Commit graph

20703 commits

Author SHA1 Message Date
Sebastian Dröge
eefea80dae audiomixer: Make sure to release the current buffer in reset()
If we didn't output the last one in aggregate because we were shutting down
earlier we might otherwise leak it.
2014-12-23 12:15:50 +01:00
Sebastian Dröge
8465c0915e audiomixer: Change blocksize property to output-buffer-duration in time format
This makes the interface of audiomixer independent of the actual caps.
2014-12-23 11:45:50 +01:00
Sebastian Dröge
b9312fe9a2 videoaggregator: Use the src query implementation of aggregator as the default case 2014-12-22 22:12:02 +01:00
Sebastian Dröge
20a79bda49 audiomixer: Use the src query implementation of aggregator as the default case 2014-12-22 22:12:02 +01:00
Song Bing
e9c6c833c9 videopool: update video alignment after applying
Video buffer pool will update video alignment to respect stride alignment
requirement. But haven't updated it to video alignment in configure.
Which will cause user get wrong video alignment.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=741501
2014-12-22 09:25:04 -05:00
Thiago Santos
ef580889e0 audiobasesink: get the internal time before the clock reset
Otherwise calls to get the clock time might change its internal state
and the internal/external time for calibration get unbalanced leading to
a clock jump

https://bugzilla.gnome.org/show_bug.cgi?id=740834
2014-12-22 10:22:03 -03:00
Sebastian Dröge
77c80f6850 MAINTAINERS: Update my mail address 2014-12-22 11:45:53 +01:00
Sebastian Dröge
87d6c265a8 video{en,de}coder: Call reset() before the start() vfunc
This makes sure that the element is in the same state before start() is called
the very first time and every future call after the element was used already.

Also it ensure that we always have a clean state before start(), cleaned the
same way in every case.
2014-12-22 11:38:20 +01:00
Sebastian Dröge
aae6400962 audioencoder: Call reset() before the start() vfunc to guarantee a clean state
The same was done already in the decoder, and we cleaned some state just above
manually that would also be taken care of by reset().

This makes sure that the element is in the same state before start() is called
the very first time and every future call after the element was used already.
2014-12-22 11:36:58 +01:00
Sebastian Dröge
098b42f36b video{en,de}coder: Reset the codec after calling the stop() vfunc
The stop() vfunc might mess with some of our fields we have just
reset, which could cause memory leaks or invalid state taken over
to later.

Also the stop() vfunc, or anything called until it from another thread,
might want to be able to use the fields that were just resetted and
become confused because of that.

In the decoder we already had a workaround for things like this happening,
this workaround is not needed anymore.
2014-12-22 11:33:14 +01:00
Sebastian Dröge
ceb9de6e55 audiobase{sink,src}: Don't hold the object lock while calling create_ringbuffer() vfunc
The implementation of that vfunc might want to use the object lock for
something too. It's generally not a good idea to keep the object lock while
calling any function implemented elsewhere.

Also the ringbuffer can only be NULL at this point, remove a useless if block.

And in the sink actually hold the object lock while setting the ringbuffer on
the instance. Code accessing this is expected to use the object lock, so do it
here ourselves too.
2014-12-22 10:47:36 +01:00
Stefan Sauer
b2fef1f9d2 audiomixer: fix build flag order
Have the libraries/inlcudes from plugins-bad first to avoid picking up the installed version.
Fixes the build when the local api changed.
2014-12-21 07:47:25 -05:00
Sebastian Dröge
bf3896b2bd audiomixer: Track discont-time per pad instead of globally
We do discont handling per pad, not per element!
2014-12-19 14:40:33 +01:00
Sebastian Dröge
bc418c7a85 audiomixer: We're only EOS if all our pads are actually EOS
Having a buffer or not on the pad is irrelevant.
2014-12-18 23:33:58 +01:00
Sebastian Dröge
eff64c7ddc audiomixer: The pad's size is always supposed to be the whole buffer size
And the offset the offset into that buffer. Changing the size will
cause all kinds of assumptions to fail and cause crashes.
2014-12-18 22:42:14 +01:00
Sebastian Dröge
5c9472f78c videoaggregator: Don't try to map NULL buffers 2014-12-18 22:04:38 +01:00
Sebastian Dröge
ccd24a3577 videoaggregator: Make sure to always update the pad's videoinfo together with buffers
Otherwise the videoinfo and the buffer content can go out of sync.
2014-12-18 22:03:04 +01:00
Sebastian Dröge
c1776a9dd3 riff-media: Error out early if we observe an invalid audio format 2014-12-18 13:25:01 +01:00
Sebastian Dröge
5ecbc9eea2 riff: Also handle invalid block aligns for raw audio
Fixes audio playback of
http://demo.archermind.com/Test%20Sample/Video/MPEG%204/Divx3/Low-Motion/576-320.avi

