Commit graph

19915 commits

Author SHA1 Message Date
Sebastian Dröge ee2e082a27 tsdemux: Don't create an incomplete OpusHead but set all the other caps fields instead
OpusHead is optional, the other fields are not.

https://bugzilla.gnome.org/show_bug.cgi?id=757152
2015-11-03 20:35:41 +02:00
Sebastian Dröge 2609c394d7 tsmux: Simplify Opus caps parsing by using codecutils helpers
https://bugzilla.gnome.org/show_bug.cgi?id=757152
2015-11-03 20:35:41 +02:00
Sebastian Dröge 51edbeb9d9 opus: Add proper support for multichannel audio
https://bugzilla.gnome.org/show_bug.cgi?id=757152
2015-11-03 20:35:41 +02:00
Sebastian Dröge 4c8f76f05b opusparse: Fix up pre-skip in OpusHead if upstream using GstAudioClippingMeta
Makes transmuxing from e.g. MPEG-TS to Ogg sample accurate.

https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge ecf7c7742c tsdemux/mux: Add support for GstAudioClippingMeta for Opus
https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge 8a837c6715 opusdec: Handle GstAudioClippingMeta instead of the pre-skip field in the OpusHead
oggdemux is outputting the meta now, and only outputs if it should really
apply to the current buffer. Previously we would skip N samples also if we
started the decoder in the middle of the stream.

https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge d5389e71ff opusenc: Add GstAudioClippingMeta to buffers that need to be clipped
https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge 483cb05af1 opusenc: Disable granule position calculations by the base class
It is doing the wrong thing because of the Opus pre-skip: while the timestamps
are shifted by the pre-skip, the granule positions are not shifted.

oggmux is doing the right thing here already.

https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge 619c750222 opusenc: Add some FIXME comments about calculating padding with LPC
https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge f66afc47ac opusenc: Encode exactly the amount of samples we got as input and put correct timestamps on it
The first frame has lookahead less samples, the last frame might have some
padding or we might have to encode another frame of silence to get all our
input into the encoded data.

This is because of a) the lookahead at the beginning of the encoding, which
shifts all data by that amount of samples and b) the padding needed to fill
the very last frame completely.

Ideally we would use LPC to calculate something better than silence for the
padding to make the encoding as smooth as possible.

With this we get exactly the same amount of samples again in an
opusenc ! opusdec pipeline.

https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge c7d785a512 opusenc: Put lookahead/pre-skip into the OpusHead header
https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00
Sebastian Dröge e75a9edff1 tsmux: Add support for Opus
https://bugzilla.gnome.org/show_bug.cgi?id=757049
2015-11-03 20:35:41 +02:00
Sebastian Dröge 1e785a3778 tsdemux: Add support for Opus
Code partially based on
  https://git.videolan.org/?p=ffmpeg.git;a=commit;h=74141f693ded2fbf75af56fff309d2db35183635
and based on the spec draft at
  https://wiki.xiph.org/OpusTS

Makes it possible to demux
  http://www.obe.tv/Downloads/opus.ts

https://bugzilla.gnome.org/show_bug.cgi?id=757049
2015-11-03 20:35:41 +02:00
Sebastian Dröge 23a9e4323a tsmux: Don't leak buffer in error cases
https://bugzilla.gnome.org/show_bug.cgi?id=757049
2015-11-03 20:35:41 +02:00
Sebastian Dröge 4e803d0bb3 tsmux: Call prepare function for each collected buffer
Not when clipping buffers, as that doesn't happen for every buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=757049
2015-11-03 20:35:41 +02:00
Sebastian Dröge ce61a754d8 mpegtsdescriptor: Add API for creating extended descriptors and fix writing them
https://bugzilla.gnome.org/show_bug.cgi?id=757049
2015-11-03 20:35:41 +02:00
Stefan Sauer af27ee3aa7 opencv: cast paramspec flags to fix the build for c++
All the other elements in this plugin do this already.
2015-11-03 09:19:37 -08:00
Luis de Bethencourt 508451005d dvbsrc: use GST_STIME_ARGS for GstClockTimeDiff
No need to use G_GINT64_FORMAT for potentially negative values of
GstClockTimeDiff. Since 1.6 these can be handled with GST_STIME_ARGS.
Plus it creates more readable values in the logs.

