Commit graph

18385 commits

Author SHA1 Message Date
Sebastian Dröge
e8167dd118 decklinkvideo{src,sink}: Sample the internal clock immediately after starting the device
Otherwise we might stay at 0.0s for too long because we will take the first
timestamp we ever see as 0.0... which will be after we started the device.
2015-02-10 14:48:09 +01:00
Sebastian Dröge
a8033553f9 videoaggregator: When receiving timeout before caps, make sure to also advance our frame counter
Otherwise we will directly go EOS on the next non-timeout.
2015-02-10 10:57:38 +01:00
Sebastian Dröge
69a37365f1 aggregator: Pause srcpad task on flow errors
Otherwise we will call the task function over and over again until
upstream finally handled the flow return and shuts us down.
2015-02-10 10:57:38 +01:00
Matthew Waters
783245f1fe videoaggregator: fix buffer selection when duration=-1
If the src framerate and videoaggreator's output framerate were
different, then we were taking every single buffer that had duration=-1
as it came in regardless of the buffer's start time.  This caused the src
to possibly run at a different speed to the output frames.

https://bugzilla.gnome.org/show_bug.cgi?id=744096
2015-02-10 14:44:21 +11:00
Sebastian Dröge
b739cf8b7f decklink: Fix compiler warning with gcc
gstdecklink.cpp: In member function 'virtual HRESULT GStreamerDecklinkInputCallback::VideoInputFrameArrived(IDeckLinkVideoInputFrame*, IDeckLinkAudioInputPacket*)':
gstdecklink.cpp:498:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     if (capture_time > m_input->clock_start_time)
                      ^
gstdecklink.cpp:503:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     if (capture_time > m_input->clock_offset)
                      ^
2015-02-09 21:04:17 +01:00
Sebastian Dröge
f0e85023c2 decklink{audio,video}src: Implement clock slaving if the pipeline clock is not the decklink clock 2015-02-09 17:17:37 +01:00
Sebastian Dröge
408f0870a6 decklinkaudio{src,sink}: Only start streams / scheduled playback if there is a videosrc at this point 2015-02-09 17:15:21 +01:00
Sebastian Dröge
349113d15a decklinkaudiosrc: Don't provide a clock
The audio source only works together with the video source, and the video
source is already providing a clock.
2015-02-09 17:04:27 +01:00
Sebastian Dröge
4de7fdfa3a decklinkaudiosink: Throttle reading from the ringbuffer
The driver has an internal buffer of unspecified and unconfigurable size, and
it will pull data from our ring buffer as fast as it can until that is full.
Unfortunately that means that we pull silence from the ringbuffer unless its
size is by conincidence larger than the driver's internal ringbuffer.

The good news is that it's not required to completely fill the buffer for
proper playback. So we now throttle reading from the ringbuffer whenever
the driver has buffered more than half of our ringbuffer size by waiting
on the clock for the amount of time until it has buffered less than that
again.
2015-02-09 16:22:39 +01:00
Sebastian Dröge
a6bcd09b6c decklinkaudiosink: Start scheduled playback when going to PLAYING
The ringbuffer's acquire() is too early, and ringbuffer's start() will only be
called after the clock has advanced a bit... which it won't unless we start
scheduled playback.
2015-02-09 16:22:39 +01:00
Alessandro Decina
052e4804eb vtdec: fix texture sharing on iOS
Move GLES calls to the context thread. Fix
CVOpenGLESTextureCacheCreateTextureFromImage usage on iOS.
2015-02-09 21:18:24 +11:00
Alessandro Decina
ad08cdf8e1 libgstgl: set user data and GDestroyNotify for wrapped textures 2015-02-09 20:46:51 +11:00
Sebastian Dröge
22b0a4dad5 decklink{audio,video}src: Take the capture times from the pipeline clock
Not from the decklink clock. Both will return exactly the same time once the
decklink clock got slaved to the pipeline clock and received the first
observation, but until then it will return bogus values. But as both return
exactly the same values, we can as well use the pipeline clock directly.
2015-02-08 21:56:04 +01:00
Tim-Philipp Müller
6725ff5598 videoaggregator: don't set element factory details
This is an abstract base class, not an element.
2015-02-08 14:32:22 +00:00
Rob Clark
b4df029030 dvdspu: some optimizations
Detect invisible pixels, and skip gstspu_vobsub_blend_comp_buffers()
when there are only invisible pixels.  This significantly reduces the
CPU load in cases of DVDs which don't use the clip_rect to exclude
processing for parts of the screen where the video is visible.

