Commit graph

7313 commits

Author SHA1 Message Date
Wim Taymans
d73b4edc99 clock: debug the clock return values 2013-07-26 12:20:05 +02:00
David Schleef
f599019a99 info: parse debug levels > 9 2013-07-24 10:30:09 -07:00
Sebastian Dröge
d55893fb96 value: Fix copy&paste mistakes in the bitmask function docs 2013-07-24 16:57:46 +02:00
Tim-Philipp Müller
0c513e3d97 value: handle deserialisation of nonexistant enum value more gracefully 2013-07-22 17:25:47 +01:00
Sebastian Dröge
7c936a4cc2 bin: Use the new group-id field of the stream-start message for stream-start message aggregation
If all stream-start messages had a group id (for backwards compatibility),
we only consider a stream started if all had the same group id.

In 2.0 we should make the group id mandatory.
2013-07-22 15:30:10 +02:00
Sebastian Dröge
75d9454bf4 gst: Add new group-id field to the stream-start event
All streams that have the same group id are supposed to be played
together, i.e. all streams inside a container file should have the
same group id but different stream ids. The group id should change
each time the stream is started, resulting in different group ids
each time a file is played for example.
2013-07-22 15:30:10 +02:00
Sebastian Dröge
9ddcfcf8f4 gst: Add some more Since: 1.2 2013-07-18 14:39:42 +02:00
Sebastian Dröge
b9841335ed info: Add some Since: 1.2 2013-07-18 14:34:31 +02:00
Руслан Ижбулатов
797fcd1d49 info: Add debug color mode option
This allows to explicitely set the debug output color
mode to UNIX on every platform, enable it (use platform
default color mode) or enable it.

https://bugzilla.gnome.org/show_bug.cgi?id=674320
2013-07-18 14:30:44 +02:00
Руслан Ижбулатов
46106ebe8f info: Fix black and underline coloring on W32
Fixes #674320
2013-07-18 14:21:22 +02:00
Руслан Ижбулатов
143f30bfcb info: Cut down src file names for MinGW too
Fixes #674320
2013-07-18 14:21:06 +02:00
Sebastian Dröge
3821cee574 query: Don't assert if no context is set in the query 2013-07-16 17:35:50 +02:00
Tim-Philipp Müller
472a64418a query: sprinkle some Since 1.2 markers in docs 2013-07-16 14:48:19 +01:00
Sebastian Dröge
e47270ee24 element: Return an empty GstContext if none was set yet 2013-07-16 15:34:57 +02:00
Sebastian Dröge
356ef049d3 query: Add gst_query_has_context_type() 2013-07-16 15:16:16 +02:00
Sebastian Dröge
c279bdb663 pad: A newly activated pad should be marked as needing reconfiguration 2013-07-15 11:36:44 +02:00
Sebastian Dröge
942d905e19 Revert "pad: Don't consider flushing pads as needing reconfiguration"
This reverts commit 948a9d2f2b.

This is racy and trying to reconfigure and fail is still better
than not trying to reconfigure at all.

https://bugzilla.gnome.org/show_bug.cgi?id=704100
2013-07-15 11:32:54 +02:00
Sebastian Dröge
ba4ec10aa5 bin: Always forward clock-lost message if we're not a top-level bin
This makes sure that no bin misses the clock-lost messages, independent
of the state, and could return an old, non-working clock from
gst_bin_provide_clock_func().

