94 GST_SYNC_METHOD_BURST_KEYFRAME, |
94 GST_SYNC_METHOD_BURST_KEYFRAME, |
95 GST_SYNC_METHOD_BURST_WITH_KEYFRAME |
95 GST_SYNC_METHOD_BURST_WITH_KEYFRAME |
96 } GstSyncMethod; |
96 } GstSyncMethod; |
97 |
97 |
98 /** |
98 /** |
99 * GstUnitType: |
99 * GstTCPUnitType: |
100 * @GST_UNIT_TYPE_UNDEFINED: undefined |
100 * @GST_TCP_UNIT_TYPE_UNDEFINED: undefined |
101 * @GST_UNIT_TYPE_BUFFERS : buffers |
101 * @GST_TCP_UNIT_TYPE_BUFFERS : buffers |
102 * @GST_UNIT_TYPE_TIME : timeunits (in nanoseconds) |
102 * @GST_TCP_UNIT_TYPE_TIME : timeunits (in nanoseconds) |
103 * @GST_UNIT_TYPE_BYTES : bytes |
103 * @GST_TCP_UNIT_TYPE_BYTES : bytes |
104 * |
104 * |
105 * The units used to specify limits. |
105 * The units used to specify limits. |
106 */ |
106 */ |
107 typedef enum |
107 typedef enum |
108 { |
108 { |
109 GST_UNIT_TYPE_UNDEFINED, |
109 GST_TCP_UNIT_TYPE_UNDEFINED, |
110 GST_UNIT_TYPE_BUFFERS, |
110 GST_TCP_UNIT_TYPE_BUFFERS, |
111 GST_UNIT_TYPE_TIME, |
111 GST_TCP_UNIT_TYPE_TIME, |
112 GST_UNIT_TYPE_BYTES |
112 GST_TCP_UNIT_TYPE_BYTES |
113 } GstUnitType; |
113 } GstTCPUnitType; |
114 |
114 |
115 /** |
115 /** |
116 * GstClientStatus: |
116 * GstClientStatus: |
117 * @GST_CLIENT_STATUS_OK : client is ok |
117 * @GST_CLIENT_STATUS_OK : client is ok |
118 * @GST_CLIENT_STATUS_CLOSED : client closed the socket |
118 * @GST_CLIENT_STATUS_CLOSED : client closed the socket |
160 |
160 |
161 gboolean currently_removing; |
161 gboolean currently_removing; |
162 |
162 |
163 /* method to sync client when connecting */ |
163 /* method to sync client when connecting */ |
164 GstSyncMethod sync_method; |
164 GstSyncMethod sync_method; |
165 GstUnitType burst_min_unit; |
165 GstTCPUnitType burst_min_unit; |
166 guint64 burst_min_value; |
166 guint64 burst_min_value; |
167 GstUnitType burst_max_unit; |
167 GstTCPUnitType burst_max_unit; |
168 guint64 burst_max_value; |
168 guint64 burst_max_value; |
169 |
169 |
170 GstCaps *caps; /* caps of last queued buffer */ |
170 GstCaps *caps; /* caps of last queued buffer */ |
171 |
171 |
172 /* stats */ |
172 /* stats */ |
206 GSList *streamheader; /* GSList of GstBuffers to use as streamheader */ |
206 GSList *streamheader; /* GSList of GstBuffers to use as streamheader */ |
207 gboolean previous_buffer_in_caps; |
207 gboolean previous_buffer_in_caps; |
208 |
208 |
209 GstTCPProtocol protocol; |
209 GstTCPProtocol protocol; |
210 guint mtu; |
210 guint mtu; |
|
211 gint qos_dscp; |
|
212 gboolean handle_read; |
211 |
213 |
212 GArray *bufqueue; /* global queue of buffers */ |
214 GArray *bufqueue; /* global queue of buffers */ |
213 |
215 |
214 gboolean running; /* the thread state */ |
216 gboolean running; /* the thread state */ |
215 GThread *thread; /* the sender thread */ |
217 GThread *thread; /* the sender thread */ |
216 |
218 |
217 /* these values are used to check if a client is reading fast |
219 /* these values are used to check if a client is reading fast |
218 * enough and to control receovery */ |
220 * enough and to control receovery */ |
219 GstUnitType unit_type;/* the type of the units */ |
221 GstTCPUnitType unit_type;/* the type of the units */ |
220 gint64 units_max; /* max units to queue for a client */ |
222 gint64 units_max; /* max units to queue for a client */ |
221 gint64 units_soft_max; /* max units a client can lag before recovery starts */ |
223 gint64 units_soft_max; /* max units a client can lag before recovery starts */ |
222 GstRecoverPolicy recover_policy; |
224 GstRecoverPolicy recover_policy; |
223 GstClockTime timeout; /* max amount of nanoseconds to remain idle */ |
225 GstClockTime timeout; /* max amount of nanoseconds to remain idle */ |
224 |
226 |
225 GstSyncMethod def_sync_method; /* what method to use for connecting clients */ |
227 GstSyncMethod def_sync_method; /* what method to use for connecting clients */ |
226 GstUnitType def_burst_unit; |
228 GstTCPUnitType def_burst_unit; |
227 guint64 def_burst_value; |
229 guint64 def_burst_value; |
228 |
230 |
229 /* these values are used to control the amount of data |
231 /* these values are used to control the amount of data |
230 * kept in the queues. It allows clients to perform a burst |
232 * kept in the queues. It allows clients to perform a burst |
231 * on connect. */ |
233 * on connect. */ |
232 gint bytes_min; /* min number of bytes to queue */ |
234 gint bytes_min; /* min number of bytes to queue */ |
233 gint64 time_min; /* min time to queue */ |
235 gint64 time_min; /* min time to queue */ |
234 gint buffers_min; /* min number of buffers to queue */ |
236 gint buffers_min; /* min number of buffers to queue */ |
235 |
237 |
|
238 gboolean resend_streamheader; /* resend streamheader if it changes */ |
|
239 |
236 /* stats */ |
240 /* stats */ |
237 gint buffers_queued; /* number of queued buffers */ |
241 gint buffers_queued; /* number of queued buffers */ |
238 gint bytes_queued; /* number of queued bytes */ |
242 gint bytes_queued; /* number of queued bytes */ |
239 gint time_queued; /* number of queued time */ |
243 gint time_queued; /* number of queued time */ |
240 |
244 |
245 GstBaseSinkClass parent_class; |
249 GstBaseSinkClass parent_class; |
246 |
250 |
247 /* element methods */ |
251 /* element methods */ |
248 void (*add) (GstMultiFdSink *sink, int fd); |
252 void (*add) (GstMultiFdSink *sink, int fd); |
249 void (*add_full) (GstMultiFdSink *sink, int fd, GstSyncMethod sync, |
253 void (*add_full) (GstMultiFdSink *sink, int fd, GstSyncMethod sync, |
250 GstUnitType format, guint64 value, |
254 GstTCPUnitType format, guint64 value, |
251 GstUnitType max_unit, guint64 max_value); |
255 GstTCPUnitType max_unit, guint64 max_value); |
252 void (*remove) (GstMultiFdSink *sink, int fd); |
256 void (*remove) (GstMultiFdSink *sink, int fd); |
253 void (*remove_flush) (GstMultiFdSink *sink, int fd); |
257 void (*remove_flush) (GstMultiFdSink *sink, int fd); |
254 void (*clear) (GstMultiFdSink *sink); |
258 void (*clear) (GstMultiFdSink *sink); |
255 GValueArray* (*get_stats) (GstMultiFdSink *sink, int fd); |
259 GValueArray* (*get_stats) (GstMultiFdSink *sink, int fd); |
256 |
260 |
280 #ifdef __SYMBIAN32__ |
284 #ifdef __SYMBIAN32__ |
281 IMPORT_C |
285 IMPORT_C |
282 #endif |
286 #endif |
283 |
287 |
284 void gst_multi_fd_sink_add_full (GstMultiFdSink *sink, int fd, GstSyncMethod sync, |
288 void gst_multi_fd_sink_add_full (GstMultiFdSink *sink, int fd, GstSyncMethod sync, |
285 GstUnitType min_unit, guint64 min_value, |
289 GstTCPUnitType min_unit, guint64 min_value, |
286 GstUnitType max_unit, guint64 max_value); |
290 GstTCPUnitType max_unit, guint64 max_value); |
287 #ifdef __SYMBIAN32__ |
291 #ifdef __SYMBIAN32__ |
288 IMPORT_C |
292 IMPORT_C |
289 #endif |
293 #endif |
290 |
294 |
291 void gst_multi_fd_sink_remove (GstMultiFdSink *sink, int fd); |
295 void gst_multi_fd_sink_remove (GstMultiFdSink *sink, int fd); |