Commit graph

72 commits

Author SHA1 Message Date
Tim-Philipp Müller 94696f4bd9 gst: don't export private TOC functions 2012-04-07 16:04:14 +01:00
Alexander Saprykin 6e65daa4d1 Add new TOC query 2012-04-02 21:50:55 +02:00
Edward Hervey 823807c5f0 Suppress deprecation warnings in selected files, for g_value_array_* mostly 2012-02-27 13:43:59 +01:00
Edward Hervey a7f8e4a230 gstquery: Make debugging message more informative
For all the newcomers out there who still don't know the values of
GstQueryType enum by heart...
... and old-timers who've got better things to do :)
2011-10-03 09:31:59 +02:00
Josep Torra ec157ebed9 query: minor changes related to enum types
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:13 +02:00
Tim-Philipp Müller f4b178af3b query: const-ify formats arguments to gst_query_set_formatsv() 2011-04-19 11:48:05 +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
Edward Hervey 5519b1fcb1 gstquery: Use structure property directly, avoid function variable.
All functions in this file can access the structure field of a query directly.
This avoids having to call gst_query_get_structure() to get it, along with being
able to remove some function variables that were used to store the result of that
function.
2010-12-03 11:33:37 +01:00
Stefan Kost 898583b2a0 docs: query doc improvements
More xrefs. Mentioned that some queries need a running pipeline.
2010-12-03 09:50:32 +02:00
Tim-Philipp Müller 34abe02458 query: minor gst_query_add_buffering_range() code reflow
Sprinkle some G_UNLIKELY(), return TRUE/FALSE constants, avoid an
unnecessary g_value_unset(), move g_value_init()+set_int64_range()
closer to where they're needed.
2010-09-16 19:40:15 +01:00
Tim-Philipp Müller 58e5d5e5b9 query: gst_query_add_buffering_range() optimisations
Don't create a new GValueArray copy for every single _add_buffering_range()
call, but append to the existing value array owned by the structure instead.
2010-09-16 19:40:15 +01:00
Sebastian Dröge 36e1ad94e1 gstquery: Only fill the start/stop values of the buffering ranges if a non-NULL pointer was provided 2010-09-03 19:58:49 +02:00
Philippe Normand 9ef1c47079 gstquery: new buffering_ranges API
Added a new query type to retrieve informations about the areas of the
media currently buffered. See bug 623121.

API: gst_query_add_buffering_range
API: gst_query_get_n_buffering_ranges
API: gst_query_parse_nth_buffering_range
2010-09-03 19:55:25 +02:00
Johan Dahlin 6ab6dcf931 query: Add out annotations
https://bugzilla.gnome.org/show_bug.cgi?id=621773
2010-06-16 19:03:21 +02:00
Sebastian Dröge fd68dbc08f gst: Use GSlice instead of normal g_malloc in more places 2010-03-28 19:48:45 +02:00
Benjamin Otte a9d1a493a7 Fixes for -Wwrite-strings
This changes some APIs in compatible ways:
- Some functions now take "const char *" arguments, not "char *"
- Some structs now have "conts char *" members, not "char *"
The changes may cause warnings when compiling with the right warning
flags. You've been warned.

Also adds -Wwrite-strings as a warning flag in configure.ac.

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 20:50:10 +01:00
Stefan Kost 868878db87 docs: use '*' instead of xxx to avoid creating a broekn xref 2009-11-27 14:18:38 +02:00
Wim Taymans 0b5e8f0e57 query: whitespace fixes 2009-11-23 11:34:07 +01:00
Edward Hervey 43dba6cefc miniobjects: Don't chain up to empty finalize method.
If ever we do anything in mini_object_finalize, we should make sure the 4
core miniobject finalize methods chain back up again.
2009-06-24 11:00:27 +02:00
Tim-Philipp Müller c8acbbfde0 structure: add gst_structure_id_new() convenience function
Add convenience wrapper for gst_structure_id_empty_new() plus
gst_structure_id_set() and use it in a few places.

