Commit graph

8929 commits

Author SHA1 Message Date
Mikhail Fludkov
ee7e80d615 rtpsession: don't act on suspicious BYE RTCP
Some endpoints (like Tandberg E20) can send BYE packet containing our
internal SSRC. I this case we would detect SSRC collision and get rid
of the source at some point. But because we are still sending packets
with that SSRC the source will be recreated immediately.
This brand new internal source will not have some variables incorrectly
set in its state. For example 'seqnum-base` and `clock-rate` values will be
-1.
The fix is not to act on BYE RTCP if it contains internal or unknown
SSRC.

https://bugzilla.gnome.org/show_bug.cgi?id=762219
2016-05-20 09:28:39 +03:00
Seungha Yang
eb09829a1c matroskademux: don't hold object lock whilst pushing out headers
matroskademux would take the GST_OBJECT_LOCK in
- gst_matroska_demux_push_codec_data_all()
- gst_matroska_demux_query()

Some parse element such as FLAC checks upstream seekability, and
there is some use cases that matroska-demux is linked to a parse element
(e.g.,FLAC format) without intermediate elements (e.g., queue).
In this case, matroska-demux never returns from _push_codec_data_all()
because the parser can return only after it receives the response to
the upstream query, but that's not going to happen because it's
deadlocked.

Elements must not hold the object lock whilst pushing out events
or data.

https://bugzilla.gnome.org/show_bug.cgi?id=766645
2016-05-19 22:01:53 +01:00
Tim-Philipp Müller
0686174f19 udpsrc: fix Since version for new "loop" property 2016-05-18 18:35:27 +01:00
Guillaume Desmottes
a6c4763b42 rtpdec: fix clock leak
gst_system_clock_obtain() returns a new ref.

https://bugzilla.gnome.org/show_bug.cgi?id=766521
2016-05-17 09:59:08 +03:00
Tim-Philipp Müller
21e281feea udpsrc: add doc blurb with since marker for new "loop" property 2016-05-17 05:33:35 +01:00
Dimitrios Katsaros
1f0cfd9ffb avimux: add support for png
https://bugzilla.gnome.org/show_bug.cgi?id=758059
2016-05-16 18:14:21 +01:00
Jan Schmidt
d7eb97393c splitmuxsrc: Connect to demux signals before activating
Fix a race in splitmuxsrc by properly connecting to the
demuxer signals we're interested in *before* setting it running.
2016-05-15 22:09:04 +10:00
Olivier Crête
e21cf3bc1c rtpmp4gpay: Don't produce timestamps based on byte count
The GST_BUFFER_OFFSET of output buffers returned to GstRtpBasePayload
should reflect the number of "samples" in the unit of the RTP clock in this
buffer. If this is not true, then it shouldn't be set.

https://bugzilla.gnome.org/show_bug.cgi?id=761943
2016-05-15 12:28:55 +02:00
Edward Hervey
ac3b1cf2ed matroska-mux: Fix strcmp usage
Just use g_strcmp0 which can handle NULL entries
2016-05-15 12:25:03 +02:00
Seungha Yang
56e273bc21 qtdemux: Parsing elst box based on version
segment_duration and media_time should be parsed based on version
of elst box. Specification defines that an elst box with version 1
has uint64 and int64 values for segment_duration and media_time,
respectively.

https://bugzilla.gnome.org/show_bug.cgi?id=766301
2016-05-15 13:10:03 +03:00
Sebastian Dröge
fe34f46f32 rtpsession: Take the lock already when reading the other stats, not just for the hash table
https://bugzilla.gnome.org/show_bug.cgi?id=766025
2016-05-15 12:31:33 +03:00
Tim-Philipp Müller
3320f4f0de matroska: use math-compat.h for NAN define 2016-05-14 17:04:57 +01:00
Jan Schmidt
fa008f271a splitmuxsink: Use GstBin async-handling instead of our own.
Set the async-handling property on GstBin to let it manage
async-handling instead of the local handling from the previous
commit. Works because of #174a5e in core
2016-05-15 00:03:15 +10:00
Olivier Crête
0ebdb97797 jitterbuffer: Upgrade debug message to error
It causes the entire pipeline to fail, it should be easier to find.
2016-05-14 12:36:08 +02:00
Jan Schmidt
08af8cd5b8 splitmuxsink: Hide internal async state changes.
When switching fragments, hide the async-start/async-done
messages from the parent bin, as otherwise we sometimes (very rarely)
hang in PAUSED instead of returning / continuing to PLAYING
state.
2016-05-14 18:34:57 +10:00
Jan Schmidt
f35f604610 splitmuxsink: Remove stray carriage-return from debug 2016-05-14 18:34:57 +10:00
Sebastian Dröge
bb1ae083c6 rtp: Ship gstrtpj2kcommon.h file to fix distcheck 2016-05-13 16:43:21 +03:00
Jesper Larsen
ce05adfb30 avimux: Do not write index and header if idx is NULL
Fixes criticals with e.g.
videotestsrc num-buffers=1 ! identity drop-probability=1.0 ! avimux ! fakesink

https://bugzilla.gnome.org/show_bug.cgi?id=748700
2016-05-13 09:55:45 +01:00
Aaron Boxer
f89c4f9f4b rtpj2kpay: manage T tile invalidation bit correctly, update tile id in header correctly.
1. according to RFC, T bit is only set when either the RTP packet only contains the J2K main header, or the packet contains tile parts from multiple tiles. This is now being managed correctly in the code. The second scenario cannot happen with our payloader, since tile headers are always placed in their own RTP packet, and so a packet cannot contain tile parts from multiple tiles.
However, I have added code to track if multiple tile parts are included in a single RTP packet, in case in the future we want to put header and data in same packet.

2. Old code would set the tile id to zero for all J2K packets. This is now set correctly to the appropriate tile id.