https://bugzilla.gnome.org/show_bug.cgi?id=701997
2013-07-10 15:57:34 +02:00
Tim-Philipp Müller
05bbd1b11a allocator: fix type of gst_memory_alignment to match declaration
Fixes compiler warnings such as
gstallocator.c:61:8: error: conflicting types for 'gst_memory_alignment'
../gst/gstallocator.h:52:18: note: previous declaration of 'gst_memory_alignment' was here
2013-07-08 15:26:38 +01:00
Nicolas Dufresne
4656d18fd5 Add few missing allow-none annotation 2013-07-03 14:25:07 -04:00
Sebastian Dröge
948a9d2f2b pad: Don't consider flushing pads as needing reconfiguration
Renegotiation and reconfiguration will fail because all queries
and events won't be accepted by the pad if it's flushing. In the
best case this just causes unneeded work and spurious warnings in
the debug logs, in the worst case it causes elements to fail completely.
2013-06-30 18:40:47 +02:00
Sjoerd Simons
1815e6067a pad: Add a filter to the caps_query done by acceptcaps
Use the caps that the pad is asked to accept as filter for the query

https://bugzilla.gnome.org/show_bug.cgi?id=702632
2013-06-19 15:12:18 +02:00
Edward Hervey
0d57bd3198 taglist: Avoid combinatorial explosion when merging tags
When appending/prepending tags, avoid re-creating (and copying) lists if we already
have one and instead just append/prepend the GValue to the list.

https://bugzilla.gnome.org/show_bug.cgi?id=702545
2013-06-19 11:58:37 +02:00
Paul HENRYS
db80044513 buffer: Fix wrong size/index handling when merging memory
https://bugzilla.gnome.org/show_bug.cgi?id=702617
2013-06-19 10:39:30 +02:00
Sebastian Dröge
bd48ba333d structure: Add gst_structure_new_from_string()
Convenience API for bindings, gst_structure_from_string() returns
a tuple (structure, end_ptr) in bindings and is unintuitive to use
because of that.
2013-06-14 13:05:38 +02:00
Hans de Goede
7fc2602761 gst: Don't intercept --help in gst_init()
Before this patch gst_init would intercept --help, causing for example
cheese's --help to look like this:

[hans@shalem cheese]$ cheese --help
Usage:
  cheese [OPTION...] - GStreamer initialization

Help Options:
  -h, --help                        Show help options
  --help-all                        Show all help options
  --help-gst                        Show GStreamer Options

gst_init is the only gfoo_init function which does this.

https://bugzilla.gnome.org/show_bug.cgi?id=702089
2013-06-13 08:37:28 +02:00
Edward Hervey
2e1db58e11 gstvalue: Add _append_and_take_value() public variants
API: gst_value_array_append_and_take_value
API: gst_value_list_append_and_take_value

We were already using this internally, this makes it public for code
which frequently appends values which are expensive to copy (like
structures, arrays, caps, ...).

Avoids copies of the values for users. The passed GValue will also
be 0-memset'ed for re-use.

New users can replace this kind of code:
gst_value_*_append_value(mycontainer, &myvalue);
g_value_unset(&myvalue);

by:

gst_value_*_append_and_take_value(mycontainer, &myvalue);

https://bugzilla.gnome.org/show_bug.cgi?id=701632
2013-06-05 12:58:05 +02:00
Edward Hervey
e1f520f27c gstbuffer: Use internal function for buffer_new_wrapped
Shaves ~10% instruction calls from the total cost

https://bugzilla.gnome.org/show_bug.cgi?id=701633
2013-06-05 11:15:34 +02:00
Sebastian Dröge
cc7113b619 elementfactory: Add support for checking subtitle/metadata factory types 2013-05-28 12:44:19 +02:00
Sebastian Dröge
ee21c26cea elementfactory: Add support for checking only the media type of a factory
And while at it also add Metadata and Subtitle media types.
2013-05-28 12:41:27 +02:00
Sebastian Dröge
73895c05b1 pad: Store sticky events even if the pad is flushing
But do this only for events that are not dropped by flushing,
i.e. do it only for everything except SEGMENT and EOS.

Without this we might drop a CAPS event if flushing happens
at an unfortunate time and nobody is resending the CAPS event.

