platform/upstream/gstreamer.git
9 years agoglimagesink: Fix structure memory leak
Vineeth TM [Tue, 17 Nov 2015 00:08:52 +0000 (09:08 +0900)]
glimagesink: Fix structure memory leak

https://bugzilla.gnome.org/show_bug.cgi?id=758205

9 years agoautoconvert: Add support for bufferlists
Olivier Crête [Tue, 17 Nov 2015 02:52:07 +0000 (21:52 -0500)]
autoconvert: Add support for bufferlists

9 years agoapplemedia: vtdec: improve negotiation
Alessandro Decina [Tue, 17 Nov 2015 00:21:27 +0000 (11:21 +1100)]
applemedia: vtdec: improve negotiation

Rework negotiation implementing GstVideoDecoder::negotiate. Make it possible to
switch texture sharing on and off at runtime. Useful to (eventually) turn
texture sharing on in pipelines where glimagesink is linked only after
decoding has already started (for example OWR).

9 years agoapplemedia: vtdec: improve handing of decode errors/frame drops
Alessandro Decina [Tue, 17 Nov 2015 00:19:57 +0000 (11:19 +1100)]
applemedia: vtdec: improve handing of decode errors/frame drops

Improve decode error handling by avoiding calling into GstVideoDecoder from the
VT decode callback. This removes contention on the GST_VIDEO_DECODER_STREAM_LOCK
which used to make the decode callback slow enough for VT to start dropping lots
of frames once the first frame was dropped.

9 years agoapplemedia: vtdec: fix uninitialized variable warning
Alessandro Decina [Tue, 17 Nov 2015 00:22:15 +0000 (11:22 +1100)]
applemedia: vtdec: fix uninitialized variable warning

9 years agoadaptivedemux: remove now-defunct "num-lookback-fragments" property
Tim-Philipp Müller [Sat, 14 Nov 2015 20:21:17 +0000 (20:21 +0000)]
adaptivedemux: remove now-defunct "num-lookback-fragments" property

This no longer does anything, and it was marked as CONSTRUCT_ONLY
which means someone would really have to go out of their way to
be able to set this, which would only be done in very custom
scenarios, if ever, and those will likely target a specific
version of GStreamer then, so probably not much point keeping
it deprecated for a while before removing it.

9 years agoautoconvert: Always give a valid reply to internal caps queries
Olivier Crête [Fri, 13 Nov 2015 22:14:14 +0000 (17:14 -0500)]
autoconvert: Always give a valid reply to internal caps queries

Caps queries can always have a valid reply, either the filter or ANY.
If the caps are ANY, then accept-caps always returns TRUE.

9 years agompegtsdemux: fix section_data leak
Nicolas Huet [Thu, 12 Nov 2015 15:35:12 +0000 (16:35 +0100)]
mpegtsdemux: fix section_data leak

If packet->payload_unit_start_indicator is true and pointer 0, there is no
discontinuity check. Therefore there could be a previous section not complete
that need to be cleared.

https://bugzilla.gnome.org/show_bug.cgi?id=758010

9 years agoglsl: fix possible string overrun in gst_glsl_version_profile_from_string
Vineeth TM [Fri, 13 Nov 2015 01:41:58 +0000 (10:41 +0900)]
glsl: fix possible string overrun in gst_glsl_version_profile_from_string

given a NULL-terminated string, s.
s[i] = '\0';
i++;
does not guarentee that s[i] is NULL terminated and thus string operations
could read off the end of the array.

https://bugzilla.gnome.org/show_bug.cgi?id=758039

9 years agoglshader: don't read invalid list pointers (use after free)
Matthew Waters [Fri, 13 Nov 2015 05:50:22 +0000 (16:50 +1100)]
glshader: don't read invalid list pointers (use after free)

gst_gl_shader_detach_unlocked already removes the list entry so attempting to
use the element to iterate to the next stage could read invalid data.

Based on patch by Vineeth TM <vineeth.tm@samsung.com>

https://bugzilla.gnome.org/show_bug.cgi?id=758039

