2001-08-06 20:40:45 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
* 2000 Wim Taymans <wim.taymans@chello.be>
|
Some docs updates
Original commit message from CVS:
* CHANGES-0.9:
* docs/design/part-TODO.txt:
* docs/design/part-events.txt:
Some docs updates
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_push), (gst_base_sink_activate_pull):
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_event_handler),
(gst_base_src_loop):
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_event), (gst_base_transform_handle_buffer),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/elements/gstfakesink.c: (gst_fake_sink_event):
* gst/elements/gstfilesink.c: (gst_file_sink_event):
Event updates.
* gst/gstbuffer.h:
Use faster casts.
* gst/gstelement.c: (gst_element_seek):
* gst/gstelement.h:
Update gst_element_seek.
* gst/gstevent.c: (gst_event_finalize), (_gst_event_copy),
(gst_event_new), (gst_event_new_custom), (gst_event_get_structure),
(gst_event_new_flush_start), (gst_event_new_flush_stop),
(gst_event_new_eos), (gst_event_new_newsegment),
(gst_event_parse_newsegment), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_filler), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_navigation):
* gst/gstevent.h:
Make GstEvent use GstStructure. Add parsing code, make sure the
API is sufficiently generic.
Mark possible directions of events and serialization.
* gst/gstmessage.c: (gst_message_init), (gst_message_finalize),
(_gst_message_copy), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_custom),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done):
Small cleanups.
* gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Update for new events.
Catch events sent in wrong directions.
* gst/gstqueue.c: (gst_queue_link_src),
(gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop),
(gst_queue_handle_src_query):
Event updates.
* gst/gsttag.c:
* gst/gsttag.h:
Remove event code from this file.
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event),
(gst_dp_event_from_packet):
Event updates.
2005-07-27 18:33:03 +00:00
|
|
|
* 2005 Wim Taymans <wim@fluendo.com>
|
2001-08-06 20:40:45 +00:00
|
|
|
*
|
|
|
|
* gstevent.h: Header for GstEvent subsystem
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __GST_EVENT_H__
|
|
|
|
#define __GST_EVENT_H__
|
|
|
|
|
2011-06-07 11:25:26 +00:00
|
|
|
typedef struct _GstEvent GstEvent;
|
|
|
|
|
2005-10-20 20:25:55 +00:00
|
|
|
/**
|
2005-11-21 11:06:42 +00:00
|
|
|
* GstEventTypeFlags:
|
|
|
|
* @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_SERIALIZED: Set if the event should be serialized with data
|
|
|
|
* flow.
|
2011-05-02 16:34:18 +00:00
|
|
|
* @GST_EVENT_TYPE_STICKY: Set if the event is sticky on the pads.
|
2005-10-20 20:25:55 +00:00
|
|
|
*
|
2005-11-21 11:06:42 +00:00
|
|
|
* #GstEventTypeFlags indicate the aspects of the different #GstEventType
|
|
|
|
* values. You can get the type flags of a #GstEventType with the
|
|
|
|
* gst_event_type_get_flags() function.
|
2005-10-20 20:25:55 +00:00
|
|
|
*/
|
2005-11-21 11:06:42 +00:00
|
|
|
typedef enum {
|
2009-09-04 09:35:59 +00:00
|
|
|
GST_EVENT_TYPE_UPSTREAM = 1 << 0,
|
|
|
|
GST_EVENT_TYPE_DOWNSTREAM = 1 << 1,
|
2011-05-02 16:34:18 +00:00
|
|
|
GST_EVENT_TYPE_SERIALIZED = 1 << 2,
|
|
|
|
GST_EVENT_TYPE_STICKY = 1 << 3
|
2005-11-21 11:06:42 +00:00
|
|
|
} GstEventTypeFlags;
|
|
|
|
|
2005-10-20 20:25:55 +00:00
|
|
|
/**
|
2005-11-21 11:06:42 +00:00
|
|
|
* GST_EVENT_TYPE_BOTH:
|
2005-10-20 20:25:55 +00:00
|
|
|
*
|
2005-11-21 11:06:42 +00:00
|
|
|
* The same thing as #GST_EVENT_TYPE_UPSTREAM | #GST_EVENT_TYPE_DOWNSTREAM.
|
2005-10-20 20:25:55 +00:00
|
|
|
*/
|
2005-11-21 11:06:42 +00:00
|
|
|
#define GST_EVENT_TYPE_BOTH \
|
|
|
|
(GST_EVENT_TYPE_UPSTREAM | GST_EVENT_TYPE_DOWNSTREAM)
|
|
|
|
|
2011-05-03 16:58:18 +00:00
|
|
|
#define GST_EVENT_MAX_STICKY 16
|
2011-05-02 16:34:18 +00:00
|
|
|
#define GST_EVENT_STICKY_SHIFT 8
|
2011-05-03 16:58:18 +00:00
|
|
|
#define GST_EVENT_NUM_SHIFT (GST_EVENT_STICKY_SHIFT + 4)
|
Some docs updates
Original commit message from CVS:
* CHANGES-0.9:
* docs/design/part-TODO.txt:
* docs/design/part-events.txt:
Some docs updates
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_push), (gst_base_sink_activate_pull):
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_event_handler),
(gst_base_src_loop):
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_event), (gst_base_transform_handle_buffer),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/elements/gstfakesink.c: (gst_fake_sink_event):
* gst/elements/gstfilesink.c: (gst_file_sink_event):
Event updates.
* gst/gstbuffer.h:
Use faster casts.
* gst/gstelement.c: (gst_element_seek):
* gst/gstelement.h:
Update gst_element_seek.
* gst/gstevent.c: (gst_event_finalize), (_gst_event_copy),
(gst_event_new), (gst_event_new_custom), (gst_event_get_structure),
(gst_event_new_flush_start), (gst_event_new_flush_stop),
(gst_event_new_eos), (gst_event_new_newsegment),
(gst_event_parse_newsegment), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_filler), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_navigation):
* gst/gstevent.h:
Make GstEvent use GstStructure. Add parsing code, make sure the
API is sufficiently generic.
Mark possible directions of events and serialization.
* gst/gstmessage.c: (gst_message_init), (gst_message_finalize),
(_gst_message_copy), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_custom),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done):
Small cleanups.
* gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Update for new events.
Catch events sent in wrong directions.
* gst/gstqueue.c: (gst_queue_link_src),
(gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop),
(gst_queue_handle_src_query):
Event updates.
* gst/gsttag.c:
* gst/gsttag.h:
Remove event code from this file.
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event),
(gst_dp_event_from_packet):
Event updates.
2005-07-27 18:33:03 +00:00
|
|
|
|
2005-10-20 20:25:55 +00:00
|
|
|
/**
|
|
|
|
* GST_EVENT_MAKE_TYPE:
|
|
|
|
* @num: the event number to create
|
2011-05-02 16:34:18 +00:00
|
|
|
* @idx: the index in the sticky array
|
2005-10-20 20:25:55 +00:00
|
|
|
* @flags: the event flags
|
|
|
|
*
|
|
|
|
* when making custom event types, use this macro with the num and
|
|
|
|
* the given flags
|
|
|
|
*/
|
2011-05-02 16:34:18 +00:00
|
|
|
#define GST_EVENT_MAKE_TYPE(num,idx,flags) \
|
|
|
|
(((num) << GST_EVENT_NUM_SHIFT) | ((idx) << GST_EVENT_STICKY_SHIFT) | (flags))
|
2005-11-21 11:06:42 +00:00
|
|
|
|
|
|
|
#define FLAG(name) GST_EVENT_TYPE_##name
|
Some docs updates
Original commit message from CVS:
* CHANGES-0.9:
* docs/design/part-TODO.txt:
* docs/design/part-events.txt:
Some docs updates
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_push), (gst_base_sink_activate_pull):
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_event_handler),
(gst_base_src_loop):
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_event), (gst_base_transform_handle_buffer),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/elements/gstfakesink.c: (gst_fake_sink_event):
* gst/elements/gstfilesink.c: (gst_file_sink_event):
Event updates.
* gst/gstbuffer.h:
Use faster casts.
* gst/gstelement.c: (gst_element_seek):
* gst/gstelement.h:
Update gst_element_seek.
* gst/gstevent.c: (gst_event_finalize), (_gst_event_copy),
(gst_event_new), (gst_event_new_custom), (gst_event_get_structure),
(gst_event_new_flush_start), (gst_event_new_flush_stop),
(gst_event_new_eos), (gst_event_new_newsegment),
(gst_event_parse_newsegment), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_filler), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_navigation):
* gst/gstevent.h:
Make GstEvent use GstStructure. Add parsing code, make sure the
API is sufficiently generic.
Mark possible directions of events and serialization.
* gst/gstmessage.c: (gst_message_init), (gst_message_finalize),
(_gst_message_copy), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_custom),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done):
Small cleanups.
* gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Update for new events.
Catch events sent in wrong directions.
* gst/gstqueue.c: (gst_queue_link_src),
(gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop),
(gst_queue_handle_src_query):
Event updates.
* gst/gsttag.c:
* gst/gsttag.h:
Remove event code from this file.
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event),
(gst_dp_event_from_packet):
Event updates.
2005-07-27 18:33:03 +00:00
|
|
|
|
2011-05-04 13:20:10 +00:00
|
|
|
#define GST_EVENT_STICKY_IDX_TYPE(type) (((type) >> GST_EVENT_STICKY_SHIFT) & 0xf)
|
|
|
|
#define GST_EVENT_STICKY_IDX(ev) GST_EVENT_STICKY_IDX_TYPE(GST_EVENT_TYPE(ev))
|
2011-05-02 16:34:18 +00:00
|
|
|
|
2005-03-21 17:34:02 +00:00
|
|
|
/**
|
|
|
|
* GstEventType:
|
Some docs updates
Original commit message from CVS:
* CHANGES-0.9:
* docs/design/part-TODO.txt:
* docs/design/part-events.txt:
Some docs updates
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_push), (gst_base_sink_activate_pull):
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_event_handler),
(gst_base_src_loop):
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_event), (gst_base_transform_handle_buffer),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/elements/gstfakesink.c: (gst_fake_sink_event):
* gst/elements/gstfilesink.c: (gst_file_sink_event):
Event updates.
* gst/gstbuffer.h:
Use faster casts.
* gst/gstelement.c: (gst_element_seek):
* gst/gstelement.h:
Update gst_element_seek.
* gst/gstevent.c: (gst_event_finalize), (_gst_event_copy),
(gst_event_new), (gst_event_new_custom), (gst_event_get_structure),
(gst_event_new_flush_start), (gst_event_new_flush_stop),
(gst_event_new_eos), (gst_event_new_newsegment),
(gst_event_parse_newsegment), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_filler), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_navigation):
* gst/gstevent.h:
Make GstEvent use GstStructure. Add parsing code, make sure the
API is sufficiently generic.
Mark possible directions of events and serialization.
* gst/gstmessage.c: (gst_message_init), (gst_message_finalize),
(_gst_message_copy), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_custom),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done):
Small cleanups.
* gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Update for new events.
Catch events sent in wrong directions.
* gst/gstqueue.c: (gst_queue_link_src),
(gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop),
(gst_queue_handle_src_query):
Event updates.
* gst/gsttag.c:
* gst/gsttag.h:
Remove event code from this file.
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event),
(gst_dp_event_from_packet):
Event updates.
2005-07-27 18:33:03 +00:00
|
|
|
* @GST_EVENT_UNKNOWN: unknown event.
|
2010-04-15 15:11:46 +00:00
|
|
|
* @GST_EVENT_FLUSH_START: Start a flush operation. This event clears all data
|
|
|
|
* 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.
|
2011-09-26 18:47:35 +00:00
|
|
|
* @GST_EVENT_CAPS: #GstCaps event. Notify the pad of a new media type.
|
2011-05-13 16:07:24 +00:00
|
|
|
* @GST_EVENT_SEGMENT: A new media segment follows in the dataflow. The
|
2010-04-15 15:11:46 +00:00
|
|
|
* segment events contains information for clipping buffers and
|
|
|
|
* converting buffer timestamps to running-time and
|
|
|
|
* stream-time.
|
2005-08-21 10:54:47 +00:00
|
|
|
* @GST_EVENT_TAG: A new set of metadata tags has been found in the stream.
|
2010-04-15 15:11:46 +00:00
|
|
|
* @GST_EVENT_BUFFERSIZE: Notification of buffering requirements. Currently not
|
|
|
|
* used yet.
|
2009-11-25 12:21:50 +00:00
|
|
|
* @GST_EVENT_SINK_MESSAGE: An event that sinks turn into a message. Used to
|
|
|
|
* send messages that should be emitted in sync with
|
|
|
|
* rendering.
|
2011-03-19 09:39:28 +00:00
|
|
|
* Since: 0.10.26
|
2011-09-26 18:47:35 +00:00
|
|
|
* @GST_EVENT_EOS: End-Of-Stream. No more data is to be expected to follow
|
|
|
|
* without a SEGMENT event.
|
2005-10-06 13:42:56 +00:00
|
|
|
* @GST_EVENT_QOS: A quality message. Used to indicate to upstream elements
|
2011-02-10 11:02:03 +00:00
|
|
|
* that the downstream elements should adjust their processing
|
|
|
|
* rate.
|
2005-08-21 10:54:47 +00:00
|
|
|
* @GST_EVENT_SEEK: A request for a new playback position and rate.
|
2005-10-06 13:42:56 +00:00
|
|
|
* @GST_EVENT_NAVIGATION: Navigation events are usually used for communicating
|
2005-11-21 13:03:36 +00:00
|
|
|
* user requests, such as mouse or keyboard movements,
|
2005-10-06 13:42:56 +00:00
|
|
|
* to upstream elements.
|
2010-04-15 15:11:46 +00:00
|
|
|
* @GST_EVENT_LATENCY: Notification of new latency adjustment. Sinks will use
|
|
|
|
* the latency information to adjust their synchronisation.
|
|
|
|
* Since: 0.10.12
|
|
|
|
* @GST_EVENT_STEP: A request for stepping through the media. Sinks will usually
|
|
|
|
* execute the step operation. Since: 0.10.24
|
2011-05-03 11:05:06 +00:00
|
|
|
* @GST_EVENT_RECONFIGURE: A request for upstream renegotiating caps and reconfiguring.
|
2011-05-17 12:01:05 +00:00
|
|
|
* Since: 0.11.0
|
2005-11-21 11:06:42 +00:00
|
|
|
* @GST_EVENT_CUSTOM_UPSTREAM: Upstream custom event
|
|
|
|
* @GST_EVENT_CUSTOM_DOWNSTREAM: Downstream custom event that travels in the
|
|
|
|
* data flow.
|
|
|
|
* @GST_EVENT_CUSTOM_DOWNSTREAM_OOB: Custom out-of-band downstream event.
|
2005-10-06 13:42:56 +00:00
|
|
|
* @GST_EVENT_CUSTOM_BOTH: Custom upstream or downstream event.
|
|
|
|
* In-band when travelling downstream.
|
2005-08-21 10:54:47 +00:00
|
|
|
* @GST_EVENT_CUSTOM_BOTH_OOB: Custom upstream or downstream out-of-band event.
|
2005-08-18 15:31:28 +00:00
|
|
|
*
|
2005-11-09 16:16:41 +00:00
|
|
|
* #GstEventType lists the standard event types that can be sent in a pipeline.
|
2005-08-21 10:54:47 +00:00
|
|
|
*
|
2005-10-06 13:42:56 +00:00
|
|
|
* The custom event types can be used for private messages between elements
|
|
|
|
* that can't be expressed using normal
|
|
|
|
* GStreamer buffer passing semantics. Custom events carry an arbitrary
|
2005-11-09 16:16:41 +00:00
|
|
|
* #GstStructure.
|
2005-08-21 10:54:47 +00:00
|
|
|
* Specific custom events are distinguished by the name of the structure.
|
2005-03-21 17:34:02 +00:00
|
|
|
*/
|
2005-10-08 16:13:50 +00:00
|
|
|
/* NOTE: keep in sync with quark registration in gstevent.c */
|
2004-03-15 14:43:35 +00:00
|
|
|
typedef enum {
|
2011-05-02 16:34:18 +00:00
|
|
|
GST_EVENT_UNKNOWN = GST_EVENT_MAKE_TYPE (0, 0, 0),
|
Some docs updates
Original commit message from CVS:
* CHANGES-0.9:
* docs/design/part-TODO.txt:
* docs/design/part-events.txt:
Some docs updates
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_push), (gst_base_sink_activate_pull):
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_event_handler),
(gst_base_src_loop):
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_event), (gst_base_transform_handle_buffer),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/elements/gstfakesink.c: (gst_fake_sink_event):
* gst/elements/gstfilesink.c: (gst_file_sink_event):
Event updates.
* gst/gstbuffer.h:
Use faster casts.
* gst/gstelement.c: (gst_element_seek):
* gst/gstelement.h:
Update gst_element_seek.
* gst/gstevent.c: (gst_event_finalize), (_gst_event_copy),
(gst_event_new), (gst_event_new_custom), (gst_event_get_structure),
(gst_event_new_flush_start), (gst_event_new_flush_stop),
(gst_event_new_eos), (gst_event_new_newsegment),
(gst_event_parse_newsegment), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_filler), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_navigation):
* gst/gstevent.h:
Make GstEvent use GstStructure. Add parsing code, make sure the
API is sufficiently generic.
Mark possible directions of events and serialization.
* gst/gstmessage.c: (gst_message_init), (gst_message_finalize),
(_gst_message_copy), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_custom),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done):
Small cleanups.
* gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Update for new events.
Catch events sent in wrong directions.
* gst/gstqueue.c: (gst_queue_link_src),
(gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop),
(gst_queue_handle_src_query):
Event updates.
* gst/gsttag.c:
* gst/gsttag.h:
Remove event code from this file.
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event),
(gst_dp_event_from_packet):
Event updates.
2005-07-27 18:33:03 +00:00
|
|
|
/* bidirectional events */
|
2011-05-02 16:34:18 +00:00
|
|
|
GST_EVENT_FLUSH_START = GST_EVENT_MAKE_TYPE (1, 0, FLAG(BOTH)),
|
|
|
|
GST_EVENT_FLUSH_STOP = GST_EVENT_MAKE_TYPE (2, 0, FLAG(BOTH) | FLAG(SERIALIZED)),
|
Some docs updates
Original commit message from CVS:
* CHANGES-0.9:
* docs/design/part-TODO.txt:
* docs/design/part-events.txt:
Some docs updates
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_push), (gst_base_sink_activate_pull):
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_event_handler),
(gst_base_src_loop):
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_event), (gst_base_transform_handle_buffer),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/elements/gstfakesink.c: (gst_fake_sink_event):
* gst/elements/gstfilesink.c: (gst_file_sink_event):
Event updates.
* gst/gstbuffer.h:
Use faster casts.
* gst/gstelement.c: (gst_element_seek):
* gst/gstelement.h:
Update gst_element_seek.
* gst/gstevent.c: (gst_event_finalize), (_gst_event_copy),
(gst_event_new), (gst_event_new_custom), (gst_event_get_structure),
(gst_event_new_flush_start), (gst_event_new_flush_stop),
(gst_event_new_eos), (gst_event_new_newsegment),
(gst_event_parse_newsegment), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_filler), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_navigation):
* gst/gstevent.h:
Make GstEvent use GstStructure. Add parsing code, make sure the
API is sufficiently generic.
Mark possible directions of events and serialization.
* gst/gstmessage.c: (gst_message_init), (gst_message_finalize),
(_gst_message_copy), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_custom),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done):
Small cleanups.
* gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Update for new events.
Catch events sent in wrong directions.
* gst/gstqueue.c: (gst_queue_link_src),
(gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop),
(gst_queue_handle_src_query):
Event updates.
* gst/gsttag.c:
* gst/gsttag.h:
Remove event code from this file.
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event),
(gst_dp_event_from_packet):
Event updates.
2005-07-27 18:33:03 +00:00
|
|
|
/* downstream serialized events */
|
2011-05-06 09:00:18 +00:00
|
|
|
GST_EVENT_CAPS = GST_EVENT_MAKE_TYPE (5, 1, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)),
|
2011-05-13 16:07:24 +00:00
|
|
|
GST_EVENT_SEGMENT = GST_EVENT_MAKE_TYPE (6, 2, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)),
|
2011-05-06 09:00:18 +00:00
|
|
|
GST_EVENT_TAG = GST_EVENT_MAKE_TYPE (7, 3, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)),
|
|
|
|
GST_EVENT_BUFFERSIZE = GST_EVENT_MAKE_TYPE (8, 4, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)),
|
|
|
|
GST_EVENT_SINK_MESSAGE = GST_EVENT_MAKE_TYPE (9, 5, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)),
|
|
|
|
GST_EVENT_EOS = GST_EVENT_MAKE_TYPE (10, 6, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)),
|
2011-05-13 16:07:24 +00:00
|
|
|
|
Some docs updates
Original commit message from CVS:
* CHANGES-0.9:
* docs/design/part-TODO.txt:
* docs/design/part-events.txt:
Some docs updates
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_push), (gst_base_sink_activate_pull):
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_event_handler),
(gst_base_src_loop):
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_event), (gst_base_transform_handle_buffer),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/elements/gstfakesink.c: (gst_fake_sink_event):
* gst/elements/gstfilesink.c: (gst_file_sink_event):
Event updates.
* gst/gstbuffer.h:
Use faster casts.
* gst/gstelement.c: (gst_element_seek):
* gst/gstelement.h:
Update gst_element_seek.
* gst/gstevent.c: (gst_event_finalize), (_gst_event_copy),
(gst_event_new), (gst_event_new_custom), (gst_event_get_structure),
(gst_event_new_flush_start), (gst_event_new_flush_stop),
(gst_event_new_eos), (gst_event_new_newsegment),
(gst_event_parse_newsegment), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_filler), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_navigation):
* gst/gstevent.h:
Make GstEvent use GstStructure. Add parsing code, make sure the
API is sufficiently generic.
Mark possible directions of events and serialization.
* gst/gstmessage.c: (gst_message_init), (gst_message_finalize),
(_gst_message_copy), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_custom),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done):
Small cleanups.
* gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Update for new events.
Catch events sent in wrong directions.
* gst/gstqueue.c: (gst_queue_link_src),
(gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop),
(gst_queue_handle_src_query):
Event updates.
* gst/gsttag.c:
* gst/gsttag.h:
Remove event code from this file.
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event),
(gst_dp_event_from_packet):
Event updates.
2005-07-27 18:33:03 +00:00
|
|
|
/* upstream events */
|
2011-05-02 16:34:18 +00:00
|
|
|
GST_EVENT_QOS = GST_EVENT_MAKE_TYPE (15, 0, FLAG(UPSTREAM)),
|
|
|
|
GST_EVENT_SEEK = GST_EVENT_MAKE_TYPE (16, 0, FLAG(UPSTREAM)),
|
|
|
|
GST_EVENT_NAVIGATION = GST_EVENT_MAKE_TYPE (17, 0, FLAG(UPSTREAM)),
|
|
|
|
GST_EVENT_LATENCY = GST_EVENT_MAKE_TYPE (18, 0, FLAG(UPSTREAM)),
|
|
|
|
GST_EVENT_STEP = GST_EVENT_MAKE_TYPE (19, 0, FLAG(UPSTREAM)),
|
2011-05-03 11:05:06 +00:00
|
|
|
GST_EVENT_RECONFIGURE = GST_EVENT_MAKE_TYPE (20, 0, FLAG(UPSTREAM)),
|
Some docs updates
Original commit message from CVS:
* CHANGES-0.9:
* docs/design/part-TODO.txt:
* docs/design/part-events.txt:
Some docs updates
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_push), (gst_base_sink_activate_pull):
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_event_handler),
(gst_base_src_loop):
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_event), (gst_base_transform_handle_buffer),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/elements/gstfakesink.c: (gst_fake_sink_event):
* gst/elements/gstfilesink.c: (gst_file_sink_event):
Event updates.
* gst/gstbuffer.h:
Use faster casts.
* gst/gstelement.c: (gst_element_seek):
* gst/gstelement.h:
Update gst_element_seek.
* gst/gstevent.c: (gst_event_finalize), (_gst_event_copy),
(gst_event_new), (gst_event_new_custom), (gst_event_get_structure),
(gst_event_new_flush_start), (gst_event_new_flush_stop),
(gst_event_new_eos), (gst_event_new_newsegment),
(gst_event_parse_newsegment), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_filler), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_navigation):
* gst/gstevent.h:
Make GstEvent use GstStructure. Add parsing code, make sure the
API is sufficiently generic.
Mark possible directions of events and serialization.
* gst/gstmessage.c: (gst_message_init), (gst_message_finalize),
(_gst_message_copy), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_custom),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done):
Small cleanups.
* gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Update for new events.
Catch events sent in wrong directions.
* gst/gstqueue.c: (gst_queue_link_src),
(gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop),
(gst_queue_handle_src_query):
Event updates.
* gst/gsttag.c:
* gst/gsttag.h:
Remove event code from this file.
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event),
(gst_dp_event_from_packet):
Event updates.
2005-07-27 18:33:03 +00:00
|
|
|
|
|
|
|
/* custom events start here */
|
2011-05-02 16:34:18 +00:00
|
|
|
GST_EVENT_CUSTOM_UPSTREAM = GST_EVENT_MAKE_TYPE (32, 0, FLAG(UPSTREAM)),
|
|
|
|
GST_EVENT_CUSTOM_DOWNSTREAM = GST_EVENT_MAKE_TYPE (32, 0, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)),
|
|
|
|
GST_EVENT_CUSTOM_DOWNSTREAM_OOB = GST_EVENT_MAKE_TYPE (32, 0, FLAG(DOWNSTREAM)),
|
|
|
|
GST_EVENT_CUSTOM_BOTH = GST_EVENT_MAKE_TYPE (32, 0, FLAG(BOTH) | FLAG(SERIALIZED)),
|
|
|
|
GST_EVENT_CUSTOM_BOTH_OOB = GST_EVENT_MAKE_TYPE (32, 0, FLAG(BOTH))
|
2004-03-15 14:43:35 +00:00
|
|
|
} GstEventType;
|
2005-11-21 11:06:42 +00:00
|
|
|
#undef FLAG
|
2001-08-06 20:40:45 +00:00
|
|
|
|
2011-06-07 11:38:35 +00:00
|
|
|
#include <gst/gstminiobject.h>
|
|
|
|
#include <gst/gstformat.h>
|
|
|
|
#include <gst/gstobject.h>
|
|
|
|
#include <gst/gstclock.h>
|
|
|
|
#include <gst/gststructure.h>
|
|
|
|
#include <gst/gsttaglist.h>
|
|
|
|
#include <gst/gstsegment.h>
|
|
|
|
#include <gst/gstsegment.h>
|
|
|
|
#include <gst/gstmessage.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
extern GType _gst_event_type;
|
|
|
|
|
|
|
|
#define GST_TYPE_EVENT (_gst_event_type)
|
|
|
|
#define GST_IS_EVENT(obj) (GST_IS_MINI_OBJECT_TYPE (obj, GST_TYPE_EVENT))
|
|
|
|
#define GST_EVENT_CAST(obj) ((GstEvent *)(obj))
|
|
|
|
#define GST_EVENT(obj) (GST_EVENT_CAST(obj))
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_EVENT_TRACE_NAME:
|
|
|
|
*
|
|
|
|
* The name used for memory allocation tracing
|
|
|
|
*/
|
|
|
|
#define GST_EVENT_TRACE_NAME "GstEvent"
|
|
|
|
|
2005-08-22 10:37:02 +00:00
|
|
|
/**
|
|
|
|
* GST_EVENT_TYPE:
|
|
|
|
* @event: the event to query
|
|
|
|
*
|
2005-09-11 12:57:36 +00:00
|
|
|
* Get the #GstEventType of the event.
|
2005-08-22 10:37:02 +00:00
|
|
|
*/
|
2009-09-04 09:35:59 +00:00
|
|
|
#define GST_EVENT_TYPE(event) (GST_EVENT_CAST(event)->type)
|
2005-09-11 12:57:36 +00:00
|
|
|
|
2005-10-15 20:33:09 +00:00
|
|
|
/**
|
|
|
|
* GST_EVENT_TYPE_NAME:
|
|
|
|
* @event: the event to query
|
|
|
|
*
|
|
|
|
* Get a constant string representation of the #GstEventType of the event.
|
|
|
|
*/
|
2009-09-04 09:35:59 +00:00
|
|
|
#define GST_EVENT_TYPE_NAME(event) (gst_event_type_get_name(GST_EVENT_TYPE(event)))
|
2005-10-15 20:33:09 +00:00
|
|
|
|
2005-08-22 10:37:02 +00:00
|
|
|
/**
|
|
|
|
* GST_EVENT_TIMESTAMP:
|
|
|
|
* @event: the event to query
|
|
|
|
*
|
2005-11-09 16:16:41 +00:00
|
|
|
* Get the #GstClockTime timestamp of the event. This is the time when the event
|
|
|
|
* was created.
|
2005-08-22 10:37:02 +00:00
|
|
|
*/
|
2009-09-04 09:35:59 +00:00
|
|
|
#define GST_EVENT_TIMESTAMP(event) (GST_EVENT_CAST(event)->timestamp)
|
2005-09-11 12:57:36 +00:00
|
|
|
|
2011-02-22 15:04:12 +00:00
|
|
|
/**
|
|
|
|
* GST_EVENT_SEQNUM:
|
|
|
|
* @event: the event to query
|
|
|
|
*
|
|
|
|
* The sequence number of @event.
|
|
|
|
*/
|
|
|
|
#define GST_EVENT_SEQNUM(event) (GST_EVENT_CAST(event)->seqnum)
|
|
|
|
|
2005-10-20 20:25:55 +00:00
|
|
|
/**
|
|
|
|
* GST_EVENT_IS_UPSTREAM:
|
|
|
|
* @ev: the event to query
|
|
|
|
*
|
|
|
|
* Check if an event can travel upstream.
|
|
|
|
*/
|
2009-09-04 09:35:59 +00:00
|
|
|
#define GST_EVENT_IS_UPSTREAM(ev) !!(GST_EVENT_TYPE (ev) & GST_EVENT_TYPE_UPSTREAM)
|
2005-10-20 20:25:55 +00:00
|
|
|
/**
|
|
|
|
* GST_EVENT_IS_DOWNSTREAM:
|
|
|
|
* @ev: the event to query
|
|
|
|
*
|
|
|
|
* Check if an event can travel downstream.
|
|
|
|
*/
|
2009-09-04 09:35:59 +00:00
|
|
|
#define GST_EVENT_IS_DOWNSTREAM(ev) !!(GST_EVENT_TYPE (ev) & GST_EVENT_TYPE_DOWNSTREAM)
|
2005-10-20 20:25:55 +00:00
|
|
|
/**
|
|
|
|
* GST_EVENT_IS_SERIALIZED:
|
|
|
|
* @ev: the event to query
|
|
|
|
*
|
|
|
|
* Check if an event is serialized with the data stream.
|
|
|
|
*/
|
2009-09-04 09:35:59 +00:00
|
|
|
#define GST_EVENT_IS_SERIALIZED(ev) !!(GST_EVENT_TYPE (ev) & GST_EVENT_TYPE_SERIALIZED)
|
2011-05-02 16:34:18 +00:00
|
|
|
/**
|
|
|
|
* GST_EVENT_IS_STICKY:
|
|
|
|
* @ev: the event to query
|
|
|
|
*
|
|
|
|
* Check if an event is sticky on the pads.
|
|
|
|
*/
|
|
|
|
#define GST_EVENT_IS_STICKY(ev) !!(GST_EVENT_TYPE (ev) & GST_EVENT_TYPE_STICKY)
|
2002-07-24 20:41:08 +00:00
|
|
|
|
2011-05-10 09:50:16 +00:00
|
|
|
/**
|
|
|
|
* gst_event_is_writable:
|
|
|
|
* @ev: a #GstEvent
|
|
|
|
*
|
|
|
|
* Tests if you can safely write data into a event's structure or validly
|
|
|
|
* modify the seqnum and timestamp field.
|
|
|
|
*/
|
|
|
|
#define gst_event_is_writable(ev) gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (ev))
|
|
|
|
/**
|
|
|
|
* gst_event_make_writable:
|
|
|
|
* @ev: (transfer full): a #GstEvent
|
|
|
|
*
|
|
|
|
* Makes a writable event from the given event. If the source event is
|
|
|
|
* already writable, this will simply return the same event. A copy will
|
|
|
|
* otherwise be made using gst_event_copy().
|
|
|
|
*
|
|
|
|
* Returns: (transfer full): a writable event which may or may not be the
|
|
|
|
* same as @ev
|
|
|
|
*/
|
|
|
|
#define gst_event_make_writable(ev) GST_EVENT_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (ev)))
|
2006-01-20 11:46:03 +00:00
|
|
|
/**
|
|
|
|
* gst_event_replace:
|
2010-12-07 18:35:04 +00:00
|
|
|
* @old_event: (inout) (transfer full): pointer to a pointer to a #GstEvent
|
|
|
|
* to be replaced.
|
|
|
|
* @new_event: (allow-none) (transfer none): pointer to a #GstEvent that will
|
|
|
|
* replace the event pointed to by @old_event.
|
2006-01-20 11:46:03 +00:00
|
|
|
*
|
|
|
|
* Modifies a pointer to a #GstEvent to point to a different #GstEvent. The
|
|
|
|
* modification is done atomically (so this is useful for ensuring thread safety
|
2006-05-09 19:14:55 +00:00
|
|
|
* in some cases), and the reference counts are updated appropriately (the old
|
2006-01-20 11:46:03 +00:00
|
|
|
* event is unreffed, the new one is reffed).
|
|
|
|
*
|
|
|
|
* Either @new_event or the #GstEvent pointed to by @old_event may be NULL.
|
|
|
|
*
|
2011-06-09 11:36:52 +00:00
|
|
|
* Returns: TRUE if @new_event was different from @old_event
|
2006-01-20 11:46:03 +00:00
|
|
|
*/
|
2011-10-13 08:18:51 +00:00
|
|
|
#ifdef _FOOL_GTK_DOC_
|
|
|
|
G_INLINE_FUNC void gst_event_replace (GstEvent **old_event, GstEvent *new_event);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
gst_event_replace (GstEvent **old_event, GstEvent *new_event)
|
|
|
|
{
|
|
|
|
gst_mini_object_replace ((GstMiniObject **) old_event, (GstMiniObject *) new_event);
|
|
|
|
}
|
2006-01-20 11:46:03 +00:00
|
|
|
|
2011-06-09 11:36:52 +00:00
|
|
|
/**
|
|
|
|
* gst_event_steal:
|
|
|
|
* @old_event: (inout) (transfer full): pointer to a pointer to a #GstEvent
|
|
|
|
* to be stolen.
|
|
|
|
*
|
|
|
|
* Atomically replace the #GstEvent pointed to by @old_event with NULL and
|
|
|
|
* return the original event.
|
|
|
|
*
|
|
|
|
* Returns: the #GstEvent that was in @old_event
|
|
|
|
*/
|
|
|
|
#define gst_event_steal(old_event) \
|
|
|
|
GST_EVENT_CAST (gst_mini_object_steal ((GstMiniObject **)(old_event)))
|
|
|
|
/**
|
|
|
|
* gst_event_take:
|
|
|
|
* @old_event: (inout) (transfer full): pointer to a pointer to a #GstEvent
|
|
|
|
* to be stolen.
|
|
|
|
* @new_event: (allow-none) (transfer full): pointer to a #GstEvent that will
|
|
|
|
* replace the event pointed to by @old_event.
|
|
|
|
*
|
|
|
|
* Modifies a pointer to a #GstEvent to point to a different #GstEvent. This
|
|
|
|
* function is similar to gst_event_replace() except that it takes ownership of
|
|
|
|
* @new_event.
|
|
|
|
*
|
|
|
|
* Either @new_event or the #GstEvent pointed to by @old_event may be NULL.
|
|
|
|
*
|
|
|
|
* Returns: TRUE if @new_event was different from @old_event
|
|
|
|
*/
|
|
|
|
#define gst_event_take(old_event,new_event) \
|
|
|
|
gst_mini_object_take ((GstMiniObject **)(old_event), GST_MINI_OBJECT_CAST (new_event))
|
2006-01-20 11:46:03 +00:00
|
|
|
|
2011-02-10 11:02:03 +00:00
|
|
|
/**
|
|
|
|
* GstQOSType:
|
|
|
|
* @GST_QOS_TYPE_OVERFLOW: The QoS event type that is produced when downstream
|
|
|
|
* elements are producing data too quickly and the element can't keep up
|
|
|
|
* processing the data. Upstream should reduce their processing rate. This
|
|
|
|
* type is also used when buffers arrive early or in time.
|
|
|
|
* @GST_QOS_TYPE_UNDERFLOW: The QoS event type that is produced when downstream
|
|
|
|
* elements are producing data too slowly and need to speed up their processing
|
2011-05-10 09:50:16 +00:00
|
|
|
* rate.
|
2011-02-10 11:02:03 +00:00
|
|
|
* @GST_QOS_TYPE_THROTTLE: The QoS event type that is produced when the
|
|
|
|
* application enabled throttling to limit the datarate.
|
|
|
|
*
|
2011-05-10 09:50:16 +00:00
|
|
|
* The different types of QoS events that can be given to the
|
|
|
|
* gst_event_new_qos() method.
|
2011-02-10 11:02:03 +00:00
|
|
|
*
|
|
|
|
* Since: 0.10.33
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
GST_QOS_TYPE_OVERFLOW = 0,
|
|
|
|
GST_QOS_TYPE_UNDERFLOW = 1,
|
|
|
|
GST_QOS_TYPE_THROTTLE = 2
|
|
|
|
} GstQOSType;
|
|
|
|
|
2005-11-09 16:16:41 +00:00
|
|
|
/**
|
|
|
|
* GstEvent:
|
|
|
|
* @mini_object: the parent structure
|
|
|
|
* @type: the #GstEventType of the event
|
|
|
|
* @timestamp: the timestamp of the event
|
2011-09-26 18:47:35 +00:00
|
|
|
* @seqnum: the sequence number of the event
|
2005-11-09 16:16:41 +00:00
|
|
|
*
|
|
|
|
* A #GstEvent.
|
|
|
|
*/
|
2004-03-15 14:43:35 +00:00
|
|
|
struct _GstEvent {
|
check/Makefile.am: remove GstData checks
Original commit message from CVS:
* check/Makefile.am: remove GstData checks
* check/gst-libs/gdp.c: (START_TEST): fix for API changes
* gst/Makefile.am: add miniobject, remove data
* gst/gst.h: add miniobject, remove data
* gst/gstdata.c: remove
* gst/gstdata.h: remove
* gst/gstdata_private.h: remove
* gst/gsttypes.h: remove GstEvent and GstMessage
* gst/gstelement.c: (gst_element_post_message): fix for API changes
* gst/gstmarshal.list: change BOXED -> OBJECT
Implement GstMiniObject.
* gst/gstminiobject.c:
* gst/gstminiobject.h:
Modify to be subclasses of GstMiniObject.
* gst/gstbuffer.c: (_gst_buffer_initialize), (gst_buffer_get_type),
(gst_buffer_class_init), (gst_buffer_finalize), (_gst_buffer_copy),
(gst_buffer_init), (gst_buffer_new), (gst_buffer_new_and_alloc),
(gst_subbuffer_get_type), (gst_subbuffer_init),
(gst_buffer_create_sub), (gst_buffer_is_span_fast),
(gst_buffer_span):
* gst/gstbuffer.h:
* gst/gstevent.c: (_gst_event_initialize), (gst_event_get_type),
(gst_event_class_init), (gst_event_init), (gst_event_finalize),
(_gst_event_copy), (gst_event_new):
* gst/gstevent.h:
* gst/gstmessage.c: (_gst_message_initialize),
(gst_message_get_type), (gst_message_class_init),
(gst_message_init), (gst_message_finalize), (_gst_message_copy),
(gst_message_new), (gst_message_new_error),
(gst_message_new_warning), (gst_message_new_tag),
(gst_message_new_state_changed), (gst_message_new_application):
* gst/gstmessage.h:
* gst/gstprobe.c: (gst_probe_perform),
(gst_probe_dispatcher_dispatch):
* gst/gstprobe.h:
* gst/gstquery.c: (_gst_query_initialize), (gst_query_get_type),
(gst_query_class_init), (gst_query_finalize), (gst_query_init),
(_gst_query_copy), (gst_query_new):
Update elements for GstData -> GstMiniObject changes
* gst/gstquery.h:
* gst/gstqueue.c: (gst_queue_finalize), (gst_queue_locked_flush),
(gst_queue_chain), (gst_queue_loop):
* gst/elements/gstbufferstore.c:
(gst_buffer_store_add_buffer_func),
(gst_buffer_store_cleared_func), (gst_buffer_store_get_buffer):
* gst/elements/gstfakesink.c: (gst_fakesink_class_init),
(gst_fakesink_render):
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init):
* gst/elements/gstfilesrc.c: (gst_mmap_buffer_get_type),
(gst_mmap_buffer_class_init), (gst_mmap_buffer_init),
(gst_mmap_buffer_finalize), (gst_filesrc_map_region),
(gst_filesrc_create_read):
* gst/elements/gstidentity.c: (gst_identity_class_init):
* gst/elements/gsttypefindelement.c:
(gst_type_find_element_src_event), (free_entry_buffers),
(gst_type_find_element_handle_event):
* libs/gst/dataprotocol/dataprotocol.c:
(gst_dp_header_from_buffer):
* libs/gst/dataprotocol/dataprotocol.h:
* libs/gst/dataprotocol/dp-private.h:
2005-05-16 20:21:55 +00:00
|
|
|
GstMiniObject mini_object;
|
2001-10-17 10:21:27 +00:00
|
|
|
|
2005-03-07 18:27:42 +00:00
|
|
|
/*< public >*/ /* with COW */
|
2004-03-15 14:43:35 +00:00
|
|
|
GstEventType type;
|
2009-09-04 09:35:59 +00:00
|
|
|
guint64 timestamp;
|
2011-02-22 15:04:12 +00:00
|
|
|
guint32 seqnum;
|
2001-08-06 20:40:45 +00:00
|
|
|
};
|
|
|
|
|
2005-10-06 13:55:43 +00:00
|
|
|
const gchar* gst_event_type_get_name (GstEventType type);
|
2009-09-04 09:35:59 +00:00
|
|
|
GQuark gst_event_type_to_quark (GstEventType type);
|
2005-11-21 11:06:42 +00:00
|
|
|
GstEventTypeFlags
|
2009-09-04 09:35:59 +00:00
|
|
|
gst_event_type_get_flags (GstEventType type);
|
2005-10-06 13:55:43 +00:00
|
|
|
|
|
|
|
|
2002-07-08 19:22:02 +00:00
|
|
|
/* refcounting */
|
2005-08-22 10:37:02 +00:00
|
|
|
/**
|
|
|
|
* gst_event_ref:
|
2006-05-14 19:25:51 +00:00
|
|
|
* @event: The event to refcount
|
2005-08-22 10:37:02 +00:00
|
|
|
*
|
|
|
|
* Increase the refcount of this event.
|
2006-05-14 19:25:51 +00:00
|
|
|
*
|
2010-12-07 18:35:04 +00:00
|
|
|
* Returns: (transfer full): @event (for convenience when doing assignments)
|
2005-08-22 10:37:02 +00:00
|
|
|
*/
|
2006-05-10 16:44:15 +00:00
|
|
|
#ifdef _FOOL_GTK_DOC_
|
2006-05-14 19:25:51 +00:00
|
|
|
G_INLINE_FUNC GstEvent * gst_event_ref (GstEvent * event);
|
2006-05-10 16:44:15 +00:00
|
|
|
#endif
|
|
|
|
|
2006-03-21 13:50:52 +00:00
|
|
|
static inline GstEvent *
|
2009-03-12 09:48:21 +00:00
|
|
|
gst_event_ref (GstEvent * event)
|
2006-03-21 13:50:52 +00:00
|
|
|
{
|
2009-12-07 19:52:22 +00:00
|
|
|
return (GstEvent *) gst_mini_object_ref (GST_MINI_OBJECT_CAST (event));
|
2006-03-21 13:50:52 +00:00
|
|
|
}
|
|
|
|
|
2005-08-22 10:37:02 +00:00
|
|
|
/**
|
2005-10-09 20:49:46 +00:00
|
|
|
* gst_event_unref:
|
2010-12-07 18:35:04 +00:00
|
|
|
* @event: (transfer full): the event to refcount
|
2005-08-22 10:37:02 +00:00
|
|
|
*
|
|
|
|
* Decrease the refcount of an event, freeing it if the refcount reaches 0.
|
|
|
|
*/
|
2009-02-22 17:51:08 +00:00
|
|
|
#ifdef _FOOL_GTK_DOC_
|
|
|
|
G_INLINE_FUNC void gst_event_unref (GstEvent * event);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
static inline void
|
2009-03-12 09:48:21 +00:00
|
|
|
gst_event_unref (GstEvent * event)
|
2009-02-22 17:51:08 +00:00
|
|
|
{
|
2009-12-07 19:52:22 +00:00
|
|
|
gst_mini_object_unref (GST_MINI_OBJECT_CAST (event));
|
2009-02-22 17:51:08 +00:00
|
|
|
}
|
2005-08-22 10:37:02 +00:00
|
|
|
|
Some docs updates
Original commit message from CVS:
* CHANGES-0.9:
* docs/design/part-TODO.txt:
* docs/design/part-events.txt:
Some docs updates
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_push), (gst_base_sink_activate_pull):
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_event_handler),
(gst_base_src_loop):
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_event), (gst_base_transform_handle_buffer),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/elements/gstfakesink.c: (gst_fake_sink_event):
* gst/elements/gstfilesink.c: (gst_file_sink_event):
Event updates.
* gst/gstbuffer.h:
Use faster casts.
* gst/gstelement.c: (gst_element_seek):
* gst/gstelement.h:
Update gst_element_seek.
* gst/gstevent.c: (gst_event_finalize), (_gst_event_copy),
(gst_event_new), (gst_event_new_custom), (gst_event_get_structure),
(gst_event_new_flush_start), (gst_event_new_flush_stop),
(gst_event_new_eos), (gst_event_new_newsegment),
(gst_event_parse_newsegment), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_filler), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_navigation):
* gst/gstevent.h:
Make GstEvent use GstStructure. Add parsing code, make sure the
API is sufficiently generic.
Mark possible directions of events and serialization.
* gst/gstmessage.c: (gst_message_init), (gst_message_finalize),
(_gst_message_copy), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_custom),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done):
Small cleanups.
* gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Update for new events.
Catch events sent in wrong directions.
* gst/gstqueue.c: (gst_queue_link_src),
(gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop),
(gst_queue_handle_src_query):
Event updates.
* gst/gsttag.c:
* gst/gsttag.h:
Remove event code from this file.
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event),
(gst_dp_event_from_packet):
Event updates.
2005-07-27 18:33:03 +00:00
|
|
|
/* copy event */
|
2005-08-22 10:37:02 +00:00
|
|
|
/**
|
|
|
|
* gst_event_copy:
|
2009-03-12 09:48:21 +00:00
|
|
|
* @event: The event to copy
|
2005-08-22 10:37:02 +00:00
|
|
|
*
|
|
|
|
* Copy the event using the event specific copy function.
|
2010-01-04 22:09:10 +00:00
|
|
|
*
|
2010-12-07 18:35:04 +00:00
|
|
|
* Returns: (transfer full): the new event
|
2005-08-22 10:37:02 +00:00
|
|
|
*/
|
2009-02-22 17:51:08 +00:00
|
|
|
#ifdef _FOOL_GTK_DOC_
|
2009-12-02 12:29:28 +00:00
|
|
|
G_INLINE_FUNC GstEvent * gst_event_copy (const GstEvent * event);
|
2009-02-22 17:51:08 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
static inline GstEvent *
|
2009-03-12 09:48:21 +00:00
|
|
|
gst_event_copy (const GstEvent * event)
|
2009-02-22 17:51:08 +00:00
|
|
|
{
|
2010-09-01 23:01:25 +00:00
|
|
|
return GST_EVENT_CAST (gst_mini_object_copy (GST_MINI_OBJECT_CONST_CAST (event)));
|
2009-02-22 17:51:08 +00:00
|
|
|
}
|
|
|
|
|
2011-08-29 13:34:30 +00:00
|
|
|
GType gst_event_get_type (void);
|
2001-10-17 10:21:27 +00:00
|
|
|
|
Some docs updates
Original commit message from CVS:
* CHANGES-0.9:
* docs/design/part-TODO.txt:
* docs/design/part-events.txt:
Some docs updates
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_push), (gst_base_sink_activate_pull):
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_event_handler),
(gst_base_src_loop):
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_event), (gst_base_transform_handle_buffer),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/elements/gstfakesink.c: (gst_fake_sink_event):
* gst/elements/gstfilesink.c: (gst_file_sink_event):
Event updates.
* gst/gstbuffer.h:
Use faster casts.
* gst/gstelement.c: (gst_element_seek):
* gst/gstelement.h:
Update gst_element_seek.
* gst/gstevent.c: (gst_event_finalize), (_gst_event_copy),
(gst_event_new), (gst_event_new_custom), (gst_event_get_structure),
(gst_event_new_flush_start), (gst_event_new_flush_stop),
(gst_event_new_eos), (gst_event_new_newsegment),
(gst_event_parse_newsegment), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_filler), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_navigation):
* gst/gstevent.h:
Make GstEvent use GstStructure. Add parsing code, make sure the
API is sufficiently generic.
Mark possible directions of events and serialization.
* gst/gstmessage.c: (gst_message_init), (gst_message_finalize),
(_gst_message_copy), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_custom),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done):
Small cleanups.
* gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Update for new events.
Catch events sent in wrong directions.
* gst/gstqueue.c: (gst_queue_link_src),
(gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop),
(gst_queue_handle_src_query):
Event updates.
* gst/gsttag.c:
* gst/gsttag.h:
Remove event code from this file.
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event),
(gst_dp_event_from_packet):
Event updates.
2005-07-27 18:33:03 +00:00
|
|
|
/* custom event */
|
2009-09-04 09:35:59 +00:00
|
|
|
GstEvent* gst_event_new_custom (GstEventType type, GstStructure *structure);
|
2002-12-30 17:42:11 +00:00
|
|
|
|
2005-10-06 13:42:56 +00:00
|
|
|
const GstStructure *
|
2009-09-04 09:35:59 +00:00
|
|
|
gst_event_get_structure (GstEvent *event);
|
2011-05-10 09:50:16 +00:00
|
|
|
GstStructure * gst_event_writable_structure (GstEvent *event);
|
2001-10-17 10:21:27 +00:00
|
|
|
|
2008-04-29 11:23:51 +00:00
|
|
|
gboolean gst_event_has_name (GstEvent *event, const gchar *name);
|
|
|
|
|
2008-11-04 12:22:53 +00:00
|
|
|
/* identifiers for events and messages */
|
|
|
|
guint32 gst_event_get_seqnum (GstEvent *event);
|
|
|
|
void gst_event_set_seqnum (GstEvent *event, guint32 seqnum);
|
|
|
|
|
2001-10-17 10:21:27 +00:00
|
|
|
/* flush events */
|
2009-09-04 09:35:59 +00:00
|
|
|
GstEvent * gst_event_new_flush_start (void);
|
2011-06-10 09:55:08 +00:00
|
|
|
|
|
|
|
GstEvent * gst_event_new_flush_stop (gboolean reset_time);
|
|
|
|
void gst_event_parse_flush_stop (GstEvent *event, gboolean *reset_time);
|
Some docs updates
Original commit message from CVS:
* CHANGES-0.9:
* docs/design/part-TODO.txt:
* docs/design/part-events.txt:
Some docs updates
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_push), (gst_base_sink_activate_pull):
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_event_handler),
(gst_base_src_loop):
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_event), (gst_base_transform_handle_buffer),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/elements/gstfakesink.c: (gst_fake_sink_event):
* gst/elements/gstfilesink.c: (gst_file_sink_event):
Event updates.
* gst/gstbuffer.h:
Use faster casts.
* gst/gstelement.c: (gst_element_seek):
* gst/gstelement.h:
Update gst_element_seek.
* gst/gstevent.c: (gst_event_finalize), (_gst_event_copy),
(gst_event_new), (gst_event_new_custom), (gst_event_get_structure),
(gst_event_new_flush_start), (gst_event_new_flush_stop),
(gst_event_new_eos), (gst_event_new_newsegment),
(gst_event_parse_newsegment), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_filler), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_navigation):
* gst/gstevent.h:
Make GstEvent use GstStructure. Add parsing code, make sure the
API is sufficiently generic.
Mark possible directions of events and serialization.
* gst/gstmessage.c: (gst_message_init), (gst_message_finalize),
(_gst_message_copy), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_custom),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done):
Small cleanups.
* gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Update for new events.
Catch events sent in wrong directions.
* gst/gstqueue.c: (gst_queue_link_src),
(gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop),
(gst_queue_handle_src_query):
Event updates.
* gst/gsttag.c:
* gst/gsttag.h:
Remove event code from this file.
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event),
(gst_dp_event_from_packet):
Event updates.
2005-07-27 18:33:03 +00:00
|
|
|
|
|
|
|
/* EOS event */
|
2009-09-04 09:35:59 +00:00
|
|
|
GstEvent * gst_event_new_eos (void);
|
Some docs updates
Original commit message from CVS:
* CHANGES-0.9:
* docs/design/part-TODO.txt:
* docs/design/part-events.txt:
Some docs updates
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_push), (gst_base_sink_activate_pull):
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_event_handler),
(gst_base_src_loop):
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_event), (gst_base_transform_handle_buffer),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/elements/gstfakesink.c: (gst_fake_sink_event):
* gst/elements/gstfilesink.c: (gst_file_sink_event):
Event updates.
* gst/gstbuffer.h:
Use faster casts.
* gst/gstelement.c: (gst_element_seek):
* gst/gstelement.h:
Update gst_element_seek.
* gst/gstevent.c: (gst_event_finalize), (_gst_event_copy),
(gst_event_new), (gst_event_new_custom), (gst_event_get_structure),
(gst_event_new_flush_start), (gst_event_new_flush_stop),
(gst_event_new_eos), (gst_event_new_newsegment),
(gst_event_parse_newsegment), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_filler), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_navigation):
* gst/gstevent.h:
Make GstEvent use GstStructure. Add parsing code, make sure the
API is sufficiently generic.
Mark possible directions of events and serialization.
* gst/gstmessage.c: (gst_message_init), (gst_message_finalize),
(_gst_message_copy), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_custom),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done):
Small cleanups.
* gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Update for new events.
Catch events sent in wrong directions.
* gst/gstqueue.c: (gst_queue_link_src),
(gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop),
(gst_queue_handle_src_query):
Event updates.
* gst/gsttag.c:
* gst/gsttag.h:
Remove event code from this file.
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event),
(gst_dp_event_from_packet):
Event updates.
2005-07-27 18:33:03 +00:00
|
|
|
|
2011-05-04 09:03:05 +00:00
|
|
|
/* Caps events */
|
|
|
|
GstEvent * gst_event_new_caps (GstCaps *caps);
|
|
|
|
void gst_event_parse_caps (GstEvent *event, GstCaps **caps);
|
|
|
|
|
2011-05-13 16:07:24 +00:00
|
|
|
/* segment event */
|
|
|
|
GstEvent* gst_event_new_segment (GstSegment *segment);
|
2011-05-18 14:56:13 +00:00
|
|
|
void gst_event_parse_segment (GstEvent *event, const GstSegment **segment);
|
|
|
|
void gst_event_copy_segment (GstEvent *event, GstSegment *segment);
|
docs/design/part-overview.txt: Make upsteam/downstream concepts more clear.
Original commit message from CVS:
* docs/design/part-overview.txt:
Make upsteam/downstream concepts more clear.
Give an example of serialized/non-serialized events.
* docs/design/part-events.txt:
* docs/design/part-streams.txt:
Mention applied_rate.
* docs/design/part-trickmodes.txt:
Mention applied rate, flesh out some more use cases.
* gst/gstevent.c: (gst_event_new_new_segment),
(gst_event_parse_new_segment), (gst_event_new_new_segment_full),
(gst_event_parse_new_segment_full), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_buffer_size),
(gst_event_parse_buffer_size), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_parse_seek),
(gst_event_new_navigation):
* gst/gstevent.h:
Add applied_rate field to NEWSEGMENT event.
API: gst_event_new_new_segment_full()
API: gst_event_parse_new_segment_full()
* gst/gstsegment.c: (gst_segment_init), (gst_segment_set_seek),
(gst_segment_set_newsegment), (gst_segment_set_newsegment_full),
(gst_segment_to_stream_time), (gst_segment_to_running_time):
* gst/gstsegment.h:
Add applied_rate to GstSegment structure.
Make calculation of stream_time and running_time more correct
wrt rate/applied_rate.
Add some more docs.
API: GstSegment::applied_rate field
API: gst_segment_set_newsegment_full();
* libs/gst/base/gstbasesink.c: (gst_base_sink_configure_segment),
(gst_base_sink_get_sync_times), (gst_base_sink_get_position):
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_sink_eventfunc),
(gst_base_transform_handle_buffer):
Parse and use applied_rate in the GstSegment field.
* tests/check/gst/gstevent.c: (GST_START_TEST):
Add check for applied_rate field.
* tests/check/gst/gstsegment.c: (GST_START_TEST),
(gstsegments_suite):
Add more checks for various GstSegment operations.
2006-05-08 09:52:33 +00:00
|
|
|
|
Some docs updates
Original commit message from CVS:
* CHANGES-0.9:
* docs/design/part-TODO.txt:
* docs/design/part-events.txt:
Some docs updates
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_push), (gst_base_sink_activate_pull):
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_event_handler),
(gst_base_src_loop):
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_event), (gst_base_transform_handle_buffer),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/elements/gstfakesink.c: (gst_fake_sink_event):
* gst/elements/gstfilesink.c: (gst_file_sink_event):
Event updates.
* gst/gstbuffer.h:
Use faster casts.
* gst/gstelement.c: (gst_element_seek):
* gst/gstelement.h:
Update gst_element_seek.
* gst/gstevent.c: (gst_event_finalize), (_gst_event_copy),
(gst_event_new), (gst_event_new_custom), (gst_event_get_structure),
(gst_event_new_flush_start), (gst_event_new_flush_stop),
(gst_event_new_eos), (gst_event_new_newsegment),
(gst_event_parse_newsegment), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_filler), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_navigation):
* gst/gstevent.h:
Make GstEvent use GstStructure. Add parsing code, make sure the
API is sufficiently generic.
Mark possible directions of events and serialization.
* gst/gstmessage.c: (gst_message_init), (gst_message_finalize),
(_gst_message_copy), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_custom),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done):
Small cleanups.
* gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Update for new events.
Catch events sent in wrong directions.
* gst/gstqueue.c: (gst_queue_link_src),
(gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop),
(gst_queue_handle_src_query):
Event updates.
* gst/gsttag.c:
* gst/gsttag.h:
Remove event code from this file.
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event),
(gst_dp_event_from_packet):
Event updates.
2005-07-27 18:33:03 +00:00
|
|
|
/* tag event */
|
2009-09-04 09:35:59 +00:00
|
|
|
GstEvent* gst_event_new_tag (GstTagList *taglist);
|
|
|
|
void gst_event_parse_tag (GstEvent *event, GstTagList **taglist);
|
Some docs updates
Original commit message from CVS:
* CHANGES-0.9:
* docs/design/part-TODO.txt:
* docs/design/part-events.txt:
Some docs updates
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_push), (gst_base_sink_activate_pull):
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_event_handler),
(gst_base_src_loop):
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_event), (gst_base_transform_handle_buffer),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/elements/gstfakesink.c: (gst_fake_sink_event):
* gst/elements/gstfilesink.c: (gst_file_sink_event):
Event updates.
* gst/gstbuffer.h:
Use faster casts.
* gst/gstelement.c: (gst_element_seek):
* gst/gstelement.h:
Update gst_element_seek.
* gst/gstevent.c: (gst_event_finalize), (_gst_event_copy),
(gst_event_new), (gst_event_new_custom), (gst_event_get_structure),
(gst_event_new_flush_start), (gst_event_new_flush_stop),
(gst_event_new_eos), (gst_event_new_newsegment),
(gst_event_parse_newsegment), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_filler), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_navigation):
* gst/gstevent.h:
Make GstEvent use GstStructure. Add parsing code, make sure the
API is sufficiently generic.
Mark possible directions of events and serialization.
* gst/gstmessage.c: (gst_message_init), (gst_message_finalize),
(_gst_message_copy), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_custom),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done):
Small cleanups.
* gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Update for new events.
Catch events sent in wrong directions.
* gst/gstqueue.c: (gst_queue_link_src),
(gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop),
(gst_queue_handle_src_query):
Event updates.
* gst/gsttag.c:
* gst/gsttag.h:
Remove event code from this file.
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event),
(gst_dp_event_from_packet):
Event updates.
2005-07-27 18:33:03 +00:00
|
|
|
|
2005-10-07 18:02:14 +00:00
|
|
|
/* buffer */
|
2009-09-04 09:35:59 +00:00
|
|
|
GstEvent * gst_event_new_buffer_size (GstFormat format, gint64 minsize, gint64 maxsize,
|
|
|
|
gboolean async);
|
|
|
|
void gst_event_parse_buffer_size (GstEvent *event, GstFormat *format, gint64 *minsize,
|
|
|
|
gint64 *maxsize, gboolean *async);
|
Some docs updates
Original commit message from CVS:
* CHANGES-0.9:
* docs/design/part-TODO.txt:
* docs/design/part-events.txt:
Some docs updates
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_push), (gst_base_sink_activate_pull):
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_event_handler),
(gst_base_src_loop):
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_event), (gst_base_transform_handle_buffer),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/elements/gstfakesink.c: (gst_fake_sink_event):
* gst/elements/gstfilesink.c: (gst_file_sink_event):
Event updates.
* gst/gstbuffer.h:
Use faster casts.
* gst/gstelement.c: (gst_element_seek):
* gst/gstelement.h:
Update gst_element_seek.
* gst/gstevent.c: (gst_event_finalize), (_gst_event_copy),
(gst_event_new), (gst_event_new_custom), (gst_event_get_structure),
(gst_event_new_flush_start), (gst_event_new_flush_stop),
(gst_event_new_eos), (gst_event_new_newsegment),
(gst_event_parse_newsegment), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_filler), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_navigation):
* gst/gstevent.h:
Make GstEvent use GstStructure. Add parsing code, make sure the
API is sufficiently generic.
Mark possible directions of events and serialization.
* gst/gstmessage.c: (gst_message_init), (gst_message_finalize),
(_gst_message_copy), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_custom),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done):
Small cleanups.
* gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Update for new events.
Catch events sent in wrong directions.
* gst/gstqueue.c: (gst_queue_link_src),
(gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop),
(gst_queue_handle_src_query):
Event updates.
* gst/gsttag.c:
* gst/gsttag.h:
Remove event code from this file.
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event),
(gst_dp_event_from_packet):
Event updates.
2005-07-27 18:33:03 +00:00
|
|
|
|
2011-06-07 11:25:26 +00:00
|
|
|
/* sink message */
|
|
|
|
GstEvent* gst_event_new_sink_message (GstMessage *msg);
|
|
|
|
void gst_event_parse_sink_message (GstEvent *event, GstMessage **msg);
|
|
|
|
|
Some docs updates
Original commit message from CVS:
* CHANGES-0.9:
* docs/design/part-TODO.txt:
* docs/design/part-events.txt:
Some docs updates
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_push), (gst_base_sink_activate_pull):
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_event_handler),
(gst_base_src_loop):
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_event), (gst_base_transform_handle_buffer),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/elements/gstfakesink.c: (gst_fake_sink_event):
* gst/elements/gstfilesink.c: (gst_file_sink_event):
Event updates.
* gst/gstbuffer.h:
Use faster casts.
* gst/gstelement.c: (gst_element_seek):
* gst/gstelement.h:
Update gst_element_seek.
* gst/gstevent.c: (gst_event_finalize), (_gst_event_copy),
(gst_event_new), (gst_event_new_custom), (gst_event_get_structure),
(gst_event_new_flush_start), (gst_event_new_flush_stop),
(gst_event_new_eos), (gst_event_new_newsegment),
(gst_event_parse_newsegment), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_filler), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_navigation):
* gst/gstevent.h:
Make GstEvent use GstStructure. Add parsing code, make sure the
API is sufficiently generic.
Mark possible directions of events and serialization.
* gst/gstmessage.c: (gst_message_init), (gst_message_finalize),
(_gst_message_copy), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_custom),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done):
Small cleanups.
* gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Update for new events.
Catch events sent in wrong directions.
* gst/gstqueue.c: (gst_queue_link_src),
(gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop),
(gst_queue_handle_src_query):
Event updates.
* gst/gsttag.c:
* gst/gsttag.h:
Remove event code from this file.
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event),
(gst_dp_event_from_packet):
Event updates.
2005-07-27 18:33:03 +00:00
|
|
|
/* QOS events */
|
2011-05-09 16:48:55 +00:00
|
|
|
GstEvent* gst_event_new_qos (GstQOSType type, gdouble proportion,
|
2011-02-10 11:02:03 +00:00
|
|
|
GstClockTimeDiff diff, GstClockTime timestamp);
|
2011-05-09 16:48:55 +00:00
|
|
|
void gst_event_parse_qos (GstEvent *event, GstQOSType *type,
|
2011-02-10 11:02:03 +00:00
|
|
|
gdouble *proportion, GstClockTimeDiff *diff,
|
|
|
|
GstClockTime *timestamp);
|
Some docs updates
Original commit message from CVS:
* CHANGES-0.9:
* docs/design/part-TODO.txt:
* docs/design/part-events.txt:
Some docs updates
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_push), (gst_base_sink_activate_pull):
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_event_handler),
(gst_base_src_loop):
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_event), (gst_base_transform_handle_buffer),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/elements/gstfakesink.c: (gst_fake_sink_event):
* gst/elements/gstfilesink.c: (gst_file_sink_event):
Event updates.
* gst/gstbuffer.h:
Use faster casts.
* gst/gstelement.c: (gst_element_seek):
* gst/gstelement.h:
Update gst_element_seek.
* gst/gstevent.c: (gst_event_finalize), (_gst_event_copy),
(gst_event_new), (gst_event_new_custom), (gst_event_get_structure),
(gst_event_new_flush_start), (gst_event_new_flush_stop),
(gst_event_new_eos), (gst_event_new_newsegment),
(gst_event_parse_newsegment), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_filler), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_navigation):
* gst/gstevent.h:
Make GstEvent use GstStructure. Add parsing code, make sure the
API is sufficiently generic.
Mark possible directions of events and serialization.
* gst/gstmessage.c: (gst_message_init), (gst_message_finalize),
(_gst_message_copy), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_custom),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done):
Small cleanups.
* gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Update for new events.
Catch events sent in wrong directions.
* gst/gstqueue.c: (gst_queue_link_src),
(gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop),
(gst_queue_handle_src_query):
Event updates.
* gst/gsttag.c:
* gst/gsttag.h:
Remove event code from this file.
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event),
(gst_dp_event_from_packet):
Event updates.
2005-07-27 18:33:03 +00:00
|
|
|
/* seek event */
|
2009-09-04 09:35:59 +00:00
|
|
|
GstEvent* gst_event_new_seek (gdouble rate, GstFormat format, GstSeekFlags flags,
|
|
|
|
GstSeekType start_type, gint64 start,
|
|
|
|
GstSeekType stop_type, gint64 stop);
|
|
|
|
void gst_event_parse_seek (GstEvent *event, gdouble *rate, GstFormat *format,
|
|
|
|
GstSeekFlags *flags,
|
|
|
|
GstSeekType *start_type, gint64 *start,
|
|
|
|
GstSeekType *stop_type, gint64 *stop);
|
2011-05-13 16:07:24 +00:00
|
|
|
|
Some docs updates
Original commit message from CVS:
* CHANGES-0.9:
* docs/design/part-TODO.txt:
* docs/design/part-events.txt:
Some docs updates
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_event), (gst_base_sink_do_sync),
(gst_base_sink_activate_push), (gst_base_sink_activate_pull):
* gst/base/gstbasesrc.c: (gst_base_src_send_discont),
(gst_base_src_do_seek), (gst_base_src_event_handler),
(gst_base_src_loop):
* gst/base/gstbasetransform.c: (gst_base_transform_transform_caps),
(gst_base_transform_configure_caps), (gst_base_transform_setcaps),
(gst_base_transform_get_size), (gst_base_transform_buffer_alloc),
(gst_base_transform_event), (gst_base_transform_handle_buffer),
(gst_base_transform_set_passthrough),
(gst_base_transform_is_passthrough):
* gst/elements/gstfakesink.c: (gst_fake_sink_event):
* gst/elements/gstfilesink.c: (gst_file_sink_event):
Event updates.
* gst/gstbuffer.h:
Use faster casts.
* gst/gstelement.c: (gst_element_seek):
* gst/gstelement.h:
Update gst_element_seek.
* gst/gstevent.c: (gst_event_finalize), (_gst_event_copy),
(gst_event_new), (gst_event_new_custom), (gst_event_get_structure),
(gst_event_new_flush_start), (gst_event_new_flush_stop),
(gst_event_new_eos), (gst_event_new_newsegment),
(gst_event_parse_newsegment), (gst_event_new_tag),
(gst_event_parse_tag), (gst_event_new_filler), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_navigation):
* gst/gstevent.h:
Make GstEvent use GstStructure. Add parsing code, make sure the
API is sufficiently generic.
Mark possible directions of events and serialization.
* gst/gstmessage.c: (gst_message_init), (gst_message_finalize),
(_gst_message_copy), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_custom),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done):
Small cleanups.
* gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps),
(gst_pad_set_caps), (gst_pad_send_event):
Update for new events.
Catch events sent in wrong directions.
* gst/gstqueue.c: (gst_queue_link_src),
(gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop),
(gst_queue_handle_src_query):
Event updates.
* gst/gsttag.c:
* gst/gsttag.h:
Remove event code from this file.
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event),
(gst_dp_event_from_packet):
Event updates.
2005-07-27 18:33:03 +00:00
|
|
|
/* navigation event */
|
2009-09-04 09:35:59 +00:00
|
|
|
GstEvent* gst_event_new_navigation (GstStructure *structure);
|
2001-10-17 10:21:27 +00:00
|
|
|
|
2007-02-02 11:48:48 +00:00
|
|
|
/* latency event */
|
2009-09-04 09:35:59 +00:00
|
|
|
GstEvent* gst_event_new_latency (GstClockTime latency);
|
|
|
|
void gst_event_parse_latency (GstEvent *event, GstClockTime *latency);
|
2007-02-02 11:48:48 +00:00
|
|
|
|
2009-06-01 10:19:52 +00:00
|
|
|
/* step event */
|
2009-09-04 09:35:59 +00:00
|
|
|
GstEvent* gst_event_new_step (GstFormat format, guint64 amount, gdouble rate,
|
2009-06-01 10:19:52 +00:00
|
|
|
gboolean flush, gboolean intermediate);
|
2009-09-04 09:35:59 +00:00
|
|
|
void gst_event_parse_step (GstEvent *event, GstFormat *format, guint64 *amount,
|
2009-06-01 10:19:52 +00:00
|
|
|
gdouble *rate, gboolean *flush, gboolean *intermediate);
|
|
|
|
|
2011-01-17 14:51:49 +00:00
|
|
|
/* renegotiate event */
|
2011-05-03 11:05:06 +00:00
|
|
|
GstEvent* gst_event_new_reconfigure (void);
|
2011-01-17 14:51:49 +00:00
|
|
|
|
2002-05-26 21:54:27 +00:00
|
|
|
G_END_DECLS
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2001-08-06 20:40:45 +00:00
|
|
|
#endif /* __GST_EVENT_H__ */
|