Audio and video together is still broken because of other issues.
2014-12-18 13:25:01 +01:00
Sebastian Dröge
a64445e543 compositor: Fix memory leak when no buffer is available for a pad currently
CID 1258718
2014-12-18 11:49:09 +01:00
Edward Hervey
e527cea8d3 audio: Fix private header include/dist
We want to dist it, but we don't want to install it.

Fixes make dist/distcheck
2014-12-18 10:58:16 +01:00
Sebastian Dröge
0adca5a33e Automatic update of common submodule
From ef1ffdc to f2c6b95
2014-12-18 10:53:20 +01:00
Thiago Santos
fb29483259 opusenc: plug ref leak of template caps
the pad template caps is already a new ref. No need to copy.
2014-12-17 22:13:17 -03:00
Thiago Santos
17a7fac1a1 video: audio: fix GI annotations for proxy caps function
Add the annotations to parameters that can be null and also for stating
the ownership of the returned caps
2014-12-17 19:15:24 -03:00
Thiago Santos
dfc82f3466 tests: audiodecoder: tests for caps query implementation
Copied from videodecoder tests and updated to audio features
2014-12-17 19:15:24 -03:00
Thiago Santos
36a99922e4 audiodecoder: expose getcaps virtual function
Allows subclasses to do custom caps query replies.

Also exposes the standard caps query handler so subclasses can just
extend on top of it instead of reimplementing the caps query proxying.
2014-12-17 19:15:24 -03:00
Thiago Santos
160dce872b audiodecoder: implement caps and accept-caps queries
Allows decoders to proxy downstream restrictions on caps.

Also implements accept-caps query to prevent regressions caused by the
new fields on the return of a caps query that would cause the accept-caps
to fail as it uses subset caps comparisons
2014-12-17 19:15:23 -03:00
Thiago Santos
5e3405bd08 audioencoder: refactor getcaps proxy function to be reusable
Makes the audioencoder's getcaps function that proxies downstream
restriction available to other elements in the audio module to use it
2014-12-17 19:15:23 -03:00
Thiago Santos
8085352fb3 videodecoder: expose getcaps virtual function
Allows subclasses to do custom caps query replies.

Also exposes the standard caps query handler so subclasses can just
extend on top of it instead of reimplementing the caps query proxying.

https://bugzilla.gnome.org/show_bug.cgi?id=741263
2014-12-17 19:15:23 -03:00
Thiago Santos
4956800549 videodecoder: accept-caps should only require fields from the template
With the new caps query results the caps returned might have extra fields
that are not required by the decoder (framerate for image decoders) and it
causes a regression making, for example, jpegdec reject caps that don't
have framerates.

The accept-caps implementation will do 2 checks:

1) Do subset check with the template caps, making sure all the required
fields that are present on the template are present on the received caps.
2) Do a intersection check with the result of a caps query, making sure
that downstream can accept the fields in the received caps.

https://bugzilla.gnome.org/show_bug.cgi?id=741263
2014-12-17 19:15:23 -03:00
Thiago Santos
00c2ce60c3 videoutils: proxy filter when doing a caps query downstream
Allows downstream to use the filter and possibly reduce caps complexity
to speed up negotiation

https://bugzilla.gnome.org/show_bug.cgi?id=741263
2014-12-17 19:15:23 -03:00
Thiago Santos
f492085552 videoutils: return empty if the element has no possible allowed caps
Instead of returning the template caps and having a failure happen
later because there are no possible caps