9 years agotests:glsl: version_profile_s string leak
Vineeth TM [Fri, 13 Nov 2015 01:44:26 +0000 (10:44 +0900)]
tests:glsl: version_profile_s string leak

https://bugzilla.gnome.org/show_bug.cgi?id=758039

9 years agoglsl: free str while returning error
Vineeth TM [Fri, 13 Nov 2015 01:56:10 +0000 (10:56 +0900)]
glsl: free str while returning error

https://bugzilla.gnome.org/show_bug.cgi?id=758039

9 years agotests:glupload: fix caps memory leak
Vineeth TM [Fri, 13 Nov 2015 02:04:34 +0000 (11:04 +0900)]
tests:glupload: fix caps memory leak

https://bugzilla.gnome.org/show_bug.cgi?id=758039

9 years agoopusenc: avoid potential overflow expression
Luis de Bethencourt [Thu, 12 Nov 2015 12:21:54 +0000 (12:21 +0000)]
opusenc: avoid potential overflow expression

The result of the two expressions will be promoted to guint64 anyway,
perform all the arithmetic in 64 bits to avoid potential overflows.

CID 1338690, CID 1338691

9 years agotsdemux: remove memory leak
Luis de Bethencourt [Thu, 12 Nov 2015 12:00:07 +0000 (12:00 +0000)]
tsdemux: remove memory leak

The values of channel_mapping are copied by gst_codec_utils_opus_create_caps ()
but it doesn't free or take ownership of the g_new0 allocated memory. This
needs to be freed before going out of scope.

CID 1338692

9 years agompegtsmux: remove unnecessary buffer check
Luis de Bethencourt [Thu, 12 Nov 2015 11:42:36 +0000 (11:42 +0000)]
mpegtsmux: remove unnecessary buffer check

buf surely isn't NULL inside the block conditional to a buffer size bigger
than (G_MAXUINT16 - 3). Plus gst_buffer_unref() checks if the buffer is
NULL and does nothing if it is.

CID 1338693

9 years agoopusparse: initialize sample rate to a default
Luis de Bethencourt [Thu, 12 Nov 2015 11:23:31 +0000 (11:23 +0000)]
opusparse: initialize sample rate to a default

sample_rate might be used uninitialized if !sink_caps is TRUE. Initialize
it to the default used in gst_codec_utils_opus_parse_caps () when there is
no rate defined in the caps.

CID 1338695

9 years agoglslstage: Fix vertex_sources memory leak
Vineeth TM [Thu, 12 Nov 2015 07:36:03 +0000 (16:36 +0900)]
glslstage: Fix vertex_sources memory leak

vertex_sources is being allocated but not freed resulting in leak

https://bugzilla.gnome.org/show_bug.cgi?id=757974

9 years agoglcolorconvert: remove unnecessary free
Vineeth TM [Thu, 12 Nov 2015 07:26:00 +0000 (16:26 +0900)]
glcolorconvert: remove unnecessary free

version_str is already being freed. So no need to call again

https://bugzilla.gnome.org/show_bug.cgi?id=757974

9 years agoglcolorconvert: Fix string leak
Vineeth TM [Thu, 12 Nov 2015 07:18:35 +0000 (16:18 +0900)]
glcolorconvert: Fix string leak

String got using gst_glsl_version_profile_to_string, is allocated
memory and should be freed

https://bugzilla.gnome.org/show_bug.cgi?id=757974

9 years agoglcolorconvert: Fix frag_prog and frag_body memory leak
Vineeth TM [Thu, 12 Nov 2015 07:02:45 +0000 (16:02 +0900)]
glcolorconvert: Fix frag_prog and frag_body memory leak

https://bugzilla.gnome.org/show_bug.cgi?id=757974

9 years agoadaptivedemux: fixed handling errors emitted by uri handler
Florin Apostol [Wed, 11 Nov 2015 16:51:23 +0000 (16:51 +0000)]
adaptivedemux: fixed handling errors emitted by uri handler

https://bugzilla.gnome.org/show_bug.cgi?id=757947

9 years agotsdemux: fix pending buffers leak when flushing
Nicolas Huet [Tue, 10 Nov 2015 15:32:37 +0000 (16:32 +0100)]
tsdemux: fix pending buffers leak when flushing

