Commit graph

8100 commits

Author SHA1 Message Date
Jan Schmidt
5a5ae1be1f parse-launch: Support linking all pads with new operator
Introduce a new operator ':' - e.g. element1 ':' element2

For example, 'uridecodebin : encodebin' -
if the encodebin has multiple profiles compatible with the
decodebin, multiple links will be created.

With '!' , after one delayed link is successfully done, the
pad-added callback is disconnected.

https://bugzilla.gnome.org/show_bug.cgi?id=751450
2016-11-02 12:04:33 +11:00
Jan Schmidt
e1dc60524e dynamic types: Implement dynamic types in the registry
Implement GstDynamicTypeFactory as a new registry feature.

GstDynamicTypeFactory provides a way of registering a GType
into the registry, such that it will be registered as a dynamic
type when the registry is loaded, and then automatically loaded
if the type is needed during caps parsing.

This allows using non-core types in pad templates, by loading a
registry feature to create the GType on the fly.

https://bugzilla.gnome.org/show_bug.cgi?id=750079
2016-11-02 11:21:37 +11:00
Sebastian Dröge
1a1152fa03 value: Update GstValue table size for GValueArray 2016-11-01 23:54:05 +02:00
Stian Selnes
287645c2d7 info: Replace %p and %r in GST_DEBUG_FILE
It's useful to be able to set a name pattern for GST_DEBUG_FILE so that
the same environment variable can be used for multiple processes and
still write to different files. Especially useful if these processes
run simultaneously.

%p: Replaced with PID
%r: Replaced with random number

%p is obviously useful. %r is useful when for instance running two
processes with same PID but in different containers.

https://bugzilla.gnome.org/show_bug.cgi?id=773092
2016-11-01 20:32:46 +02:00
Stian Selnes
fd728c2531 registry: set env GST_REGISTRY_DISABLE=yes to disable registry
If GST_REGISTRY_DISABLE=yes the registry is disabled similar to
compile time switch GST_DISABLE_REGISTRY.

https://bugzilla.gnome.org/show_bug.cgi?id=773089
2016-11-01 20:31:46 +02:00
Stian Selnes
c85a30f80b gstvalue: Make GValueArray serializable
For instance very useful for logging GValueArray with GST_PTR_FORMAT

https://bugzilla.gnome.org/show_bug.cgi?id=761918
2016-11-01 20:30:43 +02:00
Wonchul Lee
f80dfc9b06 element: Allow multiple conversion specifiers for request pads
This allows pad template names like "src_%u_%u", but it does not allow
multiple specifiers of string type %s as that would lead to ambiguities.

https://bugzilla.gnome.org/show_bug.cgi?id=761225
2016-11-01 20:29:03 +02:00
Thiago Santos
83cac0f7b6 pad: add no-reconfigure link check
Enable it to prevent sending reconfigure when linking elements.

Useful for autoplugging when we know caps or bufferpools shouldn't change
to save doing caps renegotiation to end up with the same final scenario.

The no-reconfigure is not a proper check, it is a flag. It is implemented
as a GstPadLinkCheck to avoid creating another gst_pad_link variant.

https://bugzilla.gnome.org/show_bug.cgi?id=757653
2016-11-01 20:28:14 +02:00
Nicolas Dufresne
3fc8a334b7 allocator: Mark registered allocator for leak 2016-10-24 11:54:22 -04:00
Andrew Eikum
ec4c76f297 gstmessage.h: Avoid gcc bit shift overflow compiler warning
Avoids bit shift overflow warning with gcc6.

https://bugzilla.gnome.org/show_bug.cgi?id=767882 (glib)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71803 (gcc)
https://bugzilla.gnome.org/show_bug.cgi?id=767883
2016-10-24 11:49:37 +01:00
Tim-Philipp Müller
f7391936ce parse: fix erroneous use of _("")
Fixes xgettext warnings when doing 'make update-po':
gst/parse/grammar.y:217: warning: Empty msgid.  It is reserved by GNU gettext:
                                  gettext("") returns the header entry with
                                  meta information, not the empty string.
2016-10-23 22:11:08 +01:00
Thibault Saunier
c0bfb1b524 Revert "meson: Use the new pic argument on static libs"
This reverts commit a5752240a1.

pic was added after 0.35 and will be present in 0.36 (meson
documentation was wrong).
2016-10-20 17:19:25 -03:00
Thibault Saunier
a5752240a1 meson: Use the new pic argument on static libs
We depend on meson 0.35 which makes it simpler to handle

Removes a meson warning
2016-10-20 16:04:42 -03:00
Matthew Waters
556c540ecd element: use g_strcmp0 in set_context
It's NULL-safe while the libc implementation may not be.

