Commit graph

8086 commits

Author SHA1 Message Date
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
Carlos Rafael Giani
eead9cf827 message: Add redirect message
Redirection messages are already used in fragmented sources and in
uridecodebin, so it makes sense to introduce these as an official message
type.

https://bugzilla.gnome.org/show_bug.cgi?id=631673
2016-07-25 12:59:21 +03:00
Tim-Philipp Müller
d052ae63d8 element: fix GST_ELEMENT_ERROR() error code expansion
In some corner cases, the error 'code' part passed to
GST_ELEMENT_ERROR() is a valid define as well, in which
case it won't survive two levels of macro expansion, but
only one. Fixes:

oss4-sink.c: In function ‘gst_oss4_sink_open’:
error: ‘GST_RESOURCE_ERROR_0x00000002’ undeclared (first use in this function)
GST_ ## domain ## _ERROR_ ## code, __txt, __dbg, __FILE__,

which is from GST_ELEMENT_ERROR(el,RESOURCE,OPEN_WRITE,..)
and OPEN_WRITE happens to be defined to 2 here.

https://bugzilla.gnome.org/show_bug.cgi?id=756806
https://bugzilla.gnome.org/show_bug.cgi?id=769117
2016-07-24 01:35:41 +01:00
Tim-Philipp Müller
12a10980b3 message: fix some nonsensical annotations 2016-07-22 17:32:33 +01:00
Vincent Penquerc'h
1105caa805 message: new API for additional custom data to error messages
https://bugzilla.gnome.org/show_bug.cgi?id=756806
2016-07-22 14:16:34 +01:00
Guillaume Desmottes
31ef105110 message: fix annotation of parse_stream_{collection,streams_selected}
gst_structure_id_get() returns a new reference so the returned object is
actually (transfer full).

The unit tests was already unreffing the objects.

https://bugzilla.gnome.org/show_bug.cgi?id=768776
2016-07-15 12:57:49 +01:00
Guillaume Desmottes
514beb7d60 message: fix annotation of parse_device_{added,removed}
gst_structure_id_get() returns a new reference so the returned device is
actually (transfer full).

The code using this API was already correct but the code example in
comments was not.

https://bugzilla.gnome.org/show_bug.cgi?id=768776
2016-07-15 12:56:52 +01:00
Guillaume Desmottes
2a0bba69e1 pad: add g-i transfer annotatation to _store_sticky_event()
For clarity.

https://bugzilla.gnome.org/show_bug.cgi?id=768810
2016-07-15 12:50:21 +01:00
Guillaume Desmottes
e73650e5f9 miniobject: weak_unref: display the pointer of the object if failing
That's generally the most useful information to help debugging the
problem.

https://bugzilla.gnome.org/show_bug.cgi?id=768579
2016-07-08 17:52:48 +01:00
Guillaume Desmottes
757a8b04c0 bin: properly display the type of the removed message
Makes debugging easier.

https://bugzilla.gnome.org/show_bug.cgi?id=768579
2016-07-08 17:52:40 +01:00
Tim-Philipp Müller
7a0f4422fa element: re-create threadpool after cleaning up tasks
We don't free this from gst_deinit() but from gst_task_cleanup_all(),
so more GStreamer API may be called. In particular makes unit tests
work again with CK_FORK=no.

https://bugzilla.gnome.org/show_bug.cgi?id=768577
2016-07-08 17:46:06 +01:00
Guillaume Desmottes
40727d9c83 element: clean up thread pool from gst_task_cleanup_all()
This ensures that all async operations (started from gst_element_call_async())
have been completed and so there is no extra thread running.

Fix races when checking for leaks on unit tests as some of those
operations were still running when the leaks tracer was checking for
leaked objects.

https://bugzilla.gnome.org/show_bug.cgi?id=768577
2016-07-08 17:27:32 +01:00
Miguel París Díaz
9f982e2d75 pad: check query caps answered and caps not NULL
https://bugzilla.gnome.org/show_bug.cgi?id=768450
2016-07-07 10:08:15 +03:00
Jan Schmidt
17f9ac5657 gstinfo: Avoid gcc 6 warning that breaks the tests build
gcc 6 has problems detecting and avoiding throwing
a warning for tautological compares in macros (they
should only trigger for compares outside macros).

Avoid them with a nasty cast of one parameter to void *

https://bugzilla.gnome.org/show_bug.cgi?id=764526
2016-07-01 22:38:01 +10:00
Tim-Philipp Müller
3623f168e9 streams: sprinkle some Since: markers for docs 2016-06-30 15:07:28 +01:00