Commit graph

5770 commits

Author SHA1 Message Date
Tim-Philipp Müller ff96aeee84 tagsetter: update for thread API deprecations in glib master 2011-12-03 16:02:36 +00:00
Tim-Philipp Müller 4b18f0a5c3 taglist: update for thread API deprecations in glib master 2011-12-03 15:36:58 +00:00
Tim-Philipp Müller ca179625f8 g_thread_create() is deprecated in GLib master, use g_thread_try_new() instead 2011-12-03 13:58:51 +00:00
Stefan Sauer e34d796e41 bus: use GST_MESSAGE_SOURCE_NAME() which also takes care of src=NULL. 2011-12-01 16:25:07 +01:00
Tim-Philipp Müller c9bd4e4e96 event: warn and fail instead of creating newsegment events in GST_FORMAT_UNDEFINED 2011-11-30 00:24:32 +00:00
Vincent Penquerc'h c0ba7985bd gstelement: add gst_element_class_add_pad_template_from_static
This function helps ensure the pad template is unreffed
without having to complicate the calling code.

https://bugzilla.gnome.org/show_bug.cgi?id=662664
2011-11-28 13:09:07 +00:00
Stefan Sauer 52e3861e91 warnings: avoid set-but-unused warnings with load-save disabled 2011-11-27 20:39:42 +01:00
Tim-Philipp Müller 7eb796d447 uri: fix wrong G_GNUC_MALLOC
_get_protocols() points to const memory in 0.10
despite the non-const return value.
2011-11-26 19:45:48 +00: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
Tim-Philipp Müller 33078aaeb7 buffer: add gst_buffer_{set,get}_qdata()
Allows people/us to attach arbitrary metadata to buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=664720

API: gst_buffer_set_qdata()
API: get_buffer_get_qdata()
2011-11-25 17:42:07 +00:00
Sebastian Dröge 0280a3c29f pad: Remove g_warning() if pad accepted caps that are not a subset of the pad caps
This check is correct but unfortunately it's impossible to implement
in a threadsafe way because the caps could have changed in the meantime.

Fixes bug #659606.
2011-11-24 11:15:29 +01:00
Tim-Philipp Müller 4d6795dcd1 gst, controller: replace g_list_prepend + reverse with GQueue 2011-11-12 14:57:48 +00:00
Vincent Penquerc'h d9e5c529ba gstvalue: consider lists and ranges equal if they hold the same set
This fixes caps operations when different elements advertise some
of their caps' properties differently (eg, for audio channels, either
a range from 1 to 2, or a list of 1 and 2).

https://bugzilla.gnome.org/show_bug.cgi?id=663643
2011-11-09 11:24:55 +01:00
Tim-Philipp Müller 16dcd5e958 docs: fix Since: markers for API added after 0.10.35 2011-11-08 00:32:36 +00:00
Vincent Penquerc'h 9121a30f9a gstcaps: remove unneeded use of gint64
https://bugzilla.gnome.org/show_bug.cgi?id=662777
2011-11-07 15:17:35 +00:00
Vincent Penquerc'h b37d06aed8 gstvalue: quicker version of intersection when we do not need the result
https://bugzilla.gnome.org/show_bug.cgi?id=662777
2011-11-07 15:17:19 +00:00
Vincent Penquerc'h d9901a6288 gststructure: simplify return statement in gst_structure_can_intersect
https://bugzilla.gnome.org/show_bug.cgi?id=662777
2011-11-07 15:17:14 +00:00
Vincent Penquerc'h afc80c10d1 gststructure: early out when we know a value cannot be a subset
If two values can be ordered, but are unequal, they are
necessarily distinct, thus one cannot be a subset of the other.

https://bugzilla.gnome.org/show_bug.cgi?id=662777
2011-11-07 15:17:04 +00:00
Vincent Penquerc'h 29c97fe780 gstvalue: quicker test for substraction emptiness
When we do not care about the actual resulting set,
but only whether it is empty of not, we can skip a fair bit
of GValue juggling.

