This is the same code that is in decklinkaudiosrc, audioringbuffer,
audiomixer and various other places. Have it once instead of copying it
everywhere.
https://bugzilla.gnome.org/show_bug.cgi?id=787560
+ Refactor previous constructor to call on that new constructor
+ Reimplement is_passthrough to strictly check whether the matrix
is an identity matrix, comparing channel-masks was incorrect:
the mixer may be remixing from a list of positions to the same
list of positions, but ordered differently, and reciprocally,
the mixer may be remixing from a list of positions to another
list of positions identically ordered
+ Remove unused tmp field, must have been a refactoring leftover
https://bugzilla.gnome.org/show_bug.cgi?id=785471
If someone calls gst_app_sink_try_pull_sample they are
probably no longer interested in any preroll samples.
Useful if the user has not registered a preroll appsink callback.
Also added unit test 'test_do_not_care_preroll'
make elements/appsink.check
that fails without this patch.
https://bugzilla.gnome.org/show_bug.cgi?id=786740
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
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
__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
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
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.
And monitor no_more_pads.
With live sources such as rtsp, uridecodebin only creates its
child decodebins between PAUSED and PLAYING.
This means that the ASYNC_DONE it posts when getting NO_PREROLL
in its change_state method gets immediately propagated by the
GstBin parent class, as opposed to a situation where a
decodebin has been added to it already, and has posted ASYNC_START.
The proposed solution, instead of simply waiting for ASYNC_DONE,
and finishing prematurely in that case, waits for three conditions
to be true:
* the uridecodebin needs to have emitted no_more_pads
* its current state must be PAUSED if not live, PLAYING otherwise
* There must be no "pending subtitle pads", ie pads where we haven't
received tags yet.
All these conditions are checked in the message handler, as we
post custom messages on it when we get subtitle tags or no_more_pads.
https://bugzilla.gnome.org/show_bug.cgi?id=783257
When the input is TRICKMODE_KEY_UNITS, we expect to only receive keyframes
which we want to decode/push immediately. Therefore don't queue them.
If upstream didn't send just keyframes (which is the ideal situation), two
different things can happen:
1) Either the subclass checks the segment flags and properly configures
the decoder implementation to only decode/output keyframes,
2) Or the subclass really decodes and outputs everything, in which case
the reverse frames will end up arriving "late" downstream (and will
be dropped). If upstream did properly send GOP in reverse order, we
still end up just showing keyframes (but at the overhead of decoding
everything).
https://bugzilla.gnome.org/show_bug.cgi?id=777094
Always put multiview-caps onto the output caps, assuming
mono if we've got no other information. It's still easy for
downstream elements to override using a capssetter or event
probe if desired.
https://bugzilla.gnome.org/show_bug.cgi?id=776172
Child streams could have more accurate width/height or various other
information added. If they have the same name, they are likely to be the
same streams.
https://bugzilla.gnome.org/show_bug.cgi?id=782697
This is now needed as GstClock does not do that internally anymore,
because that broke bindings.
And mark the function correctly as (transfer full), which it already was
before.
https://bugzilla.gnome.org/show_bug.cgi?id=743062
Performing a gst_sdp_media_get_caps_from_media() would result in
changing fields in the GstSDPMedia violating the const tag in the
function declaration.
Before there would be a line with a=rtpmap:96 VP8/90000
after, that attribute would only contain a=rtpmap:96
Fix by performing modifications on duplicated strings instead of on
the internal values.
Also add a simple test for checking that the representation doesn't
change by a gst_sdp_media_get_caps_from_media()
The GSource for dealing with timeouts in
gst_video_convert_sample_async() might be attached to a non-default
context, so we should not be using g_source_remove() on the returned ID.
The correct thing to do is to keep a reference to the actual GSource and
then call g_source_destroy() on it.
https://bugzilla.gnome.org/show_bug.cgi?id=780297
Track how long it takes to generate the first buffer after a flush
as a simple measure of how efficient the decoder is at skipping /
rushing to get to the first decode.
When initializing a timecode from a GDateTime, and the remaining time
until the new second is less than half a frame (according to the given
frame rate), it would lead to the creation of an invalid timecode, e.g.
00:00:00:25 (at 25 fps) instead of 00:00:01:00. Fixed.
https://bugzilla.gnome.org/show_bug.cgi?id=779866
Use G_GUINT64_FORMAT for guint64 values.
Introduced by fcb63e77a9
Found by Alexander Larsson
gstvideodecoder.c: In function 'gst_video_decoder_have_frame':
gstvideodecoder.c:3312:51: error: format '%u' expects argument of type 'unsigned int', but argument 8 has type 'guint64 {aka long long unsigned int}' [-Werror=format=]
Don't guess a timestamp of the start of the segment when running
in reverse mode, as more likely it means we're discontinuous somewhere
in the middle of the segment, and we'll fix up timestamps once
the frames are decoded and reversed.
When a PTS is not set, we still want to store the rest of the
buffer information, or else we lose important things like the
duration or buffer flags when parsing.
This adds a property to select the maximum number of threads to use for
conversion and scaling. During processing, each plane is split into
an equal number of consecutive lines that are then processed by each
thread.
During tests, this gave up to 1.8x speedup with 2 threads and up to 3.2x
speedup with 4 threads when converting e.g. 1080p to 4k in v210.
https://bugzilla.gnome.org/show_bug.cgi?id=778974
In gst_video_time_code_is_valid, also check for invalid
ranges when using drop-frame TC. Refactor some code which
broke after the check was added.
https://bugzilla.gnome.org/show_bug.cgi?id=779010
It was taking the initial input y-offset from the output value, which
only works for y=0 (in which case both are the same). If y > 0, we would
always stay behind the requested input offset and never ever read
anything from the input.
The parser might do some conversion on a stream but the stream keeps
being the same, and we need to make sure GstDiscoverer detects it is the
case.
https://bugzilla.gnome.org/show_bug.cgi?id=778298