Commit graph

2674 commits

Author SHA1 Message Date
Tim-Philipp Müller
c8f8395f41 meson: fail silently in ptp helper post install script
.. in case permissions/capabilities could not be set.
2017-05-05 12:23:43 +01:00
Tim-Philipp Müller
0d33e8f11d meson: use cc.find_library()
find_library() was deprecated and removed in later versions.
2017-05-05 12:02:33 +01:00
Tim-Philipp Müller
dcfb222e05 meson: add gst-ptp-helper
https://bugzilla.gnome.org/show_bug.cgi?id=774418
2017-05-05 11:49:08 +01:00
Tim-Philipp Müller
cccd76aa99 helpers: remove old cruft from CLEANFILES
These files are no longer built, so no need to clean them.
2017-05-05 00:45:27 +01:00
Tim-Philipp Müller
3d8d81ecb7 g-i: no need to load registry in g-i scanner 2017-05-04 21:59:48 +01:00
Yasushi SHOJI
5d40e49d12 harness: Abort when failed to construct the specified pipeline
gst_harness_new_parse() returns without any error even if it doesn't
find the specified element.  Then a succeeding call to
gst_harness_set_sink_caps_str() causes an error like this:

	Unexpected critical/warning: gst_pad_push_event: assertion 'GST_IS_PAD (pad)' failed

This is a bit cryptic and doesn't give users any clue what was going
on.

gst_harness_new_parse() calls gst_harness_add_parse() with a newly
created empty harness and the given pipeline description string, but
gst_harness_add_parse() does not have a way to propagate the error
back to the caller.  Since the function, gst_harness_add_parse(), is a
public API, it's not a good idea to change its signature.  This patch,
instead, makes the function to g_error() when it discovers any error.
With this change the same error prints:

	** (myelement-test:25345): ERROR **: Unable to create pipeline 'bin.( myelement )': no element "myelement"

The current implementation of gst_parse_launch_full() doesn't return
partially constructed pipeline when GST_PARSE_FLAG_FATAL_ERRORS is
specified, however, this patch also adds a check for it.

https://bugzilla.gnome.org/show_bug.cgi?id=781958
2017-05-04 19:48:33 +01:00
Sebastian Dröge
733de3190b adapter: Check if meta transform_func is NULL before using it
https://bugzilla.gnome.org/show_bug.cgi?id=782050
2017-05-02 14:27:14 +03:00
Frédéric Dalleau
ca7fa6a661 basetransform: Check if meta transform_func is NULL before using it
An untested pointer segfaulted in webkit while playing video
on imx6 sabrelite. It turned out that the imx plugin didn't
implement the meta transform function.

The following GST_DEBUG trace was visible:
gstbasetransform.c:1779:foreach_metadata:<conv2> copy metadata
                                                GstImxVpuBufferMetaAPI

Thread 26 vqueue:src received signal SIGSEGV, Segmentation fault.

(gdb) bt
 0x00000000 in ?? ()
 0x73f8d7d8 in foreach_metadata (inbuf=0xc9b020, meta=0x474b2490,
                  user_data=<optimized out>) at gstbasetransform.c:1781
 0x73eb3ea8 in gst_buffer_foreach_meta (buffer=buffer@entry=0xc9b020,
                  func=0x73f8d705 <foreach_metadata>,
                  user_data=user_data@entry=0x474b24d4)
                  at gstbuffer.c:2234

https://bugzilla.gnome.org/show_bug.cgi?id=782050
2017-05-02 14:26:21 +03:00
Yasushi SHOJI
c423df49af basetransform: fix typo in debug log output
This unbalanced closing parenthesis is leftover from the commit
8b739d91e7. It used to wrap the caps but we don't seem to do that in
the current code.

So, just remove it. No functionality has been changed.