Add a function that does so, since we cannot just pass NULL
to the existing API as it may be part of the API contract.

https://bugzilla.gnome.org/show_bug.cgi?id=662777
2011-11-07 15:16:52 +00:00
Vincent Penquerc'h 7090257a83 gststructure: rejig test ordering for speed
https://bugzilla.gnome.org/show_bug.cgi?id=662777
2011-11-07 15:16:26 +00:00
Sjoerd Simons 57074fc025 caps: Add gst_caps_is_strictly_equal 2011-11-04 17:49:55 +00:00
Peteris Krisjanis 795e836ce3 introspection: add Value annotations for GST_SECOND, GST_MSECOND, GST_USECOND, GST_NSECOND constants
gobject-introspection won't parse them properly otherwise.

Still need to force the right type though (either GstClockTime or
guint64), but Type: xyz has no effect for me here, so someone with
a newer g-i needs to test this.

Some other defines are also missing, e.g. GST_CLOCK_TIME_NONE.
2011-11-04 00:19:56 +00:00
Tim-Philipp Müller d2c713a9b5 bin: use statically allocated GQueue
Because we can.
2011-11-03 22:58:50 +00:00
Nicolas Dufresne 391568efde ghostpad: Don't cache internal proxy pad target
The internal proxy pad target is simply a cache of the internal proxy pad
peer. This patch uses the well implement GstPad peer handling to obtain the
target. This fixes issues with target not being set in both direction when
two ghostpads are linked together (empty bin).

https://bugzilla.gnome.org/show_bug.cgi?id=658517
2011-11-03 09:27:00 +01:00
Tim-Philipp Müller d9f95e8920 filter: deprecate gst_filter_run()
It's not really used outside of core at all, and has
serious namespace issues. If anyone feels the need to
revive this one, please use a less generic name space.

API: deprecate gst_filter_run()
API: deprecate GstFilterFunc
2011-10-30 21:55:05 +00:00
Tim-Philipp Müller 8008837986 registry: don't use soon-to-be-deprecated gst_filter_run()
Lines-of-code savings are negligible anyway.
2011-10-30 21:47:39 +00:00
Tim-Philipp Müller 19b4c9c793 pluginfeature: deprecate gst_plugin_feature_type_name_filter()
It's only used internally anyway and the helper struct
has namespace issues.

API: deprecated gst_plugin_feature_type_name_filter()
API: deprecated GstTypeNameData
2011-10-30 21:47:26 +00:00
Tim-Philipp Müller 606c53fc94 taglist: add to_string and new_from_string functions
We want to make GstTagList opaque and not have people use
GstStructure API on it.

API: gst_tag_list_to_string()
API: gst_tag_list_new_from_string()
2011-10-30 09:58:16 +00:00
Tim-Philipp Müller 911c078c2b taglist: avoid pointless tag name -> quark lookups
We never get a tag name quark from a caller, it's always a
string, from which we'll try to look up our tag info in the
hash table, so change the hash table key from quark to string.
Avoids a bunch of pointless string => quark lookup in the
global quark table. We need to do an extra string => quark
conversion now when we copy a taglist, but in that case we're
in a slow path anyway.
2011-10-30 09:26:52 +00:00
Tim-Philipp Müller cdade325ae taglist: add gst_tag_list_is_equal()
API: gst_tag_list_is_equal()
2011-10-30 01:44:00 +01:00
Tim-Philipp Müller bc1a37e64f structure: identical structures are definitely equal 2011-10-29 23:52:22 +01:00
Stefan Sauer b7ae6c46a3 event: clarify docs for step event 2011-10-26 12:24:29 +02:00
Tim-Philipp Müller dd9f244f03 registry: add support for GST_REGISTRY_REUSE_PLUGIN_SCANNER=no
This will make sure we spawn a new plugin scanner helper for each plugin
to be introspected, which helps with making sure we don't load too many
shared objects (libs, plugins) at the same time on systems where there
is a hard limit like on Android.

A better version might re-use the scanner for up to N times, though
it's not clear whether that would actually improve things dramatically.

