Commit graph

5749 commits

Author SHA1 Message Date
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
Shaun Hoopes 3029a222e8 debugutils: improve dot file flow layout
Iterate source- and sink-pads separately to ensure that the graph reflects the
upstream/downstream order. Fixes #643269
2011-08-06 18:26:39 +02:00
Tim-Philipp Müller 317fba25a6 elementfactory: fix g-i annotation for _create() and _make() to allow NULL object names 2011-07-27 10:09:11 +01:00
Raluca Elena Podiuc 43f5624334 docs: removed double negation in event/message seq num description
https://bugzilla.gnome.org/show_bug.cgi?id=654751
2011-07-16 23:53:03 +01:00
Emmanuel Pacaud 156583a69c task: Check for PR_SET_NAME before using
Fixes: #653172.

Signed-off-by: David Schleef <ds@schleef.org>
2011-06-25 13:52:28 -07:00
Javier Jardón 5d25e4a204 Use "const" instead G_CONST_RETURN
G_CONST_RETURN will be deprecated soon.

https://bugzilla.gnome.org/show_bug.cgi?id=652211
2011-06-09 17:54:27 +01:00
Tim-Philipp Müller 6d374e54b9 parse: add prototypes for unused functions to avoid compiler warning
The warning is never fatal, because we don't use -Werror for the
parser helper library build, but the warnings are annoying anyway.
2011-06-05 15:27:19 +01:00
David Schleef f3eac7de22 Work around changes in g_atomic API
See #651514 for details.  It's apparently impossible to write code
that avoids both type punning warnings with old g_atomic headers and
assertions in the new.  Thus, macros and a version check.
2011-06-04 00:36:26 -07:00
Sebastian Dröge 0a80b57d74 value: Consider "1" and "{1}" as equal in gst_value_compare()
Previously this was only done in the is_subset() check but
having it only there brings us into definition-hell where
"1" and "{1}" are subset of each other but not equal.
2011-05-30 11:33:57 +02:00
Sebastian Dröge f304196148 caps: Fix subset check for equivalent lists and scalar values
For example "{ 1 }" and "1" are not strictly equal but
both are a subset of each other. Also add a unit test
for this.
2011-05-30 07:38:40 +02:00
Stefan Kost 6c2024f881 docs: xrefs more api around GstStateChange and GstStateChangeReturn. 2011-05-28 10:24:37 +03:00
Stefan Kost dd6a5d81c4 docs: xref the async messages to GstStateChange 2011-05-28 09:52:55 +03:00
Sebastian Dröge 57df188757 caps: Add gst_caps_is_subset_structure()
API: gst_caps_is_subset_structure()

This allows to check if a structure is a subset of given
caps without allocating a new caps instance for it.
2011-05-27 13:55:31 +02:00
Sebastian Dröge da58834884 structure: Add gst_structure_is_subset()
API: gst_structure_is_subset()
2011-05-27 13:47:11 +02:00
Sebastian Dröge d98e9acb0f caps: Optimize gst_caps_is_subset()
..and as a result gst_caps_is_equal() and others.

This now only checks if for every subset structure there is
a superset structure in the superset caps. Previously we were
subtracting one from another, creating completely new caps
and then even simplified them.

The new implemention now is about 1.27 times faster and doesn't
break the -base unit tests are anything anymore.
2011-05-27 13:38:51 +02:00
Sebastian Dröge 0cf2dfd0ba caps: Fix subset check in gst_caps_merge()
Caps A are a subset of caps B even if caps B doesn't
have all fields of caps A.

Also add a unit test for this.
2011-05-27 13:37:06 +02:00
Sebastian Dröge d706ca0859 Revert "caps: Optimize gst_caps_is_subset()"
This reverts commit 32248a9b85.

This breaks some tests in -base and the failures should
be fixed first.
2011-05-27 12:56:43 +02:00
Sebastian Dröge 32248a9b85 caps: Optimize gst_caps_is_subset()
..and as a result gst_caps_is_equal() and others.

This now only checks if for every subset structure there is
a superset structure in the superset caps. Previously we were
subtracting one from another, creating completely new caps
and then even simplified them.

The new implemention now is about 1.27 times faster.
2011-05-27 12:45:59 +02:00
Tim-Philipp Müller 8a3721a1ca gst: we can now use GLib 2.24 API unconditionally 2011-05-25 16:02:10 +01:00
Руслан Ижбулатов d56b3ec5aa systemclock: Placate gcc by defining EWOULDBLOCK to something 2011-05-25 12:04:14 +02:00
Руслан Ижбулатов 54a9d8038d poll: Fix WAKE_EVENT() to behave posixly on Windows 2011-05-25 12:04:14 +02:00
Stefan Kost e0c92982e9 registrybinary: small cleanups
Remove unneeded braces from string define. Small doc improvement.
2011-05-24 20:30:11 +03:00