https://bugzilla.gnome.org/show_bug.cgi?id=667221
2015-02-08 06:17:01 +11:00
Jan Schmidt
cb7c99b8ee dvdspu: Avoid warning if the video for a still frame arrives after the SPU
When we don't have a segment on the video pad yet during a still frame
don't freak out.
2015-02-08 06:16:49 +11:00
Jan Schmidt
52166768ed resindvd: Don't send meaningless segment position downstream
Don't place a meaningless value in the position field in
outgoing segments - values have to be in the range start->stop.

https://bugzilla.gnome.org/show_bug.cgi?id=740558
2015-02-08 06:16:12 +11:00
Luis de Bethencourt
1f670cb9ba Revert "aiffparse: make sure we have data before handling sink event"
This reverts commit a4baabb48d.
2015-02-06 16:22:26 +00:00
Luis de Bethencourt
a4baabb48d aiffparse: make sure we have data before handling sink event
Check AIFF_PARSE_DATA is True before handling sink event, if not goto exit.
2015-02-06 15:13:43 +00:00
Tim-Philipp Müller
dc2c4840f9 audiomixer: remove now-unused base_time field in object structure 2015-02-06 10:47:20 +00:00
Sebastian Dröge
a5002ea59d aggregator: Streamline latency calculations
Min latency can never be invalid, latency property can never be invalid
either. So no need to check for all these things in various places.
2015-02-06 11:03:57 +01:00
Sebastian Dröge
65b1db2aa2 aggregator: If upstream has no max latency but the subclass has, take the subclass max latency 2015-02-06 11:03:56 +01:00
Sebastian Dröge
ea50bc1917 aggregator: Fix min>max latency error check
We have to include the upstream latency, our own latency and the subclass
latency in the calculations.

FIXME: This is still not entirely correct
2015-02-06 11:03:56 +01:00
Sebastian Dröge
ef8e5280d0 aggregator: Don't add the latency property to the max latency
It has no meaning for the max latency and is only used to increase the min
latency.
2015-02-06 11:03:56 +01:00
Matthew Waters
04db2d8eb6 glproto/vao: only supported in core for ES 3.0+
Was causing horizontally flipped video for frame 2 onward on android
2015-02-06 12:54:05 +11:00
Thiago Santos
62309fbfa0 faac: relace parsed with framed in aac caps
For AAC it should always be 'framed' and not 'parsed'
2015-02-05 13:31:18 -03:00
Thiago Santos
759ee44988 faac: fix output caps to negotiate with some muxers
Add parsed/framed=true to allow negotiation with some
muxers that required parsed input. Encoders already provide
parsed/framed output so it should say so in caps.
2015-02-05 13:10:16 -03:00
Tim-Philipp Müller
337bff3c82 tests: compositor: add unit test for proper segment.base handling
As adjusted by gst_pad_set_offset(), or when doing segment seeks
or looping for example.
2015-02-05 15:48:41 +00:00
Tim-Philipp Müller
689f627412 tests: audiomixer: add unit test for proper segment.base handling
As adjusted by gst_pad_set_offset(), or when doing segment seeks
or looping for example. See previous audiomixer commit.
2015-02-05 15:23:04 +00:00
Sebastian Dröge
ce7444411e audiomixer: Remove weird and wrong segment handling
There's no reason why audiomixer should override the segment
base of upstream with whatever value it got from a SEEK event,
or even worse... with 0 if there was no SEEK event yet. This
broke synchronization if upstream provided a segment base other
than 0, e.g. when using pad offsets.
Also that this code did things conditional on the element's state
should've been a big warning already that something is just wrong.
If this breaks anything else now, let's fix it properly :)

Also don't do fancy segment position trickery when receiving a
segment event. It's just not correct.
2015-02-05 16:02:54 +01:00
Sebastian Dröge
83e5fe2f70 openslesringbuffer: Only pre-roll a single buffer
There is no reason to pre-roll more buffers here as we have our own ringbuffer
with more segments around it, and we can immediately provide more buffers to
OpenSL ES when it requests that from the callback.

