Commit graph

20703 commits

Author SHA1 Message Date
Julien Isorce
68518acb53 appsink: unref preroll buffer upon pull
There is no reason for appsink to hang onto the preroll buffer.
If needed, the application can just keep a ref on this buffer
after calling gst_app_sink_try_pull_preroll.

Also added unit test 'test_pull_preroll'
  make elements/appsink.check

https://bugzilla.gnome.org/show_bug.cgi?id=786740
2017-09-13 14:11:27 +01:00
Julien Isorce
c134a3c21b appsink: rename GstBuffer *preroll to preroll_buffer
priv->preroll can be confused with basesink_class->preroll

https://bugzilla.gnome.org/show_bug.cgi?id=786740
2017-09-13 14:06:43 +01:00
Tim-Philipp Müller
925a4fe6a4 tests: playbin-complex: skip test that needs oggdemux if it's not available
https://bugzilla.gnome.org/show_bug.cgi?id=773145
2017-09-10 16:32:31 +01:00
Nicolas Dufresne
2bf665486e Request minimum buffer even if need_pool is FALSE
When tee is used, it will not request a pool, but still it wants to
know how many buffers are required.

https://bugzilla.gnome.org/show_bug.cgi?id=730758
2017-09-06 14:20:46 -04:00
Nicolas Dufresne
5d6fbcb0af video-filter: Support allocation pool with pool object
This is used to indicate upstream the requirement in buffers
while no buffer pool can be provided. In this case, only
configure the pool with caps/size/min/max if we have caps,
which we only parsed when there was no allocation pool.

https://bugzilla.gnome.org/show_bug.cgi?id=730758
2017-09-06 14:20:46 -04:00
Nicolas Dufresne
c1f524f3a8 Request minimum buffer even if need_pool is FALSE
When tee is used, it will not request a pool, but still it wants to
know how many buffers are required.

https://bugzilla.gnome.org/show_bug.cgi?id=730758
2017-09-06 14:19:37 -04:00
Matthew Waters
5d3d764568 video/affinetransformationmeta: use the provided doc comment for the struct 2017-08-24 19:11:29 +10:00
Julien Isorce
3573238683 gl: do not include GL headers in public gstgl headers
Except for gst/gl/gstglfuncs.h

It is up to the client app to include these headers.
It is coherent with the fact that gstreamer-gl.pc does not
require any egl.pc/gles.pc. I.e. it is the responsability
of the app to search these headers within its build setup.

For example gstreamer-vaapi includes explicitly EGL/egl.h
and search for it in its configure.ac.

For example with this patch, if an app includes the headers
  gst/gl/egl/gstglcontext_egl.h
  gst/gl/egl/gstgldisplay_egl.h
  gst/gl/egl/gstglmemoryegl.h
it will *no longer* automatically include EGL/egl.h and GLES2/gl2.h.
Which is good because the app might want to use the gstgl api only
without the need to bother about gl headers.

Also added a test: cd tests/check && make libs/gstglheaders.check

https://bugzilla.gnome.org/show_bug.cgi?id=784779
2017-08-22 10:00:19 +01:00
Mark Nauwelaerts
2372894c63 playbin: ref_sink() sink rather than pointer to sink 2017-08-20 12:25:29 +02:00
Tim-Philipp Müller
f051c0890a Automatic update of common submodule
From 29046b8 to 3f4aa96
2017-08-17 12:23:18 +01:00
Mathieu Duponchelle
28943c4399 videoutilsprivate: fill more video fields.
__gst_video_element_proxy_caps is called by
__gst_video_element_proxy_getcaps with caps set to the caps
allowed downstream. As we didn't set colorimetry or
chroma-site on the resulting caps, upstream considered it
possible to use whatever values it wanted, leading to
not negotiated errors later on.

As the description for that function is:
"Takes caps and copies its video fields to tmpl_caps",
it seems legitimate to set these fields there.

https://bugzilla.gnome.org/show_bug.cgi?id=786172
2017-08-14 12:42:57 +02:00
Philippe Normand
d375a28a37 appsrc: handle duration query only if the property was set
https://bugzilla.gnome.org/show_bug.cgi?id=786200
2017-08-12 16:23:27 +01:00
Edward Hervey
ce65017d03 decodebin3/urisourcebin: Switch to actual EOS events internally
Use the intended sequence for re-using elements:
* EOS
* STREAM_START if element is to be re-used

This avoids having elements (such as queue/multiqueue/queue2) not
properly resetting themselves.