https://bugzilla.gnome.org/show_bug.cgi?id=781484
2017-04-19 09:21:32 +01:00
Rico Tzschichholz
72e42f0ce9 meson: A couple for GIR-generation fixes 2017-04-13 10:05:53 +01:00
Thibault Saunier
15566bf505 meson: Add controller enum file as generated sources
Avoiding build failure like
https://ci.appveyor.com/project/thiblahute/gst-build-ge9m5/build/1.0.2857
2017-04-12 10:03:29 -03:00
Tim-Philipp Müller
89ce63ee6c controller: include new proxycontrolbinding header
And fix includes in docs to just include the main header (the
include for the proxycontrolbinding was wrong in the docs).
2017-04-11 20:18:29 +01:00
Sebastian Dröge
9a04087347 controller: Fix build with srcdir!=builddir 2017-04-10 14:26:42 +03:00
Rico Tzschichholz
f34c8aac4d controller: Add missing sources/headers to the GIR build 2017-04-10 13:52:41 +03:00
Sebastian Dröge
1365e675c6 meson: And actually make the controller mkenums rules work 2017-04-09 12:16:39 +03:00
Sebastian Dröge
c7cc48b42e controller: Generate GLib enums automatically 2017-04-09 12:06:55 +03:00
Tim-Philipp Müller
519d64881f Don't use deprecated g_object_newv()
Use g_object_new() instead which nowadays has a shortcut for the
no-properties check. It still does an extra GType check in the
function guard, but there's a pending patch to remove that
and it's hardly going to be a performance issue in practice,
even less so on a system that's compiled without run-time checks.

Alternative would be to move to the new g_object_new_properties()
with a fallback define for older glib versions, but it makes the
code look more unwieldy and doesn't seem worth it.

Fixes deprecation warnings when building against newer GLib versions.

https://bugzilla.gnome.org/show_bug.cgi?id=780903
2017-04-08 09:49:59 +01:00
Nicolas Dufresne
35c4428083 meson: Add bash completion support 2017-04-04 14:46:48 -04:00
Nicolas Dufresne
bae1fe254a completion: Place the completion helper in libexec
This patch reorganize the bash completion scripts in order to install
the binary helper (gst-completion-helper) in libexec path rather then
share folder. Most Linux hierarchy compliance requires that no binary
executable are placed in share. We also cleanup the unused .pc entries
and remove copy pasted parts of the script. Note that other project
including the common helper, should now use $_GST_HELPER to read
the binary executable gst-completion-helper. This helper is not longer
version, as it is placed in a versionned subfolder
(libexec/gstreamer.10) just like the other helpers (scanner and ptp).
2017-04-04 14:46:48 -04:00
Sebastian Dröge
50ec7129bb queuearray: Add G_BEGIN_DECLS and G_END_DECLS to make it usable from C++ code 2017-03-24 14:21:55 +02:00
Jan Schmidt
e571002dcb baseparse: Don't forget error returns when processing more
If parsing returns a non-OK flow return in the middle
of processing an input buffer, don't overwrite that
if a later return is OK again - the subclass might
return not-linked in the middle, and then discard
subsequent data without pushing while returning OK.

A later success doesn't invalidate the earlier failure,
but we should continue processing after not-linked, so
as to keep parse state consistent.

https://bugzilla.gnome.org/show_bug.cgi?id=779831
2017-03-22 11:42:53 +11:00
Wim Taymans
586b34436e buffer: handle gst_buffer_map failures 2017-03-10 10:13:05 +01:00
Tim-Philipp Müller
834fd18dfa bytereader: fix peek value when scanning for 00 00 01 with non-0 offset
We would add the offset a second time in _scan_for_start_code()
when we found a result, but it's already been added to the data
pointer at the beginning of _masked_scan_uint32_peek(), so the
peeked value would be wrong if the initial offset was >0, and
we would potentially read memory out-of-bounds.

Add unit test for all of this.