https://bugzilla.gnome.org/show_bug.cgi?id=757895

9 years agotsdemux: Fix pad leak when the pad is never exposed
Etienne Peron [Wed, 10 Jun 2015 12:18:00 +0000 (14:18 +0200)]
tsdemux: Fix pad leak when the pad is never exposed

If tsdemux never receives data for a stream, the corresponding pad will never
be added and stream->active will remain FALSE. When the stream is removed, the
pad will not be unreffed and will be leaked.

https://bugzilla.gnome.org/show_bug.cgi?id=757873

9 years agoivfparse: Fix the wrong width & height parsing of vp9 bitstream
Sreerenj Balachandran [Mon, 9 Nov 2015 15:45:29 +0000 (17:45 +0200)]
ivfparse: Fix the wrong width & height parsing of vp9 bitstream

The current implementation for detecting the resolution changes
on key frames is based on vp8 bitstream alignment. Avoid this
width and height parsing for vp9 bitstream, which requires proper
frame header parsing inorder to detect the resolution change (Fixme).

https://bugzilla.gnome.org/show_bug.cgi?id=757825

9 years agovtenc: Set profile_level to NULL after release
Heinrich Fink [Wed, 11 Nov 2015 10:40:52 +0000 (11:40 +0100)]
vtenc: Set profile_level to NULL after release

Otherwise, gst_vtenc_negotiate_profile_and_level will double-release as
it checks for profile_level != NULL. This caused crashes when the
vtenc instance is stopped and then restarted.

https://bugzilla.gnome.org/show_bug.cgi?id=757935

9 years agoglcolorconvert: mangle gl_FragColor for GL3
Matthew Waters [Wed, 11 Nov 2015 12:39:35 +0000 (23:39 +1100)]
glcolorconvert: mangle gl_FragColor for GL3

Some drivers don't provide the compatibility definition and we need to provide
our own 'out vec4' variable to put the results of the fragment shader into.

https://bugzilla.gnome.org/show_bug.cgi?id=757938

9 years agotests:glcolorconvert: Fix caps memory leak
Vineeth TM [Wed, 11 Nov 2015 07:06:25 +0000 (16:06 +0900)]
tests:glcolorconvert: Fix caps memory leak

Output caps being got from video info is not getting freed

https://bugzilla.gnome.org/show_bug.cgi?id=757929

9 years agotsdemux: provide our own definition of log2()
Matthew Waters [Tue, 10 Nov 2015 06:58:58 +0000 (17:58 +1100)]
tsdemux: provide our own definition of log2()

The log2 function/macro doesn't exist when targetting android API < 18 (or MSVC
< 2013) whereas our current baseline is API 9.

9 years agoglviewconvert: remove set_format
Matthew Waters [Tue, 10 Nov 2015 02:52:30 +0000 (13:52 +1100)]
glviewconvert: remove set_format

We need the caps to be able to
1. check the caps features
2. get the requested texture-target on input/output

9 years agoglimagesink: fix a memory leak if the view conversion fails
Matthew Waters [Tue, 10 Nov 2015 23:31:07 +0000 (10:31 +1100)]
glimagesink: fix a memory leak if the view conversion fails

9 years agoglimagesink: balance the creation/destruction of the overlay compositor
Matthew Waters [Wed, 11 Nov 2015 02:37:59 +0000 (13:37 +1100)]
glimagesink: balance the creation/destruction of the overlay compositor

Fixes some leaks/possible segfault on when failing to create the compositor.

9 years agoglshader: properly unref the stages on failure
Matthew Waters [Wed, 11 Nov 2015 01:23:30 +0000 (12:23 +1100)]
glshader: properly unref the stages on failure

When failing in the varargs functions, all the stage objects not handled need to
be unreffed to prevent a leak.

9 years agoglslstage: properly return an error when we could not create the shader stage
Matthew Waters [Wed, 11 Nov 2015 00:29:35 +0000 (11:29 +1100)]
glslstage: properly return an error when we could not create the shader stage