When delaying EOS propagation (because we want to wait until all
streams of a group are done for example), we re-trigger them by
first sending the cached STREAM_START and then EOS (which will
cause elements to re-set themselves if needed and accept new
buffers/events).

https://bugzilla.gnome.org/show_bug.cgi?id=785951
2017-08-11 11:23:29 +03:00
Tim-Philipp Müller
94d2e4c223 meson: hide symbols by default unless explicitly exported 2017-08-10 14:01:19 +01:00
Tim-Philipp Müller
7acdfa3753 pbutils: sprinkle more GST_EXPORT 2017-08-10 13:57:26 +01:00
Mathieu Duponchelle
5322026885 videoaggregator: use colorimetry from find_best_format.
This increases the chances that we won't need to do any conversion
for a given pad.

https://bugzilla.gnome.org/show_bug.cgi?id=786078
2017-08-10 13:55:59 +02:00
Mathieu Duponchelle
7305f50512 videoaggregator: improve find_best_format heuristic.
The goal here is to minimize the work needed to bring all images
to a common format. A better criteria than the number of pads
with a given format is the number of pixels with a given format.

https://bugzilla.gnome.org/show_bug.cgi?id=786078
2017-08-10 13:55:59 +02:00
Mathieu Duponchelle
663ef174d8 compositor: improve conversion debugging
https://bugzilla.gnome.org/show_bug.cgi?id=786078
2017-08-10 13:55:59 +02:00
Tim-Philipp Müller
ece4a096a1 libs: add some more missing GST_EXPORT 2017-08-10 10:27:23 +01:00
Sebastian Dröge
88975f224e examples/snapshot: Does not need GTK but only gdk-pixbuf 2017-08-09 12:27:05 +03:00
Mark Nauwelaerts
00fa39befa audioencoder: also adjust sample count upon discont to avoid ts overflow
Only adjusting the base_ts might lead to a negative ts and as such integer
overflow into a huge timestamp which then propagates into the granulepos
and so on.  Instead, resync to incoming buffer timestamp using both base_ts
and sample count rather than only base_ts.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=785948
2017-08-09 09:32:55 +02:00
Tim-Philipp Müller
2d632ff367 meson: fix a few meson warnings 2017-08-08 00:13:01 +01:00
Satya Prakash Gupta
815e72e91f examples: fix memory leaks in appsrc and appsrc2 examples
https://bugzilla.gnome.org/show_bug.cgi?id=785336
2017-08-07 20:18:26 +01:00
Sebastian Dröge
b4899a5a65 playbin: Make sure to ref_sink() any sinks before calling activate_sink()
It is forwarding messages to the playbin bus, thus forwarding messages
that contain a floating reference to the application. This generally
makes bindings unhappy, we must not leak floating references to them.
2017-08-07 15:27:45 +03:00
Sebastian Dröge
f996b05644 xmptag: Stop parsing GPS coordinate if sscanf() fails
CID 1139610
2017-08-04 13:39:31 +03:00
Sebastian Dröge
088a5cec64 videoaggregator: Don't mix up width and height
CID 1416129
2017-08-04 11:08:18 +03:00
Tim-Philipp Müller
afb652c169 examples: fix compiler warning in compositor crossfade example
warning: control reaches end of non-void function
2017-08-03 20:21:17 +01:00
Tim-Philipp Müller
61b54cdb40 compositor: update disted orc fallback files 2017-08-03 20:14:41 +01:00
Thibault Saunier
f90db75ab6 tests: examples: Add a simple crossfade example
https://bugzilla.gnome.org/show_bug.cgi?id=784827
2017-08-03 13:01:50 -04:00
Thibault Saunier
effb593a93 compositor: Add support for crossfade blending
Crossfading is a bit more complex than just having two pads with the
right keyframes as the blending is not exactly the same.

The difference is in the way we compute the alpha channel, in the case
of crossfading, we have to compute an additive operation between
the destination and the source (factored by the alpha property of both
the input pad alpha property and the crossfading ratio) basically so
that the crossfade result of 2 opaque frames is also fully opaque at any
time in the crossfading process, avoid bleeding through the layer
blending.

Some rationnal can be found in https://phabricator.freedesktop.org/T7773.

https://bugzilla.gnome.org/show_bug.cgi?id=784827
2017-08-03 12:59:43 -04:00
Tim-Philipp Müller
6105420bfc appsrc: fix doc typos 2017-08-01 17:08:08 +01:00
Sebastian Dröge
8be5030d47 appsrc: Add out annotations to gst_app_src_get_latency() 2017-08-01 18:49:23 +03:00
Thibault Saunier
ffd4c990c1 audioconvert: Consider channel=1, channel-mask=0x0 as mono
channels=1 is always mono, having it 'unpositioned' does not make
sense.