https://bugzilla.gnome.org/show_bug.cgi?id=771773
2016-10-19 22:24:27 +11:00
Matthew Waters
3654d844c1 element: check for invalid gstcontext's being provided to set_context
https://bugzilla.gnome.org/show_bug.cgi?id=771773
2016-10-19 22:24:27 +11:00
Sebastian Dröge
35a34d2fa8 controlbinding: Store object in a thread-safe GWeakRef
g_object_weak_ref() is not thread-safe.
2016-10-13 18:25:59 +02:00
Sebastian Dröge
a3185f626a controlsource: Remove misleading sentence from the documentation
control sources are not required to return values between 0.0 and 1.0.
This is completely up to the control binding that is used.
2016-10-13 17:55:45 +02:00
Sebastian Dröge
98ded2dd60 object: Fix broken sentence structure in docs 2016-10-13 17:22:00 +02:00
Edward Hervey
71a2bdeaf7 streams: Extend GstStreamType documentation
Users shouldn't assume it will be a single value since it's a flag.
2016-10-13 12:04:20 +02:00
Edward Hervey
0ab950f501 bin: Add a new GST_BIN_FLAG_STREAMS_AWARE flag
This flag is to indicate to child elements that they can add and
remove pads at any point in time without re-adding existing ones.

Elements should post before-hand a GST_MESSAGE_STREAM_COLLECTION

https://bugzilla.gnome.org/show_bug.cgi?id=772741
2016-10-11 12:36:57 +02:00
Edward Hervey
d02e1d7f7d bin: Fix iterator resync'ing
When we get GST_ITERATOR_RESYNC, we need to call gst_iterator_resync()
otherwise we will always get GST_ITERATOR_RESYNC (and that loop would
run forever).
2016-10-08 17:23:08 +02:00
Sebastian Dröge
644584668f message: Fix typo in gst_message_new_progress() docs
test -> text
2016-10-01 16:47:43 +03:00
Tim-Philipp Müller
557e06a6f1 meson: fix internal printf for %ll format modifier on 32-bit systems
gst/gstprintf unit test would fail on 32-bit x86 with:
gstprintf.c:83:printf_I32_I64:0: 'str' (64-bit x value = b5a6978f) is not equal to '"64-bit x value = f1e2d3c4b5a6978f"'
2016-09-24 18:12:46 +01:00
Nirbheek Chauhan
f8e3637dc7 Revert "meson: Force gstenum_h to be built when using gst_dep"
This reverts commit cfc565e2d8.

The commit was redundant since gst_gen_sources already contains
gstenum_h. We're still investigating why some people are still seeing
a racy build failure.
2016-09-23 04:21:42 +05:30
Nirbheek Chauhan
cfc565e2d8 meson: Force gstenum_h to be built when using gst_dep
This forces gstenumtypes.h to be built whenever something uses gst_dep
as a subproject dependency. This is needed since gst/gst.h includes
gstenumtypes.h

Closes https://github.com/mesonbuild/meson/issues/714 which is not
actually a Meson bug.
2016-09-23 00:28:55 +05:30
Sebastian Dröge
bf1c12342a bin: Add forgotten "git commit --amend" for last commit
Need to cast away the const as g_queue_foreach() takes a non-const GQueue*
2016-09-19 10:07:51 -04:00
Kouhei Sutou
a43de49d52 bin: When copying the sort iterator, also copy its internal queue
Otherwise both iterators share the same references, the second one
usually resulting in a crash when being freed.

https://bugzilla.gnome.org/show_bug.cgi?id=771649
2016-09-19 10:04:55 -04:00
Arun Raghavan
4cc0254df1 message: Fix documentation for gst_message_new_duration()
Seems like there was some documentation left over from when this was
gst_message_new_duration().
2016-09-15 17:39:32 +05:30
Nirbheek Chauhan
b6e69ffdfb gstconfig: Use __declspec when built with MinGW and linking with MSVC
Earlier we were only using __declspec(dllexport/import) when we were
built with MSVC because when built with MinGW and linking with MinGW we
don't need it (and we get linker errors because of it).

However, when we're built with MinGW and someone wants to link to us
with MSVC, we still need the prototypes to have __declspec(dllimport)
since MSVC cannot do auto-import like GCC can.

https://bugzilla.gnome.org/show_bug.cgi?id=771029
2016-09-13 13:46:19 +05:30
Sebastian Dröge
c7e0299d24 bin: Also don't *unset* element flags if they're in the suppressed flags
Otherwise our bin might lose various flags that were explicitly set on
it at arbitrary times.
2016-09-12 17:07:09 +02:00
Wonchul Lee
978b7ace52 bin: Add setter and getter to suppress element flags
Suppress-flags is for preventing propagation of child element's specific
flag when it is added to the bin.

https://bugzilla.gnome.org/show_bug.cgi?id=770627
2016-09-10 13:28:21 -03:00
Graham Leggett
84fcec0065 gst: Ensure gst_value is initialised before gst_tag
Otherwise GST_TYPE_FRACTION will work correctly in tags.