https://bugzilla.gnome.org/show_bug.cgi?id=778365
2017-02-22 11:07:24 +00:00
Stefan Sauer
c189827619 gstbasesink: xref symbol in docs 2017-02-15 21:37:31 +01:00
Thibault Saunier
5ef7a20687 meson: libs: Add gir to the source list of the dependency 2017-01-27 16:36:39 -03:00
Thibault Saunier
a87b4551a6 Port gtk-doc comments to their equivalent markdown syntax
Modernizing our documentation and preparing a possible move to hotdoc.
This commits also adds missing @title metadatas to all SECTIONs
2017-01-27 16:36:38 -03:00
Julien Isorce
b2c05cac8e baseparse: correctly handle non-flush seek
Otherwise when seeking/looping to the start when reaching the end,
the sink waits for the duration of the stream. So the user hears
nothing for the duration of the stream before it actually loop again.
See example attached to the bug for that.

Existing test:
gst-plugins-good/tests/icles/test-segment-seeks foo.flac
Without the patch the user hears a crack/cut at each seek.

https://bugzilla.gnome.org/show_bug.cgi?id=777780
2017-01-26 16:51:21 +00:00
Stian Selnes
0c36e5766d check: Add API to filter g_warning/g_critical etc
New API functions to filter log messages before they are processed by
GstCheck. This can be used to discard specific messages that are
accepted by the test or to add callbacks that test specific messages.

Default bevavior when no callback is given to a filter is to discard the
message, because it does not makes sense to have a filter with no
callback which does not discard; that would be a noop.

Discarded messages will in addition to bypass the GstCheck handling also
return to GLib that the message is not fatal if it occurs.

https://bugzilla.gnome.org/show_bug.cgi?id=773091
2017-01-24 00:11:59 +00:00
Mark Nauwelaerts
9bcebaacc7 baseparse: also unset DISCONT on buffers in reverse playback fragments 2016-12-28 13:46:33 +01:00
Fabrice Bellet
de65529d52 basesink: fix a use after free case
The event may be disposed while being pushed, so we make sure the
debug infrastructure won't use it after the gst_pad_push().
2016-12-17 09:40:25 +05:30
Tim-Philipp Müller
bb28a59d5b check: fix typo in docs 2016-12-16 18:30:46 +00:00
Tim-Philipp Müller
6354b57295 check: export new global variable 2016-12-16 18:20:45 +00:00
Thibault Saunier
7b3d383971 check: Avoid possible double free 2016-12-16 14:00:18 -03:00
Thibault Saunier
f7255f318f check: Allow listing unit tests names
Adding options while running gst_check_init

https://bugzilla.gnome.org/show_bug.cgi?id=775540
2016-12-16 13:46:39 -03:00
Nirbheek Chauhan
f8df150e29 check: Fix macro check for OS X
TARGET_OS_MAC is defined on all Apple platforms. You need to check for
!TARGET_OS_IPHONE to detect OS X (now called macOS).
2016-12-09 22:39:36 +05:30
Nirbheek Chauhan
77af10a521 check: Don't try to include CoreServices.h on iOS
On iOS, we have MobileCoreServices.h but it's not really needed.
2016-12-09 18:01:35 +05:30
Nirbheek Chauhan
e60bd6c662 check: Don't check for malloc/realloc and try to fallback
When malloc is not available, this will set #define malloc rpl_malloc
which is implemented only inside libcheck, and not everything will link
to libcheck.

We don't really need to care too much about how malloc is implemented
and we don't care about platforms that don't implement malloc.
2016-12-09 17:59:53 +05:30
Nirbheek Chauhan
958d791d3c Add a README.txt with context for libcheck
https://bugzilla.gnome.org/show_bug.cgi?id=775870
2016-12-09 16:03:41 +05:30
Nirbheek Chauhan
d8e8e92176 libcheck: Update the compatibility code and checks
This brings us up-to-speed with the latest compatibility code from upstream
check git. For completeness, we do all the checks that upstream check does, but
we skip the snprintf/vsnprintf code because it's not straightforward (involves
running code and that is bad for cross-compilation) and not necessary for the
platforms we support anyway.

If someone really wants this, they can uncomment this and copy the relevant
checks from the check git repository.