https://bugzilla.gnome.org/show_bug.cgi?id=745187
2016-05-13 11:01:25 +03:00
Aaron Boxer
84ff5511de rtpj2kpay: manage fragmented headers correctly
J2K main header framentation across multiple RTP packets is now handled correctly

https://bugzilla.gnome.org/show_bug.cgi?id=745187
2016-05-13 11:01:19 +03:00
Aaron Boxer
d2765be120 rtpj2k: move common code to shared header, code clean up
https://bugzilla.gnome.org/show_bug.cgi?id=745187
2016-05-13 11:01:15 +03:00
Aaron Boxer
82c2a5cbf8 rtpj2k: update documentation
https://bugzilla.gnome.org/show_bug.cgi?id=745187
2016-05-13 11:01:09 +03:00
Patricia Muscalu
fe4dc610e6 auparse: Fix sticky event misordering warning
Make sure that src pad has caps before sending segment event.

https://bugzilla.gnome.org/show_bug.cgi?id=766359
2016-05-13 10:21:35 +03:00
Sebastian Dröge
204a86af97 rtpsession: Don't notify about stats property changes while taking the session lock
The signal handlers might want to actually get the value of the stats
property, which would take the session lock again and deadlock.

This was introduced by 2e960e7075.

https://bugzilla.gnome.org/show_bug.cgi?id=766025
2016-05-11 09:28:13 +03:00
Thiago Santos
00f23053b1 qtdemux: improve edts segment handling after seeks in push mode
Properly handle edts segments for push-based operation seeking.
We only support edts that a single segment that has media at the end,
being preceeded by any number of gap segments.

This also allows the qt segment rate to be respected after seeks

https://bugzilla.gnome.org/show_bug.cgi?id=765669
2016-05-09 11:46:46 -03:00
Thiago Santos
6604614dc5 qtdemux: properly activate segment with rate != 1.0
Also use the qt rate to identify the position within a qt segment
to properly translate playback time to qt media time

https://bugzilla.gnome.org/show_bug.cgi?id=765669
2016-05-09 10:49:53 -03:00
Havard Graff
8f7962e1c3 rtpjitterbuffer: Fix stall when receiving already lost packet
When a packet arrives that has already been considered lost as part of a
large gap the "lost timer" for this will be cancelled. If the remaining
packets of this large gap never arrives, there will be missing entries
in the queue and the loop function will keep waiting for these packets
to arrive and never push another packet, effectively stalling the
pipeline.

The proposed fix conciders parts of a large gap definitely lost (since
they are calculated from latency) and ignores the late arrivals.

In practice the issue is rare since large gaps are scheduled immediately,
and for the stall to happen the late arrival needs to be processed
before this times out.

https://bugzilla.gnome.org/show_bug.cgi?id=765933
2016-05-06 14:32:42 +03:00
Miguel París Díaz
2e960e7075 rtpsession: Take session lock when creating stats
The access to the session hash table must happen while the session lock is
taken, otherwise another thread might modify the hash table while we're
creating the stats.

https://bugzilla.gnome.org/show_bug.cgi?id=766025
2016-05-06 09:24:22 +03:00
Thiago Santos
c70ed4c914 qtdemux: update segment when new duration is found
Otherwise the old segment will have a shorter stop time and would
cause the stream to end too early.
2016-05-05 09:30:48 -03:00
Thiago Santos
a5e02e948b qtdemux: dismember activate_segment into 2 parts
One that updates and push a new segment, the other will move the
stream to the new segment starting position
2016-05-05 09:30:48 -03:00
George Kiagiadakis
bd2a1487cc splitmuxsrc: add a format-location signal that allows bypassing the location property
This signal allows a user to directly return a sorted list of
files to be joined, so that they don't have to follow the
filename pattern that the "location" property expects.

https://bugzilla.gnome.org/show_bug.cgi?id=753625
2016-05-05 10:49:07 +01:00
Xavier Claessens
0fc02f35c7 splitmuxsink: Fix deadlock case when source reaches EOS
https://bugzilla.gnome.org/show_bug.cgi?id=765072
2016-05-05 01:22:10 +10:00
Stefan Sauer
36597cf201 wavparse: simplify and correct header scanning
The wav spec tells that 'fmt' (and 'bext' if present) must come before 'data'.
There is no requirement for 'fmt' to be first. We already had a list of chunks
to skip, but it is easier to just skip any chunk while seeking for 'fmt'.

This fixes reading files generated by ProTools.
2016-05-03 23:03:14 -07:00
Mark Nauwelaerts
eb336a804b avimux: set audio header rate according to calculated bps in stop_file
... now that set_fields is no longer called there by
e538608b3f
2016-05-01 15:14:00 +02:00
Sebastian Dröge
e0b26059ae qtdemux: Store the segment sequence number in the EOS events and SEGMENT_DONE events/message
Also instead of storing it per stream, store it globally in the demuxer. It's
the same for each stream anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=765806
2016-04-29 15:13:34 +03:00
Sebastian Dröge
3b7df52c86 udpsrc: Always bind to ANY when address is a multicast address and not only on Windows
For IPv6 addresses, binding to a multicast group does not work on Linux
either. Always bind to ANY and then later join the multicast group.

https://bugzilla.gnome.org/show_bug.cgi?id=764679
2016-04-29 11:48:23 +03:00
Sebastian Dröge
f8b87c8a05 qtmux: Allow MPEG-1 Layer 1 and 2 in addition to 3 in MP4
Via the MPEG-4 Part 3 spec we can support the other layers too.
Also correct the samples per frame calculation for MP3 if it's MPEG-2 or
MPEG-2.5.

https://bugzilla.gnome.org/show_bug.cgi?id=765725
2016-04-28 16:26:40 +03:00
Sebastian Dröge
7c728db1f3 rtspsrc: Update caps for TCP whenever they change
We only changed them for UDP so far, which caused the wrong seqnum-base and
other information to be passed to rtpjitterbuffer/etc when seeking. This
usually wasn't that much of a problem as the code there is robust enough, but
every now and then it causes us to drop up to 32756 packets before we
continue doing anything meaningful.