While it was erroring out correctly later, there were GLib warnings about
setting a GError over the top of another GError.

9 years agoglshaderstrings: fixup the external-oes fragment shader
Matthew Waters [Tue, 10 Nov 2015 14:05:20 +0000 (01:05 +1100)]
glshaderstrings: fixup the external-oes fragment shader

The wrong sampler type was used
s/sampler2DExternalOES/samplerExternalOES/

9 years agoglcolorconvert: try to keep the same texture-target if possible
Matthew Waters [Tue, 10 Nov 2015 12:41:24 +0000 (23:41 +1100)]
glcolorconvert: try to keep the same texture-target if possible

Fixes issues attempting to passthrough external-oes textures

9 years agoglcolorconvert: fix rendering rectangular textures with GL3
Matthew Waters [Tue, 10 Nov 2015 11:41:57 +0000 (22:41 +1100)]
glcolorconvert: fix rendering rectangular textures with GL3

Rectangular textures are unavailable in unextended
GLES2 #version 100 shaders.

Fixes
texture-target=rectangle ! glcolorconvert ! texture-target=2D

There's a couple of differences between GL3 and GLES2/GL

- varying -> in or out depending on the stage (vertex/fragment)
- attribute -> in
- filtered texture access is a single function, texture()

9 years agoglcolorconvert: properly use the other texture-target on fixation
Matthew Waters [Tue, 10 Nov 2015 09:20:29 +0000 (20:20 +1100)]
glcolorconvert: properly use the other texture-target on fixation

9 years agoglslstage: add debug as to why _set_strings() failed
Matthew Waters [Tue, 10 Nov 2015 09:15:56 +0000 (20:15 +1100)]
glslstage: add debug as to why _set_strings() failed

9 years agoglsl: fix check for glsl version against GL context inversion
Matthew Waters [Tue, 10 Nov 2015 09:13:53 +0000 (20:13 +1100)]
glsl: fix check for glsl version against GL context inversion

Any GLSL version that was less than the provided GL version would fail

9 years agoadaptivedemux: Fix pad memory leak.
Vineeth TM [Tue, 10 Nov 2015 01:02:38 +0000 (10:02 +0900)]
adaptivedemux: Fix pad memory leak.

The static pads got from queue and uri_handler are not being freed
resulting in memory leaks.

https://bugzilla.gnome.org/show_bug.cgi?id=757859

9 years agogl: forward declare some enums
Matthew Waters [Tue, 10 Nov 2015 02:13:50 +0000 (13:13 +1100)]
gl: forward declare some enums

Specifically the GstGLTextureTarget enum

9 years agoglslstage: expose the default shader strings as public
Matthew Waters [Tue, 10 Nov 2015 02:11:37 +0000 (13:11 +1100)]
glslstage: expose the default shader strings as public

Add some other simple strings for external-oes textures or transforming
the texture coordinates with a transformation matrix

9 years agoglcolorconvert: wait on the sync meta for input buffers
Matthew Waters [Thu, 5 Nov 2015 16:05:31 +0000 (03:05 +1100)]
glcolorconvert: wait on the sync meta for input buffers

9 years agoglimagesink: wait on the provided sync meta provided to glimagesink
Matthew Waters [Wed, 4 Nov 2015 13:13:01 +0000 (00:13 +1100)]
glimagesink: wait on the provided sync meta provided to glimagesink

9 years agoglcolorconvert: use the correct oes target string in the template caps
Matthew Waters [Sun, 8 Nov 2015 11:14:01 +0000 (22:14 +1100)]
glcolorconvert: use the correct oes target string in the template caps

9 years agogtk: add the overlaycomposition feature to the template caps
Matthew Waters [Tue, 10 Nov 2015 01:32:39 +0000 (12:32 +1100)]
gtk: add the overlaycomposition feature to the template caps

There is a possibility that the _get_caps impl will be called with the
feature in the filter caps which when interecting with the template,
will return EMPTY and therefore fail negotiation.

https://bugzilla.gnome.org/show_bug.cgi?id=757854

