[aravis/resend] gv_stream: prepare to the 2 different methods for packet request decision.



commit ec0478a46f0661802c893b39eef6c20c850dee3b
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Sun Feb 20 21:50:11 2011 +0100

    gv_stream: prepare to the 2 different methods for packet request decision.

 src/arvgvstream.c |    4 ++--
 src/arvgvstream.h |    8 ++++++--
 2 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/arvgvstream.c b/src/arvgvstream.c
index 5a805eb..b51d647 100644
--- a/src/arvgvstream.c
+++ b/src/arvgvstream.c
@@ -442,7 +442,7 @@ arv_gv_stream_new (GInetAddress *device_address, guint16 port,
 	thread_data->user_data = user_data;
 	thread_data->socket = gv_stream->socket;
 	thread_data->device_address = g_inet_socket_address_new (device_address, ARV_GVCP_PORT);
-	thread_data->packet_resend = ARV_GV_STREAM_PACKET_RESEND_ALWAYS;
+	thread_data->packet_resend = ARV_GV_STREAM_PACKET_RESEND_BOTH;
 	thread_data->timestamp_tick_frequency = timestamp_tick_frequency;
 	thread_data->cancel = FALSE;
 
@@ -653,7 +653,7 @@ arv_gv_stream_class_init (ArvGvStreamClass *gv_stream_class)
 		g_param_spec_enum ("packet-resend", "Packet resend",
 				   "Packet resend behaviour",
 				   ARV_TYPE_GV_STREAM_PACKET_RESEND,
-				   ARV_GV_STREAM_PACKET_RESEND_ALWAYS,
+				   ARV_GV_STREAM_PACKET_RESEND_BOTH,
 				   G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
 		);
 }
diff --git a/src/arvgvstream.h b/src/arvgvstream.h
index e2d7880..a02bf30 100644
--- a/src/arvgvstream.h
+++ b/src/arvgvstream.h
@@ -43,12 +43,16 @@ typedef enum {
 /**
  * ArvGvStreamPacketResend:
  * @ARV_GV_STREAM_PACKET_RESEND_NEVER: never request a packet resend
- * @ARV_GV_STREAM_PACKET_RESEND_ALWAYS: request a packet resend if a packet was missing
+ * @ARV_GV_STREAM_PACKET_RESEND_WINDOW: packet resend request based on receive window
+ * @ARV_GV_STREAM_PACKET_RESEND_TIMEOUT: packet resend request based on timeout
+ * @ARV_GV_STREAM_PACKET_RESEND_BOTH: packet resend request based on receive window and timeout
  */
 
 typedef enum {
 	ARV_GV_STREAM_PACKET_RESEND_NEVER,
-	ARV_GV_STREAM_PACKET_RESEND_ALWAYS
+	ARV_GV_STREAM_PACKET_RESEND_WINDOW	= 1,
+	ARV_GV_STREAM_PACKET_RESEND_TIMEOUT	= 2,
+	ARV_GV_STREAM_PACKET_RESEND_BOTH	= 3,
 } ArvGvStreamPacketResend;
 
 #define ARV_TYPE_GV_STREAM             (arv_gv_stream_get_type ())



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]