https://bugzilla.gnome.org/show_bug.cgi?id=765689
2016-04-27 20:52:32 +03:00
Sebastian Dröge
608b4ee53c rtpjitterbuffer: Ensure to not take caps with the wrong pt for getting the clock-rate
Especially the caps on the pad might be out of date, and the new caps would be
provided for the current pt via the request-pt-map signal.

https://bugzilla.gnome.org/show_bug.cgi?id=765689
2016-04-27 20:52:27 +03:00
Sebastian Dröge
d24e68719b rtspsrc: Don't propagate spurious state change returns from internal elements further
We handle them inside rtspsrc and override them in all other cases anyway, so
do the same for "internal" state changes like PAUSED->PAUSED and
PLAYING->PLAYING.

This keeps unexpected NO_PREROLL to confuse state changes in GstBin.

See also https://bugzilla.gnome.org/show_bug.cgi?id=760532

https://bugzilla.gnome.org/show_bug.cgi?id=765689
2016-04-27 20:52:15 +03:00
Sebastian Dröge
e538608b3f avimux: Don't override maximum audio chunk size with the scale again just before writing it
set_fields() should only be called in the beginning, otherwise we will never
remember the maximum audio chunk size and write a wrong block align... which
then causes wrong timestamps and other problems.
2016-04-27 14:09:03 +03:00
Sebastian Dröge
34dc1298e9 avimux: Actually store the largest audio chunk size for the VBR case of MP2/MP3
3ea338ce27 changed avimux to do that, but it
never actually kept track of the max audio chunk for MP3 and MP2. These are
knowing the hdr.scale only after parsing the frames instead of at setcaps
time.
2016-04-27 13:54:31 +03:00
Mats Lindestam
63c284c24e multiudpsink: Allow setting "socket-v6" without setting "socket" too
https://bugzilla.gnome.org/show_bug.cgi?id=764897
2016-04-26 11:05:22 +03:00
Tim-Philipp Müller
4ba6214d3a deinterlace: fix description of linear interlacing method 2016-04-22 15:48:08 +01:00
Thibault Saunier
dd9bfd03ec flv: Handle the case where we do not get any CollectData in handle_buffer
https://bugzilla.gnome.org/show_bug.cgi?id=765320
2016-04-22 08:39:02 -03:00
Seungha Yang
cde45a41a5 qtdemux: Do not use unreliable framerate
timescale/1 is unreliable value for framerate. Due to downstream
element usually use framerate generated by qtdemux, let it be omitted
until the framerate can be reliably calculated.

https://bugzilla.gnome.org/show_bug.cgi?id=764733
2016-04-21 12:53:48 +03:00
Sebastian Dröge
707c69cb72 Revert "qtdemux: expose streams with first moof for fragmented format"
This reverts commit d8bb6687ea.

https://bugzilla.gnome.org/show_bug.cgi?id=764733
2016-04-21 12:53:33 +03:00
Alex Ashley
0c4cc14533 qtdemux: support seeking of CENC encrypted streams
When playing a stream that has been protected by DASH CENC, playback
will fail if a seek is performed. Qtdemux produces the error "stream
is protected using cenc, but no cenc protection system information
has been found" and playback stops.

The problem is that gst_qtdemux_reset() gets called as part of the
FLUSH during a seek. This function frees the protection_system_ids
array. When gst_qtdemux_configure_protected_caps() is called after the
seek has completed, the protection_system_ids array is empty and
qtdemux is unable to create the correct output caps for the protected
stream.

This commit changes it to only free the protection_system_ids on
hard resets.

https://bugzilla.gnome.org/show_bug.cgi?id=761787
2016-04-20 12:19:51 -03:00
Tim-Philipp Müller
76506190e9 udpsrc: add "retrieve-sender-address" property
This allows disabling of sender address retrieval, which might
be useful in certain scenarios, like when the socket is connected,
or the sender address is not of interest (e.g. when receiving an
MPEG-TS stream). Disabling sender address retrieval in those
cases can have minor performance advantages.

https://bugzilla.gnome.org/show_bug.cgi?id=563323
2016-04-18 14:33:10 +01:00
Xavier Claessens
7886e8d8a0 spitmuxsink: Avoid creating small file at EOS
When EOS is reached, the current file get closed and the last
GOP in the mq was written in a new file.

https://bugzilla.gnome.org/show_bug.cgi?id=765072
2016-04-16 22:14:37 +10:00
Sebastian Dröge
2dee0e385f scaletempo: S16 uses S32 temporary buffers, float/double their own type
Make sure to allocate not only a S16 buffer for S16 but a twice as big one to
hold S32.

https://bugzilla.gnome.org/show_bug.cgi?id=765116
2016-04-15 20:06:42 +03:00
Aleix Conchillo Flaqué
c36930535d rtspsrc: add srtp rollover counters from mikey crypto sessions
The server can send multiple crypto sessions, one for each SSRC with its
own rollover counter. We parse this information and pass it to the SRTP
decoder via the "request-key" signal.

https://bugzilla.gnome.org/show_bug.cgi?id=730540
2016-04-15 18:12:06 +02:00
Jan Schmidt
a660ac7e88 rtpjitterbuffer: Fix debug output when resyncing
Don't output the pointer value of the time() function as a timestamp
by using the correct variable.

Fixes build on Raspberry Pi 3.
2016-04-15 14:35:07 +00:00
Damian Ziobro
ae4484c2ba splitmuxsink: Add max_files_number property
https://bugzilla.gnome.org/show_bug.cgi?id=744612
2016-04-14 04:18:11 +10:00
Reynaldo H. Verdejo Pinochet
6b209acf28 videomixer: drop reference to videomixer 2
Fix a small grammar mistake on "overlayed" while at it.
2016-04-13 10:57:03 -07:00
Paolo Pettinato
40fbffc208 rtpmux: Forward sticky events on buffer lists too, not only on buffers
https://bugzilla.gnome.org/show_bug.cgi?id=764933
2016-04-12 15:22:14 +03:00
Sebastian Dröge
1f21747cc5 deinterlace: Drain the field history if the caps are changing
Otherwise we will use fields from the old caps with everything set up for the
new caps, causing crashes and worse.

