Commit graph

15832 commits

Author SHA1 Message Date
Alex Ashley
97f6f7c713 qtdemux: only transform protected caps once
Commit 7873bede31
(https://bugzilla.gnome.org/show_bug.cgi?id=760774) changed the
behaviour of qtdemux to call gst_qtdemux_configure_stream() for
every new moof.

When playing a protected stream, gst_qtdemux_configure_stream()
calls gst_qtdemux_configure_protected_caps(). The
gst_qtdemux_configure_protected_caps() function takes the original
media format, puts this in a field called "original-media-type"
and then changes the caps to "application/x-cenc".

The gst_qtdemux_configure_protected_caps() did not handle the case
of being called multiple times, causing it to incorrectly set the
caps. The second call was causing the caps to be set to:

    application/x-cenc, original-media-type"application/x-cenc"

This commit makes gst_qtdemux_configure_protected_caps() check that
the caps have already been transformed, so that it only gets
changed once.

    https://bugzilla.gnome.org/show_bug.cgi?id=761769
2016-02-17 17:04:25 +02:00
Sebastian Dröge
01342378b5 opus: Add proper support for multichannel audio
https://bugzilla.gnome.org/show_bug.cgi?id=757152
2016-02-17 14:58:01 +00:00
Sebastian Dröge
0472d9f8b2 opus: Copy metadata in the (de)payloader, but only the relevant ones
The payloader didn't copy anything so far, the depayloader copied every
possible meta. Let's make it consistent and just copy all metas without tags or
with only the audio tag.

https://bugzilla.gnome.org/show_bug.cgi?id=751774
2016-02-17 14:58:01 +00:00
Sebastian Dröge
ff51629c9a opusdepay: Set multistream=FALSE on the Opus caps
The RTP Opus mapping only allows mono/stereo, and not multistream Opus
streams.
2016-02-17 14:58:01 +00:00
Olivier Crête
89b172b3ed rtpopuspay: Forward stereo preferences from caps upstream
https://bugzilla.gnome.org/show_bug.cgi?id=746617
2016-02-17 14:58:01 +00:00
Olivier Crête
4df223f325 rtpopuspay: Set the number of channels to 2 as per RFC draft
https://bugzilla.gnome.org/show_bug.cgi?id=746617
2016-02-17 14:58:01 +00:00
Sebastian Dröge
bbb1143ca3 opus: Handle sprop-stereo and sprop-maxcapturerate RTP caps fields
https://bugzilla.gnome.org/show_bug.cgi?id=746617
2016-02-17 14:58:01 +00:00
Vincent Penquerc'h
4b5ad70924 rtpopuspay: default encoding name to OPUS
https://bugzilla.gnome.org/show_bug.cgi?id=737810
2016-02-17 14:58:01 +00:00
Vincent Penquerc'h
755289ed0c rtpopuspay: make caps writable before truncating them
https://bugzilla.gnome.org/show_bug.cgi?id=737810
2016-02-17 14:58:01 +00:00
Vincent Penquerc'h
e427369840 rtpopuspay: negotiate the encoding name
Chrome uses a different encoding name that gstreamer.

https://bugzilla.gnome.org/show_bug.cgi?id=737810
2016-02-17 14:58:01 +00:00
Nicolas Dufresne
9e4511edf4 rtpopus: Use OPUS encoding name
Both Firefox and Chrome uses OPUS as the encoding in their SDP.
Adding this now defacto standard name remove the need for special
case in SDP parsing code.

https://bugzilla.gnome.org/show_bug.cgi?id=737810
2016-02-17 14:58:01 +00:00
Wim Taymans
b310393916 opuspay: fix timestamps
Copy timestamps to payloaded buffer.
Avoid input buffer memory leak.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=692929
2016-02-17 14:58:00 +00:00
Tim-Philipp Müller
117e30c47e Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2016-02-17 14:58:00 +00:00
Wim Taymans
5d893c7ea2 opuspay: remove pointless caps serialization
Remove the caps serialization in the rtp caps. the spec nor the receiver
does anything with it.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=686547
2016-02-17 14:58:00 +00:00
Tim-Philipp Müller
17742d2347 Use gst_element_class_set_static_metadata()
where possible. Avoids some string copies. Also re-indent
some stuff. Also some indent fixes here and there.
2016-02-17 14:58:00 +00:00
Olivier Crête
18638c9c4e rtpopuspay: Allocate the rtp buffer correctly
Use the right functions to allocate the rtp buffer
2016-02-17 14:58:00 +00:00
Mark Nauwelaerts
ad261f64c3 replace gst_element_class_set_details_simple with gst_element_class_set_metadata 2016-02-17 14:58:00 +00:00
Mark Nauwelaerts
d196562755 opus: port to updated 0.11 2016-02-17 14:58:00 +00:00
Edward Hervey
77ea437507 Merge remote-tracking branch 'origin/master' into 0.11-premerge
Conflicts:
	docs/libs/Makefile.am
	ext/kate/gstkatetiger.c
	ext/opus/gstopusdec.c
	ext/xvid/gstxvidenc.c
	gst-libs/gst/basecamerabinsrc/Makefile.am
	gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c
	gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.h
	gst-libs/gst/video/gstbasevideocodec.c
	gst-libs/gst/video/gstbasevideocodec.h
	gst-libs/gst/video/gstbasevideodecoder.c
	gst-libs/gst/video/gstbasevideoencoder.c
	gst/asfmux/gstasfmux.c
	gst/audiovisualizers/gstwavescope.c
	gst/camerabin2/gstcamerabin2.c
	gst/debugutils/gstcompare.c
	gst/frei0r/gstfrei0rmixer.c
	gst/mpegpsmux/mpegpsmux.c
	gst/mpegtsmux/mpegtsmux.c
	gst/mxf/mxfmux.c
	gst/videomeasure/gstvideomeasure_ssim.c
	gst/videoparsers/gsth264parse.c
	gst/videoparsers/gstmpeg4videoparse.c
2016-02-17 14:58:00 +00:00
Vincent Penquerc'h
8df374108a opusenc: add upstream negotiation for multistream ability
This will help elements that cannot deal with multistream,
such as the RTP payloader.

The caps now do not include a "streams" field anymore, but
a "multistream" boolean, since we have no real use for knowing
the exact amount of streams.

https://bugzilla.gnome.org/show_bug.cgi?id=665078
2016-02-17 14:58:00 +00:00
Danilo Cesar Lemes de Paula
c207bdf1e7 Adding opus RTP payloader/depayloader element
Adding OPUS RTP module based on the current draft:
http://tools.ietf.org/id/draft-spittka-payload-rtp-opus-00.txt

https://bugzilla.gnome.org/show_bug.cgi?id=664817
2016-02-17 14:58:00 +00:00
Luis de Bethencourt
f2f31ec50f rtp: h264/h265: avoid duplication of read_golomb()
There is no need to have two identical implementations of the read_golomb
function.

https://bugzilla.gnome.org/show_bug.cgi?id=761606
2016-02-17 14:18:16 +00:00
Ognyan Tonchev
750b7c72fe matroskademux: Simple implementation of TRICKMODE_KEY_UNITS
When the trickmode key-units flag is set on the segment, simply skip
any sample on a video stream that isn't a keyframe

https://bugzilla.gnome.org/show_bug.cgi?id=762185
2016-02-17 16:17:13 +02:00
Tim-Philipp Müller
77403d0afe matroska-demux: send GAP events for lagging audio and video streams too
Send GAP events for non-subtitle streams too if they lag too much
behind, but use a higher threshold than for subtitles.

This helps with fixing prerolling with a file where one of the
audio streams only has data starting from 19s onwards. It's not
a complete fix yet, it also requires changes elsewhere, such as
in baseparse, to make sure caps are propagated.

https://bugzilla.gnome.org/show_bug.cgi?id=614460
https://bugzilla.gnome.org/show_bug.cgi?id=753899
2016-02-16 17:11:39 +00:00
Stian Selnes
5faa9c11a6 rtpvp9pay: rtpvp9depay: Initial implementation of draft 01
Quick and dirty implementation of an RTP payloader and depayloader
for VP9. In particalur it assumes no spatial or temporal layering,
non-flexible mode, and some other bits and pieces.

https://bugzilla.gnome.org/show_bug.cgi?id=754773
2016-02-16 15:54:06 +02:00
Vineeth TM
dc70bfd36a avidemux: Fix string memory leak
codec_name is not being freed in all conditions leading to memory leak

https://bugzilla.gnome.org/show_bug.cgi?id=762117
2016-02-16 11:43:24 +00:00
Miguel París Díaz
92affe2dec rtpbin: add "get-session" signal
This gets the GstRTPSession element, as compared to the RTPSession object
that is returned by get-internal-session.

https://bugzilla.gnome.org/show_bug.cgi?id=759293
2016-02-16 13:39:52 +02:00
Tim-Philipp Müller
9d0f127703 rtp: h265: hook up move RTP H.265 payloader/depayloader to build
https://bugzilla.gnome.org/show_bug.cgi?id=761606
2016-02-16 00:25:50 +00:00
Tim-Philipp Müller
7f9f3d38b2 rtp: h265: use common meta utility functions
https://bugzilla.gnome.org/show_bug.cgi?id=761606
2016-02-16 00:25:46 +00:00
Tim-Philipp Müller
714d31ce30 rtp: h265: remove codecparser dependency from h265 payloader/depayloader
Looks like it just uses the NAL enums and nothing else from
the codecparsers, and that's the only reason it had to be
moved from -good to -bad when it was originally added. We
can probably keep those NAL enums up to date enough, so let's
remove the codecparser dependency so it can be moved back into
-good.

https://bugzilla.gnome.org/show_bug.cgi?id=761606
2016-02-16 00:25:41 +00:00
Tim-Philipp Müller
a70c75782b Merge branch 'plugin-move-rtp-h265'
Move RTP H.265 payloader/depayloader from -bad to -good.

https://bugzilla.gnome.org/show_bug.cgi?id=761606
2016-02-16 00:24:58 +00:00
Luis de Bethencourt
139108c83a gstrtph265depay: keep consistency with rtph264depay
Use gst_rtp_drop_meta() and the same function prototype for
gst_rtp_copy_meta() to keep consistency with the RTP elements in
gst-plugins-good
2016-02-16 00:24:41 +00:00
Luis de Bethencourt
403ac009fa rtph265depay: fix termination of access unit
Only consider the access unit complete when the next-occurring VCL NAL unit
has the first bit after its NAL unit header equal to 1.
2016-02-16 00:24:41 +00:00
Luis de Bethencourt
983e30f658 rtph265depay: fix unneeded sub-buffer creation
We create a sub-buffer just to copy over its metas and then throw it
away immediately, just use the original input buffer directly.
2016-02-16 00:24:41 +00:00
Luis de Bethencourt
4ee6c17edb rtph265pay: add "send VPS/SPS/PPS with every key frame" mode
It's not enough to have timeout or event based VPS/SPS/PPS information
sent in RTP packets. There are some scenarios when key frames may appear
more frequently than once a second, in which case the minimum timeout
for "config-interval" of 1 second for sending VPS/SPS/PPS isn't enough.
It might also be desirable in general to make sure the VPS/SPS/PPS is
available with every keyframe (packet loss aside), so receivers can
actually pick up decoding immediately from the first keyframe if
VPS/SPS/PPS is not signaled out of band.

This commit adds the possibility to send VPS/SPS/PPS with every key frame.
This mode can be enabled by setting "config-interval" property to -1. In
this case the payloader will add VPS, SPS and PPS before every key (IDR)
frame.

https://bugzilla.gnome.org/show_bug.cgi?id=757892
2016-02-16 00:24:41 +00:00
Luis de Bethencourt
64ca3b26d9 rtph265pay: change config-interval property type from uint to int
This way we can use -1 as special value, which is nicer than MAXUINT.

https://bugzilla.gnome.org/show_bug.cgi?id=757892
2016-02-16 00:24:41 +00:00
Luis de Bethencourt
698e5bbfb5 rtph265depay: make sure we call handle_nal for each NAL
Call handle_nal for each NAL in the STAP-A RTP packet. This makes sure
we correctly extract the SPS and PPS.

https://bugzilla.gnome.org/show_bug.cgi?id=730999
2016-02-16 00:24:41 +00:00
Luis de Bethencourt
1e55d0d725 rtph265pay: Copy metadata in the payloader, but only the relevant ones
The payloader didn't copy anything so far, the depayloader copied every
possible meta. Let's make it consistent and just copy all metas without
tags or with only the video tag.

https://bugzilla.gnome.org/show_bug.cgi?id=751774
2016-02-16 00:24:41 +00:00
Luis de Bethencourt
8611645af6 rtph265pay: Use GST_WARNING_OBJECT() instead of GST_WARNING()
https://bugzilla.gnome.org/show_bug.cgi?id=753228
2016-02-16 00:24:41 +00:00
Luis de Bethencourt
df724c410b rtph265pay: fix potential crash when shutting down
A race condition in the state change function may cause buffers to be
unreffed while they are still used by the streaming thread in
gst_rtp_h265_pay_send_vps_sps_pps() resulting in a crash. Chain up to the
parent class first in the state change function to make sure streaming
has stopped and only then free those buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=741381
2016-02-16 00:24:41 +00:00
Luis de Bethencourt
f2bae3ab59 rtph265pay: fix buffer leak when using SPS/PPS
Fixes a buffer leak that would occur if the pipeline was shutdown while a
SPS/PPS header was being created.

https://bugzilla.gnome.org/show_bug.cgi?id=741271
2016-02-16 00:24:41 +00:00
Luis de Bethencourt
f1e2849438 rtph265depay: copy metadata in the depayloader, but only the relevant ones
The payloader didn't copy anything so far, the depayloader copied every
possible meta. Let's make it consistent and just copy all metas without
tags or with only the video tag.

https://bugzilla.gnome.org/show_bug.cgi?id=751774
2016-02-16 00:24:40 +00:00
Luis de Bethencourt
3bede1c95b rtph265depay: checking if depay has sps/pps nals before insertion
Related to: https://bugzilla.gnome.org/show_bug.cgi?id=753430

https://bugzilla.gnome.org/show_bug.cgi?id=753228
2016-02-16 00:24:40 +00:00
Luis de Bethencourt
18b628824b rtph265depay: only update the srcpad caps if something else than the codec_data changed
h264parse and gstrtph264depay do the same, let's keep the behaviour
consistent. As we now include the codec_data inside the stream, this causes
less caps renegotiation.

https://bugzilla.gnome.org/show_bug.cgi?id=753228
2016-02-16 00:24:40 +00:00
Luis de Bethencourt
3979ffa6a3 rtph265depay: PPS replaces old PPS if it has the same id
https://bugzilla.gnome.org/show_bug.cgi?id=753228
2016-02-16 00:24:40 +00:00
Luis de Bethencourt
d10b6f1e3a rtph265depay: Insert SPS/PPS NALs into the stream
rtph264depay does the same and this fixes decoding of some streams with 32
SPS (or 256 PPS). It is allowed to have SPS ID 0 to 31 (or PPS ID 0 to 255),
but the field in the codec_data for the number of SPS or PPS is only 5
(or 8) bit. As such, 32 SPS (or 256 PPS) are interpreted as 0 everywhere.

This looks like a mistake in the part of the spect about the codec_data.
2016-02-16 00:24:40 +00:00
Luis de Bethencourt
0bfa97b047 rtph265depay: implement process_rtp_packet() vfunc
For more optimised RTP packet handling: means we don't need to map the
input buffer again but can just re-use the mapping the base class has
already done.

Based on: https://bugzilla.gnome.org/show_bug.cgi?id=750235

https://bugzilla.gnome.org/show_bug.cgi?id=753228
2016-02-16 00:24:40 +00:00
Luis de Bethencourt
a526d014db rtph265depay: Use GST_BUFFER_PTS() instead of GST_BUFFER_TIMESTAMP()
Switching to GST_BUFFER_TIMESTAMP() to be consistent with other rtp code.
2016-02-16 00:24:40 +00:00
Luis de Bethencourt
470c8b3720 rtph265depay: prevent trying to get 0 bytes from adapter
This causes an assertion and would lead to getting a NULL instead
of a buffer. Without proper checking this would easily lead to a
segfault.

Related to rpth264depay: https://bugzilla.gnome.org/show_bug.cgi?id=737199
2016-02-16 00:24:40 +00:00
Luis de Bethencourt
7ae49b46ff rtp: remove dead assignment
Value set to ret will be overwritten at least once at the end of the while
loop, removing assignment.
2016-02-16 00:24:40 +00:00