API: gst_structure_id_new()
2009-05-29 19:28:10 +01:00
Tim-Philipp Müller bc7c7e9836 micro-optimisation: use GST_QUARK in more places
Use gst_structure_id_empty_new() in combination with GST_QUARK
rather than gst_structure_id_new() when creating message, event,
query and taglist structures. Mostly just because we can.
2009-05-29 19:27:43 +01:00
Stefan Kost c2da78a953 docs: fix gtk-doc warnings
Move MT safety to main description (it does not belong to Return: or Since:
statement). Add a few missing return docs. Downgrade a normal comment froma doc
comment. Fix a doc header to only contain symbol name.
2009-05-22 12:53:11 +03:00
Sebastian Dröge e7ccf786c3 gst: Use G_DEFINE_TYPE and friends or at least g_once_init_* in the _get_type() functions 2009-04-04 10:20:36 +02:00
Sebastian Dröge 9b65eb6838 API: Add URI query type. This is useful to query the URI of a sink/source element and can be used by demuxers that ne...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstquark.c:
* gst/gstquark.h:
* gst/gstquery.c: (gst_query_new_uri), (gst_query_set_uri),
(gst_query_parse_uri):
* gst/gstquery.h:
API: Add URI query type. This is useful to query the URI
of a sink/source element and can be used by demuxers that
need to get data from other files.
This query should go upstream by default.
Fixes bug #562949.
* plugins/elements/gstfdsink.c: (gst_fd_sink_query):
* plugins/elements/gstfdsrc.c: (gst_fd_src_class_init),
(gst_fd_src_query):
* plugins/elements/gstfilesink.c: (gst_file_sink_query):
* plugins/elements/gstfilesrc.c: (gst_file_src_class_init),
(gst_file_src_query):
Implement URI query.
2008-12-20 17:33:44 +00:00
Wim Taymans 82479761f1 gst/gstquery.*: Add GstQueryType for custom queries instead of having to use the not-so-very-convenient registration ...
Original commit message from CVS:
* gst/gstquery.c:
* gst/gstquery.h:
Add GstQueryType for custom queries instead of having to use the
not-so-very-convenient registration infrastructure to register new
types.
2008-11-20 10:35:50 +00:00
David Schleef 93f300823f gst/gstutils.c: Remove check in gst_pad_query_convert() that src_val must be positive, because that's not a requirement.
Original commit message from CVS:
* gst/gstutils.c: Remove check in gst_pad_query_convert() that
src_val must be positive, because that's not a requirement.
This causes problems with converting negative granulepos
values for Dirac.
* gst/gstquery.c: Same, gst_query_new_convert().
2008-08-27 03:04:23 +00:00
Stefan Kost 2f6b52d6f3 gst/gstquery.c: Also use G_GINT64_CONSTANT for the queries.
Original commit message from CVS:
* gst/gstquery.c:
Also use G_GINT64_CONSTANT for the queries.
2008-04-16 18:48:03 +00:00
Wim Taymans 08beab1f20 docs/design/part-buffering.txt: Fix some typos and set the estimated total for push mode to -1.
Original commit message from CVS:
* docs/design/part-buffering.txt:
Fix some typos and set the estimated total for push mode to -1.
* gst/gstquery.c: (gst_query_new_buffering):
Set buffering-left to 0 as we're not buffering by default.
* libs/gst/base/gstbasesrc.c: (gst_base_src_default_query):
Implement BUFFERING query.
2008-04-09 18:26:15 +00:00
Wim Taymans 7293b3e7d7 Rename _avail -> _range
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstquery.c: (gst_query_parse_latency),
(gst_query_set_buffering_percent),
(gst_query_parse_buffering_percent),
(gst_query_set_buffering_range), (gst_query_parse_buffering_range):
* gst/gstquery.h:
Rename _avail -> _range
API: gst_query_set_buffering_range
API: gst_query_parse_buffering_range
2008-04-08 20:28:21 +00:00
Wim Taymans 1365624d74 Add busy field and quark for the buffering query so that the app can only use the query to see if buffering is in pro...
Original commit message from CVS:
* docs/design/part-buffering.txt:
* gst/gstquark.c:
* gst/gstquark.h:
* gst/gstquery.c: (gst_query_parse_latency),
(gst_query_new_buffering), (gst_query_set_buffering_percent),
(gst_query_parse_buffering_percent):
* gst/gstquery.h:
Add busy field and quark for the buffering query so that the app can
only use the query to see if buffering is in progress.
2008-04-08 20:17:49 +00:00
Wim Taymans 5e14412c47 Reorder the message docs and headers for clarity.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstmessage.c: (gst_message_set_buffering_stats),
(gst_message_parse_buffering_stats):
* gst/gstmessage.h:
* gst/gstquery.c: (gst_query_new_latency), (gst_query_set_latency),
(gst_query_parse_latency), (gst_query_new_buffering),
(gst_query_set_buffering_percent),
(gst_query_parse_buffering_percent),
(gst_query_set_buffering_stats), (gst_query_parse_buffering_stats),
(gst_query_set_buffering_avail), (gst_query_parse_buffering_avail):
* gst/gstquery.h:
Reorder the message docs and headers for clarity.
Add aditional buffering stats API for messages.
Add buffering query.
Convert some leftover queries to use GstQuark.
API: gst_message_set_buffering_stats
API: gst_message_parse_buffering_stats
API: GST_QUERY_BUFFERING
API: GstBufferingMode
API: gst_query_new_buffering
API: gst_query_set_buffering_percent
API: gst_query_parse_buffering_percent
API: gst_query_set_buffering_stats
API: gst_query_parse_buffering_stats
API: gst_query_set_buffering_avail
API: gst_query_parse_buffering_avail
2008-04-08 19:59:06 +00:00
Sebastian Dröge 109511b55b Properly chain up finalize functions to the parent class.
Original commit message from CVS:
* gst/gstbuffer.c: (gst_buffer_class_init), (gst_buffer_finalize):
* gst/gstevent.c: (gst_event_class_init), (gst_event_finalize):
* gst/gstmessage.c: (gst_message_class_init),
(gst_message_finalize):
* gst/gstquery.c: (gst_query_class_init), (gst_query_finalize):
* plugins/elements/gstfilesrc.c: (gst_mmap_buffer_class_init),
(gst_mmap_buffer_finalize):
Properly chain up finalize functions to the parent class.
2008-02-12 12:04:43 +00:00
Tim-Philipp Müller 99a41cefe3 g_type_class_ref() other types as well, see #349410 and #64764.
Original commit message from CVS:
* gst/gst.c: (init_post):
* gst/gstevent.c: (_gst_event_initialize):
* gst/gstquery.c: (_gst_query_initialize):
* libs/gst/dataprotocol/dataprotocol.c (gst_dp_init):
g_type_class_ref() other types as well, see #349410 and #64764.
* gst/gstbuffer.c: (_gst_buffer_initialize):
* gst/gstmessage.c: (_gst_message_initialize):
Simplify existing g_type_class_ref().
2007-11-01 21:50:05 +00:00
Stefan Kost 1756e6aa87 gst/: Remove empty instance_init() functions to save relocs and lessen the noise. Remove some of the function prototy...
Original commit message from CVS:
* gst/gstindexfactory.c: (gst_index_factory_get_type):
* gst/gstplugin.c: (gst_plugin_init):
* gst/gstpluginfeature.c: (gst_plugin_feature_init):
* gst/gstquery.c: (gst_query_get_type):
* gst/gstregistry.c: (gst_registry_init):
* gst/gsturi.c: (gst_uri_handler_base_init):
Remove empty instance_init() functions to save relocs and lessen the
noise. Remove some of the function prototypes that are doubled by
G_DEFINE_TYPE.
2007-06-27 10:12:14 +00:00
Wim Taymans 863a867f81 gst/gstquery.c: Remove old structure field.
Original commit message from CVS:
* gst/gstquery.c: (gst_query_new_latency):
Remove old structure field.
2007-02-02 18:08:32 +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
Josep Torre Valles fcb5023fa4 gst/gst.c: Fix empty declaration and type mismatch.
Original commit message from CVS:
2006-10-06  Zaheer Abbas Merali  <zaheerabbas at merali dot org>