https://bugzilla.gnome.org/show_bug.cgi?id=662091
2011-10-26 11:20:16 +01:00
Thiago Santos 27ce89812a caps: No need to require writable caps for _append/_merge second caps
The second caps ownership is transfered, no need to require it to
be writable from the caller function. Instead, _append and _merge
make it writable on their own.

Discovered because of an assertion on encoding-profile.c in
_get_input_caps using _merge but not passing writable caps.
2011-10-21 10:23:04 -03:00
Stefan Sauer ad438461a6 pad: not only describe conditions in the docs, also check them in the code
When blocking pads, check if the pad is in the rigt direction. Log some info
for the developer and return FALSE, instead of just locking up.
2011-10-20 09:51:11 +02:00
Thiago Santos 3ab02d8fdc message: protect against null message sources
Message sources can be null, check if it is before trying to
access its name.
2011-10-18 19:29:13 -03:00
Stefan Sauer 2e6b434730 logging: more logging and prefer human readable details over memory locations 2011-10-18 15:24:21 +02:00
Stefan Sauer a98208770b debugutils: improve display of ghost- and proxypads
Handle virtual links between ghost and proxypads when iterating pads instead of
when linking. Besides using less code this provides a more accurate picture.
2011-10-18 15:24:21 +02:00
Tim-Philipp Müller d42923b014 bus: give watch source a name
Give our GSource a meaningful name. Source names can be
used for debugging and profiling, for example with
systemtap or gdb.
2011-10-16 21:14:03 +01:00
Edward Hervey d829425fb9 gstbuffer: Add transfer annotations for gst_buffer_join() 2011-10-16 21:13:56 +01:00
Stefan Sauer 72d4bbd8db bus: fix typo in the docs 2011-10-13 17:33:06 +02:00
Stefan Sauer 32b90e667d debugutils: show if an element is state-locked 2011-10-13 16:49:01 +02:00
Stefan Sauer 735068218e logging: use _OBJECT variants more 2011-10-13 16:49:01 +02:00
Sebastian Dröge e8d3870214 buffer: Use an inline function instead of a macro for gst_buffer_replace()
This gives us type checks by the compiler and more useful compiler errors.
2011-10-13 10:19:34 +02: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
Tim-Philipp Müller 56e27b0546 utils: catch invalid instance sizes in gst_type_register_static_full()
Add guards to catch overly large instance sizes.

https://bugzilla.gnome.org/show_bug.cgi?id=660955
2011-10-10 19:41:33 +01:00
Tim-Philipp Müller 01d87250a8 gstparse: prefix generated parser functions so they don't get exported
Don't export those 35-something random _gst_parse_yy* symbols. These were
never in any header files and also blacklisted from our .def files, in
case anyone wonders.
2011-10-08 14:34:04 +01:00
Thiago Santos 52613b4d14 pipeline: Use pipeline category for one more log message
Makes debugging easier.
2011-10-07 13:36:38 -03:00
Robert Swain 138bb17bf9 GST_PTR_FORMAT: Add GstBuffer ptr format and use in GST_SCHEDULING
GstBuffer pointers can now be printed using GST_PTR_FORMAT. This is used
in the very useful GST_SCHEDULING debug logs in gstpad.c and allows for
easier and more information tracking of buffer progress through a
pipeline with just debug logging.
2011-10-07 16:38:52 +02: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
Tim-Philipp Müller eeed491170 gst.h: include header for atomic queue 2011-09-30 14:52:01 +01:00
Raimo Järvi 6637d983d3 gst: Fix compiler warnings on 64 bit mingw-w64
Fixes bug #660083.
2011-09-26 12:17:30 +02:00
Stas Sergeev b090a376d4 pad: Set caps on pad before checking if the pad is linked
This allows the setcaps handler and notify::caps to link
the pad downstream and doesn't require hacks to always
provide a peer to the pad, like in decodebin2.
2011-09-19 14:08:16 +02:00
Fabrizio (Misto) Milo 7be3899653 caps: use g_value_take_string() and gst_value_get_caps() instead of accessing internal fields 2011-09-19 09:50:11 +02:00
Tim-Philipp Müller b15ae28ad2 pad: add more debug logging for other chain function code path as well 2011-09-16 13:38:41 +01:00
Tim-Philipp Müller a08402bdfd pad: fix up printf format in debug message
Which I messed up.
2011-09-16 13:13:30 +01:00
Vincent Penquerc'h 91c217c714 pad: make some debug traces more useful
https://bugzilla.gnome.org/show_bug.cgi?id=659139
2011-09-16 12:07:21 +01:00
Tim-Philipp Müller 98ee2979d1 caps: move log messages for caps creation/freeing into TRACE category
Reduce SPAM for GST_CAPS:5.
2011-09-10 18:24:49 +01:00
Sebastian Dröge 22ba786807 pad: Only do the subset check in gst_pad_accept_caps() if the pad claims to accept the caps 2011-09-09 12:56:20 +02:00
Sebastian Dröge 7a82ed41f8 Revert "pad: Use gst_pad_accept_caps() instead of manually checking when configuring a sinkpad"
This reverts commit d3cad28da9.

