Use double durations for audio and video.
This commit is contained in:
parent
237e7c98dd
commit
60fbdf148b
@ -288,7 +288,7 @@ int guac_protocol_send_sync(guac_socket* socket, guac_timestamp timestamp);
|
|||||||
* @return Zero on success, non-zero on error.
|
* @return Zero on success, non-zero on error.
|
||||||
*/
|
*/
|
||||||
int guac_protocol_send_audio(guac_socket* socket, int channel,
|
int guac_protocol_send_audio(guac_socket* socket, int channel,
|
||||||
const char* mimetype, int duration, void* data, int size);
|
const char* mimetype, double duration, void* data, int size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Begins a audio instruction over the given guac_socket connection. Only the
|
* Begins a audio instruction over the given guac_socket connection. Only the
|
||||||
@ -315,7 +315,7 @@ int guac_protocol_send_audio(guac_socket* socket, int channel,
|
|||||||
* @return Zero on success, non-zero on error.
|
* @return Zero on success, non-zero on error.
|
||||||
*/
|
*/
|
||||||
int guac_protocol_send_audio_header(guac_socket* socket,
|
int guac_protocol_send_audio_header(guac_socket* socket,
|
||||||
int channel, const char* mimetype, int duration, int size);
|
int channel, const char* mimetype, double duration, int size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes a block of audio data to the currently in-progress audio instruction
|
* Writes a block of audio data to the currently in-progress audio instruction
|
||||||
@ -438,7 +438,7 @@ int guac_protocol_send_file_end(guac_socket* socket);
|
|||||||
* @return Zero on success, non-zero on error.
|
* @return Zero on success, non-zero on error.
|
||||||
*/
|
*/
|
||||||
int guac_protocol_send_video(guac_socket* socket, const guac_layer* layer,
|
int guac_protocol_send_video(guac_socket* socket, const guac_layer* layer,
|
||||||
const char* mimetype, int duration, void* data, int size);
|
const char* mimetype, double duration, void* data, int size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Begins a video instruction over the given guac_socket connection. Only the
|
* Begins a video instruction over the given guac_socket connection. Only the
|
||||||
@ -465,7 +465,7 @@ int guac_protocol_send_video(guac_socket* socket, const guac_layer* layer,
|
|||||||
* @return Zero on success, non-zero on error.
|
* @return Zero on success, non-zero on error.
|
||||||
*/
|
*/
|
||||||
int guac_protocol_send_video_header(guac_socket* socket,
|
int guac_protocol_send_video_header(guac_socket* socket,
|
||||||
const guac_layer* layer, const char* mimetype, int duration, int size);
|
const guac_layer* layer, const char* mimetype, double duration, int size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes a block of video data to the currently in-progress video instruction
|
* Writes a block of video data to the currently in-progress video instruction
|
||||||
|
@ -400,7 +400,7 @@ int guac_protocol_send_arc(guac_socket* socket, const guac_layer* layer,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int guac_protocol_send_audio(guac_socket* socket, int channel,
|
int guac_protocol_send_audio(guac_socket* socket, int channel,
|
||||||
const char* mimetype, int duration, void* data, int size) {
|
const char* mimetype, double duration, void* data, int size) {
|
||||||
|
|
||||||
return
|
return
|
||||||
guac_protocol_send_audio_header(socket, channel,
|
guac_protocol_send_audio_header(socket, channel,
|
||||||
@ -411,7 +411,7 @@ int guac_protocol_send_audio(guac_socket* socket, int channel,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int guac_protocol_send_audio_header(guac_socket* socket,
|
int guac_protocol_send_audio_header(guac_socket* socket,
|
||||||
int channel, const char* mimetype, int duration, int size) {
|
int channel, const char* mimetype, double duration, int size) {
|
||||||
|
|
||||||
int base64_length = (size + 2) / 3 * 4;
|
int base64_length = (size + 2) / 3 * 4;
|
||||||
|
|
||||||
@ -421,7 +421,7 @@ int guac_protocol_send_audio_header(guac_socket* socket,
|
|||||||
|| guac_socket_write_string(socket, ",")
|
|| guac_socket_write_string(socket, ",")
|
||||||
|| __guac_socket_write_length_string(socket, mimetype)
|
|| __guac_socket_write_length_string(socket, mimetype)
|
||||||
|| guac_socket_write_string(socket, ",")
|
|| guac_socket_write_string(socket, ",")
|
||||||
|| __guac_socket_write_length_int(socket, duration)
|
|| __guac_socket_write_length_double(socket, duration)
|
||||||
|| guac_socket_write_string(socket, ",")
|
|| guac_socket_write_string(socket, ",")
|
||||||
|| guac_socket_write_int(socket, base64_length)
|
|| guac_socket_write_int(socket, base64_length)
|
||||||
|| guac_socket_write_string(socket, ".");
|
|| guac_socket_write_string(socket, ".");
|
||||||
@ -1009,7 +1009,7 @@ int guac_protocol_send_transform(guac_socket* socket, const guac_layer* layer,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int guac_protocol_send_video(guac_socket* socket, const guac_layer* layer,
|
int guac_protocol_send_video(guac_socket* socket, const guac_layer* layer,
|
||||||
const char* mimetype, int duration, void* data, int size) {
|
const char* mimetype, double duration, void* data, int size) {
|
||||||
|
|
||||||
return
|
return
|
||||||
guac_protocol_send_video_header(socket, layer,
|
guac_protocol_send_video_header(socket, layer,
|
||||||
@ -1020,7 +1020,7 @@ int guac_protocol_send_video(guac_socket* socket, const guac_layer* layer,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int guac_protocol_send_video_header(guac_socket* socket,
|
int guac_protocol_send_video_header(guac_socket* socket,
|
||||||
const guac_layer* layer, const char* mimetype, int duration, int size) {
|
const guac_layer* layer, const char* mimetype, double duration, int size) {
|
||||||
|
|
||||||
int base64_length = (size + 2) / 3 * 4;
|
int base64_length = (size + 2) / 3 * 4;
|
||||||
|
|
||||||
@ -1030,7 +1030,7 @@ int guac_protocol_send_video_header(guac_socket* socket,
|
|||||||
|| guac_socket_write_string(socket, ",")
|
|| guac_socket_write_string(socket, ",")
|
||||||
|| __guac_socket_write_length_string(socket, mimetype)
|
|| __guac_socket_write_length_string(socket, mimetype)
|
||||||
|| guac_socket_write_string(socket, ",")
|
|| guac_socket_write_string(socket, ",")
|
||||||
|| __guac_socket_write_length_int(socket, duration)
|
|| __guac_socket_write_length_double(socket, duration)
|
||||||
|| guac_socket_write_string(socket, ",")
|
|| guac_socket_write_string(socket, ",")
|
||||||
|| guac_socket_write_int(socket, base64_length)
|
|| guac_socket_write_int(socket, base64_length)
|
||||||
|| guac_socket_write_string(socket, ".");
|
|| guac_socket_write_string(socket, ".");
|
||||||
|
Loading…
Reference in New Issue
Block a user