https://bugzilla.gnome.org/show_bug.cgi?id=775870
2016-12-09 15:31:01 +05:30
Nirbheek Chauhan
eb1f861012 libcheck: Just move libcompat files to a subdir
Makes it clearer which files are actually used in libcheck and which are used
for cross-platform compatibility. This is going to be especially useful when we
add all the libcompat fallback code that upstream libcheck has which will add
about 6 new files.

https://bugzilla.gnome.org/show_bug.cgi?id=775870
2016-12-09 15:31:01 +05:30
Nirbheek Chauhan
0bb6d590cc libcheck: port to latest check git
Upstream seems to have stopped doing releases, but we need to update for better
Windows and Visual Studio support.

This patch only updates the libcheck sources and ignores the compatibility
sources for now.

https://bugzilla.gnome.org/show_bug.cgi?id=775870
2016-12-09 15:31:01 +05:30
Ricardo Ribalda Delgado
0728b9b59b helpers/gst: Get bash completion options from gst-launch
It is more likely that gst-launch is installed than ges-launch

Reported-by: Marianna Smidth Buschle <msb@qtec.com>

https://bugzilla.gnome.org/show_bug.cgi?id=775714
2016-12-06 18:25:23 +00:00
Marcin Kolny
90f101981c net: set clock name in the constructor
gst_net_client_clock_new() and gst_ntp_clock_new() didn't set the
"name" property.

https://bugzilla.gnome.org/show_bug.cgi?id=775538
2016-12-06 12:10:17 +02:00
Olivier Crête
e6febb5bc1 basesink: Document the interaction between unlock() and wait_preroll()
This was totally non-obvious, the kind of big problem is that subclasses must
be able to unblock their streaming thread and continue exactly where they left off
on unpause!

https://bugzilla.gnome.org/show_bug.cgi?id=773912
2016-11-23 11:58:43 -05:00
Matthew Waters
3eb4896435 controllers: add new proxy control binding
Allows proxying the control interface from one property on one GstObject
to another property (of the same type) in another GstObject.

E.g. in a parent-child relationship, one may need to
gst_object_sync_values() on the child and have a binding (set elsewhere)
on the parent update the value.

Note: that this doesn't solve GObject property forwarding and must be
taken care of by the implementation manually or using GBinding.

https://bugzilla.gnome.org/show_bug.cgi?id=774657
2016-11-23 17:15:09 +11:00
Sebastian Dröge
f08c8d2da3 basetransform: Ensure to set the RECONFIGURE flag again if reconfiguration failed
It might've failed just because of flushing or other things, and we
should retry again on the next possibility if something ever calls in
here again.

https://bugzilla.gnome.org/show_bug.cgi?id=774623
2016-11-18 12:04:18 +02:00
Jan Schmidt
2e579a7c1b baseparse: Fix previous commit
Check the correct segment format value.

parse->segment.format is the format we're outputting in,
not the upstream format. Use parse->priv->upstream_format instead,
and make sure it's set in pull mode.
2016-11-16 00:30:26 +11:00
Jan Schmidt
d81c0aec81 baseparse: Restrict query/convert responses when demuxing
If the parser is not parsing a raw elementary stream, restrict
the position, duration and conversion query replies to
things we can sensibly answer about - especially don't do
random conversions to/from bytes.
2016-11-16 00:12:22 +11:00
Scott D Phillips
075744a894 Cast away const from GstMetaInfo in *_get_meta_info() functions
MSVC warns about the const in the implicit argument conversion in the
calls to g_once_init_{enter,leave}. It's OK so explicitly cast it.

https://bugzilla.gnome.org/show_bug.cgi?id=774293
2016-11-15 14:51:18 +02:00
Scott D Phillips
1e30725331 typefindhelper: Update prototype of helper_find_suggest()
forward declaration prototype is updated to match the change in:

 5a72c23 Change some types to match their prototypes

https://bugzilla.gnome.org/show_bug.cgi?id=774293
2016-11-15 14:29:36 +02:00