https://bugzilla.gnome.org/show_bug.cgi?id=757480
2015-11-03 15:05:43 +00:00
Luis de Bethencourt 1ba4d63d6a amcvideodec: use GST_STIME_ARGS for GstClockTimeDiff
No need to manually handle negative value of deadline, GST_STIME_ARGS does
exactly this.
2015-11-03 15:00:28 +00:00
Hyunil Park c9aaa4189b waylandsink: Add exception code for setting wl_surface
Waylandsink needs exception code in gst_wayland_sink_set_window_handle().
After making sink->window, User can call
gst_wayland_sink_set_window_handle(). It is the user's fault, but
Waylandsink needs to handle the exception, if not then sink->window is
changed and rendering fails.

https://bugzilla.gnome.org/show_bug.cgi?id=747482
2015-11-03 10:45:05 +00:00
Hyunil Park d3db3df320 waylandsink: Add exception code for setting wl_display
Waylandsink needs exception code in gst_wayland_sink_set_context(). After
calling gst_wayland_sink_set_context(), below code is set.
GST_ELEMENT_CLASS (parent_class)->set_context (element, context); but, If
user can call onemore. It is user's fault. but waylandsink need to
exception.

https://bugzilla.gnome.org/show_bug.cgi?id=747482
2015-11-03 10:42:14 +00:00
Olivier Crête 86c33cbb6e aggregator: Hold object lock while manipulating the segment
Make sure the object lock is held when aggregator->segment is
modified.
2015-11-02 20:10:35 -05:00
Olivier Crête f0cbeb4140 audioaggregator: Improve log messages
Make the level of log messages saner and improve some.
2015-11-02 19:40:28 -05:00
Olivier Crête 9deb334251 aggregator: Remove dead code
This code will never be called as max>=min in all cases. If the upstream
latency query returned min>max, the function already returned and all
values that are added to those have max>= min.
2015-11-02 19:05:01 -05:00
Luis de Bethencourt fa4b58f1cd mpegtsmux: use GST_STIME_ARGS for GstClockTimeDiff
No need to manually handle negative values of best->dts in
GST_DEBUG_OBJECT. Use GST_STIME_ARGS for this.
2015-11-02 17:02:51 +00:00
Luis de Bethencourt 2288b5e9ec videoaggregator: use GST_STIME_ARGS for GstClockTimeDiff
No need to manually handle negative values of diff, GST_STIME_ARGS does
exactly this.
2015-11-02 17:00:22 +00:00
Florin Apostol 19d604e92f dashdemux: remove unreachable code
The stream->cur_seg_template is set to the lowest available segment
template (representation or adaptation or period, in this order).
Because the template elements are inherited, the lowest template will
have all the elements the parents had, so there is no need to check the
parent for an element that is not found in the child (eg initialisation
or index).

https://bugzilla.gnome.org/show_bug.cgi?id=752714
2015-11-02 11:37:19 +00:00
Vincent Penquerc'h 2f8efd1ce3 tests: add a test for MPD file duration parsing
https://bugzilla.gnome.org/show_bug.cgi?id=752336
2015-11-02 11:36:12 +00:00
Vincent Penquerc'h 045a03c14a mpdparser: add some checks to duration parsing
https://bugzilla.gnome.org/show_bug.cgi?id=752336
2015-11-02 11:36:12 +00:00
Florin Apostol 7dca9fb3f4 dashdemux: added duration format validation
https://bugzilla.gnome.org/show_bug.cgi?id=752336
2015-11-02 11:36:12 +00:00
Luis de Bethencourt f28fad6e83 dashdemux: fix memory leak
Free new_mpd, allocated with g_slice_new(), before going out of scope in
goto error.

CID 1338050
2015-11-02 11:27:43 +00:00
Alessandro Decina 5336cc9ff6 Revert "vtenc: free input buffer ASAP"
This reverts commit 6101fc57b8.

GstVideoEncoder assumes that the input buffer is available until _finish_frame.

https://bugzilla.gnome.org/show_bug.cgi?id=756951
2015-11-02 20:16:15 +11:00
Sebastian Dröge dbd894f133 opusdec: Assume 48kHz if no sample rate is given in the header 2015-11-02 09:36:46 +02:00
Sebastian Dröge 18c8abec6d opusenc: Place 48kHz first in the caps
For all the other sample rates the encoder will have to resample internally.
2015-11-02 09:36:43 +02:00
Alessandro Decina 614ea95690 gstglutils: fix shader compilation on Mountain Lion
Make gst_gl_context_gen_shader/_compile_shader assume GST_GLSL_PROFILE_ES |
GST_GLSL_PROFILE_COMPATIBILITY as the profile. Without this, the shader compiler
doesn't inject the #version tag resulting in a compilation error on Mountain
Lion.