It causes performance problems because acceptcaps() propagates downstream.
2011-09-08 14:29:00 +02:00
Sebastian Dröge d3cad28da9 pad: Use gst_pad_accept_caps() instead of manually checking when configuring a sinkpad 2011-09-08 13:42:53 +02:00
Sebastian Dröge 79b5e89015 pad: Print a g_warning() if pad accept caps that are not a subset of its caps
In 0.11 only subsets are supported again as documented instead of also
allowing non-empty intersections.
2011-09-08 13:42:53 +02:00
Sebastian Dröge 2bfada5581 Revert "pad: Check for subsets, not non-empty intersections to check if caps are compatible"
This reverts commit 0c5d502073.

See bug #658541.
2011-09-08 13:42:52 +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
Stefan Sauer 83eb2d42fa docs: escape % in docblob 2011-09-07 14:08:35 +02:00
Stas Sergeev fcadf09779 ghostpad: Use gst_pad_set_caps() instead of manually changing caps
gst_pad_set_caps() does essentially the same but additionally calls
the pad's setcaps function.

Fixes bug #658076.
2011-09-07 13:38:47 +02:00
Sebastian Dröge 0c5d502073 pad: Check for subsets, not non-empty intersections to check if caps are compatible
Pads should only accept caps that are a subset of the pad caps, e.g.
they should accept only caps that have a non-empty intersection and
at least all fields of the pad caps.

Without this a pad that wants for example
  "video/x-h264,stream-format=byte-stream"
will be happy to accept
  "video/x-h264".