https://bugzilla.gnome.org/show_bug.cgi?id=741263
2014-12-17 19:15:23 -03:00
Thiago Santos
f24075887f videodecoder: implement caps query
Refactor the encoder's caps query proxying function to a common place
and use it in the videodecoder to proxy downstream restrictions.

The new function is private to the gstvideo lib.

https://bugzilla.gnome.org/show_bug.cgi?id=741263
2014-12-17 19:15:23 -03:00
Sebastian Dröge
06f6d3c65c aggregator: Add function to allow subclasses to set their own latency
For audiomixer this is one blocksize, for videoaggregator this should
be the duration of one output frame.
2014-12-17 19:51:32 +01:00
Sebastian Dröge
6f0eb92d72 aggregator: Add function to allow subclasses to set their own latency
For audiomixer this is one blocksize, for videoaggregator this should
be the duration of one output frame.
2014-12-17 19:51:32 +01:00
Sebastian Dröge
46f713c598 audiomixer: Make sure to not have pads being behind the current offset
We would break sync between the different streams then.
2014-12-17 19:37:22 +01:00
Sebastian Dröge
26d1a22e90 aggregator: Add a timeout parameter to ::aggregate()
When this is TRUE, we really have to produce output. This happens
in live mixing mode when we have to output something for the current
time, no matter if we have enough input or not.
2014-12-17 18:41:41 +01:00
Sebastian Dröge
d508b39952 aggregator: Add a timeout parameter to ::aggregate()
When this is TRUE, we really have to produce output. This happens
in live mixing mode when we have to output something for the current
time, no matter if we have enough input or not.
2014-12-17 18:41:41 +01:00
Sebastian Dröge
67ef96c82d audiomixer: Add queues after the (live) sources in the unit test 2014-12-17 18:41:41 +01:00
Tim-Philipp Müller
f78a3d9ef2 configure: require release version of orc now that there is one 2014-12-17 12:01:19 +00:00
Sebastian Dröge
cf90f534f1 audiomixer: Implement get_next_time() 2014-12-16 17:37:12 +01:00
Matthew Waters
e354149436 aggregator: make the src pad task drive the pipeline for live pipelines
This removes the uses of GAsyncQueue and replaces it with explicit
GMutex, GCond and wakeup count which is used for the non-live case.

For live pipelines, the aggregator waits on the clock until either
data arrives on all sink pads or the expected output buffer time
arrives plus the timeout/latency at which time, the subclass
produces a buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=741146
2014-12-16 16:58:57 +01:00
Matthew Waters
8fe8510d80 videoaggregator: always try to use newer buffers
instead of dropping them for being too old.  This ensures that
the newest buffer is always used for rendering
2014-12-16 16:49:49 +01:00
Wim Taymans
662a674f8a ximagesink: clear src and dest rectangles
Now that the center function also takes into account the x and y
coordinates of the dest rectangle, better clear all the fields before
using them.
2014-12-16 12:57:55 +01:00
Song Bing
8baf1ec500 videopool: update buffer size after video alignment
Update the new buffer size after alignment in the pool configuration
before calling the parent set_config. This ensures that the parent knows
about the buffer size that we will allocate and makes the size check
work in the release_buffer method.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=741420
2014-12-16 12:14:53 +01:00
Sebastian Dröge
0b7537f93b audiobasesrc/sink: Add _CAST macros 2014-12-15 20:57:30 +01:00
Edward Hervey
ff57f69134 video: Fix non-default usage of gst_video_sink_center_rect
Make sure we take into account non-0 x/y destination rectangles
2014-12-15 14:11:07 +01:00
Tim-Philipp Müller
c77a21b1fa examples: improve playback-test help text a little
And allow pipeline type to be specified as string.
2014-12-15 12:13:08 +00:00
Sebastian Dröge
46251a7bef pango: Add license/copyright header to header file 2014-12-15 10:35:35 +01:00
Sebastian Dröge
6521870077 Revert "decodebin: Only emit the drain signal for the main decode chain, not any subchains"
This reverts commit a391dfe17f.

It breaks gapless playback: https://bugzilla.gnome.org/show_bug.cgi?id=740045
2014-12-15 09:46:13 +01:00