9 years agoapplemedia: fix vtdec texture sharing on ios 9.1
Alessandro Decina [Tue, 10 Nov 2015 03:21:33 +0000 (14:21 +1100)]
applemedia: fix vtdec texture sharing on ios 9.1

Use gst_gl_sized_gl_format_from_gl_format_type to get the format passed to
CVOpenGLESTextureCacheCreateTextureFromImage. Before this change extracting the
second texture from the pixel buffer was failing on ios 9.1.

9 years agotemplatematch: add a framerate to test caps
Thiago Santos [Fri, 6 Nov 2015 20:24:52 +0000 (17:24 -0300)]
templatematch: add a framerate to test caps

The pad template requires a framerate, so use it to prevent
caps negotiation failures.

Fixes the unit test

9 years agotests: update .gitignore for new test binaries
Tim-Philipp Müller [Fri, 6 Nov 2015 20:38:56 +0000 (20:38 +0000)]
tests: update .gitignore for new test binaries

9 years agoassrender: don't send flush events on seeks
Tim-Philipp Müller [Fri, 6 Nov 2015 19:26:21 +0000 (19:26 +0000)]
assrender: don't send flush events on seeks

It's for the upstream element driving the pipeline to
handle seeks and send flush events or not, filters
should not interfere here, otherwise downstream pads
could be flushing before upstream pads are flushing,
which can result in GST_FLOW_ERROR being sent instead
of GST_FLOW_FLUSHING when trying to forward sticky
events at just the wrong moment.

9 years agodvbsuboverlay: Don't send flush events
Edward Hervey [Fri, 6 Nov 2015 15:16:32 +0000 (16:16 +0100)]
dvbsuboverlay: Don't send flush events

It is up to the element handling the seek to send flush events
downstream, otherwise we end up with a situation where upstream
would get unexpected GST_FLOW_FLUSHING

9 years agoFix code indentation
Tim-Philipp Müller [Fri, 6 Nov 2015 19:23:09 +0000 (19:23 +0000)]
Fix code indentation

9 years agortponviftimestamp: use stream time for timestamp
Branko Subasic [Thu, 22 Oct 2015 11:40:36 +0000 (13:40 +0200)]
rtponviftimestamp: use stream time for timestamp

The Onvif Streaming Specification specifies that the NTP timestamps
in the Onvif extension header indicaes the absolute UTC time associated
with the access unit. But by using running time we can not achieve that,
since a frame's running time depends on the played interval, whether a
non-flushing is done, etc. Instead we have to use the stream time.

https://bugzilla.gnome.org/show_bug.cgi?id=757688

9 years agortponviftimestamp: Update ntp-offset and d/e-bits with a GstEvent
Linus Svensson [Fri, 6 Nov 2015 08:44:57 +0000 (09:44 +0100)]
rtponviftimestamp: Update ntp-offset and d/e-bits with a GstEvent

It is now possible to update the currently used ntp-offset with a
custom serialized downstream event. The element will read the ntp-offset
property when doing the state transition from READY to PAUSED and
use that offset until it receives a "GstNtpOffset" event, which also
has a "ntp-offset" attribute in that it's structure. In case the
property is not set and no event has been received, the element will
guess the npt-offset with help of the clock. If no clock can be
retrieved, the element will error out and stop the data flow.

The same event is also used for updating the D/E-bits in the RTP
extension header. The discont flag in a buffer can be set whenver a
live/network source looses a frame, but that is not the type of
discontinuity that the onvif extension header should reflect. The
header is mainly used for playback of a track concept, in which
gaps can be present, and it's those kind of gaps that should be
highlighted with the D- and E-bits.

https://bugzilla.gnome.org/show_bug.cgi?id=757688

9 years agortponviftimestamp: Do not rearange order of data
Linus Svensson [Fri, 6 Nov 2015 08:44:16 +0000 (09:44 +0100)]
rtponviftimestamp: Do not rearange order of data

If a buffer or a buffer list is cached, no events serialized with the
data stream should get through. The cached buffers and events should
be purged when we stop flushing.

https://bugzilla.gnome.org/show_bug.cgi?id=757688