Also don't do anything if the same caps are set twice.
2016-04-12 15:01:28 +03:00
Sebastian Dröge
0c84b1b104 deinterlace: Instead of confusing crashes later, just error out immediately if mapping a video frame fails
This probably still crashes but at least we get some hint about what goes
wrong instead of random behaviour later.
2016-04-12 15:00:31 +03:00
Luis de Bethencourt
1bb9d9c682 qtdemux: check stream is available in PIFF parser
qtdemux->streams is an array, it will never evaluate to true when comparing
to NULL. Instead we want to check the number of streams to make sure the
stream is available.

https://bugzilla.gnome.org/show_bug.cgi?id=753614
CID 1358389
2016-04-12 11:39:48 +01:00
Luis de Bethencourt
574bf8e02f Revert "qtdemux: redundant check in PIFF parser"
This reverts commit 41e10524f3.
2016-04-12 11:37:36 +01:00
Luis de Bethencourt
41e10524f3 qtdemux: redundant check in PIFF parser
qtdemux->streams is an array of size GST_QTDEMUX_MAX_STREAMS, it will never
evaluate to true when comparing to NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=753614
CID 1358389
2016-04-12 11:08:37 +01:00
Sebastian Dröge
4a0de53cc1 rtpjitterbuffer: Fix rtp_jitter_buffer_get_ts_diff() fill level calculation
The head of the queue is the oldest packet (as in lowest seqnum), the tail is
the newest packet. To calculate the fill level, we should calculate tail-head
while considering wraparounds. Not the other way around.

Other code is already doing this in the correct order.

https://bugzilla.gnome.org/show_bug.cgi?id=764889
2016-04-12 10:17:57 +03:00
Sebastian Dröge
95dc198563 rtpmanager: It's GST_LIBS, not GST_LIBS_LIBS 2016-04-11 10:44:56 +03:00
Seungha Yang
faa664b8ea qtdemux: Fix parsing segment duration of empty edit list box
For empty edit list, segment-duration in edit list box should not be
used for segment event.

https://bugzilla.gnome.org/show_bug.cgi?id=764870
2016-04-11 10:28:07 +03:00
Nicola Murino
cbdbfc8902 matroskamux: make timecodescale configurable
In some use cases the default timecodescale will produce blocks with the same timestamp

https://bugzilla.gnome.org/show_bug.cgi?id=764769
2016-04-11 10:17:25 +03:00
Edward Hervey
5fa1c2ba59 jiterbuffer: Move assertion to the right location
We shouldn't have "late" lost timers at that point
2016-04-07 13:01:52 +02:00
Edward Hervey
b82da62922 jitterbuffer: Speed up lost timeout handling
When downstream blocks, "lost" timers are created to notify the
outgoing thread that packets are lost.

The problem is that for high packet-rate streams, we might end up with
a big list of lost timeouts (had a use-case with ~1000...).

The problem isn't so much the amount of lost timeouts to handle, but
rather the way they were handled. All timers would first be iterated,
then the one selected would be handled ... to re-iterate the list again.

All of this is being done while the jbuf lock is taken, which in some use-cases
would return in holding that lock for 10s... blocking any buffers from
being accepted in input... which would then arrive late ... which would
create plenty of lost timers ... which would cause the same issue.

In order to avoid that situation, handle the lost timers immediately when
iterating the list of pending timers. This modifies the complexity from
a quadratic to a linear complexity.

https://bugzilla.gnome.org/show_bug.cgi?id=762988
2016-04-07 10:14:24 +02:00
Edward Hervey
d656fe8d54 jitterbuffer: Don't create lost events if we don't need them
When "do-lost" is set to FALSE we don't use/send the lost events.
In that case, don't create them to start with :)

https://bugzilla.gnome.org/show_bug.cgi?id=762988
2016-04-07 10:13:56 +02:00
Edward Hervey
cf866a8469 jitterbuffer: Add tracing of lock usage
Helps with debugging lock usage

https://bugzilla.gnome.org/show_bug.cgi?id=762988
2016-04-07 10:06:18 +02:00
Nirbheek Chauhan
e20a687737 rtpjpegdepay: Don't send invalid frames downstream after packet loss or a DISCONT
After clearing the adapter due to a DISCONT, as might happen when some packet(s)
have been lost, the depayloader was pushing data into the adapter (which had no
header due to the clear), creating a headerless frame out of it, and sending it
downstream. The downstream decoder would then usually ignore it; unless there
were lots of DISCONTs from the jitterbuffer in which case the decoder would reach
its max_errors limit and throw an element error. Now we just discard that data.

It is probaby not worth trying to salvage this data because non-progressive
jpeg does not degrade gracefully and makes the video unwatchable even with
low packet loss such as 3-5%.
2016-04-04 17:40:11 +01:00
Sebastian Dröge
df247f091c rtpjitterbuffer: Add RFC7273 media clock handling
https://bugzilla.gnome.org/show_bug.cgi?id=762259
2016-04-03 11:24:34 +03:00
Philippe Normand
fd7964e746 qtdemux: PIFF box detection and parsing support
The PIFF data is stored in a custom UUID box which is parsed and the
crypto_info of the element is updated accordingly. This allows
downstream decryptors to process and decrypt the protected content.

https://bugzilla.gnome.org/show_bug.cgi?id=753614
2016-04-02 18:01:10 +01:00
Luis de Bethencourt
4b7e377d25 rtpvorbisdepay: remove dead code
payload_buffer hasn't been assigned a value before the jumps to
switch_failed or packet_short. So the value must be NULL. No need
to unmap and unref.