https://bugzilla.gnome.org/show_bug.cgi?id=700806
2013-05-27 12:40:50 +02:00
Sebastian Dröge
3d44f542ed pad: Only check if we get buffers before stream-start/segment if compiling without G_DISABLE_ASSERT
In releases this is set usually.
2013-05-10 16:03:34 +02:00
Sebastian Dröge
d500ffc300 pad: Fix uninitialized variable compiler warning 2013-05-09 17:55:21 +02:00
Sebastian Dröge
1b87f0c36a pad: Make sure pending, older sticky events are sent downstream in dynamic linking scenarios
If a pad block was triggered from sending a sticky event downstream, it
could happen that the pad block is relinking pads, which then requires
to resend previous sticky events.
2013-05-09 17:55:21 +02:00
Sebastian Dröge
8bedcf450f pad: Warn if data flow happens before stream-start or segment event 2013-05-09 11:05:50 +02:00
Sebastian Dröge
430285b5c8 pad: Only let gst_pad_sticky_events_foreach() iterate over existing events 2013-05-09 10:59:41 +02:00
Sebastian Dröge
e0f59d22eb pad: If we push sticky events because of another sticky event, only push those that come before the new event
https://bugzilla.gnome.org/show_bug.cgi?id=699937
2013-05-09 10:29:11 +02:00
Sebastian Dröge
ae47133360 pad: No sticky events must arrive after EOS 2013-05-09 09:51:13 +02:00
Nicolas Dufresne
e8a9ffa092 pad: Improve warning message naming events type name
With this patch, message should look like ¨Sticky event misordering, got
'caps' before 'stream-start'¨ making it faster to debug.

https://bugzilla.gnome.org/show_bug.cgi?id=688188
2013-05-09 09:35:30 +02:00
Nicolas Dufresne
f6aa4d85c1 pad: Only inforce STREAM_START, CAPS and SEGMENT ordering
Previous patch was inforcing a complete ordering of the sticky events, while
in fact, only STREAM_START, CAPS and SEGMENT events need proper ordering.

See: https://bugzilla.gnome.org/show_bug.cgi?id=688188
2013-05-09 09:35:19 +02:00
Nicolas Dufresne
a68e33712e pad: Detect, fix and warn when sticky events are in wrong order
We can prevent buggy element from causing other elements to fail or crash
by sorting sticky event at insertion. In this case, we also warn as this
is not supposed to happen.

See: https://bugzilla.gnome.org/show_bug.cgi?id=688188
2013-05-08 13:48:59 +02:00
Tim-Philipp Müller
65c2ecb4f3 buffer: allow calling _fill() with a NULL data pointer if size is 0 bytes 2013-05-08 10:25:36 +01:00
Alessandro Decina
543b92a856 gstpad: run probes for FLUSH events sent with gst_pad_send_event
Move probe handling in gst_pad_send_event_unchecked so that probes are run for
FLUSH events too.
2013-04-25 06:43:29 +02:00
Wim Taymans
43620e1642 pad: notify caps property on NULL as well
Also notify the caps property when it changes to NULL
2013-04-23 11:17:05 +02:00
Wim Taymans
49c9d2f229 pad: clarify locking 2013-04-23 11:16:16 +02:00
Sebastian Dröge
ce8cb1f1b3 part-context: Write some design documentation about GstContext 2013-04-19 15:01:20 +02:00
Sebastian Dröge
7ae54c34e5 capsfeatures: Add documentation about ANY GstCapsFeatures 2013-04-19 11:24:38 +02:00
Andre Moreira Magalhaes (andrunko)
a8300a4891 gstvalue: Add compare function for caps 2013-04-18 14:45:47 -03:00
Sebastian Dröge
03c3738b67 context: Add gst_context_writable_structure() and let get_structure() return const again 2013-04-18 10:18:22 +02:00
Tim-Philipp Müller
e8a9f7acdf printf: fix handling of old printf extension specifiers for ABI compatibility
Fixes abort when the old specifiers are used. Fix up the conversion
specifier, it would get overwritten with 'c' below to the extension
format char, which then later is unhandled, leading to the abort.
Also fix up and enable unit test for this.

