Commit graph

128 commits

Author SHA1 Message Date
Alexander Saprykin c3f97992c4 Add new TOC and TOC select events 2012-04-02 21:50:55 +02:00
Tim-Philipp Müller c8380cb0d2 gst: sprinkle some G_GNUC_MALLOC
Maybe gcc can do something clever with that, or at least
warn us if we don't save the return value somewhere.
2011-11-26 18:57:44 +00:00
Sebastian Dröge ef32fd0d15 event: Use an inline function instead of a macro for gst_event_replace()
This gives us type checks by the compiler and more useful compiler errors.
2011-10-13 10:18:51 +02:00
Piotr Fusik 14f5518f3d docs, gst: typo fixes
https://bugzilla.gnome.org/show_bug.cgi?id=658449
2011-09-07 18:03:17 +01:00
Tim-Philipp Müller e1ac508cab docs: add pointer to part-seeking.txt design docs to event seek flags docs 2011-04-03 16:18:54 +01:00
Sebastian Dröge 27c0a2b9b1 event: Add since marker to GST_EVENT_SINK_MESSAGE 2011-03-19 10:39:28 +01:00
Wim Taymans 56826a5ee6 event: add QoS event type
Add a parameter to the QoS event to specify the QoS event type.
Update docs and add unit test.

See #638891
2011-02-10 15:21:45 +01:00
Tim-Philipp Müller 3256c708be docs: gst: more gobject introspection annotations
Many of these are superfluous, added for clarity.
2010-12-07 18:37:04 +00:00
Jeffrey S. Smith 4375e998ee Fix casts in a bunch of inline functions to maintain correct const-ness
Make code including GStreamer headers compile with -Wcast-qual by
maintaining const-ness when casting. Also fix function signature of
gst_byte_writer_set_pos(): the byte writer should not be marked as
const.

https://bugzilla.gnome.org/show_bug.cgi?id=627910
2010-09-02 00:09:08 +01:00
Wim Taymans c13e225a17 docs: add some more docs for the events 2010-04-29 10:26:14 +02:00
Stefan Kost 1526e34687 docs: add missing returns: tag 2010-01-05 00:09:10 +02:00
Wim Taymans c2b0e9de25 Use plain casting instead of typechecking 2009-12-07 20:52:22 +01:00
Wim Taymans d5e42a92c8 event: fix docs for _copy() 2009-12-02 13:29:28 +01:00
Stefan Kost 22abe6fbcf docs: document new event in enum 2009-11-25 14:21:50 +02:00
Sebastian Dröge fee1ad3a0a event: API: Add sink-message event
gst_event_new_sink_message()
gst_event_parse_sink_message()

This event is used for sending a GstMessage downstream and synchronized
with the stream, to be posted by the sink once it reaches the sink.

Fixes bug #602275.
2009-11-18 13:12:27 +01:00
Wim Taymans 1b8a3e0e2d event: whitespace fixes 2009-09-04 11:35:59 +02:00
Wim Taymans 386c516e51 add new API for framestepping
Add new STEP event and methods for creating/parsing the event
Update design docs.
Add new STEP_DONE message and method to create/parse.

API: GstEvent::gst_event_new_step()
API: GstEvent::gst_event_parse_step()
API: GstMessage::gst_message_new_step_done()
API: GstMessage::gst_message_parse_step_done()
2009-06-01 13:36:49 +02:00
Wim Taymans 5467c64379 docs: Improve some docs
Rename some function variables and add some Return: to make the docs more happy.
2009-03-12 10:48:21 +01:00
Ali Sabil 136cfb3bed Convert unref/copy functions of GstMiniObject subclasses to static inline functions
unref and copy functions are sometimes used as function
pointers for example in the case of g_hash_table_new_full
as a GDestroyNotify function.

Currently GstBuffer, GstEvent, GstMessage and GstQuery
define their respective unref and copy functions as
macros, making use of gst_mini_object_unref/copy.
This approach works very well for most cases, except
for some automatically generated bindings (currently Vala),
where the memory management semantics are defined
declaratively.

The possible solutions would be to either convert all
the macros into static inline function, or change the
signature of gst_mini_object_unref to take a void*
instead of a GstMiniObject*.