CID #1316476
2016-04-01 12:15:58 +01:00
Luis de Bethencourt
6a16be75bf rtph263pay: fix leak
Free memory of current macroblock once it isn't needed so it isn't leaked
by the call of the gst_rtp_h263_pay_B_mbfinder function.
if (!(mac = gst_rtp_h263_pay_B_mbfinder (context, gob, mac, mb))) {

CID 1212156
2016-03-31 15:25:17 +01:00
Jan Schmidt
41d2b6f19e splitmux: Handle a hang draining out at EOS
Make sure that all data is drained out when the reference pad
goes EOS. Fixes a problem where data that arrives on other
pads after the reference pad finishes can stall forever and
never pass EOS.

https://bugzilla.gnome.org/show_bug.cgi?id=763711
2016-04-01 00:48:05 +11:00
Xavier Claessens
fb835c100a splitmuxsink: Fix occasional deadlock when ending file with subtitle
Deadlock occurs when splitting files if one stream received no buffer during
the first GOP of the next file. That can happen in that scenario for example:
 1) The first GOP of video is collected, it has a duration of 10s.
    max_in_running_time is set to 10s.
 2) Other streams catchup and we receive the first subtitle buffer at ts=0 and
    has a duration of 1min.
 3) We receive the 2nd subtitle buffer with a ts=1min. in_running_time is set to
    1min. That buffer is blocked in handle_mq_input() because
    max_in_running_time is still 10s.
 4) Since all in_running_time are now > 10s, max_out_running_time is now set to
    10s. That first GOP gets recorded into the file. The muxer pop buffers out
    of the mq, when it tries to pop a 2nd subtitle buffer it blocks because the
    GstDataQueue is empty.
 5) A 2nd GOP of video is collected and has a duration of 10s as well.
    max_in_running_time is now 20s. Since subtitle's in_running_time is already
    1min, that GOP is already complete.
 6) But let's say we overran the max file size, we thus set state to
    SPLITMUX_STATE_ENDING_FILE now. As soon as a buffer with ts > 10s (end of
    previous GOP) arrives in handle_mq_output(), EOS event is sent downstream
    instead. But since the subtitle queue is empty, that's never going to
    happen. Pipeline is now deadlocked.

To fix this situation we have to:
 - Send a dummy event through the queue to wakeup output thread.
 - Update out_running_time to at least max_out_running_time so it sends EOS.
 - Respect time order, so we set out_running_tim=max_in_running_time because
   that's bigger than previous buffer and smaller than next.

https://bugzilla.gnome.org/show_bug.cgi?id=763711
2016-04-01 00:48:05 +11:00
Stian Selnes
4c0e509328 rtpsession: Add new signal 'on-app-rtcp'
Similar to the 'on-feedback-rtcp' signal, but emitted for RTCP APP
packets.

https://bugzilla.gnome.org/show_bug.cgi?id=762217
2016-03-30 15:42:01 +03:00
Minjae Kim
eb13a1d607 rtpmanager: Set to initial value for 'ntpns' in get_current_times()
Initialize "ntpns" variable to -1 as the OE compiler for some reason doesn't
realize that the variable is set in all code paths.

https://bugzilla.gnome.org/show_bug.cgi?id=764119
2016-03-29 10:21:07 +03:00
Sebastian Dröge
3549aa7924 rtpjpegpay: Allow different quantization tables for components 2 and 3
RFC 2435 mentions in section 4.1 that U/V use table number 1, but this seems
just like an example. Some encoders are not following that and there seems to
be no reason to reject their streams.

https://bugzilla.gnome.org/show_bug.cgi?id=761345
2016-03-25 12:52:56 +02:00
Thiago Santos
d738fa0787 splitmuxsink: only try to create internal sink if it doesn't exist
This allows splitmuxsink to be reused after being put to NULL.

Test included

https://bugzilla.gnome.org/show_bug.cgi?id=762893
2016-03-24 20:10:25 -03:00
Sebastian Dröge
239cf06d81 deinterleave: Return the current caps on the srcpads on caps queries
It's not like we could accept any other caps here. The caps are decided by the
upstream caps event.

Also keep the filter order intact when filtering the results against the
filter caps.

https://bugzilla.gnome.org/show_bug.cgi?id=763326
2016-03-24 14:47:40 +02:00
Jimmy Ohn
206e24855a qtdemux: Fix qtdemux memory leak in src_convert function
If we don't find the index of the sample correctly in src_convert function,
we have to unref about the qtdemux before returning value.
So, I have modify it about instead pass qtdemux as a parameter into
src_convert function.

https://bugzilla.gnome.org/show_bug.cgi?id=763973
2016-03-24 14:36:26 +02:00
Jimmy Ohn
c633f2aab7 qtdemux: Add check condition for fail case in get_duration function
Currently, get_duration function always return the TRUE even though
it can't be set duration correctly. So, we need to add the else condition
about the fail case. Also, we already set the GST_CLOCK_TIME_NONE
in this function. So I have modify it which is related code in some
function.

https://bugzilla.gnome.org/show_bug.cgi?id=763968
2016-03-24 14:35:47 +02:00
Jimmy Ohn
0ef9e6d139 qtdemux: Modify data type of duration in handle_src_query function
Data type of duration need to modify from guint64 to GstClockTime
for consistency in handle_src_query function.

https://bugzilla.gnome.org/show_bug.cgi?id=763965
2016-03-24 14:34:55 +02:00
Vivia Nikolaidou
dc2aafb3d4 deinterlace: Added "auto" fields mode
The "auto" fields mode will detect the upstream and downstream framerates and
will decide to deinterlace all or only top fields.

https://bugzilla.gnome.org/show_bug.cgi?id=763869
2016-03-24 14:34:11 +02:00
Havard Graff
bcbb8fc1da flvdemux: don't emit pad-added until caps are ready
In other words, gst_pad_get_current_caps should never return NULL
in a pad-added callback from the demuxer.