This is a workaround for old code using gst_gl_context_gen_shader. New code
should use the gst_glsl_stage_* API directly which allows the caller to
explicitly specify version/profile.
2015-11-02 12:10:44 +11:00
Philippe Renon c4657f4276 ksvideosrc: don't try to align current timestamp on previous timestamp
this causes frames to be dropped.

Based on a patch by Sebastian Dröge

https://bugzilla.gnome.org/show_bug.cgi?id=748337
2015-11-01 11:16:36 +02:00
Matthew Waters dd738842e4 glbufferpool: explicitly initialize a possibly uninitialized variable
The ret variable may be uninitialized and so its contents were undefined and
the results were erratic (failing with glvideomixer, succeeding in other cases)

P.S. No idea why gcc/clang et al never picked up on this like they normally do
(probably due to some optimisation pass figuring out it's only set once...)
2015-10-31 23:32:55 +11:00
Vincent Penquerc'h e48e68416c mpdparser: make durations unsigned where appropriate
The standard does not seem to make any particular explicit not
implicit reference to the signedness of durations, and the code
does not rely on such, nor on the negativity of the -1 value
that's used as a placeholder when a duration property is not
present in the XML.

https://bugzilla.gnome.org/show_bug.cgi?id=750847
2015-10-30 16:29:46 +00:00
Florin Apostol d6e805a283 dashdemux: inherit bitstreamSwitching from Period to AdaptationSet
https://bugzilla.gnome.org/show_bug.cgi?id=752340
2015-10-30 15:58:36 +00:00
Florin Apostol fe6adec702 dashdemux: marked PROP_BANDWIDTH_USAGE property as deprecated
https://bugzilla.gnome.org/show_bug.cgi?id=753890
2015-10-30 15:25:14 +00:00
Florin Apostol 590df23cb1 dashdemux: unit testing reproducing inherited segment duration overflow
unit test reproducing https://bugzilla.gnome.org/show_bug.cgi?id=751832
2015-10-30 15:05:28 +00:00
Florin Apostol 013655d886 dashdemux: inherited segment URLs are ignored if they are defined again in a lower SegmentList
According to the standard:
"SegmentBase, SegmentTemplate and SegmentList shall inherit
attributes and elements from the same element on a higher level.
If the same attribute or element is present on both levels,
the one on the lower level shall take precedence over the one
on the higher level."

gst_mpdparser_parse_segment_list_node will now discard any inherited
segment URLs if the parsed element defines some too.

https://bugzilla.gnome.org/show_bug.cgi?id=751832
2015-10-30 14:31:21 +00:00
Florin Apostol 77f4776acb adaptivedemux: tests: added test for fragment download error
https://bugzilla.gnome.org/show_bug.cgi?id=757361
2015-10-30 13:28:09 +00:00
Florin Apostol 695ec674c6 adaptivedemux: tests: made adaptive demux test thread safe
https://bugzilla.gnome.org/show_bug.cgi?id=757361
2015-10-30 13:28:04 +00:00
Florin Apostol 7254747bbe adaptivedemux: tests: added query test
Testing if adaptive demux responds to queries.

https://bugzilla.gnome.org/show_bug.cgi?id=757361
2015-10-30 13:27:54 +00:00
Florin Apostol dc04d3d261 dashdemux: tests: added test for multiple BaseURL entries
https://bugzilla.gnome.org/show_bug.cgi?id=757245
2015-10-30 13:00:53 +00:00
Florin Apostol 4632dbe3ae dashdemux: tests: added unit test for 6d1eda9391
Commit 6d1eda9391 fixed the period start
time scaling. This patch updates the unit tests to cover that scenario.

https://bugzilla.gnome.org/show_bug.cgi?id=755105
2015-10-30 12:57:54 +00:00
Florin Apostol 7aa81d78a7 adaptivedemux: tests: added download error test
Tests adaptive demux behaviour when the uri is wrong and download does
not happen.
2015-10-30 12:50:10 +00:00
Florin Apostol a2ffe7e979 adaptivedemux: stop task on multiple download errors
On multiple download errors, we stop the download task and change the src
element state to NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=756240
2015-10-30 12:50:10 +00:00
Vincent Penquerc'h 7d909966e5 adaptivedemux: fix a missing lock in write to stream->last_ret
https://bugzilla.gnome.org/show_bug.cgi?id=757359
2015-10-30 12:24:22 +00:00