9 years agortponvif: split unit tests in several files
Branko Subasic [Tue, 13 Oct 2015 12:21:47 +0000 (14:21 +0200)]
rtponvif: split unit tests in several files

Split the unit tests for rtponviftimestamp and rtponvifparse
elements in separate files.
Setup and cleanup the element and pads in fixures. Make the tests work
with CK_FORK=no as well, by cleaning up the 'buffers' list when needed.
Make unit tests work when run in valgrind by unreffing all buffers,
and by not allocating any payload in RTP buffers. Since we're not
doing anything with the payload part, but we're memcmp-aring the
complete buffer memory, valgrind complained about non-initialized
memory being used.

https://bugzilla.gnome.org/show_bug.cgi?id=757688

9 years agoadaptivedemux: improved bitrate estimations
Philippe Normand [Fri, 4 Sep 2015 07:59:06 +0000 (09:59 +0200)]
adaptivedemux: improved bitrate estimations

Bitrate estimation is now handled through a queue2 element added after
the source element used to download fragments.

Original hlsdemux patch by Duncan Palmer <dpalmer@digisoft.tv>
https://bugzilla.gnome.org/show_bug.cgi?id=733959

9 years agodshow: fix GList leak
Tim-Philipp Müller [Fri, 6 Nov 2015 12:59:51 +0000 (12:59 +0000)]
dshow: fix GList leak

_remove_link() would not free the actual list nodes.

9 years agoglshader, tsdemux: simplify code
Tim-Philipp Müller [Fri, 6 Nov 2015 12:31:09 +0000 (12:31 +0000)]
glshader, tsdemux: simplify code

Jus use _delete_link() instead of _remove_link() + _free1()

9 years agoglmixerbin: fix minor leak
Tim-Philipp Müller [Fri, 6 Nov 2015 12:30:12 +0000 (12:30 +0000)]
glmixerbin: fix minor leak

Don't leak removed list node.

9 years agofaac: Initialize debug category soon enough
Thibault Saunier [Fri, 6 Nov 2015 09:22:42 +0000 (10:22 +0100)]
faac: Initialize debug category soon enough

Avoiding assertions

9 years agoconfigure.ac: Added --with-hls-crypto=auto|nettle|libgcrypt|openssl option to build...
Julian Bouzas [Thu, 5 Nov 2015 10:12:41 +0000 (10:12 +0000)]
configure.ac: Added --with-hls-crypto=auto|nettle|libgcrypt|openssl option to build the source using the desired cryptographic library for HLS

https://bugzilla.gnome.org/show_bug.cgi?id=755319

9 years agohls: m3u8: don't leak GList nodes when matching up variant lists after master list...
Tim-Philipp Müller [Fri, 6 Nov 2015 00:48:42 +0000 (00:48 +0000)]
hls: m3u8: don't leak GList nodes when matching up variant lists after master list update

9 years agoaggregator: use GST_STIME_FORMAT for GstClockTimeDiff
Luis de Bethencourt [Thu, 5 Nov 2015 12:36:48 +0000 (12:36 +0000)]
aggregator: use GST_STIME_FORMAT for GstClockTimeDiff

No need to manually handle negative value of deadline, GST_STIME_FORMAT does
exactly this.

9 years agoresindvd: use GST_STIME_FORMAT for GstClockTimeDiff
Luis de Bethencourt [Thu, 5 Nov 2015 12:17:00 +0000 (12:17 +0000)]
resindvd: use GST_STIME_FORMAT 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_FORMAT.
Plus it creates more readable values in the logs.

https://bugzilla.gnome.org/show_bug.cgi?id=757480

9 years agoopusdec: Update sink pad templates
Sebastian Dröge [Thu, 5 Nov 2015 11:11:19 +0000 (12:11 +0100)]
opusdec: Update sink pad templates

We always require the channel-mapping-field. If it's 0 we require nothing
else, otherwise we need channels, stream-count and coupled count to be
available.

9 years agoaggregator: don't compare templ instance pointers
Stefan Sauer [Wed, 4 Nov 2015 03:09:33 +0000 (19:09 -0800)]
aggregator: don't compare templ instance pointers