Fixes bug #572480.
2009-02-22 18:51:08 +01:00
Wim Taymans 812640dd18 gst/gstevent.h: Add a SKIP seek flag for use with advanced trickmodes.
Original commit message from CVS:
* gst/gstevent.h:
Add a SKIP seek flag for use with advanced trickmodes.
API: GstSeekFlags::GST_SEEK_FLAG_SKIP
2008-11-06 12:03:17 +00:00
Andy Wingo 5f5fbbdd7d Add sequence numbers to events and messages. See #559250.
Original commit message from CVS:
2008-11-04  Andy Wingo  <wingo@pobox.com>

Add sequence numbers to events and messages. See #559250.

* gst/gstutils.c (gst_util_seqnum_next, gst_util_seqnum_compare):
New functions.

* gst/gstevent.h:
* gst/gstevent.c (_gst_event_copy, gst_event_new): Initialize new
events with a new sequence number, and copy it when copying.
(gst_event_get_seqnum, gst_event_set_seqnum): Accessors for an
event's sequence number.

* gst/gstmessage.h:
* gst/gstmessage.c (_gst_message_copy, gst_message_new_custom):
(gst_event_get_seqnum, gst_event_set_seqnum): As with events, so
with messages.

* docs/gst/gstreamer-sections.txt: Add new functions to the docs.
2008-11-04 12:22:53 +00:00
Tim-Philipp Müller 2a1af2c947 gst/gstevent.h: Clarify docs for GST_SEEK_TYPE_CUR (#534505).
Original commit message from CVS:
* gst/gstevent.h:
Clarify docs for GST_SEEK_TYPE_CUR (#534505).
2008-05-25 14:44:44 +00:00
Wim Taymans cf45b88349 Add method to conveniently check the name of a custom event with gst_event_has_name().
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstevent.c: (gst_event_has_name):
* gst/gstevent.h:
* tests/check/gst/gstevent.c: (GST_START_TEST):
Add method to conveniently check the name of a custom event with
gst_event_has_name().
Reformat the event docs so that related methods are put together instead
of the default alphabetical sort.
Update unit test with new method.
API: GstEvent::gst_event_has_name()
2008-04-29 11:23:51 +00:00
Tim-Philipp Müller 4e121ae147 gst/: Move declaration of private _gst_foo_initialize() functions into our private header file where they should have...
Original commit message from CVS:
* gst/gst_private.h:
* gst/gstbuffer.h:
* gst/gstevent.h:
* gst/gstformat.h:
* gst/gstmessage.h:
* gst/gstplugin.h:
* gst/gstquery.h:
* gst/gsttaglist.h:
* gst/gstvalue.h:
Move declaration of private _gst_foo_initialize() functions into
our private header file where they should have been all along.
2007-11-02 18:35:37 +00:00
Wim Taymans 74da6ad937 docs/gst/gstreamer-sections.txt: Add docs for new methods.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
Add docs for new methods.
* gst/gstevent.c: (gst_event_new_latency),
(gst_event_parse_latency):
* gst/gstevent.h:
Add new LATENCY event to configure latency in a pipeline.
API: gst_event_new_latency
API: gst_event_parse_latency
* gst/gstmessage.c: (gst_message_new_buffering),
(gst_message_new_lost_preroll), (gst_message_new_prerolled),
(gst_message_new_latency), (gst_message_parse_buffering),
(gst_message_parse_lost_preroll):
* gst/gstmessage.h:
Added messages used in draft-latency.
API: gst_message_new_lost_preroll
API: gst_message_parse_lost_preroll
API: gst_message_new_prerolled
API: gst_message_new_latency
* gst/gstquery.c: (gst_query_new_latency), (gst_query_set_latency),
(gst_query_parse_latency):
* gst/gstquery.h:
Implemented new latency query as in design doc.
API: gst_query_new_latency
API: gst_query_set_latency
API: gst_query_parse_latency
2007-02-02 11:48:48 +00:00
Wim Taymans ececbda2b2 gst/gstevent.*: Reserve LATENCY event.
Original commit message from CVS:
* gst/gstevent.c:
* gst/gstevent.h:
Reserve LATENCY event.
2007-01-10 10:21:47 +00:00
Wim Taymans 9bece70bf2 gst/gstevent.h: Add small comment.
Original commit message from CVS:
* gst/gstevent.h:
Add small comment.
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_sink_eventfunc):
Debug segment values *after* updating them as this is more
interesting.
2006-10-24 08:22:19 +00:00
Wim Taymans 89814eed61 docs/design/part-qos.txt: Fix typo.
Original commit message from CVS:
* docs/design/part-qos.txt:
Fix typo.
* gst/gstevent.c:
* gst/gstevent.h:
Update seek event docs regarding negative rates.
Rename @cur to @start.
* gst/gstsegment.c: (gst_segment_set_seek):
* gst/gstsegment.h:
Update set_seek docs regarding negative rates.
Correctly update last_stop to @stop when dealing with negative
rates.
Rename @cur to @start.
* tests/check/gst/gstpad.c: (GST_START_TEST):
Activate pads before trying to use them.
* tests/check/gst/gstsegment.c: (GST_START_TEST),
(gst_segment_suite):
Add simple check for segments and negative rates.
2006-10-09 16:33:29 +00:00
Wim Taymans 84fc21c3c1 gst/gstbin.c: Update documentation.
Original commit message from CVS:
* gst/gstbin.c:
Update documentation.
* gst/gstelement.c: (gst_element_class_init),
(gst_element_release_request_pad), (gst_element_set_clock),
(gst_element_get_index), (gst_element_add_pad),
(gst_element_remove_pad), (gst_element_get_random_pad),
(gst_element_send_event), (gst_element_get_query_types),
(gst_element_query), (gst_element_post_message),
(gst_element_message_full), (gst_element_continue_state),
(gst_element_lost_state), (gst_element_save_thyself),
(gst_element_restore_thyself):
Documentation updates.
Rename last bit of the new-pad -> pad-added signal rename.
Fix the case where an element query would only work if the source
pad was linked.
Avoid some useless type checking in message handling.
* gst/gstevent.c:
* gst/gstevent.h:
* gst/gstutils.c:
Documentation updates.
2006-09-15 08:32:57 +00:00
Wim Taymans 15d8500f57 gst/: Remove comma at end of enumerator list.
Original commit message from CVS:
* gst/gstbus.h:
* gst/gstclock.h:
* gst/gstevent.h:
* gst/gstiterator.h:
* gst/gstpad.h:
* gst/gstplugin.h:
* gst/gsttask.h:
Remove comma at end of enumerator list.
2006-07-06 09:21:03 +00:00
Thomas Vander Stichele 6b33231aa7 whitespace/doc fixes
Original commit message from CVS:
whitespace/doc fixes
2006-07-02 21:52:57 +00:00
Tim-Philipp Müller d619a982a8 Minor docs fixes.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstevent.c:
* gst/gstevent.h:
* gst/gstmessage.h:
Minor docs fixes.
2006-05-14 19:25:51 +00:00
Tim-Philipp Müller f2cee82949 gst/: Make gtk-doc generate docs for our inlined gst_buffer_ref(), gst_event_ref() and gst_message_ref() functions ag...
Original commit message from CVS:
* gst/gstbuffer.h:
* gst/gstevent.h:
* gst/gstmessage.h:
Make gtk-doc generate docs for our inlined gst_buffer_ref(),
gst_event_ref() and gst_message_ref() functions again
(ugly hack, please do fix if there's a better way besides
overrides.txt, which doesn't seem to work).
2006-05-10 16:44:15 +00:00
Thomas Vander Stichele b38fcba51b doc whitespace fixes
Original commit message from CVS:
doc whitespace fixes
2006-05-09 19:14:55 +00:00
Wim Taymans b9dbb55105 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
Edward Hervey 067db77499 gst/: gst_[buffer|event|message]_ref() macros are replaced by a static inline functions because gcc-4.1 will about if...
Original commit message from CVS:
* gst/gstbuffer.h:
* gst/gstevent.h:
* gst/gstmessage.h:
gst_[buffer|event|message]_ref() macros are replaced by a static
inline functions because gcc-4.1 will about if the return value
isn't used.
* tests/check/gst/gstevent.c: (event_probe):
gst_event_ref now has to be given a GstEvent* , fix check accordingly.
2006-03-21 13:50:52 +00:00
Wim Taymans 7a88e2a762 docs/libs/gstreamer-libs-sections.txt: Added basesink new methods.
Original commit message from CVS:
* docs/libs/gstreamer-libs-sections.txt:
Added basesink new methods.
* gst/gstevent.c:
* gst/gstevent.h:
Docs updates. Flesh out the QoS docs.
* libs/gst/base/gstadapter.c:
Small doc clarification about ownership and flushing.
* libs/gst/base/gstbasesink.c: (gst_base_sink_set_sync),
(gst_base_sink_get_sync), (gst_base_sink_set_max_lateness),
(gst_base_sink_get_max_lateness), (gst_base_sink_set_property),
(gst_base_sink_get_property), (gst_base_sink_do_sync):
* libs/gst/base/gstbasesink.h:
Added new methods to allow subclass to control max-lateness
and sync.
Generate very basic QoS events based on last sync observation.
Updated docs, fix typo, added some QoS blurb.
* libs/gst/base/gstbasesrc.c:
Remove obsolete _get_state() calls from docs.
2006-03-07 16:21:02 +00:00
Tim-Philipp Müller d21b9afd54 Add gst_event_replace() (#327001)
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstevent.h:
Add gst_event_replace() (#327001)
2006-01-20 11:46:03 +00:00
Andy Wingo a5820445bf gst/gstevent.h (struct _GstEvent): Meant to remove the extra padding here before, but it missed the commit.
Original commit message from CVS:
2005-12-01  Andy Wingo  <wingo@pobox.com>

* gst/gstevent.h (struct _GstEvent): Meant to remove the extra
padding here before, but it missed the commit.
2005-12-01 12:00:56 +00:00
Thomas Vander Stichele 3ea45adb90 gst/gstevent.*: fix #320529 - clean up new_segment API and structure.
Original commit message from CVS:

* gst/gstevent.c: (gst_event_new_new_segment),
(gst_event_parse_new_segment):
* gst/gstevent.h:
fix #320529 - clean up new_segment API and structure.
Let's hope everyone was using the methods, and not the structure.
2005-11-29 17:23:56 +00:00
Andy Wingo 19858fd9f0 gst/gstevent.h (gst_event_new_new_segment) (gst_event_parse_new_segment, gst_event_new_buffer_size)
Original commit message from CVS:
2005-11-22  Andy Wingo  <wingo@pobox.com>

* gst/gstevent.h (gst_event_new_new_segment)
(gst_event_parse_new_segment, gst_event_new_buffer_size)
(gst_event_parse_buffer_size, gst_ghost_pad_new_no_target):
Renamed from *_newsegment, *_buffersize, *_notarget.

* scripts/update-funcnames: New script, performs the changes
listed above.
2005-11-22 11:48:58 +00:00
Andy Wingo 153931fa86 check/gst/gstevent.c (create_custom_events): Check that
Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

* check/gst/gstevent.c (create_custom_events): Check that
FLUSH_STOP is serialized.

* check/elements/identity.c (event_func):
* check/elements/fakesrc.c (event_func): No stream lock, the core
takes it.

* gst/base/gstbasetransform.c (gst_base_transform_event): No more
stream lock taking, yay.

* gst/gstevent.h (GST_EVENT_FLUSH_STOP): Marked as serialized to
ensure that core takes the stream lock.

* gst/base/gstbasesrc.c (gst_base_src_do_seek): Update for stream
lock name change.

* gst/base/gstbasesink.c (gst_base_sink_event): No need to take
the stream lock for EOS, NEWSEGMENT, or FLUSH_STOP, the core does
it already. For the flush start we do take it though so we get the
right preroll state change messages.

* gst/gstqueue.c (gst_queue_sink_activate_push): No need to take
the stream lock here, the core does it for us.

* gst/gstpad.h (GST_PAD_GET_STREAM_LOCK): Renamed from
GST_STREAM_GET_LOCK.
(GST_PAD_STREAM_LOCK, GST_PAD_STREAM_TRYLOCK)
(GST_PAD_STREAM_UNLOCK, GST_PAD_STREAM_UNLOCK_FULL)
(GST_PAD_STREAM_LOCK_FULL): Renamed from GST_STREAM_*.
(GST_PAD_GET_PREROLL_LOCK): Renamed from GST_PREROLL_GET_LOCK.
(GST_PAD_PREROLL_LOCK, GST_PAD_PREROLL_TRYLOCK)
(GST_PAD_PREROLL_UNLOCK): Renamed from GST_PREROLL_*.

* gst/gstpad.c: Update for stream lock name change.

* gst/base/gstbasesink.c: Update for preroll lock name change.
2005-11-21 17:21:15 +00:00
Andy Wingo e4b8378ba4 gst/gstevent.h (GST_EVENT_FILLER): Removed. Can be added back during the stable series if we need it. Fixes #319178.
Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

* gst/gstevent.h (GST_EVENT_FILLER): Removed. Can be added back
during the stable series if we need it. Fixes #319178.

* gst/gstevent.c (gst_event_new_filler): Removed.

* check/gst/gstevent.c: Update comment about filler events.
2005-11-21 13:03:36 +00:00
Andy Wingo 33d5749b88 gst/gstevent.h (GstEventTypeFlags): New data type, the flags of the event type (upstream, downstream, serialized). Re...
Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

* gst/gstevent.h (GstEventTypeFlags): New data type, the flags of
the event type (upstream, downstream, serialized). Renamed
GST_EVDIR_* and GST_EVSER to GST_EVENT_TYPE_*.
(GstEventType): Use GstEventTypeFlags. Rename CUSTOM_UP to
CUSTOM_UPSTREAM, CUSTOM_DS to CUSTOM_DOWNSTREAM, etc.

* gst/gstevent.c: Update for new CUSTOM event names.

* check/gst/gstevent.c: Update check for new CUSTOM event names.

* gst/gstevent.h:
* gst/gstevent.c (gst_event_type_get_flags): New function. Fixes
bug #319392.
2005-11-21 11:06:42 +00:00
Wim Taymans 27daf02ce6 gst/: Fix docs.
Original commit message from CVS:
* gst/gstevent.h:
* gst/gsturi.h:
Fix docs.
2005-11-09 16:16:41 +00:00
Wim Taymans 5bb924622f gst/: Avoid excessive typechecking in macros.
Original commit message from CVS:
* gst/base/gstbasesink.c: (gst_base_sink_preroll_queue_empty),
(gst_base_sink_do_sync), (gst_base_sink_handle_event),
(gst_base_sink_chain), (gst_base_sink_change_state):
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.h:
* gst/gstelement.h:
* gst/gstevent.h:
Avoid excessive typechecking in macros.

* gst/gstminiobject.c: (gst_mini_object_get_type),
(gst_mini_object_init), (gst_mini_object_new),
(gst_mini_object_free):
* gst/gstobject.c: (gst_object_class_init), (gst_object_init),
(gst_object_finalize):
Remove cruft code, optimize alloc_trace.
2005-11-08 11:13:07 +00:00
Stefan Kost 349aa7e2e6 fixing examples fixing docs typos changing log priority in error situations
Original commit message from CVS:
* examples/controller/audio-example.c: (main):
* examples/queue/queue.c: (event_loop):
* gst/base/gstbasetransform.h:
* gst/gstelement.c: (gst_element_send_event):
* gst/gstevent.h:
* gst/gstpad.c: (gst_pad_send_event):
fixing examples
fixing docs typos
changing log priority in error situations
2005-10-26 18:57:43 +00:00
Wim Taymans e1a166a584 And 2% more doc coverage.
Original commit message from CVS:
* docs/gst/gstreamer-docs.sgml:
* docs/gst/gstreamer-sections.txt:
* gst/gstelement.h:
* gst/gstevent.c:
* gst/gstevent.h:
* gst/gstmessage.h:
* gst/gstpad.h:
* gst/gstparse.h:
* gst/gsttask.c: (gst_task_finalize), (gst_task_func):
* gst/gsttask.h:
* gst/gstutils.c:
* gst/gstutils.h:
And 2% more doc coverage.
2005-10-21 11:36:32 +00:00
Wim Taymans b8d492863b Yay! 1% more docs coverage.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_abort_state), (gst_element_commit_state),
(gst_element_lost_state):
* gst/gstevent.h:
* gst/gstquery.c: (gst_query_set_position),
(gst_query_parse_position), (gst_query_set_duration),
(gst_query_parse_duration), (gst_query_new_convert):
* gst/gstutils.c:
Yay! 1% more docs coverage.
2005-10-20 20:25:55 +00:00
Tim-Philipp Müller 34c8e29cec gst/gstevent.h: Oops, add missing closing bracket.
Original commit message from CVS:
* gst/gstevent.h:
Oops, add missing closing bracket.
2005-10-15 22:24:20 +00:00