Pre-rolling a single buffer before starting is necessary though, as otherwise
we will only output silence.

Lowers latency a bit, depending on latency-time and buffer-time settings.
2015-02-05 12:28:22 +01:00
Sebastian Dröge
141fb455e8 openslesringbuffer: Allocate at most 4 internal buffers
4 is the "typical" number of buffers defined by Android's OpenSL ES
implementation, and its code is optimized for this. Also because we
have our own ringbuffer around this, we will always have enough
buffering on our side already.

Allows for more efficient processing.
2015-02-05 12:28:13 +01:00
Sebastian Dröge
616cb1bdc6 openslessink/src: Lower default buffer time to 200ms like alsasink 2015-02-05 12:21:55 +01:00
Matthew Waters
9ecb530eaa glfilter: ensure that the input upload/colorconvert are always available 2015-02-05 16:46:32 +11:00
Matthew Waters
4f15cc8d3c glimagesink: log the converted caps 2015-02-05 11:07:19 +11:00
Matthew Waters
5432308012 glupload: restrict EGL and UploadMeta to RGBA
other formats are highly untested.
2015-02-05 11:07:19 +11:00
Matthew Waters
8c91da6f75 glcolorconvert: don't intersect with the input caps
that limits our formats to whatever is in the input caps
2015-02-05 11:07:19 +11:00
Luis de Bethencourt
2cd9d30340 gl: fix memory leak
In gst_gl_filter_fixate_caps () it can goto done without freeing the memory of
the tmp GstStructure. This makes it go out of scope and leak.

CID #1265765
2015-02-04 14:10:13 +00:00
Luis de Bethencourt
3656e0248a motioncells: initialize class variables
Some variables are not initialized in the constructor. It is highly unlikely
they are used before being set, but it is safer to initialize them.

CID #1197704
2015-02-04 11:52:26 +00:00
Nicolas Dufresne
5aa292b588 ksvideosrc: Fix missing brace warning
There is more but it's from ks.h GUID initializer, which is shipped
this way with mingw.
2015-02-03 18:16:51 -05:00
Nicolas Dufresne
bd5e9a5442 ksvideosrc: Fix buffer handling
The pseudo buffer pool code was using gst_buffer_is_writable()
alone to try and figure-out if cached buffer could be reused.
It needs to check for memory writability too. Also check map
result and fix map flags.

https://bugzilla.gnome.org/show_bug.cgi?id=734264
2015-02-03 18:16:50 -05:00
Thiago Santos
e9c1d64895 mpegtsmux: avoid leaking force keyunit event when going to NULL
Do not set to NULL before unreffing the event or it will leak
2015-02-03 17:05:06 -03:00
Anton Gritsay
77bafb4dbc mpegtsmux: parse force key unit events with the correct function
Otherwise it won't be parsed and bogus values would be used.

https://bugzilla.gnome.org/show_bug.cgi?id=696032
2015-02-03 17:05:00 -03:00
Thiago Santos
b18a09dbec tsdemux: remove update segment logic
This is not needed in 1.x series anymore
2015-02-03 13:50:42 -03:00
Aurélien Zanelli
d0a50be26d tsdemux: don't mark streams as needing a new segment on flush
The flush is called on discont and we shouldn't output a new segment
each time a discont happens. So this commit remove the mark for a new
segment when flushing streams by propagating the 'hard' flag passed
on the flusing from the base class.

https://bugzilla.gnome.org/show_bug.cgi?id=743363
2015-02-03 13:50:42 -03:00
Sebastian Dröge
d4d02c6f9d corevideotexturecache: Add some assertions instead of just dereferencing NULL 2015-02-03 17:32:24 +01:00
Sebastian Dröge
b51254395a corevideotexturecache: Don't unconditionally use the CoreMedia meta on iOS
We might instead have a CoreVideo meta.
2015-02-03 17:32:24 +01:00
Tim-Philipp Müller
97bb963e95 Undo accidental common module rewind
in commit 7d463576
2015-02-03 14:55:32 +00:00
Sebastian Dröge
dac3e4ca06 vtdec: Don't dereference NULL frames when draining/flushing 2015-02-03 15:38:40 +01:00
Matthew Waters
c1ad8d776a gl: remove the egl caps from the src pads
we don't actually support producing EGLImage buffers anywhere.
2015-02-03 15:30:08 +11:00