One can pass the PadTemplate from the element_class or the one from the factory.
While they have the same content, the addresses are different.

9 years agoopus: Remove invalid unit test
Sebastian Dröge [Tue, 3 Nov 2015 22:12:52 +0000 (00:12 +0200)]
opus: Remove invalid unit test

Opus headers should never be in-band, so don't test for correct
handling of that.

9 years agoopusenc: Create an empty taglist if there is none
Sebastian Dröge [Tue, 3 Nov 2015 22:12:22 +0000 (00:12 +0200)]
opusenc: Create an empty taglist if there is none

There always have to be 2 buffers in the streamheaders, even if
the comment buffer is basically empty.

9 years agoaggregator: Set to running in a single place
Olivier Crête [Tue, 3 Nov 2015 19:41:57 +0000 (14:41 -0500)]
aggregator: Set to running in a single place

Only set to running when the thread is actually started.

9 years agoaggregator: Document more locking
Olivier Crête [Tue, 3 Nov 2015 19:37:26 +0000 (14:37 -0500)]
aggregator: Document more locking

9 years agotsdemux: Don't create an incomplete OpusHead but set all the other caps fields instead
Sebastian Dröge [Tue, 3 Nov 2015 17:53:00 +0000 (19:53 +0200)]
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

9 years agotsmux: Simplify Opus caps parsing by using codecutils helpers
Sebastian Dröge [Tue, 3 Nov 2015 17:51:03 +0000 (19:51 +0200)]
tsmux: Simplify Opus caps parsing by using codecutils helpers

https://bugzilla.gnome.org/show_bug.cgi?id=757152

9 years agoopus: Add proper support for multichannel audio
Sebastian Dröge [Tue, 3 Nov 2015 12:50:53 +0000 (14:50 +0200)]
opus: Add proper support for multichannel audio

https://bugzilla.gnome.org/show_bug.cgi?id=757152

9 years agoopusparse: Fix up pre-skip in OpusHead if upstream using GstAudioClippingMeta
Sebastian Dröge [Tue, 3 Nov 2015 09:41:07 +0000 (11:41 +0200)]
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

9 years agotsdemux/mux: Add support for GstAudioClippingMeta for Opus
Sebastian Dröge [Mon, 2 Nov 2015 16:02:55 +0000 (18:02 +0200)]
tsdemux/mux: Add support for GstAudioClippingMeta for Opus

https://bugzilla.gnome.org/show_bug.cgi?id=757153

9 years agoopusdec: Handle GstAudioClippingMeta instead of the pre-skip field in the OpusHead
Sebastian Dröge [Mon, 2 Nov 2015 15:33:53 +0000 (17:33 +0200)]
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

9 years agoopusenc: Add GstAudioClippingMeta to buffers that need to be clipped
Sebastian Dröge [Mon, 2 Nov 2015 14:52:28 +0000 (16:52 +0200)]
opusenc: Add GstAudioClippingMeta to buffers that need to be clipped

https://bugzilla.gnome.org/show_bug.cgi?id=757153

9 years agoopusenc: Disable granule position calculations by the base class
Sebastian Dröge [Mon, 2 Nov 2015 08:30:52 +0000 (10:30 +0200)]
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

9 years agoopusenc: Add some FIXME comments about calculating padding with LPC
Sebastian Dröge [Sat, 31 Oct 2015 13:02:50 +0000 (15:02 +0200)]
opusenc: Add some FIXME comments about calculating padding with LPC

https://bugzilla.gnome.org/show_bug.cgi?id=757153

9 years agoopusenc: Encode exactly the amount of samples we got as input and put correct timesta...
Sebastian Dröge [Fri, 30 Oct 2015 18:57:37 +0000 (20:57 +0200)]
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

9 years agoopusenc: Put lookahead/pre-skip into the OpusHead header
Sebastian Dröge [Fri, 30 Oct 2015 18:47:20 +0000 (20:47 +0200)]
opusenc: Put lookahead/pre-skip into the OpusHead header

https://bugzilla.gnome.org/show_bug.cgi?id=757153