https://bugzilla.gnome.org/process_bug.cgi
2013-04-18 00:46:58 +01:00
Sebastian Dröge
0d6440b8d9 context: Return a non-const GstStructure to make code simpler and update docs 2013-04-17 12:17:49 +02:00
Philippe Normand
54c678a21e query: new _BANDWIDTH_LIMITED flag
Source elements with limited bandwidth capabilities and supporting
buffering for downstream elements should set this flag when answering
a scheduling query. This is useful for the on-disk buffering scenario
of uridecodebin to avoid checking the URI protocol against a list of
hardcoded protocols.

Bug 693484
2013-04-16 16:52:08 +02:00
Sebastian Dröge
18a7a1d062 gst: Add better support for static plugins
API: GST_PLUGIN_STATIC_DECLARE()
API: GST_PLUGIN_STATIC_REGISTER()

Based on a patch by Håvard Graff <havard.graff@tandberg.com>.

This now allows GST_PLUGIN_DEFINE() to create a static plugin if
GST_PLUGIN_BUILD_STATIC is defined. The resulting plugin can be
statically linked or dynamically linked during compilation but
can't be dynamically loaded during runtime.

Also adds GST_PLUGIN_STATIC_DECLARE() and GST_PLUGIN_STATIC_REGISTER(),
which allows to register a static linked plugin easily.
It is still required to manually register every single statically linked
plugin from inside the application as this can't be automated in a portable
way.

A new configure parameter --enable-static-plugins was added that allows
to build all plugins we build here as static plugins.

Fixes bug #667305.
2013-04-15 15:52:18 +02:00
Sreerenj Balachandran
899bbf310b pluginfeature: Fix the GstPluginFeature name comparison.
The gst_plugin_feature_rank_compare_func() should return
negative value, if the rank of both PluginFeatures are equal and
the name of first PluginFeature comes before the second one.

https://bugzilla.gnome.org/show_bug.cgi?id=697990
2013-04-15 09:24:08 +02:00
Tim-Philipp Müller
109be629b7 printf: disable some unused printf variants 2013-04-14 11:33:41 +01:00
Tim-Philipp Müller
91c42b9380 printf: use sprintf() to work around glibc complaining about %n in a writable format string
Don't use snprintf(), but use sprintf instead and do our own
length calculations, because glibc may complain about us passing
%n in a format string if the string is in writable memory, and
here the format string is always in writable memory since we
construct it on the fly. This happens if glibc has been compiled
with _FORTIFY_SOURCE=2, which seems to be the case on some
distros/systems). On the upside, we now use the sprintf code path
on all systems which should be better from a maintenance point
of view.