https://bugzilla.gnome.org/show_bug.cgi?id=753922
2016-09-10 10:59:40 +03:00
Sebastian Dröge
1b7ab25512 element: Reset the stop position to NONE in seek_simple()
When using seek_simple() in combination with other kinds of seeks, this
becomes problematic. seek_simple() does not reset the stop position to
GST_CLOCK_TIME_NONE but keeps whatever a previous seek did. So for example
when doing a seek_simple() after a rate=-1 seek, we would usually get
assertions that start>stop (and stop being the old stop from the rate=1 seek).

https://bugzilla.gnome.org/show_bug.cgi?id=771104
2016-09-10 10:58:44 +03:00
Thibault Saunier
ed61bff072 meson: Allow others to build GIR files when using GStreamer as subproject
And add a way to disable the introspection and bump version to 1.9.2
2016-09-05 12:39:12 -03:00
Sebastian Dröge
b3a8885e35 gstconfig.h.in: Add another version of the SH4 #define and S390x
https://bugzilla.gnome.org/show_bug.cgi?id=770731
2016-09-05 11:11:29 +03:00
Wim Taymans
0abb6e1a42 config: newer gcc doesn't know __ppc__ and __ppc64__ anymore
__ppc__ and __ppc64__ are non-standard defines, we should use
__powerpc__ and __powerpc64__ instead because newer gcc doesn't know
them anymore.
2016-09-05 09:50:17 +02:00
Wim Taymans
0e8ebbe590 config: support System z 2016-09-01 14:13:40 +02:00
Thibault Saunier
da73b89200 element: Add API to more easily post messages about flowing issues
In many parts of the code we raise streaming error when the flow
goes wrong, and each time we create more or less similare error
message. Also that message does not let the application know what
has actually gone wrong. In the new API we add a "flow-return" detail
field inside the GstMessage so that the application has all the information
if it needs it.

API:
    GST_ELEMENT_FLOW_ERROR

https://bugzilla.gnome.org/show_bug.cgi?id=770158
2016-08-27 09:33:20 -03:00
Nirbheek Chauhan
22b892b44f gstconfig: Decide GST_EXPORT declaration style at build time
We only use GST_EXPORT consistently when building with MSVC by using the
visual studio definitions files (win32/common/*.def), so always disable
it when building with Autotools and only enable it with Meson when
building with MSVC.

This allows you to use MinGW to link to a GStreamer built with MSVC and
get the correct function prototypes to find functions and variables in
DLLs.
2016-08-26 15:20:50 +01:00
Tim-Philipp Müller
3cba95ca2a element: rename gst_element_message_new_details() to gst_make_element_message_details()
Fixes g-i warning "Gst: Constructor return type mismatch
symbol='gst_element_message_new_details' constructed='Gst.Element'
return='Gst.Structure'".

This is a newly-added function in git that has not been in a stable
release yet, so it's fine to rename it. It's also only used indirectly
via macros.
2016-08-26 12:56:40 +01:00
Tim-Philipp Müller
26797d0714 docs: fix various gtk-doc warnings
e.g. "warning: multi-line since docs found"
2016-08-26 12:35:23 +01:00
Tim-Philipp Müller
89f5df1782 g-i: info: allow passing NULL to gst_debug_remove_log_function()
Useful for removing the default handler from bindings.
2016-08-26 12:05:16 +01:00
Jan Schmidt
a95645eaba value: Implement can_intersect for GstFlagSet types
Make sure that gst_value_can_intersect returns TRUE
for GstFlagSet combinations that can successfully
intersect
2016-08-26 03:23:40 +10:00
Arjen Veenhuizen
cf6cac07dd buffer: add explicit getters and setters for buffer flags
These can be used from bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=768301
2016-08-22 18:59:06 +01:00
Hoonhee Lee
a7a2623166 streams: update and emit notify signal only if taglist actually changed
https://bugzilla.gnome.org/show_bug.cgi?id=770161
2016-08-21 18:40:40 +01:00
Nirbheek Chauhan
b2f9808722 Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
2016-08-19 21:26:14 +01:00
Tim-Philipp Müller
714d8aa451 Move gstconfig.h back to normal include dir
Now that it's arch-independent again. Will need fixes in cerbero too.
2016-08-13 13:55:15 +01:00
Nirbheek Chauhan
6ef601367e gstconfig.h: Detect unaligned access support at compile-time
This makes gstconfig.h completely arch-independent. Should cover all
compilers that gstreamer is known to build on, and all architectures
that I could find information on. People are encouraged to file bugs if
their platform/arch is missing.
2016-08-13 10:29:31 +01:00
Tim-Philipp Müller
e2cd6ffafc Remove old alloc tracing code now that we have a GstTracer-based replacement
It's been internal API only in 1.x.
2016-08-13 10:10:30 +01:00
Jan Schmidt
9fd2101b36 events: Implement the stream-group-done event
A new event which precedes EOS in situations where we
need downstream to unblock any pads waiting on a stream
before we can send EOS. E.g, decodebin draining a chain
so it can switch pads.

https://bugzilla.gnome.org/show_bug.cgi?id=768995
2016-07-25 20:22:20 +10:00