Added tests for the two special cases with AAC and H.264 where this
would happen every time.

https://bugzilla.gnome.org/show_bug.cgi?id=763780
2016-03-24 14:33:33 +02:00
Vineeth TM
1071309870 good: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763076
2016-03-24 14:32:20 +02:00
Jihae Yi
da5c8a954c rtspsrc: avoid potentially overflowing expression
https://bugzilla.gnome.org/show_bug.cgi?id=757569
2016-03-24 14:28:50 +02:00
Jimmy Ohn
84f436f122 qtdemux: Add the function to get channels and sample rate for AAC
Add aac_get_channels and sample_rate function to get these value for
AAC.

https://bugzilla.gnome.org/show_bug.cgi?id=749110
2016-03-24 14:28:09 +02:00
Sebastian Dröge
605175b8c4 deinterleave: Use GstIterator for iterating all pads instead of manually iterating them while holding the object lock all the time
Doing queries while holding the object lock is a bit dangerous, and in this
case causes deadlocks.

https://bugzilla.gnome.org/show_bug.cgi?id=763326
2016-03-17 21:12:29 +02:00
Vivia Nikolaidou
5d8e7598ac deinterlace: Fix typo to not change the input caps but our filtered caps
Changing the input caps and not using them anymore afterwards is useless, and
it breaks negotiation in pipelines like:

gst-launch-1.0 videotestsrc ! "video/x-raw,framerate=25/1,interlace-mode=interleaved" !
  deinterlace fields=all ! "video/x-raw,framerate=50/1,interlace-mode=progressive" !
  fakesink
2016-03-17 21:11:36 +02:00
Nirbheek Chauhan
78847d03cf rtpmanager: Some comment and documentation clarifications/fixes 2016-03-15 09:32:47 +00:00
Sebastian Dröge
66e9e4c202 Revert "flacparse: push tags in pre_push_frame"
This reverts commit 4065fcb80a.

flacparse should not push tags by itself, the base class is going to do that
while properly merging in upstream tags. It just didn't because of a bug in
the base class, which was hidden by this commit.

https://bugzilla.gnome.org/show_bug.cgi?id=763553
2016-03-13 10:33:13 +02:00
Nirbheek Chauhan
bbde949e8e win32: Don't use __attribute__ on MSVC
Use MSVC-equivalents for alignment and packing compiler directives when building
on MSVC
2016-03-10 10:01:19 +00:00
Nirbheek Chauhan
63803bfac0 win32: Don't try to include xmath.h on newer Visual Studio 2016-03-10 10:01:19 +00:00
Nirbheek Chauhan
5d93844676 gst Factor out endian-order RGB formats
MSVC seems to ignore preprocessor conditionals inside static pad
template macros.
2016-03-10 10:00:58 +00:00
Thiago Santos
d8fb7a9c96 qtdemux: reset pending segment if we are already pushing one
When upstream is running in bytes in push-mode, qtdemux will
convert seeks from time to bytes and send it upstream. Upstream
element will perform a byte seek and send a byte segment to qtdemux
that will convert it to time and push it downstream.

There is, however, the pending_segment variable that stores a new
segment event to be pushed before the next data. When handling seeks
as mentioned above this variable was being ignored and, if it contained
some segment event, it would override the one resulting from the seek.
This would restore a previous segment and would cause the seek segment
to be discarded downstream.

This patch fixes this issue by unrefing any pending segment as the
seek from upstream should contain the latest one that should be
used, as requested by the application.

https://bugzilla.gnome.org/show_bug.cgi?id=763165
2016-03-07 15:26:13 -03:00
Thiago Santos
b46af7fda7 qtdemux: run gst-indent
Otherwise commits will fail with our indent check hook
2016-03-07 15:26:13 -03:00
Sebastian Dröge
49be64e571 udpsrc: Fix multicast group joining with provided sockets on Windows
On Windows the socket will be bound to ANY instead of the multicast group,
as binding to a multicast group does not work. Which would mean that we
override src->addr to become ANY and won't automatically join a multicast
group anymore on Windows.

On Linux we would automatically join a multicast group, keep it consistent.

https://bugzilla.gnome.org/show_bug.cgi?id=763093
2016-03-04 15:31:51 +02:00
Sebastian Dröge
b6e10be278 Revert "rtpjitterbuffer: don't forget to unlock mutex in error code path in two cases"
This reverts commit a7fb7b5359.

The mutex is taken by the caller, we should keep it locked when returning so
the caller can unlock it again.
2016-03-02 13:13:24 +02:00
Luis de Bethencourt
4065fcb80a flacparse: push tags in pre_push_frame
Push a tag event before pre-roll if we have tags.

https://bugzilla.gnome.org/show_bug.cgi?id=762660
2016-03-01 19:23:02 +00:00
Tim-Philipp Müller
a7fb7b5359 rtpjitterbuffer: don't forget to unlock mutex in error code path in two cases 2016-03-01 14:14:36 +00:00
Luis de Bethencourt
5dcf1a4f69 matroska-demux: remove impossible condition
It is impossible for a guint to have a negative value, no need to check for
this. Introduced in commit 6861d11c49

CID 1354509
2016-02-29 10:11:38 +00:00
Petr Viktorin
d089cd5a12 alpha: Fix sample pipeline
Use the zorder pad property to make sure the semitransparent
video is on top of the background.

https://bugzilla.gnome.org/show_bug.cgi?id=762809
2016-02-28 11:52:14 -05:00
Tim-Philipp Müller
a4d64b5caa rgvolume: make tag list writable before modifying it
Making the event itself writable is not enough, it won't make
the actual taglist in the event writable as well. Instead, just
make a copy of the taglist and then create a new tag event from
that if required, replacing the old one. Before we would
inadvertently modify taglists upstream elements might still
be holding on to. Add unit test for this as well.