2011-09-06 12:35:41 +02:00
Josep Torra 185ab7f325 docs: add since 0.10.36 on the new _NONE enum values 2011-08-26 14:11:15 +02:00
Josep Torra 306e317ae9 typefind: add GST_TYPE_FIND_NONE and use it
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:15 +02:00
Josep Torra 1db007e5bb parse: use GST_PARSE_FLAG_NONE instead of 0
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:14 +02:00
Josep Torra b26c5b99f2 value: explicitly cast to the enum type
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:14 +02:00
Josep Torra b57683d258 utils: minor changes related to enum types
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:14 +02:00
Josep Torra c0749e7762 trace: add GST_ALLOC_TRACE_NONE for consistency and use it
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:14 +02:00
Josep Torra 97442ad1a3 task: explicitly cast to the enum type
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:14 +02:00
Josep Torra 95b96b57a2 tagsetter: use GST_TAG_MERGE_UNDEFINED instead of FALSE
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:14 +02:00
Josep Torra c0b0b977d7 segment: use GST_SEEK_FLAG_NONE instead of 0
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:14 +02:00
Josep Torra 9f8fe424c7 registrychunks: explicitly cast to the enum types
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:14 +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
Josep Torra 480d415419 padtemplate: explicitly cast to the enum types
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:13 +02:00
Josep Torra 746813344d pad: explicitly cast to the enum type
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:13 +02:00
Josep Torra c27ce79ba1 message: explicitly cast to the right enum types
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:13 +02:00
Josep Torra 2a6ba0b29d info: explicitly cast to the enum type
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:13 +02:00
Josep Torra e5d00246cf index: explicitly cast to the enum type
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:13 +02:00
Josep Torra 11e287529d format: use GST_FORMAT_UNDEFINED and few casts to GstFormat
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:13 +02:00
Stefan Kost febde0c19f gstobject: also remove the cast as this is causing the trouble 2011-08-23 11:55:17 +02:00
Stefan Kost df099959fd gstobject: use the atomic macros to deal with the glib change in the impl. 2011-08-23 11:43:44 +02:00
David Schleef ec6e452f63 object: make gst_object_replace() atomic 2011-08-21 14:07:08 -07:00
Stefan Kost cce32ba0a2 docs: more clarification for element docs
Don't suggest deprecated method in the desction docs and try to be more helpful
in other places by suggesting related functions.
2011-08-20 14:07:55 +02:00
Stefan Kost a3611c139a docs: small clarification in the gst_element_get_request_pad docs
Make it more obvious that one should pass the template name.
2011-08-20 09:57:14 +02:00
Tim-Philipp Müller eb08ed6ed0 docs: fix typo in element factory documentation 2011-08-16 17:19:29 +01:00
Tim-Philipp Müller 4985d2a954 caps: fix compiler warning reported by ICC
The MAX macro expands to code that checks if an unsigned integer is < 0.

Fixes warning #186: pointless comparison of unsigned integer reported by ICC.

https://bugzilla.gnome.org/show_bug.cgi?id=656265
2011-08-15 21:15:29 +01:00
Josep Torra c56881a026 buffer: explicitly cast to the enum type
Fixes warning #188: enumerated type mixed with another type reported by ICC.

https://bugzilla.gnome.org/show_bug.cgi?id=656265
2011-08-15 21:15:22 +01:00
Josep Torra 2271b6dc9a gststate: explicitly cast to the enum type
Fixes warning #188: enumerated type mixed with another type reported by ICC.

https://bugzilla.gnome.org/show_bug.cgi?id=656265
2011-08-15 21:15:12 +01:00
Josep Torra 89239d85cc event: explicitly cast to the right enum types
Fixes warning #188: enumerated type mixed with another type reported by ICC.

https://bugzilla.gnome.org/show_bug.cgi?id=656265
2011-08-15 21:14:55 +01:00
Josep Torra 7b434c44bf gsterror: explicitly cast to the right GstGError code enum types
Fixes warning #188: enumerated type mixed with another type reported by ICC.

https://bugzilla.gnome.org/show_bug.cgi?id=656265
2011-08-15 21:14:22 +01:00
Josep Torra b30b78c505 debugutils: use GST_STATE_VOID_PENDING for GstState instead of 0
Fixes a warning reported by ICC.

https://bugzilla.gnome.org/show_bug.cgi?id=656265
2011-08-15 21:13:47 +01:00
Josep Torra d99d270a69 caps: define GST_CAPS_FLAGS_NONE for consistency with other enumerations
Use them to fix warnings when building with ICC.

API: GST_CAPS_FLAGS_NONE

https://bugzilla.gnome.org/show_bug.cgi?id=656265
2011-08-15 21:13:29 +01:00
Josep Torra abda75bcf5 gst: use GstDebugLevel enum type to fix a warning building with ICC
https://bugzilla.gnome.org/show_bug.cgi?id=656265
2011-08-15 21:13:03 +01:00
Stefan Kost d8c0bd45a7 debugutils: removed non-sense comment 2011-08-11 10:09:41 +02:00
Stefan Kost 20618b4c28 registry: move utf-8 validation to registry saving time
Instead of checking for valid utf-8 element-details every time we create
elements (from plugin-init or registry), do it before we save the registry.
Fixes #656193.
2011-08-10 13:45:49 +02:00