This fixes pipeline such as:

  gst-validate-1.0 audiotestsrc ! audio/x-raw,channels=2,rate=44100,layout=interleaved ! audioconvert ! audioresample ! audio/x-raw, rate=44100, channels=1 ! avenc_mp2 ! fakesink

https://bugzilla.gnome.org/show_bug.cgi?id=785407
2017-07-26 09:26:39 -04:00
Stefan Sauer
4080b844c0 audioaggregator: use local var
Instead of the self->priv-> deref use the local var we created already.
2017-07-26 09:43:52 +02:00
Sebastian Dröge
01f4d6494a videotimecode: Add GST_VIDEO_TIME_CODE_INIT macro 2017-07-25 10:03:41 +03:00
Satya Prakash Gupta
5cf883c8ed videofilter: Unmap input frame if mapping output frame failed
https://bugzilla.gnome.org/show_bug.cgi?id=785341
2017-07-24 17:05:17 +03:00
Sebastian Dröge
ae8d0cf3ac videodecoder: Make sure we have an actually writable buffer when modifying metadata
avviddec keeps references to the buffers internally for example, in
which case we need to do a shallow copy of the buffer.
2017-07-24 16:48:17 +03:00
Sebastian Dröge
79424411e7 videometa: Don't crash if adding the timecode meta to a buffer failed 2017-07-24 16:29:53 +03:00
Satya Prakash Gupta
075dac486f ssaparse: Fix buffer leak in error case
https://bugzilla.gnome.org/show_bug.cgi?id=785331
2017-07-24 11:56:50 +03:00
Stefan Sauer
2bf83de168 adder: comment and formatting cleanups
Log a few more details. Update method comments. Remove some extra blank lines.
2017-07-23 13:13:14 +02:00
Mathieu Duponchelle
875af55937 videorate: flush remaining buffers on SEGMENT_DONE
Just as we do on EOS.

https://bugzilla.gnome.org/show_bug.cgi?id=784666
2017-07-21 14:22:07 -04:00
Tim-Philipp Müller
6461ad057c fft: don't generate g-i files for bindings
The g-i stuff for this helper lib was never usable from bindings
anyway and there are problems with the latest gobject-introspection,
so we might just as well remove the g-i integration entirely for
this lib.
2017-07-19 23:08:12 +01:00
Seungha Yang
bf32c0b3b0 decodebin3: Remove FIXME and do remove_input_stream() only for the corresponding parsebin
Do not remove other parsebin's input streams. It will cause unexpected
removal of any input streams in multi-parsebin use case.

Basically, the purpose of blocking buffers is similar to checking
no-more-pads of chain/group. That is, it gives hint to know the timing
to remove old (EOSed) streams of the parsebin and to add/reuse slots
for new input streams. But, that doesn't mean that we need to remove
other parsebin's EOSed stream. Each parsebin has most likely its
own streaming thread and therefore EOSed time can be much different.
(i.e., much early EOS of subtitle only parsebin)

https://bugzilla.gnome.org/show_bug.cgi?id=785120
2017-07-19 17:13:20 +02:00
Seungha Yang
abe1183c17 parsebin: Ensure StreamType and Caps of GstStream object before exposing it
The final StreamType and Caps might not be set yet on GstStream at exposing the pads.

https://bugzilla.gnome.org/show_bug.cgi?id=785120
2017-07-19 17:13:20 +02:00
Seungha Yang
7a236e2302 playbin3: Delay linking text output until video stream is shown
We are not sure that which stream's collection arrives first
when there are multiple parsebins such as adaptive streaming.

https://bugzilla.gnome.org/show_bug.cgi?id=785120
2017-07-19 17:13:20 +02:00
Tim-Philipp Müller
afa2cbf39b tests: appsrc: fix leaks in new unit test 2017-07-19 09:08:12 +01:00
Satya Prakash Gupta
3cc824c9ce encodebin: fix possible pad ref leak in error code path
https://bugzilla.gnome.org/show_bug.cgi?id=785065
2017-07-19 09:07:27 +01:00
Tim-Philipp Müller
d483df1d40 video: mark symbols explicitly for export with GST_EXPORT 2017-07-18 12:46:57 +01:00
Tim-Philipp Müller
d95e62be82 audio: mark symbols explicitly for export with GST_EXPORT 2017-07-18 12:46:57 +01:00
Edward Hervey
6ccba23752 playbin3: We only care about source pads going away 2017-07-18 13:05:06 +02:00