https://bugzilla.gnome.org/show_bug.cgi?id=762793
2016-02-28 14:44:39 +00:00
Sebastian Dröge
bf5a72a6dd rtspsrc: Properly error out if binding the UDP sockets fails
udpsrc is not returning us a socket in that case.
2016-02-28 13:01:34 +02:00
Sebastian Dröge
03d2ae154e goom: Use goom_set_resolution() instead of recreating the goom instance when the resolution changes
https://bugzilla.gnome.org/show_bug.cgi?id=762765
2016-02-27 20:33:32 +02:00
Sebastian Dröge
bd0d2a3d7d Revert "goom: Initialize the goom struct only once we know width/height and recreate it if those change"
This reverts commit cc6e102643.
2016-02-27 20:32:45 +02:00
Sebastian Dröge
cc6e102643 goom: Initialize the goom struct only once we know width/height and recreate it if those change
Fixes crash when the width and/or height is changing.

https://bugzilla.gnome.org/show_bug.cgi?id=762765
2016-02-27 20:31:15 +02:00
Tim-Philipp Müller
fb0bc126c9 rtp: opus: move Opus RTP payloader/depayloader from -bad to -good
https://bugzilla.gnome.org/show_bug.cgi?id=756282
2016-02-25 22:45:16 +00:00
Tim-Philipp Müller
3b970e9b5e Merge branch 'plugin-move-rtp-opus'
Move Opus RTP depayloader/payloader from -bad to -good.

https://bugzilla.gnome.org/show_bug.cgi?id=756282
2016-02-25 22:45:15 +00:00
Philippe Normand
9c47c0da59 qtdemux: cenc aux info parsing from mdat support in PULL mode
This is already supported for PUSH mode but was failing in PULL mode.
The aux info is sometimes stored in the mdat before the first sample,
so the loop task needs to pull data stored at that location and
perform the aux info cenc parsing.

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

https://bugzilla.gnome.org/show_bug.cgi?id=762516
2016-02-25 12:46:27 +02:00
Philippe Normand
67f3fc1748 qtdemux: prevent buffer flow if any stream failed to be exposed
In some cases the stream configuration can fail, for instance if the
stream is protected and no decryptor was found. For those situations
the demuxer shouldn't emit any data on the corresponding source pad of
the stream and bail out.

https://bugzilla.gnome.org/show_bug.cgi?id=762516
2016-02-25 12:46:27 +02:00
Philippe Normand
fb5d50cd07 qtdemux: don't push encrypted buffer without cenc metadata
When the cenc metadata is stored outside of the moof box and the
stream is exposed it is possible that the cenc metadata hasn't been
processed yet while the first buffer is being pushed. When this
happens the buffer can't possibly be decrypted downstream so don't
push it.

https://bugzilla.gnome.org/show_bug.cgi?id=762516
2016-02-25 12:46:27 +02:00
Philippe Normand
459ef195bb qtdemux: read saio aux_info_type as a FOURCC
https://bugzilla.gnome.org/show_bug.cgi?id=756897
2016-02-24 10:54:23 +02:00
Sebastian Dröge
49f4631909 gst: Handle gst_pad_get_current_caps() returning NULL gracefully 2016-02-23 18:27:47 +02:00
Dave Craig
9b2e1f9f36 rtph265depay: Don't assume that get_current_caps() returns non-NULL caps after has_current_caps()
Remove calls to gst_pad_has_current_caps() which then go on to call
gst_pad_get_current_caps() as the caps can go to NULL in between. Instead just
use gst_pad_get_current_caps() and check for NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=759539
2016-02-23 18:12:54 +02:00
Dave Craig
211c8492b3 gst: Don't assume that get_current_caps() returns non-NULL caps after has_current_caps()
Remove calls to gst_pad_has_current_caps() which then go on to call
gst_pad_get_current_caps() as the caps can go to NULL in between. Instead just
use gst_pad_get_current_caps() and check for NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=759539
2016-02-23 18:11:42 +02:00
Dave Craig
6cdbf40622 aacparse: Handle gst_pad_get_current_caps() returning NULL gracefully
This can happen when the pipeline is currently shutting down.

https://bugzilla.gnome.org/show_bug.cgi?id=759539
2016-02-23 18:11:42 +02:00
Linus Svensson
a5691af319 matroska-demux: Don't handle seek until ready
https://bugzilla.gnome.org/show_bug.cgi?id=762542
2016-02-23 17:54:43 +02:00
Linus Svensson
1a3986d016 matroska-demux: Unref seek event
https://bugzilla.gnome.org/show_bug.cgi?id=762542
2016-02-23 17:54:43 +02:00
Aurélien Zanelli
84e441d268 multifilesink: close file on write error with next-file mode is set to buffer
If we have an error during fwrite call, file stays open and thus next
incoming buffer will trigger an assert when trying to opening a new
file.
This happens if we do not restart element, file is closed at stop, and
if application handles the returned GST_FLOW_ERROR to keep bin alive.

https://bugzilla.gnome.org/show_bug.cgi?id=762434
2016-02-23 11:34:31 +02:00
Matej Knopp
8657987f8f matroskamux: don't output empty tags/tag elements
Such files will not play on Android, because of bug in libwebm matroska parsing, which is still present in 6.0.1

https://bugzilla.gnome.org/show_bug.cgi?id=762349
2016-02-23 11:00:05 +02:00
Vincent Penquerc'h
6861d11c49 matroska-demux: make up an OpusHead block if possible when missing
https://bugzilla.gnome.org/show_bug.cgi?id=761489
2016-02-23 10:47:43 +02:00
Vincent Penquerc'h
565607107f matroska-mux: make up an OpusHead block if possible when missing
This block is needed in the Matroska file, but data coming from
RTP may not have one.

