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
|
2012-11-03 20:44:48 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2001-08-06 20:40:45 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#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:
|
2011-11-23 16:50:17 +00:00
|
|
|
* @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.
|
|
|
|
* @GST_EVENT_TYPE_STICKY: Set if the event is sticky on the pads.
|
|
|
|
* @GST_EVENT_TYPE_STICKY_MULTI: Multiple sticky events can be on a pad, each
|
|
|
|
* identified by the event name.
|
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,
|
2011-11-23 16:50:17 +00:00
|
|
|
GST_EVENT_TYPE_STICKY = 1 << 3,
|
|
|
|
GST_EVENT_TYPE_STICKY_MULTI = 1 << 4
|
2005-11-21 11:06:42 +00:00
|
|
|
} GstEventTypeFlags;
|
|
|
|
|
2005-10-20 20:25:55 +00:00
|
|
|
/**
|
2017-04-05 12:46:26 +00:00
|
|
|
* GST_EVENT_TYPE_BOTH: (value 3) (type GstEventTypeFlags)
|
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 \
|
2017-04-05 12:46:26 +00:00
|
|
|
((GstEventTypeFlags)(GST_EVENT_TYPE_UPSTREAM | GST_EVENT_TYPE_DOWNSTREAM))
|
2005-11-21 11:06:42 +00:00
|
|
|
|
2012-01-26 12:24:44 +00:00
|
|
|
#define GST_EVENT_NUM_SHIFT (8)
|
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
|
|
|
|
* @flags: the event flags
|
|
|
|
*
|
|
|
|
* when making custom event types, use this macro with the num and
|
|
|
|
* the given flags
|
|
|
|
*/
|
2012-01-26 12:24:44 +00:00
|
|
|
#define GST_EVENT_MAKE_TYPE(num,flags) \
|
|
|
|
(((num) << GST_EVENT_NUM_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
|
|
|
|
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.
|
2019-04-23 12:08:18 +00:00
|
|
|
* @GST_EVENT_SELECT_STREAMS: A request to select one or more streams (Since: 1.10)
|
2012-01-27 09:30:43 +00:00
|
|
|
* @GST_EVENT_STREAM_START: Event to mark the start of a new stream. Sent before any
|
|
|
|
* other serialized event and only sent at the start of a new stream,
|
|
|
|
* not after flushing seeks.
|
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.
|
2019-04-23 12:08:18 +00:00
|
|
|
* @GST_EVENT_STREAM_COLLECTION: A new #GstStreamCollection is available (Since: 1.10)
|
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.
|
2016-03-14 03:20:42 +00:00
|
|
|
* @GST_EVENT_STREAM_GROUP_DONE: Indicates that there is no more data for
|
|
|
|
* the stream group ID in the message. Sent before EOS
|
2019-04-23 12:08:18 +00:00
|
|
|
* in some instances and should be handled mostly the same. (Since: 1.10)
|
2011-09-26 18:47:35 +00:00
|
|
|
* @GST_EVENT_EOS: End-Of-Stream. No more data is to be expected to follow
|
2015-06-12 08:53:23 +00:00
|
|
|
* without either a STREAM_START event, or a FLUSH_STOP and a SEGMENT
|
|
|
|
* event.
|
2012-07-05 10:52:51 +00:00
|
|
|
* @GST_EVENT_SEGMENT_DONE: Marks the end of a segment playback.
|
2012-07-03 08:02:55 +00:00
|
|
|
* @GST_EVENT_GAP: Marks a gap in the datastream.
|
2012-03-14 16:40:32 +00:00
|
|
|
* @GST_EVENT_TOC: An event which indicates that a new table of contents (TOC)
|
2012-07-10 09:46:41 +00:00
|
|
|
* was found or updated.
|
2015-03-16 12:35:27 +00:00
|
|
|
* @GST_EVENT_PROTECTION: An event which indicates that new or updated
|
|
|
|
* encryption information has been found in the stream.
|
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.
|
|
|
|
* @GST_EVENT_STEP: A request for stepping through the media. Sinks will usually
|
2012-07-10 09:46:41 +00:00
|
|
|
* execute the step operation.
|
2011-05-03 11:05:06 +00:00
|
|
|
* @GST_EVENT_RECONFIGURE: A request for upstream renegotiating caps and reconfiguring.
|
2012-03-14 16:40:32 +00:00
|
|
|
* @GST_EVENT_TOC_SELECT: A request for a new playback position based on TOC
|
2012-07-10 09:46:41 +00:00
|
|
|
* entry's UID.
|
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.
|
2011-11-28 09:55:28 +00:00
|
|
|
* @GST_EVENT_CUSTOM_DOWNSTREAM_STICKY: Custom sticky 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 {
|
2012-01-26 12:24:44 +00:00
|
|
|
GST_EVENT_UNKNOWN = GST_EVENT_MAKE_TYPE (0, 0),
|
2012-01-26 15:31:50 +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
|
|
|
/* bidirectional events */
|
2012-01-26 12:24:44 +00:00
|
|
|
GST_EVENT_FLUSH_START = GST_EVENT_MAKE_TYPE (10, FLAG(BOTH)),
|
|
|
|
GST_EVENT_FLUSH_STOP = GST_EVENT_MAKE_TYPE (20, FLAG(BOTH) | FLAG(SERIALIZED)),
|
2012-01-26 15:31:50 +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
|
|
|
/* downstream serialized events */
|
2012-01-26 15:31:50 +00:00
|
|
|
GST_EVENT_STREAM_START = GST_EVENT_MAKE_TYPE (40, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)),
|
|
|
|
GST_EVENT_CAPS = GST_EVENT_MAKE_TYPE (50, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)),
|
|
|
|
GST_EVENT_SEGMENT = GST_EVENT_MAKE_TYPE (70, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)),
|
2015-06-12 08:53:23 +00:00
|
|
|
GST_EVENT_STREAM_COLLECTION = GST_EVENT_MAKE_TYPE (75, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY) | FLAG(STICKY_MULTI)),
|
2012-01-26 15:31:50 +00:00
|
|
|
GST_EVENT_TAG = GST_EVENT_MAKE_TYPE (80, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY) | FLAG(STICKY_MULTI)),
|
|
|
|
GST_EVENT_BUFFERSIZE = GST_EVENT_MAKE_TYPE (90, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)),
|
2012-01-27 09:54:56 +00:00
|
|
|
GST_EVENT_SINK_MESSAGE = GST_EVENT_MAKE_TYPE (100, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY) | FLAG(STICKY_MULTI)),
|
2016-03-14 03:20:42 +00:00
|
|
|
GST_EVENT_STREAM_GROUP_DONE = GST_EVENT_MAKE_TYPE (105, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)),
|
2012-01-27 09:54:56 +00:00
|
|
|
GST_EVENT_EOS = GST_EVENT_MAKE_TYPE (110, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)),
|
2012-07-28 08:41:30 +00:00
|
|
|
GST_EVENT_TOC = GST_EVENT_MAKE_TYPE (120, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY) | FLAG(STICKY_MULTI)),
|
2015-03-16 12:35:27 +00:00
|
|
|
GST_EVENT_PROTECTION = GST_EVENT_MAKE_TYPE (130, FLAG (DOWNSTREAM) | FLAG (SERIALIZED) | FLAG (STICKY) | FLAG (STICKY_MULTI)),
|
2012-01-26 15:31:50 +00:00
|
|
|
|
|
|
|
/* non-sticky downstream serialized */
|
|
|
|
GST_EVENT_SEGMENT_DONE = GST_EVENT_MAKE_TYPE (150, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)),
|
2012-01-27 09:54:56 +00:00
|
|
|
GST_EVENT_GAP = GST_EVENT_MAKE_TYPE (160, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)),
|
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 */
|
2012-01-27 09:54:56 +00:00
|
|
|
GST_EVENT_QOS = GST_EVENT_MAKE_TYPE (190, FLAG(UPSTREAM)),
|
|
|
|
GST_EVENT_SEEK = GST_EVENT_MAKE_TYPE (200, FLAG(UPSTREAM)),
|
|
|
|
GST_EVENT_NAVIGATION = GST_EVENT_MAKE_TYPE (210, FLAG(UPSTREAM)),
|
|
|
|
GST_EVENT_LATENCY = GST_EVENT_MAKE_TYPE (220, FLAG(UPSTREAM)),
|
|
|
|
GST_EVENT_STEP = GST_EVENT_MAKE_TYPE (230, FLAG(UPSTREAM)),
|
|
|
|
GST_EVENT_RECONFIGURE = GST_EVENT_MAKE_TYPE (240, FLAG(UPSTREAM)),
|
2012-04-02 19:15:09 +00:00
|
|
|
GST_EVENT_TOC_SELECT = GST_EVENT_MAKE_TYPE (250, FLAG(UPSTREAM)),
|
2015-06-12 08:53:23 +00:00
|
|
|
GST_EVENT_SELECT_STREAMS = GST_EVENT_MAKE_TYPE (260, 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 */
|
2012-01-27 09:54:56 +00:00
|
|
|
GST_EVENT_CUSTOM_UPSTREAM = GST_EVENT_MAKE_TYPE (270, FLAG(UPSTREAM)),
|
|
|
|
GST_EVENT_CUSTOM_DOWNSTREAM = GST_EVENT_MAKE_TYPE (280, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)),
|
|
|
|
GST_EVENT_CUSTOM_DOWNSTREAM_OOB = GST_EVENT_MAKE_TYPE (290, FLAG(DOWNSTREAM)),
|
|
|
|
GST_EVENT_CUSTOM_DOWNSTREAM_STICKY = GST_EVENT_MAKE_TYPE (300, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY) | FLAG(STICKY_MULTI)),
|
|
|
|
GST_EVENT_CUSTOM_BOTH = GST_EVENT_MAKE_TYPE (310, FLAG(BOTH) | FLAG(SERIALIZED)),
|
|
|
|
GST_EVENT_CUSTOM_BOTH_OOB = GST_EVENT_MAKE_TYPE (320, 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
|
|
|
|
2015-06-12 08:53:23 +00:00
|
|
|
/**
|
|
|
|
* GstStreamFlags:
|
|
|
|
* @GST_STREAM_FLAG_NONE: This stream has no special attributes
|
|
|
|
* @GST_STREAM_FLAG_SPARSE: This stream is a sparse stream (e.g. a subtitle
|
|
|
|
* stream), data may flow only in irregular intervals with large gaps in
|
|
|
|
* between.
|
|
|
|
* @GST_STREAM_FLAG_SELECT: This stream should be selected by default. This
|
|
|
|
* flag may be used by demuxers to signal that a stream should be selected
|
|
|
|
* by default in a playback scenario.
|
|
|
|
* @GST_STREAM_FLAG_UNSELECT: This stream should not be selected by default.
|
|
|
|
* This flag may be used by demuxers to signal that a stream should not
|
|
|
|
* be selected by default in a playback scenario, but only if explicitly
|
|
|
|
* selected by the user (e.g. an audio track for the hard of hearing or
|
|
|
|
* a director's commentary track).
|
|
|
|
*
|
|
|
|
* Since: 1.2
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
GST_STREAM_FLAG_NONE,
|
|
|
|
GST_STREAM_FLAG_SPARSE = (1 << 0),
|
|
|
|
GST_STREAM_FLAG_SELECT = (1 << 1),
|
|
|
|
GST_STREAM_FLAG_UNSELECT = (1 << 2)
|
|
|
|
} GstStreamFlags;
|
|
|
|
|
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/gstmessage.h>
|
2013-03-28 14:35:13 +00:00
|
|
|
#include <gst/gstcontext.h>
|
2017-01-11 20:25:08 +00:00
|
|
|
#include <gst/gststreams.h>
|
|
|
|
#include <gst/gsttoc.h>
|
|
|
|
#include <gst/gststreamcollection.h>
|
2011-06-07 11:38:35 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API GType _gst_event_type;
|
2011-06-07 11:38:35 +00:00
|
|
|
|
|
|
|
#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))
|
|
|
|
|
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
|
|
|
*/
|
2018-05-06 15:32:14 +00:00
|
|
|
/* FIXME 2.0: Remove the GstEvent::timestamp field */
|
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:
|
2014-06-11 23:06:19 +00:00
|
|
|
* @old_event: (inout) (transfer full) (nullable): pointer to a
|
|
|
|
* pointer to a #GstEvent to be replaced.
|
2010-12-07 18:35:04 +00:00
|
|
|
* @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).
|
|
|
|
*
|
2014-05-29 21:54:34 +00:00
|
|
|
* Either @new_event or the #GstEvent pointed to by @old_event may be %NULL.
|
2006-01-20 11:46:03 +00:00
|
|
|
*
|
2014-05-29 21:54:34 +00:00
|
|
|
* Returns: %TRUE if @new_event was different from @old_event
|
2006-01-20 11:46:03 +00:00
|
|
|
*/
|
2011-11-22 11:45:41 +00:00
|
|
|
static inline gboolean
|
2011-10-13 08:18:51 +00:00
|
|
|
gst_event_replace (GstEvent **old_event, GstEvent *new_event)
|
|
|
|
{
|
2011-11-22 11:45:41 +00:00
|
|
|
return gst_mini_object_replace ((GstMiniObject **) old_event, (GstMiniObject *) new_event);
|
2011-10-13 08:18:51 +00:00
|
|
|
}
|
2006-01-20 11:46:03 +00:00
|
|
|
|
2011-06-09 11:36:52 +00:00
|
|
|
/**
|
|
|
|
* gst_event_steal:
|
2014-06-11 23:06:19 +00:00
|
|
|
* @old_event: (inout) (transfer full) (nullable): pointer to a
|
|
|
|
* pointer to a #GstEvent to be stolen.
|
2011-06-09 11:36:52 +00:00
|
|
|
*
|
2014-05-29 21:54:34 +00:00
|
|
|
* Atomically replace the #GstEvent pointed to by @old_event with %NULL and
|
2011-06-09 11:36:52 +00:00
|
|
|
* return the original event.
|
|
|
|
*
|
|
|
|
* Returns: the #GstEvent that was in @old_event
|
|
|
|
*/
|
2011-12-05 09:24:34 +00:00
|
|
|
static inline GstEvent *
|
|
|
|
gst_event_steal (GstEvent **old_event)
|
|
|
|
{
|
|
|
|
return GST_EVENT_CAST (gst_mini_object_steal ((GstMiniObject **) old_event));
|
|
|
|
}
|
|
|
|
|
2011-06-09 11:36:52 +00:00
|
|
|
/**
|
|
|
|
* gst_event_take:
|
2014-06-11 23:06:19 +00:00
|
|
|
* @old_event: (inout) (transfer full) (nullable): pointer to a
|
|
|
|
* pointer to a #GstEvent to be stolen.
|
2011-06-09 11:36:52 +00:00
|
|
|
* @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.
|
|
|
|
*
|
2014-05-29 21:54:34 +00:00
|
|
|
* Either @new_event or the #GstEvent pointed to by @old_event may be %NULL.
|
2011-06-09 11:36:52 +00:00
|
|
|
*
|
2014-05-29 21:54:34 +00:00
|
|
|
* Returns: %TRUE if @new_event was different from @old_event
|
2011-06-09 11:36:52 +00:00
|
|
|
*/
|
2011-12-05 09:24:34 +00:00
|
|
|
static inline gboolean
|
|
|
|
gst_event_take (GstEvent **old_event, GstEvent *new_event)
|
|
|
|
{
|
|
|
|
return gst_mini_object_take ((GstMiniObject **) old_event, (GstMiniObject *) new_event);
|
|
|
|
}
|
2006-01-20 11:46:03 +00:00
|
|
|
|
2011-02-10 11:02:03 +00:00
|
|
|
/**
|
|
|
|
* GstQOSType:
|
2014-10-08 17:21:56 +00:00
|
|
|
* @GST_QOS_TYPE_OVERFLOW: The QoS event type that is produced when upstream
|
2011-02-10 11:02:03 +00:00
|
|
|
* elements are producing data too quickly and the element can't keep up
|
2014-10-08 17:21:56 +00:00
|
|
|
* processing the data. Upstream should reduce their production rate. This
|
2011-02-10 11:02:03 +00:00
|
|
|
* type is also used when buffers arrive early or in time.
|
2014-10-08 17:21:56 +00:00
|
|
|
* @GST_QOS_TYPE_UNDERFLOW: The QoS event type that is produced when upstream
|
|
|
|
* elements are producing data too slowly and need to speed up their
|
|
|
|
* production rate.
|
2011-02-10 11:02:03 +00:00
|
|
|
* @GST_QOS_TYPE_THROTTLE: The QoS event type that is produced when the
|
2014-10-08 17:21:56 +00:00
|
|
|
* application enabled throttling to limit the data rate.
|
2011-02-10 11:02:03 +00:00
|
|
|
*
|
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
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
GST_QOS_TYPE_OVERFLOW = 0,
|
|
|
|
GST_QOS_TYPE_UNDERFLOW = 1,
|
|
|
|
GST_QOS_TYPE_THROTTLE = 2
|
|
|
|
} GstQOSType;
|
|
|
|
|
2013-01-06 20:27:54 +00:00
|
|
|
|
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;
|
2018-05-06 15:32:14 +00:00
|
|
|
/* FIXME 2.0: Remove the GstEvent::timestamp field */
|
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
|
|
|
};
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2005-10-06 13:55:43 +00:00
|
|
|
const gchar* gst_event_type_get_name (GstEventType type);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2009-09-04 09:35:59 +00:00
|
|
|
GQuark gst_event_type_to_quark (GstEventType type);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
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-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
|
|
|
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
|
|
|
|
2018-11-04 17:53:51 +00:00
|
|
|
/**
|
|
|
|
* gst_clear_event: (skip)
|
|
|
|
* @event_ptr: a pointer to a #GstEvent reference
|
|
|
|
*
|
|
|
|
* Clears a reference to a #GstEvent.
|
|
|
|
*
|
|
|
|
* @event_ptr must not be %NULL.
|
|
|
|
*
|
|
|
|
* If the reference is %NULL then this function does nothing. Otherwise, the
|
|
|
|
* reference count of the event is decreased and the pointer is set to %NULL.
|
|
|
|
*
|
|
|
|
* Since: 1.16
|
|
|
|
*/
|
|
|
|
static inline void
|
|
|
|
gst_clear_event (GstEvent ** event_ptr)
|
|
|
|
{
|
2018-11-05 13:03:51 +00:00
|
|
|
gst_clear_mini_object ((GstMiniObject **) event_ptr);
|
2018-11-04 17:53:51 +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
|
|
|
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
|
|
|
}
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
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 */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-26 18:57:44 +00:00
|
|
|
GstEvent* gst_event_new_custom (GstEventType type, GstStructure *structure) G_GNUC_MALLOC;
|
2002-12-30 17:42:11 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2005-10-06 13:42:56 +00:00
|
|
|
const GstStructure *
|
2009-09-04 09:35:59 +00:00
|
|
|
gst_event_get_structure (GstEvent *event);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-05-10 09:50:16 +00:00
|
|
|
GstStructure * gst_event_writable_structure (GstEvent *event);
|
2001-10-17 10:21:27 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
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 */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2008-11-04 12:22:53 +00:00
|
|
|
guint32 gst_event_get_seqnum (GstEvent *event);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2008-11-04 12:22:53 +00:00
|
|
|
void gst_event_set_seqnum (GstEvent *event, guint32 seqnum);
|
|
|
|
|
2014-04-04 15:06:18 +00:00
|
|
|
/* accumulated pad offsets for the event */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2014-04-04 15:06:18 +00:00
|
|
|
gint64 gst_event_get_running_time_offset (GstEvent *event);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2014-04-04 15:06:18 +00:00
|
|
|
void gst_event_set_running_time_offset (GstEvent *event, gint64 offset);
|
|
|
|
|
2012-01-27 09:30:43 +00:00
|
|
|
/* Stream start event */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2012-07-28 06:37:00 +00:00
|
|
|
GstEvent * gst_event_new_stream_start (const gchar *stream_id) G_GNUC_MALLOC;
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2012-07-28 06:37:00 +00:00
|
|
|
void gst_event_parse_stream_start (GstEvent *event, const gchar **stream_id);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2015-06-12 08:53:23 +00:00
|
|
|
void gst_event_set_stream (GstEvent *event, GstStream *stream);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2015-06-12 08:53:23 +00:00
|
|
|
void gst_event_parse_stream (GstEvent *event, GstStream **stream);
|
2012-01-27 09:30:43 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2013-01-06 20:27:54 +00:00
|
|
|
void gst_event_set_stream_flags (GstEvent *event, GstStreamFlags flags);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2013-01-06 20:27:54 +00:00
|
|
|
void gst_event_parse_stream_flags (GstEvent *event, GstStreamFlags *flags);
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2013-07-22 09:41:35 +00:00
|
|
|
void gst_event_set_group_id (GstEvent *event, guint group_id);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2013-07-22 09:41:35 +00:00
|
|
|
gboolean gst_event_parse_group_id (GstEvent *event, guint *group_id);
|
|
|
|
|
2001-10-17 10:21:27 +00:00
|
|
|
/* flush events */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-26 18:57:44 +00:00
|
|
|
GstEvent * gst_event_new_flush_start (void) G_GNUC_MALLOC;
|
2011-06-10 09:55:08 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-26 19:44:23 +00:00
|
|
|
GstEvent * gst_event_new_flush_stop (gboolean reset_time) G_GNUC_MALLOC;
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-06-10 09:55:08 +00:00
|
|
|
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
|
|
|
|
2015-06-12 08:53:23 +00:00
|
|
|
/* Stream collection event */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2015-06-12 08:53:23 +00:00
|
|
|
GstEvent * gst_event_new_stream_collection (GstStreamCollection *collection) G_GNUC_MALLOC;
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2015-06-12 08:53:23 +00:00
|
|
|
void gst_event_parse_stream_collection (GstEvent *event, GstStreamCollection **collection);
|
|
|
|
|
|
|
|
/* select streams event */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2015-06-12 08:53:23 +00:00
|
|
|
GstEvent * gst_event_new_select_streams (GList *streams);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2015-06-12 08:53:23 +00:00
|
|
|
void gst_event_parse_select_streams (GstEvent *event, GList **streams);
|
|
|
|
|
2016-03-14 03:20:42 +00:00
|
|
|
/* stream-group-done event */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2016-11-11 18:30:44 +00:00
|
|
|
GstEvent * gst_event_new_stream_group_done (guint group_id) G_GNUC_MALLOC;
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2016-03-14 03:20:42 +00:00
|
|
|
void gst_event_parse_stream_group_done (GstEvent *event, guint *group_id);
|
|
|
|
|
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 */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-26 18:57:44 +00:00
|
|
|
GstEvent * gst_event_new_eos (void) G_GNUC_MALLOC;
|
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
|
|
|
|
2012-01-27 18:56:01 +00:00
|
|
|
/* GAP event */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2012-02-17 23:53:58 +00:00
|
|
|
GstEvent * gst_event_new_gap (GstClockTime timestamp,
|
2012-01-27 18:56:01 +00:00
|
|
|
GstClockTime duration) G_GNUC_MALLOC;
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2012-01-27 18:56:01 +00:00
|
|
|
void gst_event_parse_gap (GstEvent * event,
|
|
|
|
GstClockTime * timestamp,
|
|
|
|
GstClockTime * duration);
|
|
|
|
|
2011-05-04 09:03:05 +00:00
|
|
|
/* Caps events */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-26 19:44:23 +00:00
|
|
|
GstEvent * gst_event_new_caps (GstCaps *caps) G_GNUC_MALLOC;
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-05-04 09:03:05 +00:00
|
|
|
void gst_event_parse_caps (GstEvent *event, GstCaps **caps);
|
|
|
|
|
2011-05-13 16:07:24 +00:00
|
|
|
/* segment event */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-26 19:44:23 +00:00
|
|
|
GstEvent* gst_event_new_segment (const GstSegment *segment) G_GNUC_MALLOC;
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-05-18 14:56:13 +00:00
|
|
|
void gst_event_parse_segment (GstEvent *event, const GstSegment **segment);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-05-18 14:56:13 +00:00
|
|
|
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 */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2012-07-27 21:52:12 +00:00
|
|
|
GstEvent* gst_event_new_tag (GstTagList *taglist) G_GNUC_MALLOC;
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2009-09-04 09:35:59 +00:00
|
|
|
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
|
|
|
|
2012-03-14 16:40:32 +00:00
|
|
|
/* TOC event */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2012-06-06 12:14:31 +00:00
|
|
|
GstEvent* gst_event_new_toc (GstToc *toc, gboolean updated);
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2012-03-14 16:40:32 +00:00
|
|
|
void gst_event_parse_toc (GstEvent *event, GstToc **toc, gboolean *updated);
|
|
|
|
|
2015-03-16 12:35:27 +00:00
|
|
|
/* Protection event */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2015-04-18 11:31:02 +00:00
|
|
|
GstEvent * gst_event_new_protection (const gchar * system_id, GstBuffer * data, const gchar * origin);
|
2015-03-16 12:35:27 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2015-04-18 11:31:02 +00:00
|
|
|
void gst_event_parse_protection (GstEvent * event, const gchar ** system_id,
|
|
|
|
GstBuffer ** data, const gchar ** origin);
|
2012-03-14 16:40:32 +00:00
|
|
|
|
2005-10-07 18:02:14 +00:00
|
|
|
/* buffer */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2009-09-04 09:35:59 +00:00
|
|
|
GstEvent * gst_event_new_buffer_size (GstFormat format, gint64 minsize, gint64 maxsize,
|
2011-11-26 18:57:44 +00:00
|
|
|
gboolean async) G_GNUC_MALLOC;
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2009-09-04 09:35:59 +00:00
|
|
|
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 */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2012-06-06 10:52:09 +00:00
|
|
|
GstEvent* gst_event_new_sink_message (const gchar *name, GstMessage *msg) G_GNUC_MALLOC;
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-06-07 11:25:26 +00:00
|
|
|
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 */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-05-09 16:48:55 +00:00
|
|
|
GstEvent* gst_event_new_qos (GstQOSType type, gdouble proportion,
|
2011-11-26 18:57:44 +00:00
|
|
|
GstClockTimeDiff diff, GstClockTime timestamp) G_GNUC_MALLOC;
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
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 */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2009-09-04 09:35:59 +00:00
|
|
|
GstEvent* gst_event_new_seek (gdouble rate, GstFormat format, GstSeekFlags flags,
|
|
|
|
GstSeekType start_type, gint64 start,
|
2011-11-26 18:57:44 +00:00
|
|
|
GstSeekType stop_type, gint64 stop) G_GNUC_MALLOC;
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2009-09-04 09:35:59 +00:00
|
|
|
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
|
|
|
|
2019-04-01 16:34:07 +00:00
|
|
|
GST_API
|
|
|
|
void gst_event_set_seek_trickmode_interval (GstEvent *event, GstClockTime interval);
|
|
|
|
|
|
|
|
GST_API
|
|
|
|
void gst_event_parse_seek_trickmode_interval (GstEvent *event, GstClockTime *interval);
|
|
|
|
|
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 */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-26 18:57:44 +00:00
|
|
|
GstEvent* gst_event_new_navigation (GstStructure *structure) G_GNUC_MALLOC;
|
2001-10-17 10:21:27 +00:00
|
|
|
|
2007-02-02 11:48:48 +00:00
|
|
|
/* latency event */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-26 18:57:44 +00:00
|
|
|
GstEvent* gst_event_new_latency (GstClockTime latency) G_GNUC_MALLOC;
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2009-09-04 09:35:59 +00:00
|
|
|
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 */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2009-09-04 09:35:59 +00:00
|
|
|
GstEvent* gst_event_new_step (GstFormat format, guint64 amount, gdouble rate,
|
2011-11-26 18:57:44 +00:00
|
|
|
gboolean flush, gboolean intermediate) G_GNUC_MALLOC;
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
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 */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2011-11-26 19:44:23 +00:00
|
|
|
GstEvent* gst_event_new_reconfigure (void) G_GNUC_MALLOC;
|
2011-01-17 14:51:49 +00:00
|
|
|
|
2012-03-14 16:40:32 +00:00
|
|
|
/* TOC select event */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2012-04-02 19:15:09 +00:00
|
|
|
GstEvent* gst_event_new_toc_select (const gchar *uid) G_GNUC_MALLOC;
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2012-03-14 16:40:32 +00:00
|
|
|
void gst_event_parse_toc_select (GstEvent *event, gchar **uid);
|
|
|
|
|
2012-07-05 10:52:51 +00:00
|
|
|
/* segment-done event */
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2012-07-05 11:03:10 +00:00
|
|
|
GstEvent* gst_event_new_segment_done (GstFormat format, gint64 position) G_GNUC_MALLOC;
|
2017-05-10 09:56:16 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2012-07-05 11:03:10 +00:00
|
|
|
void gst_event_parse_segment_done (GstEvent *event, GstFormat *format, gint64 *position);
|
2012-07-05 10:52:51 +00:00
|
|
|
|
2015-11-10 17:38:59 +00:00
|
|
|
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
|
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstEvent, gst_event_unref)
|
|
|
|
#endif
|
|
|
|
|
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__ */
|