https://bugzilla.gnome.org/show_bug.cgi?id=697970
2013-04-14 11:23:10 +01:00
Gwenole Beauchesne
f43b756f39 plugin: fix name expansion for GST_PLUGIN_DEFINE macro
Make GST_PLUGIN_DEFINE use G_STRINGIFY() to convert the name argument
into a meaningful string. The advantage of this is that `name' can be
expanded from other macros defined in the plug-in element.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=697872
2013-04-13 11:40:26 +01:00
Tim-Philipp Müller
0e1dd050a5 printf: don't build if debugging subsystem was disabled 2013-04-13 01:19:41 +01:00
Tim-Philipp Müller
5299a0cd65 printf: deal with some of the HAVE_FOO used in the printf code
Probably needs some more work for MSVC.
2013-04-12 23:05:59 +01:00
Tim-Philipp Müller
3c1d9c6d41 printf: fix alloca use for windows with mingw32
Don't use just GLIB_HAVE_ALLOCA_H to check if alloca is available,
that's just for the header. GLib may define alloca for us otherwise
too irrespective of GLIB_HAVE_ALLOCA_H.

Fixes compiler warning with mingw32:
gst/printf/vasnprintf.c:73:0: warning: "alloca" redefined
2013-04-12 23:05:58 +01:00
Tim-Philipp Müller
ff292d530c printf: enable and fix compiler warnings
But suppress -Wformat-nonliteral warnings since sprintf
is used with a runtime-generated format string in our
vasnprintf implementation.
2013-04-12 23:05:58 +01:00
Tim-Philipp Müller
97b3948a9f printf: fix up dodgy use of #if HAVE_FOO and #if !HAVE_FOO
Should use #ifdef and #ifndef.
2013-04-12 23:05:58 +01:00
Tim-Philipp Müller
79d6b91e27 printf: mark internal functions as internal 2013-04-12 23:05:57 +01:00
Tim-Philipp Müller
3778c1878c printf: skip pointer extension signifier chars after %p
So they don't get printed after the serialised pointer string.
2013-04-12 23:05:57 +01:00
Tim-Philipp Müller
6d8a6470d5 printf: don't leak serialised pointer extension strings 2013-04-12 23:05:57 +01:00
Tim-Philipp Müller
9a9b449c5f printf: handle old GST_PTR_FORMAT %P and GST_SEGMENT_FORMAT %Q defines too
For binary backwards compatibility.
2013-04-12 23:05:57 +01:00
Tim-Philipp Müller
5803da553c printf: make printf parser recognise our pointer extension format
and call the hook to get a string for the pointer instead.

https://bugzilla.gnome.org/show_bug.cgi?id=613081
2013-04-12 23:05:57 +01:00
Tim-Philipp Müller
fe7f7135e0 printf: add infrastructure for pointer extensions hook
Does not do anything yet. On a sidenote, we can't just use
%p\001 or so to signal the extension because g-i complains
about an invalid ascii character then, so have to resort to
something more elaborate, such as %p\aA etc.

https://bugzilla.gnome.org/show_bug.cgi?id=613081
2013-04-12 23:05:57 +01:00
Tim-Philipp Müller
7b19944280 info: use new internal printf for debug message printing
and remove all the printf extension/specifier stuff for
the system printf. Next we need to add back the custom
specifiers to our own printf implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=613081
2013-04-12 23:05:57 +01:00
Tim-Philipp Müller
8fc876f09f printf: add our own printf implementation for debug logging
We will add support for our own printf modifiers, so we can
get nice debug log output on all operating systems irrespective
of the specific libc version used.

https://bugzilla.gnome.org/show_bug.cgi?id=613081
2013-04-12 23:05:56 +01:00
Wim Taymans
f45c84db02 taglist: avoid triggering an assertion
When deserialization of the structure fails, return a NULL taglist instead of
asserting.
2013-04-12 16:17:46 +01:00
Wim Taymans
396b49ec4d buffer: add _gst_max_memory() function
Add the a function to query the maximum amount of memory blocks that can be
added to a buffer. Also improve the docs for _insert_memory().
2013-04-11 14:31:01 +01:00
Stefan Sauer
8d816e9527 bus: fix the precondition for gst_bus_disable_sync_message_emission()
Use the right variable and invert the test. The precondition should catch
someone calling to once too often.
2013-04-10 21:50:53 +02:00
Olivier Crête
787d973fb2 capsfeatures: Init debug category before ever using it 2013-04-09 19:37:06 -04:00
Руслан Ижбулатов
e745a2bcf0 clock: Do use HAVE_CLOCK_GETTIME
Fixes #697549
2013-04-09 20:33:27 +02:00
Sebastian Dröge
f7532a7e13 capsfeatures: Copy ANY flag when copying caps features too 2013-04-06 22:10:58 +02:00
Sebastian Dröge
91b3890d70 caps: Handle ANY caps features properly in more places 2013-04-06 21:49:25 +02:00
Sebastian Dröge
db6ee700f2 caps: Properly handle ANY caps features in caps operations 2013-04-06 21:09:49 +02:00
Stefan Sauer
627d111eb6 bus: update signal docs for gst_bus_enable_sync_message_emission() 2013-04-05 21:24:19 +02:00
Tim-Philipp Müller
cf69475aeb caps: fix caps feature leak
Fixes leaks in 14 core unit tests including
gst/gstcaps.
2013-04-04 23:14:13 +01:00
Wim Taymans
6c62146031 structure: simplify is_subset check
Iterate over the fields of the superset instead of those of the subset.
This way we can check the presence of the subset field and do the subset check
in one iteration.
2013-04-04 17:59:10 +02:00
Wim Taymans
d92ce924e6 caps: update docs, is_subset() works now 2013-04-04 17:46:09 +02:00
Wim Taymans
ff0deeed9a bufferpool: fix docs 2013-04-04 16:39:23 +02:00
Wim Taymans
3e1a430c22 pad: add gst_pad_store_sticky_event()
Rewire some internal functions and expose a new
gst_pad_store_sticky_event() function.

API: gst_pad_store_sticky_event()
2013-04-04 16:36:26 +02:00
Wim Taymans
1457c9c499 pad: clarify docs 2013-04-04 15:45:23 +02:00
Wim Taymans
e857030232 pad: improve debug 2013-04-04 15:45:15 +02:00
Wim Taymans
95c6cd37a8 segment: don't WARN, just DEBUG
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=696911
2013-04-04 10:17:30 +02:00
Nicolas Dufresne
ab44e14c52 segment: Fix seeking when position is slightly outside the segment
Very often, when the end of a segment is detected by demuxer, the position
is slightly outside the segment boundaries. Currently, if that is the case
the base will be set to NONE instead of normal accumulation. This would
break non-flushing seeks in oggdemux and most likely other demuxers.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=696899
2013-04-04 10:10:24 +02:00
Wim Taymans
e9c48043d1 gst: add stream flags 2013-04-03 16:45:46 +02:00
Tim-Philipp Müller
24cac0afa3 docs: more since markers and other docs fixes 2013-04-02 23:51:06 +01:00
Tim-Philipp Müller
ce77032133 docs: add since markers to capsfeatures docs 2013-04-02 23:21:39 +01:00
Sebastian Dröge
65c650d7d4 capsfeatures: Add GST_CAPS_FEATURES_ANY
This is equal to any other caps features but results in unfixed caps. It
would be used by elements that only look at the buffer metadata or are
currently working in passthrough mode, and as such don't care about any
specific features.
2013-04-02 22:17:22 +02:00
Tim-Philipp Müller
0dd761101c info: minor cosmetic changes
Let's not use ugly leading underscores for
static functions.
2013-04-01 22:17:20 +01:00
Tim-Philipp Müller
cef9018eaf info: fix object printing of caps features in debug log 2013-04-01 21:23:21 +01:00
Stefan Sauer
6465dbd647 info: refactor pretty printing objects
Extract formatters into local functions. Change the structure filtering so that
it works for taglists too.
2013-04-01 16:39:18 +02:00
Stefan Sauer
28b0cb5721 element: make post_message and query more alike 2013-04-01 16:39:17 +02:00
Sebastian Dröge
a838e5aa75 capsfeatures: For copying features it's not required to have no parent refcount 2013-04-01 10:19:25 +02:00
Sebastian Dröge
efcb4023e6 caps: Set features' parent refcount in gst_caps_set_features() too 2013-04-01 10:19:01 +02:00
Sebastian Dröge
ccd2966f7a caps: Set sysmem features if explicitely requested 2013-04-01 10:18:39 +02:00
Sebastian Dröge
7477b25df5 caps: Add new data type for handling caps features to the caps
These are meant to specify features in caps that are required
for a specific structure, for example a specific memory type
or meta.

Semantically they could be though of as an extension of the media
type name of the structures and are handled exactly like that.
2013-03-31 18:15:52 +02:00