https://bugzilla.gnome.org/show_bug.cgi?id=761489
2016-02-23 10:47:43 +02:00
Mark Nauwelaerts
afad769c78 matroskademux: make stream-id more readable and order-friendly
... as streams are so ordered by id by e.g. decodebin
(and as typically already honoured by other demuxers).
2016-02-22 16:06:11 +01:00
Mark Nauwelaerts
7456ee1e1b matroska: remove confusing duplicate track uid field 2016-02-22 16:05:41 +01:00
Luis de Bethencourt
93cd4be8d5 rtpvp9pay: add missing break
VP9_PAY_PICTURE_ID_7BITS and VP9_PAY_PICTURE_ID_15BITS are mutually
exclusive options of the picture-id-mode. We can break after the
first case.

1 or 2 bytes need to be added to the header length depending on the
PictureID size.
https://tools.ietf.org/html/draft-uberti-payload-vp9-00#section-4.2

CID 1353479
2016-02-22 14:06:02 +00:00
Vineeth TM
7150b89c59 avidemux: Fix buffer memory leak
buffer being mapped is not being unmapped in some cases

https://bugzilla.gnome.org/show_bug.cgi?id=762420
2016-02-22 10:14:44 +02:00
Stian Selnes
5a2cc41398 rtpmanager: Don't warn for duplicate/reordered packets
This is a normal scenario and should not be a warning.

https://bugzilla.gnome.org/show_bug.cgi?id=762208
2016-02-21 22:37:57 +00:00
Tim-Philipp Müller
13a9a7543d win32: remove outdated build cruft
This hasn't been touched for generations, doesn't work,
and is just causing confusion. We also don't want to
maintain these files manually.
2016-02-21 09:47:43 +00:00
Matej Knopp
f96c9eb6bc qtdemux: workaround for files with wrong color_table_id value
Instead of erroring out, just use the default color table.

https://bugzilla.gnome.org/show_bug.cgi?id=761637
2016-02-19 16:00:59 +00:00
Tim-Philipp Müller
df341f41dc flvmux, rtpvp9depay: fix indentation 2016-02-19 15:04:15 +00:00
Havard Graff
7787f439fc flvmux: plug leak(s) in error-scenario
https://bugzilla.gnome.org/show_bug.cgi?id=762210
2016-02-19 14:59:09 +00:00
Havard Graff
1e09e5bfe9 flvdemux: fix eos event leak
https://bugzilla.gnome.org/show_bug.cgi?id=762209
2016-02-19 14:54:04 +00:00
Philippe Normand
52b16768a2 qtdemux: plug leaks in cenc aux info parsing 2016-02-19 10:30:46 +02:00
Sebastian Dröge
a7c3f353bd matroskademux: Unmap wavpack header buffer after creating it
Otherwise it will be mapped writable all the time and we can't read from it
anywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=762239
2016-02-18 11:10:14 +02:00
Tim-Philipp Müller
d6685b247a rtp: sprinkle some G_GNUC_INTERNAL for internal utils functions 2016-02-17 15:07:37 +00:00
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
Luis de Bethencourt
693a924461 remove unused enum items PROP_LAST
This were probably added to the enums due to cargo cult programming and are
unused.
2016-02-16 00:24:40 +00:00
Luis de Bethencourt
51791d8fe2 rtp: donl_present variable unused
donl_present is not implemented, yet the value is set and checked a few times.
Cleaning this.

CID #1249687
2016-02-16 00:24:40 +00:00
Luis de Bethencourt
e3d8d8cedb rtp: value truncated too short creates dead code
type is truncated to 0-31 with "& 0x1f", but right after that it is checks if
the value is equivalent to GST_H265_NAL_VPS, GST_H265_NAL_SPS, and
GST_H265_NAL_PPS (which are 32, 33, and 34 respectively). Obviously, this will
never be True if the value is maximum 31 after the truncation.
The intention of the code was to truncate to 0-63.
2016-02-16 00:24:40 +00:00
Luis de Bethencourt
59fea44503 rtp: fix nal unit type check
After further investigation the previous commit is wrong. The code intended to
check if the type is 39 or the ranges 41-44 and 48-55. Just like gsth265parse.c
does. Type 40 would not be complete.
2016-02-16 00:24:40 +00:00
Luis de Bethencourt
d215b18a20 rtp: fix dead code and check for impossible values
nal_type is the index for a GstH265NalUnitType enum. There are two types of dead
code here:
First, after checking if nal_type is >= 39 there are two OR conditionals that
check if the value is in ranges higher than that number, so if nal_type >= 39
falls in the True branch those other conditions aren't checked and if it falls
in the False branch and they are checked, they will always also be False. They
are redundant.
Second, the enum has a range of 0 to 40. So the checks for ranges higher than 41
should never be True.
Removing this redundant checks.

CID 1249684
2016-02-16 00:24:40 +00:00
Thijs Vermeir
544c0d75ce rtp: add h265 RTP payloader + depayloader 2016-02-16 00:24:40 +00:00
Stefan Sauer
af29e77858 monoscope: rework the scaling code
The running average was wrong and the resulting scaling factor was only held in
place using the CLAMP. In addtion we are now convering quickly to volume
changes.

FInally now with this change, we can change the resolution defines and
everythign adjusts.
2016-02-12 21:01:03 +01:00
Stefan Sauer
5e68873d22 monoscope: use constants in the drawing code
Make all the drawing ops be based on the constants. This way we can change
the fixed size at least at compile time.
2016-02-12 21:01:03 +01:00
Stefan Sauer
292d44316e monoscope: replace hardcoded values by constants
This at least establishes the relationship.
2016-02-12 21:01:03 +01:00
Stefan Sauer
8d17911b33 monoscpe: make the convolver use dynamic memory
Replace all #defines with members and initialize the convolver with a parameter.
2016-02-12 21:01:03 +01:00
Stefan Sauer
3d23ceebae monoscope: update README
We can already create multiple instances.
2016-02-12 21:01:03 +01:00
Stefan Sauer
daea0540fd monoscope: code cleanup
Use constants more often. Cleanup comments and add more to explain how things
work.
2016-02-12 21:01:03 +01:00