9 years agotsmux: Add support for Opus
Sebastian Dröge [Sun, 25 Oct 2015 15:27:39 +0000 (17:27 +0200)]
tsmux: Add support for Opus

https://bugzilla.gnome.org/show_bug.cgi?id=757049

9 years agotsdemux: Add support for Opus
Sebastian Dröge [Sat, 24 Oct 2015 11:27:43 +0000 (14:27 +0300)]
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

9 years agotsmux: Don't leak buffer in error cases
Sebastian Dröge [Sun, 25 Oct 2015 17:31:51 +0000 (19:31 +0200)]
tsmux: Don't leak buffer in error cases

https://bugzilla.gnome.org/show_bug.cgi?id=757049

9 years agotsmux: Call prepare function for each collected buffer
Sebastian Dröge [Sun, 25 Oct 2015 17:29:53 +0000 (19:29 +0200)]
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

9 years agompegtsdescriptor: Add API for creating extended descriptors and fix writing them
Sebastian Dröge [Sun, 25 Oct 2015 16:09:24 +0000 (18:09 +0200)]
mpegtsdescriptor: Add API for creating extended descriptors and fix writing them

https://bugzilla.gnome.org/show_bug.cgi?id=757049

9 years agoopencv: cast paramspec flags to fix the build for c++
Stefan Sauer [Tue, 3 Nov 2015 05:16:15 +0000 (21:16 -0800)]
opencv: cast paramspec flags to fix the build for c++

All the other elements in this plugin do this already.

9 years agodvbsrc: use GST_STIME_ARGS for GstClockTimeDiff
Luis de Bethencourt [Tue, 3 Nov 2015 15:05:20 +0000 (15:05 +0000)]
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

9 years agoamcvideodec: use GST_STIME_ARGS for GstClockTimeDiff
Luis de Bethencourt [Tue, 3 Nov 2015 15:00:01 +0000 (15:00 +0000)]
amcvideodec: use GST_STIME_ARGS for GstClockTimeDiff

No need to manually handle negative value of deadline, GST_STIME_ARGS does
exactly this.

9 years agowaylandsink: Add exception code for setting wl_surface
Hyunil Park [Tue, 3 Nov 2015 10:42:40 +0000 (10:42 +0000)]
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

9 years agowaylandsink: Add exception code for setting wl_display
Hyunil Park [Thu, 9 Apr 2015 04:17:01 +0000 (13:17 +0900)]
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

9 years agoaggregator: Hold object lock while manipulating the segment
Olivier Crête [Tue, 3 Nov 2015 01:10:35 +0000 (20:10 -0500)]
aggregator: Hold object lock while manipulating the segment

Make sure the object lock is held when aggregator->segment is
modified.

9 years agoaudioaggregator: Improve log messages
Olivier Crête [Tue, 3 Nov 2015 00:40:28 +0000 (19:40 -0500)]
audioaggregator: Improve log messages

Make the level of log messages saner and improve some.

9 years agoaggregator: Remove dead code
Olivier Crête [Tue, 3 Nov 2015 00:05:01 +0000 (19:05 -0500)]
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.

9 years agompegtsmux: use GST_STIME_ARGS for GstClockTimeDiff
Luis de Bethencourt [Mon, 2 Nov 2015 17:02:47 +0000 (17:02 +0000)]
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.

9 years agovideoaggregator: use GST_STIME_ARGS for GstClockTimeDiff
Luis de Bethencourt [Mon, 2 Nov 2015 16:58:57 +0000 (16:58 +0000)]
videoaggregator: use GST_STIME_ARGS for GstClockTimeDiff

No need to manually handle negative values of diff, GST_STIME_ARGS does
exactly this.

9 years agodashdemux: remove unreachable code
Florin Apostol [Mon, 2 Nov 2015 11:17:29 +0000 (11:17 +0000)]
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

9 years agotests: add a test for MPD file duration parsing
Vincent Penquerc'h [Mon, 2 Nov 2015 10:48:11 +0000 (10:48 +0000)]
tests: add a test for MPD file duration parsing

https://bugzilla.gnome.org/show_bug.cgi?id=752336