| gstevent.h | gstevent.h | |||
|---|---|---|---|---|
| skipping to change at line 48 | skipping to change at line 48 | |||
| * @GST_EVENT_TYPE_UPSTREAM: Set if the event can travel upstream. | * @GST_EVENT_TYPE_UPSTREAM: Set if the event can travel upstream. | |||
| * @GST_EVENT_TYPE_DOWNSTREAM: Set if the event can travel downstream. | * @GST_EVENT_TYPE_DOWNSTREAM: Set if the event can travel downstream. | |||
| * @GST_EVENT_TYPE_SERIALIZED: Set if the event should be serialized with d ata | * @GST_EVENT_TYPE_SERIALIZED: Set if the event should be serialized with d ata | |||
| * flow. | * flow. | |||
| * | * | |||
| * #GstEventTypeFlags indicate the aspects of the different #GstEventType | * #GstEventTypeFlags indicate the aspects of the different #GstEventType | |||
| * values. You can get the type flags of a #GstEventType with the | * values. You can get the type flags of a #GstEventType with the | |||
| * gst_event_type_get_flags() function. | * gst_event_type_get_flags() function. | |||
| */ | */ | |||
| typedef enum { | typedef enum { | |||
| GST_EVENT_TYPE_UPSTREAM = 1 << 0, | GST_EVENT_TYPE_UPSTREAM = 1 << 0, | |||
| GST_EVENT_TYPE_DOWNSTREAM = 1 << 1, | GST_EVENT_TYPE_DOWNSTREAM = 1 << 1, | |||
| GST_EVENT_TYPE_SERIALIZED = 1 << 2 | GST_EVENT_TYPE_SERIALIZED = 1 << 2 | |||
| } GstEventTypeFlags; | } GstEventTypeFlags; | |||
| /** | /** | |||
| * GST_EVENT_TYPE_BOTH: | * GST_EVENT_TYPE_BOTH: | |||
| * | * | |||
| * The same thing as #GST_EVENT_TYPE_UPSTREAM | #GST_EVENT_TYPE_DOWNSTREAM. | * The same thing as #GST_EVENT_TYPE_UPSTREAM | #GST_EVENT_TYPE_DOWNSTREAM. | |||
| */ | */ | |||
| #define GST_EVENT_TYPE_BOTH \ | #define GST_EVENT_TYPE_BOTH \ | |||
| (GST_EVENT_TYPE_UPSTREAM | GST_EVENT_TYPE_DOWNSTREAM) | (GST_EVENT_TYPE_UPSTREAM | GST_EVENT_TYPE_DOWNSTREAM) | |||
| #define GST_EVENT_TYPE_SHIFT 4 | #define GST_EVENT_TYPE_SHIFT 4 | |||
| /** | /** | |||
| * GST_EVENT_MAKE_TYPE: | * GST_EVENT_MAKE_TYPE: | |||
| * @num: the event number to create | * @num: the event number to create | |||
| * @flags: the event flags | * @flags: the event flags | |||
| * | * | |||
| * when making custom event types, use this macro with the num and | * when making custom event types, use this macro with the num and | |||
| * the given flags | * the given flags | |||
| */ | */ | |||
| #define GST_EVENT_MAKE_TYPE(num,flags) \ | #define GST_EVENT_MAKE_TYPE(num,flags) \ | |||
| (((num) << GST_EVENT_TYPE_SHIFT) | (flags)) | (((num) << GST_EVENT_TYPE_SHIFT) | (flags)) | |||
| #define FLAG(name) GST_EVENT_TYPE_##name | #define FLAG(name) GST_EVENT_TYPE_##name | |||
| /** | /** | |||
| * GstEventType: | * GstEventType: | |||
| * @GST_EVENT_UNKNOWN: unknown event. | * @GST_EVENT_UNKNOWN: unknown event. | |||
| * @GST_EVENT_FLUSH_START: Start a flush operation | * @GST_EVENT_FLUSH_START: Start a flush operation. This event clears all d | |||
| * @GST_EVENT_FLUSH_STOP: Stop a flush operation | ata | |||
| * from the pipeline and unblock all streaming threads. | ||||
| * @GST_EVENT_FLUSH_STOP: Stop a flush operation. This event resets the | ||||
| * running-time of the pipeline. | ||||
| * @GST_EVENT_EOS: End-Of-Stream. No more data is to be expected to follow | * @GST_EVENT_EOS: End-Of-Stream. No more data is to be expected to follow | |||
| * without a NEWSEGMENT event. | * without a NEWSEGMENT event. | |||
| * @GST_EVENT_NEWSEGMENT: A new media segment follows in the dataflow. | * @GST_EVENT_NEWSEGMENT: A new media segment follows in the dataflow. The | |||
| * segment events contains information for clipping buffers | ||||
| and | ||||
| * converting buffer timestamps to running-time and | ||||
| * stream-time. | ||||
| * @GST_EVENT_TAG: A new set of metadata tags has been found in the stream. | * @GST_EVENT_TAG: A new set of metadata tags has been found in the stream. | |||
| * @GST_EVENT_BUFFERSIZE: Notification of buffering requirements | * @GST_EVENT_BUFFERSIZE: Notification of buffering requirements. Currently | |||
| not | ||||
| * used yet. | ||||
| * @GST_EVENT_SINK_MESSAGE: An event that sinks turn into a message. Used t | ||||
| o | ||||
| * send messages that should be emitted in sync wi | ||||
| th | ||||
| * rendering. | ||||
| * @GST_EVENT_QOS: A quality message. Used to indicate to upstream elements | * @GST_EVENT_QOS: A quality message. Used to indicate to upstream elements | |||
| * that the downstream elements are being starved of or | * that the downstream elements are being starved of or | |||
| * flooded with data. | * flooded with data. | |||
| * @GST_EVENT_SEEK: A request for a new playback position and rate. | * @GST_EVENT_SEEK: A request for a new playback position and rate. | |||
| * @GST_EVENT_NAVIGATION: Navigation events are usually used for communicat ing | * @GST_EVENT_NAVIGATION: Navigation events are usually used for communicat ing | |||
| * user requests, such as mouse or keyboard movement s, | * user requests, such as mouse or keyboard movement s, | |||
| * to upstream elements. | * to upstream elements. | |||
| * @GST_EVENT_LATENCY: Notification of new latency adjustment. Since: 0.10. | * @GST_EVENT_LATENCY: Notification of new latency adjustment. Sinks will u | |||
| 12 | se | |||
| * the latency information to adjust their synchronisat | ||||
| ion. | ||||
| * Since: 0.10.12 | ||||
| * @GST_EVENT_STEP: A request for stepping through the media. Sinks will us | ||||
| ually | ||||
| * execute the step operation. Since: 0.10.24 | ||||
| * @GST_EVENT_CUSTOM_UPSTREAM: Upstream custom event | * @GST_EVENT_CUSTOM_UPSTREAM: Upstream custom event | |||
| * @GST_EVENT_CUSTOM_DOWNSTREAM: Downstream custom event that travels in th e | * @GST_EVENT_CUSTOM_DOWNSTREAM: Downstream custom event that travels in th e | |||
| * data flow. | * data flow. | |||
| * @GST_EVENT_CUSTOM_DOWNSTREAM_OOB: Custom out-of-band downstream event. | * @GST_EVENT_CUSTOM_DOWNSTREAM_OOB: Custom out-of-band downstream event. | |||
| * @GST_EVENT_CUSTOM_BOTH: Custom upstream or downstream event. | * @GST_EVENT_CUSTOM_BOTH: Custom upstream or downstream event. | |||
| * In-band when travelling downstream. | * In-band when travelling downstream. | |||
| * @GST_EVENT_CUSTOM_BOTH_OOB: Custom upstream or downstream out-of-band ev ent. | * @GST_EVENT_CUSTOM_BOTH_OOB: Custom upstream or downstream out-of-band ev ent. | |||
| * | * | |||
| * #GstEventType lists the standard event types that can be sent in a pipel ine. | * #GstEventType lists the standard event types that can be sent in a pipel ine. | |||
| * | * | |||
| * The custom event types can be used for private messages between elements | * The custom event types can be used for private messages between elements | |||
| * that can't be expressed using normal | * that can't be expressed using normal | |||
| * GStreamer buffer passing semantics. Custom events carry an arbitrary | * GStreamer buffer passing semantics. Custom events carry an arbitrary | |||
| * #GstStructure. | * #GstStructure. | |||
| * Specific custom events are distinguished by the name of the structure. | * Specific custom events are distinguished by the name of the structure. | |||
| */ | */ | |||
| /* NOTE: keep in sync with quark registration in gstevent.c */ | /* NOTE: keep in sync with quark registration in gstevent.c */ | |||
| typedef enum { | typedef enum { | |||
| GST_EVENT_UNKNOWN = GST_EVENT_MAKE_TYPE (0, 0), | GST_EVENT_UNKNOWN = GST_EVENT_MAKE_TYPE (0, 0), | |||
| /* bidirectional events */ | /* bidirectional events */ | |||
| GST_EVENT_FLUSH_START = GST_EVENT_MAKE_TYPE (1, FLAG(BOT | GST_EVENT_FLUSH_START = GST_EVENT_MAKE_TYPE (1, FLAG(BOTH)), | |||
| H)), | GST_EVENT_FLUSH_STOP = GST_EVENT_MAKE_TYPE (2, FLAG(BOTH) | FL | |||
| GST_EVENT_FLUSH_STOP = GST_EVENT_MAKE_TYPE (2, FLAG(BOTH) | FLA | AG(SERIALIZED)), | |||
| G(SERIALIZED)), | ||||
| /* downstream serialized events */ | /* downstream serialized events */ | |||
| GST_EVENT_EOS = GST_EVENT_MAKE_TYPE (5, FLAG(DOW | GST_EVENT_EOS = GST_EVENT_MAKE_TYPE (5, FLAG(DOWNSTREAM | |||
| NSTREAM) | FLAG(SERIALIZED)), | ) | FLAG(SERIALIZED)), | |||
| GST_EVENT_NEWSEGMENT = GST_EVENT_MAKE_TYPE (6, FLAG(DOWNSTREAM) | GST_EVENT_NEWSEGMENT = GST_EVENT_MAKE_TYPE (6, FLAG(DOWNSTREAM | |||
| | FLAG(SERIALIZED)), | ) | FLAG(SERIALIZED)), | |||
| GST_EVENT_TAG = GST_EVENT_MAKE_TYPE (7, FLAG(DOW | GST_EVENT_TAG = GST_EVENT_MAKE_TYPE (7, FLAG(DOWNSTREAM | |||
| NSTREAM) | FLAG(SERIALIZED)), | ) | FLAG(SERIALIZED)), | |||
| GST_EVENT_BUFFERSIZE = GST_EVENT_MAKE_TYPE (8, FLAG(DOWNSTREAM) | GST_EVENT_BUFFERSIZE = GST_EVENT_MAKE_TYPE (8, FLAG(DOWNSTREAM | |||
| | FLAG(SERIALIZED)), | ) | FLAG(SERIALIZED)), | |||
| GST_EVENT_SINK_MESSAGE = GST_EVENT_MAKE_TYPE (9, FLAG(DOWNSTREAM | ||||
| ) | FLAG(SERIALIZED)), | ||||
| /* upstream events */ | /* upstream events */ | |||
| GST_EVENT_QOS = GST_EVENT_MAKE_TYPE (15, FLAG(UP | GST_EVENT_QOS = GST_EVENT_MAKE_TYPE (15, FLAG(UPSTREAM) | |||
| STREAM)), | ), | |||
| GST_EVENT_SEEK = GST_EVENT_MAKE_TYPE (16, FLAG(UPSTREAM)) | GST_EVENT_SEEK = GST_EVENT_MAKE_TYPE (16, FLAG(UPSTREAM) | |||
| , | ), | |||
| GST_EVENT_NAVIGATION = GST_EVENT_MAKE_TYPE (17, FLAG(UPSTREAM)) | GST_EVENT_NAVIGATION = GST_EVENT_MAKE_TYPE (17, FLAG(UPSTREAM) | |||
| , | ), | |||
| GST_EVENT_LATENCY = GST_EVENT_MAKE_TYPE (18, FLAG(UPSTREAM)) | GST_EVENT_LATENCY = GST_EVENT_MAKE_TYPE (18, FLAG(UPSTREAM) | |||
| , | ), | |||
| GST_EVENT_STEP = GST_EVENT_MAKE_TYPE (19, FLAG(UPSTREAM) | ||||
| ), | ||||
| /* custom events start here */ | /* custom events start here */ | |||
| GST_EVENT_CUSTOM_UPSTREAM = GST_EVENT_MAKE_TYPE (32, FLAG(UPSTREAM)) | GST_EVENT_CUSTOM_UPSTREAM = GST_EVENT_MAKE_TYPE (32, FLAG(UPSTREAM) | |||
| , | ), | |||
| GST_EVENT_CUSTOM_DOWNSTREAM = GST_EVENT_MAKE_TYPE (32, FLAG(DOWNSTREAM | GST_EVENT_CUSTOM_DOWNSTREAM = GST_EVENT_MAKE_TYPE (32, FLAG(DOWNSTREA | |||
| ) | FLAG(SERIALIZED)), | M) | FLAG(SERIALIZED)), | |||
| GST_EVENT_CUSTOM_DOWNSTREAM_OOB = GST_EVENT_MAKE_TYPE (32, FLAG(DOWNSTREA M)), | GST_EVENT_CUSTOM_DOWNSTREAM_OOB = GST_EVENT_MAKE_TYPE (32, FLAG(DOWNSTREA M)), | |||
| GST_EVENT_CUSTOM_BOTH = GST_EVENT_MAKE_TYPE (32, FLAG(BO | GST_EVENT_CUSTOM_BOTH = GST_EVENT_MAKE_TYPE (32, FLAG(BOTH) | F | |||
| TH) | FLAG(SERIALIZED)), | LAG(SERIALIZED)), | |||
| GST_EVENT_CUSTOM_BOTH_OOB = GST_EVENT_MAKE_TYPE (32, FLAG(BOTH)) | GST_EVENT_CUSTOM_BOTH_OOB = GST_EVENT_MAKE_TYPE (32, FLAG(BOTH)) | |||
| } GstEventType; | } GstEventType; | |||
| #undef FLAG | #undef FLAG | |||
| /** | /** | |||
| * GST_EVENT_TRACE_NAME: | * GST_EVENT_TRACE_NAME: | |||
| * | * | |||
| * The name used for memory allocation tracing | * The name used for memory allocation tracing | |||
| */ | */ | |||
| #define GST_EVENT_TRACE_NAME "GstEvent" | #define GST_EVENT_TRACE_NAME "GstEvent" | |||
| typedef struct _GstEvent GstEvent; | typedef struct _GstEvent GstEvent; | |||
| typedef struct _GstEventClass GstEventClass; | typedef struct _GstEventClass GstEventClass; | |||
| #define GST_TYPE_EVENT (gst_event_get_type()) | #define GST_TYPE_EVENT (gst_event_get_type()) | |||
| #define GST_IS_EVENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_EVENT)) | #define GST_IS_EVENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_EVENT)) | |||
| #define GST_IS_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_EVENT)) | #define GST_IS_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_EVENT)) | |||
| #define GST_EVENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_EVENT, GstEventClass)) | #define GST_EVENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_EVENT, GstEventClass)) | |||
| #define GST_EVENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_EVENT, GstEvent)) | #define GST_EVENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_EVENT, GstEvent)) | |||
| #define GST_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_EVENT, GstEventClass)) | #define GST_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_EVENT, GstEventClass)) | |||
| #define GST_EVENT_CAST(obj) ((GstEvent *)(obj)) | #define GST_EVENT_CAST(obj) ((GstEvent *)(obj)) | |||
| /** | /** | |||
| * GST_EVENT_TYPE: | * GST_EVENT_TYPE: | |||
| * @event: the event to query | * @event: the event to query | |||
| * | * | |||
| * Get the #GstEventType of the event. | * Get the #GstEventType of the event. | |||
| */ | */ | |||
| #define GST_EVENT_TYPE(event) (GST_EVENT_CAST(event)->type) | #define GST_EVENT_TYPE(event) (GST_EVENT_CAST(event)->type) | |||
| /** | /** | |||
| * GST_EVENT_TYPE_NAME: | * GST_EVENT_TYPE_NAME: | |||
| * @event: the event to query | * @event: the event to query | |||
| * | * | |||
| * Get a constant string representation of the #GstEventType of the event. | * Get a constant string representation of the #GstEventType of the event. | |||
| */ | */ | |||
| #define GST_EVENT_TYPE_NAME(event) (gst_event_type_get_name(GST_EVENT_T YPE(event))) | #define GST_EVENT_TYPE_NAME(event) (gst_event_type_get_name(GST_EVENT_ TYPE(event))) | |||
| /** | /** | |||
| * GST_EVENT_TIMESTAMP: | * GST_EVENT_TIMESTAMP: | |||
| * @event: the event to query | * @event: the event to query | |||
| * | * | |||
| * Get the #GstClockTime timestamp of the event. This is the time when the event | * Get the #GstClockTime timestamp of the event. This is the time when the event | |||
| * was created. | * was created. | |||
| */ | */ | |||
| #define GST_EVENT_TIMESTAMP(event) (GST_EVENT_CAST(event)->timestamp) | #define GST_EVENT_TIMESTAMP(event) (GST_EVENT_CAST(event)->timestamp) | |||
| /** | /** | |||
| * GST_EVENT_SRC: | * GST_EVENT_SRC: | |||
| * @event: the event to query | * @event: the event to query | |||
| * | * | |||
| * The source #GstObject that generated this event. | * The source #GstObject that generated this event. | |||
| */ | */ | |||
| #define GST_EVENT_SRC(event) (GST_EVENT_CAST(event)->src) | #define GST_EVENT_SRC(event) (GST_EVENT_CAST(event)->src) | |||
| /** | /** | |||
| * GST_EVENT_IS_UPSTREAM: | * GST_EVENT_IS_UPSTREAM: | |||
| * @ev: the event to query | * @ev: the event to query | |||
| * | * | |||
| * Check if an event can travel upstream. | * Check if an event can travel upstream. | |||
| */ | */ | |||
| #define GST_EVENT_IS_UPSTREAM(ev) !!(GST_EVENT_TYPE (ev) & GST_EVENT_T YPE_UPSTREAM) | #define GST_EVENT_IS_UPSTREAM(ev) !!(GST_EVENT_TYPE (ev) & GST_EVENT_ TYPE_UPSTREAM) | |||
| /** | /** | |||
| * GST_EVENT_IS_DOWNSTREAM: | * GST_EVENT_IS_DOWNSTREAM: | |||
| * @ev: the event to query | * @ev: the event to query | |||
| * | * | |||
| * Check if an event can travel downstream. | * Check if an event can travel downstream. | |||
| */ | */ | |||
| #define GST_EVENT_IS_DOWNSTREAM(ev) !!(GST_EVENT_TYPE (ev) & GST_EVENT_T YPE_DOWNSTREAM) | #define GST_EVENT_IS_DOWNSTREAM(ev) !!(GST_EVENT_TYPE (ev) & GST_EVENT_ TYPE_DOWNSTREAM) | |||
| /** | /** | |||
| * GST_EVENT_IS_SERIALIZED: | * GST_EVENT_IS_SERIALIZED: | |||
| * @ev: the event to query | * @ev: the event to query | |||
| * | * | |||
| * Check if an event is serialized with the data stream. | * Check if an event is serialized with the data stream. | |||
| */ | */ | |||
| #define GST_EVENT_IS_SERIALIZED(ev) !!(GST_EVENT_TYPE (ev) & GST_EVENT_T YPE_SERIALIZED) | #define GST_EVENT_IS_SERIALIZED(ev) !!(GST_EVENT_TYPE (ev) & GST_EVENT_ TYPE_SERIALIZED) | |||
| /** | /** | |||
| * gst_event_replace: | * gst_event_replace: | |||
| * @old_event: pointer to a pointer to a #GstEvent to be replaced. | * @old_event: (inout) (transfer full): pointer to a pointer to a #GstEvent | |||
| * @new_event: pointer to a #GstEvent that will replace the event pointed t | * to be replaced. | |||
| o | * @new_event: (allow-none) (transfer none): pointer to a #GstEvent that wi | |||
| * by @old_event. | ll | |||
| * replace the event pointed to by @old_event. | ||||
| * | * | |||
| * Modifies a pointer to a #GstEvent to point to a different #GstEvent. The | * Modifies a pointer to a #GstEvent to point to a different #GstEvent. The | |||
| * modification is done atomically (so this is useful for ensuring thread s afety | * modification is done atomically (so this is useful for ensuring thread s afety | |||
| * in some cases), and the reference counts are updated appropriately (the old | * in some cases), and the reference counts are updated appropriately (the old | |||
| * event is unreffed, the new one is reffed). | * event is unreffed, the new one is reffed). | |||
| * | * | |||
| * Either @new_event or the #GstEvent pointed to by @old_event may be NULL. | * Either @new_event or the #GstEvent pointed to by @old_event may be NULL. | |||
| * | * | |||
| * Since: 0.10.3 | * Since: 0.10.3 | |||
| */ | */ | |||
| #define gst_event_replace(old_event,new_event) \ | #define gst_event_replace(old_event,new_event) \ | |||
| gst_mini_object_replace ((GstMiniObject **)(old_event), GST_MINI_OBJECT | gst_mini_object_replace ((GstMiniObject **)(old_event), GST_MINI_OBJECT | |||
| (new_event)) | _CAST (new_event)) | |||
| /** | /** | |||
| * GstSeekType: | * GstSeekType: | |||
| * @GST_SEEK_TYPE_NONE: no change in position is required | * @GST_SEEK_TYPE_NONE: no change in position is required | |||
| * @GST_SEEK_TYPE_CUR: change relative to currently configured segment. Thi s | * @GST_SEEK_TYPE_CUR: change relative to currently configured segment. Thi s | |||
| * can't be used to seek relative to the current playback position - do a | * can't be used to seek relative to the current playback position - do a | |||
| * position query, calculate the desired position and then do an absolut e | * position query, calculate the desired position and then do an absolut e | |||
| * position seek instead if that's what you want to do. | * position seek instead if that's what you want to do. | |||
| * @GST_SEEK_TYPE_SET: absolute position is requested | * @GST_SEEK_TYPE_SET: absolute position is requested | |||
| * @GST_SEEK_TYPE_END: relative position to duration is requested | * @GST_SEEK_TYPE_END: relative position to duration is requested | |||
| * | * | |||
| * The different types of seek events. When constructing a seek event with | * The different types of seek events. When constructing a seek event with | |||
| * gst_event_new_seek(), a format, a seek method and optional flags are to | * gst_event_new_seek(), a format, a seek method and optional flags are to | |||
| * be provided. The seek event is then inserted into the graph with | * be provided. The seek event is then inserted into the graph with | |||
| * gst_pad_send_event() or gst_element_send_event(). | * gst_pad_send_event() or gst_element_send_event(). | |||
| */ | */ | |||
| typedef enum { | typedef enum { | |||
| /* one of these */ | /* one of these */ | |||
| GST_SEEK_TYPE_NONE = 0, | GST_SEEK_TYPE_NONE = 0, | |||
| GST_SEEK_TYPE_CUR = 1, | GST_SEEK_TYPE_CUR = 1, | |||
| GST_SEEK_TYPE_SET = 2, | GST_SEEK_TYPE_SET = 2, | |||
| GST_SEEK_TYPE_END = 3 | GST_SEEK_TYPE_END = 3 | |||
| } GstSeekType; | } GstSeekType; | |||
| /** | /** | |||
| * GstSeekFlags: | * GstSeekFlags: | |||
| * @GST_SEEK_FLAG_NONE: no flag | * @GST_SEEK_FLAG_NONE: no flag | |||
| * @GST_SEEK_FLAG_FLUSH: flush pipeline | * @GST_SEEK_FLAG_FLUSH: flush pipeline | |||
| * @GST_SEEK_FLAG_ACCURATE: accurate position is requested, this might | * @GST_SEEK_FLAG_ACCURATE: accurate position is requested, this might | |||
| * be considerably slower for some formats. | * be considerably slower for some formats. | |||
| * @GST_SEEK_FLAG_KEY_UNIT: seek to the nearest keyframe. This might be | * @GST_SEEK_FLAG_KEY_UNIT: seek to the nearest keyframe. This might be | |||
| * faster but less accurate. | * faster but less accurate. | |||
| * @GST_SEEK_FLAG_SEGMENT: perform a segment seek. | * @GST_SEEK_FLAG_SEGMENT: perform a segment seek. | |||
| * @GST_SEEK_FLAG_SKIP: when doing fast foward or fast reverse playback, al low | * @GST_SEEK_FLAG_SKIP: when doing fast foward or fast reverse playback, al low | |||
| * elements to skip frames instead of generating all | * elements to skip frames instead of generating all | |||
| * frames. Since 0.10.22. | * frames. Since 0.10.22. | |||
| * | * | |||
| * Flags to be used with gst_element_seek() or gst_event_new_seek(). All fl ags | * Flags to be used with gst_element_seek() or gst_event_new_seek(). All fl ags | |||
| * can be used together. | * can be used together. | |||
| * | * | |||
| * A non flushing seek might take some time to perform as the currently | * A non flushing seek might take some time to perform as the currently | |||
| * playing data in the pipeline will not be cleared. | * playing data in the pipeline will not be cleared. | |||
| skipping to change at line 286 | skipping to change at line 302 | |||
| * When this message is posted, it is possible to send a new seek event to | * When this message is posted, it is possible to send a new seek event to | |||
| * continue playback. With this seek method it is possible to perform seeml ess | * continue playback. With this seek method it is possible to perform seeml ess | |||
| * looping or simple linear editing. | * looping or simple linear editing. | |||
| * | * | |||
| * When doing fast forward (rate > 1.0) or fast reverse (rate < -1.0) trick mode | * When doing fast forward (rate > 1.0) or fast reverse (rate < -1.0) trick mode | |||
| * playback, the @GST_SEEK_FLAG_SKIP flag can be used to instruct decoders | * playback, the @GST_SEEK_FLAG_SKIP flag can be used to instruct decoders | |||
| * and demuxers to adjust the playback rate by skipping frames. This can im prove | * and demuxers to adjust the playback rate by skipping frames. This can im prove | |||
| * performance and decrease CPU usage because not all frames need to be dec oded. | * performance and decrease CPU usage because not all frames need to be dec oded. | |||
| */ | */ | |||
| typedef enum { | typedef enum { | |||
| GST_SEEK_FLAG_NONE = 0, | GST_SEEK_FLAG_NONE = 0, | |||
| GST_SEEK_FLAG_FLUSH = (1 << 0), | GST_SEEK_FLAG_FLUSH = (1 << 0), | |||
| GST_SEEK_FLAG_ACCURATE = (1 << 1), | GST_SEEK_FLAG_ACCURATE = (1 << 1), | |||
| GST_SEEK_FLAG_KEY_UNIT = (1 << 2), | GST_SEEK_FLAG_KEY_UNIT = (1 << 2), | |||
| GST_SEEK_FLAG_SEGMENT = (1 << 3), | GST_SEEK_FLAG_SEGMENT = (1 << 3), | |||
| GST_SEEK_FLAG_SKIP = (1 << 4) | GST_SEEK_FLAG_SKIP = (1 << 4) | |||
| } GstSeekFlags; | } GstSeekFlags; | |||
| /** | /** | |||
| * GstEvent: | * GstEvent: | |||
| * @mini_object: the parent structure | * @mini_object: the parent structure | |||
| * @type: the #GstEventType of the event | * @type: the #GstEventType of the event | |||
| * @timestamp: the timestamp of the event | * @timestamp: the timestamp of the event | |||
| * @src: the src of the event | * @src: the src of the event | |||
| * @structure: the #GstStructure containing the event info. | * @structure: the #GstStructure containing the event info. | |||
| * | * | |||
| * A #GstEvent. | * A #GstEvent. | |||
| */ | */ | |||
| struct _GstEvent { | struct _GstEvent { | |||
| GstMiniObject mini_object; | GstMiniObject mini_object; | |||
| /*< public >*/ /* with COW */ | /*< public >*/ /* with COW */ | |||
| GstEventType type; | GstEventType type; | |||
| guint64 timestamp; | guint64 timestamp; | |||
| GstObject *src; | GstObject *src; | |||
| GstStructure *structure; | GstStructure *structure; | |||
| /*< private >*/ | /*< private >*/ | |||
| union { | union { | |||
| guint32 seqnum; | guint32 seqnum; | |||
| gpointer _gst_reserved; | gpointer _gst_reserved; | |||
| } abidata; | } abidata; | |||
| }; | }; | |||
| struct _GstEventClass { | struct _GstEventClass { | |||
| GstMiniObjectClass mini_object_class; | GstMiniObjectClass mini_object_class; | |||
| /*< private >*/ | /*< private >*/ | |||
| gpointer _gst_reserved[GST_PADDING]; | gpointer _gst_reserved[GST_PADDING]; | |||
| }; | }; | |||
| const gchar* gst_event_type_get_name (GstEventType type); | const gchar* gst_event_type_get_name (GstEventType type); | |||
| GQuark gst_event_type_to_quark (GstEventType type); | GQuark gst_event_type_to_quark (GstEventType type); | |||
| GstEventTypeFlags | GstEventTypeFlags | |||
| gst_event_type_get_flags (GstEventType type); | gst_event_type_get_flags (GstEventType type); | |||
| GType gst_event_get_type (void); | GType gst_event_get_type (void); | |||
| /* refcounting */ | /* refcounting */ | |||
| /** | /** | |||
| * gst_event_ref: | * gst_event_ref: | |||
| * @event: The event to refcount | * @event: The event to refcount | |||
| * | * | |||
| * Increase the refcount of this event. | * Increase the refcount of this event. | |||
| * | * | |||
| * Returns: @event (for convenience when doing assignments) | * Returns: (transfer full): @event (for convenience when doing assignments ) | |||
| */ | */ | |||
| #ifdef _FOOL_GTK_DOC_ | #ifdef _FOOL_GTK_DOC_ | |||
| G_INLINE_FUNC GstEvent * gst_event_ref (GstEvent * event); | G_INLINE_FUNC GstEvent * gst_event_ref (GstEvent * event); | |||
| #endif | #endif | |||
| static inline GstEvent * | static inline GstEvent * | |||
| gst_event_ref (GstEvent * event) | gst_event_ref (GstEvent * event) | |||
| { | { | |||
| return (GstEvent *) gst_mini_object_ref (GST_MINI_OBJECT (event)); | return (GstEvent *) gst_mini_object_ref (GST_MINI_OBJECT_CAST (event)); | |||
| } | } | |||
| /** | /** | |||
| * gst_event_unref: | * gst_event_unref: | |||
| * @event: The event to refcount | * @event: (transfer full): the event to refcount | |||
| * | * | |||
| * Decrease the refcount of an event, freeing it if the refcount reaches 0. | * Decrease the refcount of an event, freeing it if the refcount reaches 0. | |||
| */ | */ | |||
| #ifdef _FOOL_GTK_DOC_ | #ifdef _FOOL_GTK_DOC_ | |||
| G_INLINE_FUNC void gst_event_unref (GstEvent * event); | G_INLINE_FUNC void gst_event_unref (GstEvent * event); | |||
| #endif | #endif | |||
| static inline void | static inline void | |||
| gst_event_unref (GstEvent * event) | gst_event_unref (GstEvent * event) | |||
| { | { | |||
| gst_mini_object_unref (GST_MINI_OBJECT (event)); | gst_mini_object_unref (GST_MINI_OBJECT_CAST (event)); | |||
| } | } | |||
| /* copy event */ | /* copy event */ | |||
| /** | /** | |||
| * gst_event_copy: | * gst_event_copy: | |||
| * @event: The event to copy | * @event: The event to copy | |||
| * | * | |||
| * Copy the event using the event specific copy function. | * Copy the event using the event specific copy function. | |||
| * | ||||
| * Returns: (transfer full): the new event | ||||
| */ | */ | |||
| #ifdef _FOOL_GTK_DOC_ | #ifdef _FOOL_GTK_DOC_ | |||
| G_INLINE_FUNC void gst_event_copy (GstEvent * event); | G_INLINE_FUNC GstEvent * gst_event_copy (const GstEvent * event); | |||
| #endif | #endif | |||
| static inline GstEvent * | static inline GstEvent * | |||
| gst_event_copy (const GstEvent * event) | gst_event_copy (const GstEvent * event) | |||
| { | { | |||
| return GST_EVENT_CAST (gst_mini_object_copy (GST_MINI_OBJECT (event))); | return GST_EVENT_CAST (gst_mini_object_copy (GST_MINI_OBJECT_CONST_CAST ( event))); | |||
| } | } | |||
| /* custom event */ | /* custom event */ | |||
| GstEvent* gst_event_new_custom (GstEventType type, GstStruc ture *structure); | GstEvent* gst_event_new_custom (GstEventType type, GstStru cture *structure); | |||
| const GstStructure * | const GstStructure * | |||
| gst_event_get_structure (GstEvent *event); | gst_event_get_structure (GstEvent *event); | |||
| gboolean gst_event_has_name (GstEvent *event, const gch ar *name); | gboolean gst_event_has_name (GstEvent *event, const gch ar *name); | |||
| /* identifiers for events and messages */ | /* identifiers for events and messages */ | |||
| guint32 gst_event_get_seqnum (GstEvent *event); | guint32 gst_event_get_seqnum (GstEvent *event); | |||
| void gst_event_set_seqnum (GstEvent *event, guint32 s eqnum); | void gst_event_set_seqnum (GstEvent *event, guint32 s eqnum); | |||
| /* flush events */ | /* flush events */ | |||
| GstEvent * gst_event_new_flush_start (void); | GstEvent * gst_event_new_flush_start (void); | |||
| GstEvent * gst_event_new_flush_stop (void); | GstEvent * gst_event_new_flush_stop (void); | |||
| /* EOS event */ | /* EOS event */ | |||
| GstEvent * gst_event_new_eos (void); | GstEvent * gst_event_new_eos (void); | |||
| /* newsegment events */ | /* newsegment events */ | |||
| GstEvent* gst_event_new_new_segment (gboolean update, gdouble ra te, | GstEvent* gst_event_new_new_segment (gboolean update, gdouble r ate, | |||
| GstFormat format, | GstFormat format, | |||
| gint64 start, gint64 stop, | gint64 start, gint64 stop, | |||
| gint64 position); | gint64 position); | |||
| GstEvent* gst_event_new_new_segment_full (gboolean update, gdouble ra | GstEvent* gst_event_new_new_segment_full (gboolean update, gdouble r | |||
| te, | ate, | |||
| gdouble applied_rate, | gdouble applied_rate, | |||
| GstFormat format, | GstFormat format, | |||
| gint64 start, gint64 stop, | gint64 start, gint64 stop, | |||
| gint64 position); | gint64 position); | |||
| void gst_event_parse_new_segment (GstEvent *event, | void gst_event_parse_new_segment (GstEvent *event, | |||
| gboolean *update, | gboolean *update, | |||
| gdouble *rate, | gdouble *rate, | |||
| GstFormat *format, | GstFormat *format, | |||
| gint64 *start, gint64 *sto p, | gint64 *start, gint64 *sto p, | |||
| gint64 *position); | gint64 *position); | |||
| void gst_event_parse_new_segment_full (GstEvent *event, | void gst_event_parse_new_segment_full (GstEvent *event, | |||
| gboolean *update, | gboolean *update, | |||
| gdouble *rate, | gdouble *rate, | |||
| gdouble *applied_rate, | gdouble *applied_rate, | |||
| GstFormat *format, | GstFormat *format, | |||
| gint64 *start, gint64 *sto p, | gint64 *start, gint64 *sto p, | |||
| gint64 *position); | gint64 *position); | |||
| /* tag event */ | /* tag event */ | |||
| GstEvent* gst_event_new_tag (GstTagList *taglist); | GstEvent* gst_event_new_tag (GstTagList *taglist); | |||
| void gst_event_parse_tag (GstEvent *event, GstTagList | void gst_event_parse_tag (GstEvent *event, GstTagLis | |||
| **taglist); | t **taglist); | |||
| /* buffer */ | /* buffer */ | |||
| GstEvent * gst_event_new_buffer_size (GstFormat format, gint64 mi | GstEvent * gst_event_new_buffer_size (GstFormat format, gint64 m | |||
| nsize, gint64 maxsize, | insize, gint64 maxsize, | |||
| gboolean async); | gboolean async); | |||
| void gst_event_parse_buffer_size (GstEvent *event, GstFormat | void gst_event_parse_buffer_size (GstEvent *event, GstFormat | |||
| *format, gint64 *minsize, | *format, gint64 *minsize, | |||
| gint64 *maxsize, gboolean * | gint64 *maxsize, gboolean | |||
| async); | *async); | |||
| /* QOS events */ | /* QOS events */ | |||
| GstEvent* gst_event_new_qos (gdouble proportion, GstCloc | GstEvent* gst_event_new_qos (gdouble proportion, GstClo | |||
| kTimeDiff diff, | ckTimeDiff diff, | |||
| GstClockTime timestamp); | GstClockTime timestamp); | |||
| void gst_event_parse_qos (GstEvent *event, gdouble *p | void gst_event_parse_qos (GstEvent *event, gdouble * | |||
| roportion, GstClockTimeDiff *diff, | proportion, GstClockTimeDiff *diff, | |||
| GstClockTime *timestamp); | GstClockTime *timestamp); | |||
| /* seek event */ | /* seek event */ | |||
| GstEvent* gst_event_new_seek (gdouble rate, GstFormat for | GstEvent* gst_event_new_seek (gdouble rate, GstFormat fo | |||
| mat, GstSeekFlags flags, | rmat, GstSeekFlags flags, | |||
| GstSeekType start_type, gin | GstSeekType start_type, gi | |||
| t64 start, | nt64 start, | |||
| GstSeekType stop_type, gint | GstSeekType stop_type, gin | |||
| 64 stop); | t64 stop); | |||
| void gst_event_parse_seek (GstEvent *event, gdouble *r | void gst_event_parse_seek (GstEvent *event, gdouble * | |||
| ate, GstFormat *format, | rate, GstFormat *format, | |||
| GstSeekFlags *flags, | GstSeekFlags *flags, | |||
| GstSeekType *start_type, gi | GstSeekType *start_type, g | |||
| nt64 *start, | int64 *start, | |||
| GstSeekType *stop_type, gin | GstSeekType *stop_type, gi | |||
| t64 *stop); | nt64 *stop); | |||
| /* navigation event */ | /* navigation event */ | |||
| GstEvent* gst_event_new_navigation (GstStructure *structure); | GstEvent* gst_event_new_navigation (GstStructure *structure); | |||
| /* latency event */ | /* latency event */ | |||
| GstEvent* gst_event_new_latency (GstClockTime latency); | GstEvent* gst_event_new_latency (GstClockTime latency); | |||
| void gst_event_parse_latency (GstEvent *event, GstClockTi | void gst_event_parse_latency (GstEvent *event, GstClockT | |||
| me *latency); | ime *latency); | |||
| /* step event */ | ||||
| GstEvent* gst_event_new_step (GstFormat format, guint64 | ||||
| amount, gdouble rate, | ||||
| gboolean flush, gboolean i | ||||
| ntermediate); | ||||
| void gst_event_parse_step (GstEvent *event, GstFormat | ||||
| *format, guint64 *amount, | ||||
| gdouble *rate, gboolean *f | ||||
| lush, gboolean *intermediate); | ||||
| G_END_DECLS | G_END_DECLS | |||
| #endif /* __GST_EVENT_H__ */ | #endif /* __GST_EVENT_H__ */ | |||
| End of changes. 55 change blocks. | ||||
| 127 lines changed or deleted | 163 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||