Patch by: Josep Torre Valles <josep@fluendo.com>

* gst/gst.c: (gst_init_get_option_group):
Fix empty declaration and type mismatch.
* gst/gstbin.c: (gst_bin_change_state_func):
Fix type mismatch.
* gst/gstelement.c: (gst_element_continue_state),
(gst_element_set_state_func), (gst_element_change_state),
(gst_element_change_state_func):
Fix type mismatches.
* gst/gstinfo.c: (gst_debug_compare_log_function_by_func),
(gst_debug_remove_log_function), (_gst_debug_nameof_funcptr):
Cast as appropriate.
* gst/gstobject.c: (gst_class_signal_connect):
Cast as appropriate.  The function pointer parameter really
has the wrong type but would break API if we change it.
* gst/gstquery.c:
Fix redefinition of _FILE_OFFSET_BITS caused on Solaris wrt
order of including string.h.
* gst/gstutils.c: (gst_element_state_get_name):
Remove unreachable line.
* gst/gstxml.c: (gst_xml_parse_doc):
Fix type mismatch.
All these caught by Forte.
2006-10-06 14:46:04 +00:00
mrcgran bae90f5955 gst/gstghostpad.c: Filter the proxied caps against the padtemplate if we have one.
Original commit message from CVS:
Patch by: mrcgran <mrc.gran at gmail dot com>
* gst/gstghostpad.c: (gst_proxy_pad_do_getcaps):
Filter the proxied caps against the padtemplate if we have one.
* gst/gstquery.c: (gst_query_new_segment):
Add include for gstinfo.h so that compilation with
-DGST_DISABLE_GST_DEBUG works again. Fixes #358436.
2006-10-02 10:06:17 +00:00
Torsten Schoenfeld 481238cfce Initialize variables when creating a new segment query.
Original commit message from CVS:
Patch by: Torsten Schoenfeld <kaffeetisch at gmx dot de>
* gst/gstquery.c: (gst_query_new_segment):
* tests/check/gst/gstquery.c: (GST_START_TEST):
Initialize variables when creating a new segment query.
Fixes #353121.
2006-08-28 08:44:29 +00:00
Jan Schmidt 5736de1957 Add internal helpers for pre-registering quarks from static strings and using the quark values directly instead of lo...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gst.c: (init_post):
* gst/gst_private.h:
* gst/gstquark.c: (_priv_gst_quarks_initialize):
* gst/gstquark.h:
* gst/gstquery.c: (gst_query_new_position),
(gst_query_set_position), (gst_query_parse_position),
(gst_query_new_duration), (gst_query_set_duration),
(gst_query_parse_duration), (gst_query_new_convert),
(gst_query_set_convert), (gst_query_parse_convert),
(gst_query_new_segment), (gst_query_set_segment),
(gst_query_parse_segment), (gst_query_new_seeking),
(gst_query_set_seeking), (gst_query_parse_seeking):
Add internal helpers for pre-registering quarks from static strings
and using the quark values directly instead of looking them up when
creating and parsing queries. Can be used for event construction too.
Closes #350432.
2006-08-16 11:47:54 +00:00
Wim Taymans 5d495664bc gst/gstquery.c: Added some docs for the segment query.
Original commit message from CVS:
* gst/gstquery.c:
Added some docs for the segment query.
2006-05-08 17:12:08 +00:00
James Andrewartha 5deab8d3c3 Make sure gstprivate.h and/or config.h are always included first, otherwise some of our defines (like _FILE_OFFSET_BI...
Original commit message from CVS:
Patch by: James Andrewartha <trs80 at tartarus uwa edu au>
* gst/gst.c:
* gst/gstbus.c:
* gst/gstclock.c:
* gst/gstevent.c:
* gst/gstformat.c:
* gst/gstmessage.c:
* gst/gstparse.c:
* gst/gstquery.c:
* gst/gstutils.c:
* gst/parse/Makefile.am:
* libs/gst/base/gstadapter.c:
* libs/gst/base/gstbasesrc.c:
* libs/gst/base/gstpushsrc.c:
* libs/gst/base/gsttypefindhelper.c:
* plugins/elements/gstfakesrc.c:
* plugins/elements/gstidentity.c:
Make sure gstprivate.h and/or config.h are
always included first, otherwise some of our
defines (like _FILE_OFFSET_BITS) might be
redefined in the system headers. Fixes build
on opensolaris (#340016).
2006-05-04 15:20:14 +00:00
Michael Smith add30e0328 gst/gstquery.c: Fix leaking GValues in queries, as shown by valgrind/testsuite.
Original commit message from CVS:
* gst/gstquery.c: (gst_query_set_formats),
(gst_query_set_formatsv):
Fix leaking GValues in queries, as shown by valgrind/testsuite.
2006-04-05 13:18:29 +00:00
Wim Taymans c1b135b4a3 Docs fixes.
Original commit message from CVS:
* gst/gstbuffer.c:
* gst/gstquery.c: (gst_query_list_add_format),
(gst_query_set_formatsv), (gst_query_parse_formats_length),
(gst_query_parse_formats_nth):
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_sync_times):
Docs fixes.
2006-02-14 13:07:10 +00:00
Wim Taymans 2fbeada812 docs/gst/gstreamer-sections.txt: Reworked query docs.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
Reworked query docs.

* gst/gstquery.c: (gst_query_new_formats),
(gst_query_list_add_format), (gst_query_set_formats),
(gst_query_set_formatsv), (gst_query_parse_formats_length),
(gst_query_parse_formats_nth):
* gst/gstquery.h:
Flesh out formats query, added some new methods.
Fix part of #324398.

* tests/check/gst/gstquery.c: (GST_START_TEST), (gstquery_suite):
Added query creation tests.
2006-02-14 12:07:16 +00:00
Jan Schmidt 84279849a8 check/: Add tests for fdsrc seekability
Original commit message from CVS:
* check/Makefile.am:
* check/elements/fdsrc.c: (event_func), (setup_fdsrc),
(cleanup_fdsrc), (GST_START_TEST), (fdsrc_suite), (main):
Add tests for fdsrc seekability

* gst/elements/gstfdsrc.c: (gst_fdsrc_class_init),
(gst_fdsrc_init), (gst_fdsrc_update_fd), (gst_fdsrc_start),
(gst_fdsrc_set_property), (gst_fdsrc_is_seekable),
(gst_fdsrc_get_size), (gst_fdsrc_uri_set_uri):
* gst/elements/gstfdsrc.h:
fdsrc should not be a 'live' source.
Implement seeking on seekable fd's.

* gst/gstquery.c: (gst_query_new_seeking),
(gst_query_parse_seeking):
* gst/gstquery.h:
Implement SEEKING query functions:
*_new_seeking and *_parse_seeking
2005-11-27 22:50:09 +00:00
Wim Taymans 10a32af38d Doc fixes.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbuffer.h:
* gst/gstelement.c:
* gst/gstformat.c:
* gst/gstformat.h:
* gst/gstindex.h:
* gst/gstquery.c:
* gst/gstquery.h:
* gst/gstvalue.c:
Doc fixes.
2005-11-20 14:50:43 +00:00
Wim Taymans 8d46970ed8 Add type to quark and type to string conversions.
Original commit message from CVS:
* docs/design/part-TODO.txt:
* gst/gstformat.c: (_gst_format_initialize), (gst_format_get_name),
(gst_format_to_quark), (gst_format_register):
* gst/gstformat.h:
* gst/gstquery.c: (_gst_query_initialize),
(gst_query_type_get_name), (gst_query_type_to_quark),
(gst_query_type_register):
* gst/gstquery.h:
Add type to quark and type to string conversions.
2005-11-19 18:57:00 +00:00
Michael Smith 96936912f3 Further improve query docs. Still not happy with this.
Original commit message from CVS:
Further improve query docs. Still not happy with this.
2005-11-10 10:17:01 +00:00
Michael Smith 67e2017f50 Improve/fix documentation for GstQuery.
Original commit message from CVS:
Improve/fix documentation for GstQuery.
This still needs some more work to explain what the queries actually mean.
2005-11-09 19:32:32 +00:00