Commit graph

9257 commits

Author SHA1 Message Date
George Kiagiadakis
ba606b96d3 rtprtxreceive: fix example pipelines and improve the documentation
https://bugzilla.gnome.org/show_bug.cgi?id=771383
2017-03-17 19:07:34 +02:00
Vincent Penquerc'h
f35238794c flacparse: fix playback if sample number does not start at 0
This reverts commit 29b807685d, while
fixing the original breaking tests/check/pipelines/flacdec.
2017-03-17 14:11:44 +00:00
Vincent Penquerc'h
29b807685d Revert "flacparse: fix playback if sample number does not start at 0"
This breaks gst-validate on the build server (though not locally),
and a unit test, and I can't run unit tests right now for some
unrelated reason.

This reverts commit 0747b56f8e.
2017-03-17 11:30:04 +00:00
George Kiagiadakis
0e65304d5c rtpsession: print the correct variable in debug statement
This debug statement is meant to print the time since the last (early)
RTCP transmission, not the last regular RTCP transmission (which also
happens to be set a few lines above to current_time, so the debug output
is just confusing)
2017-03-16 17:46:46 +02:00
George Kiagiadakis
1622d4c894 rtprtxsend: convert LOG message to TRACE
This is printed too often (for every chained buffer!) and just clutters the logs.
2017-03-16 17:46:46 +02:00
Miguel París Díaz
9ffef7ecd5 rtpsource: fix warning message
https://bugzilla.gnome.org/show_bug.cgi?id=780105
2017-03-16 16:33:02 +02:00
Vincent Penquerc'h
0747b56f8e flacparse: fix playback if sample number does not start at 0
https://bugzilla.gnome.org/show_bug.cgi?id=777738
2017-03-16 14:21:20 +00:00
Miguel París Díaz
54a2f33e47 rtpsource: get clock-rate from pt if needed to generate SR
https://bugzilla.gnome.org/show_bug.cgi?id=780105
2017-03-16 15:48:37 +02:00
Tim-Philipp Müller
c8f094cf7d rtph264depay: fix crash with empty sprops-parameters
https://bugzilla.gnome.org/show_bug.cgi?id=780040
2017-03-16 00:41:44 +00:00
Thiago Santos
b434ba86f1 atomsrecovery: also handle extra atoms after 'mdia' in a 'trak'
Take into account the atoms at the end of the 'trak' atom when
recovering it. So that its size (already computed and added in the trak
size) isn't making offsets wrong.

https://bugzilla.gnome.org/show_bug.cgi?id=771478
2017-03-14 20:27:48 -07:00
Thiago Santos
7e39dec391 qtmux: avoid fallthrough to moovrecovery failure section
Return before that to preserve our successfull results, otherwise no
moov recovery information would be written

https://bugzilla.gnome.org/show_bug.cgi?id=771478
2017-03-14 20:27:48 -07:00
Thiago Santos
4d9b17ad77 atomsrecovery: expect more atom types at the headers
Skip more atoms at the header until it finds the 'mdat' to continue the
moov recovery

https://bugzilla.gnome.org/show_bug.cgi?id=771478
2017-03-14 20:27:48 -07:00
Emeric Grange
534be3313c qtmux: add CineForm support
https://bugzilla.gnome.org/show_bug.cgi?id=780024
2017-03-14 18:03:34 +02:00
Sebastian Dröge
6cb8c802f4 qtmux: Only create new chunks if we have more than a single stream
There's no point in creating multiple chunks otherwise, it only wastes
some bytes for storing the chunk offsets.
2017-03-14 15:09:44 +02:00
Emeric Grange
7bdcd57980 qtdemux: add S16L support
https://bugzilla.gnome.org/show_bug.cgi?id=780022
2017-03-14 14:55:44 +02:00
Michael Dutka
cef5411193 rtph264depay, rtph265depay: remove stray g_debug()
https://bugzilla.gnome.org/show_bug.cgi?id=779858
2017-03-10 18:14:52 +00:00
Wim Taymans
16f3fd6782 qtmux: init fourcc
Initialize the fourcc to 0 so that we can detect failure later.
2017-03-10 11:24:14 +01:00
Sebastian Dröge
98583dc944 qtmux: Free EDTS instead of just clearing it and setting it to NULL 2017-03-08 16:01:02 +02:00
Sebastian Dröge
0e62a0603d qtmux: Fix some memory leaks related to timecode tracks 2017-03-08 15:27:32 +02:00
Jan Schmidt
7c0a9cb585 splitmuxsrc: Fix reverse playback
Fix the check for whether the start time of the segment has
been reached when playing in reverse. Otherwise, playback
stops after reaching the start of any file part, instead of
continuing until all parts within the segment have played
2017-03-04 00:35:32 +11:00
Jan Schmidt
c82ced1868 qtdemux: Don't lose crypto info on a new moof
We parse the next moof in advance of having pushed
all samples from the previous one in some cases, and
we'll still need the crypto info from the previous
fragment so keep around any unused crypto info entries
when adding new ones
2017-03-04 00:35:32 +11:00
Sebastian Dröge
7709920ca3 qtmux: Update modification times when sending the moov
https://bugzilla.gnome.org/show_bug.cgi?id=779422
2017-03-02 20:33:30 +02:00
Michael Smith
f7b1eae3a2 sbcparse: Fix up values for allocation enumeration.
https://bugzilla.gnome.org/show_bug.cgi?id=779389
2017-03-02 11:29:25 -05:00
George Kiagiadakis
71b63d54fe rtprtxreceive: fix potential leak of old, unassociated, association requests
https://bugzilla.gnome.org/show_bug.cgi?id=722560
2017-03-01 10:50:43 +02:00
Sebastian Dröge
8dee6f815f avidemux: Don't increment -1 / unset indices
CID 1398545
2017-02-28 15:47:23 +02:00
Sebastian Dröge
ce2070c092 qtdemux: Protect against NULL pointer dereference for streams without caps
CID 1363332
2017-02-28 15:20:31 +02:00
Sebastian Dröge
f2e17f5791 rtph263pay: Free mac on errors
CID 1212149
2017-02-28 12:57:02 +02:00
Sebastian Dröge
bc14107742 rtpvorbispay: Add missing break to for loop 2017-02-28 12:45:24 +02:00
Sebastian Dröge
4c30cbfe22 qtdemux: Fix compilation with gcc 7
qtdemux.c: In function ‘qtdemux_parse_samples’:
qtdemux.c:8450:39: error: ‘*’ in boolean context, suggest ‘&&’ instead [-Werror=int-in-bool-context]
         if (stream->samples_per_frame * stream->bytes_per_frame) {
             ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
2017-02-27 21:02:51 +02:00
Sebastian Dröge
323dc466d0 mpegaudioparse: Fix compilation with gcc 7
gstmpegaudioparse.c: In function ‘gst_mpeg_audio_parse_reset’:
gstmpegaudioparse.c:209:3: error: ‘memset’ used with length equal to number of elements without multiplication by element size [-Werror=memset-elt-size]
   memset (mp3parse->xing_seek_table_inverse, 0, 256);
   ^~~~~~
gstmpegaudioparse.c: In function ‘gst_mpeg_audio_parse_handle_first_frame’:
gstmpegaudioparse.c:951:7: error: ‘memset’ used with length equal to number of elements without multiplication by element size [-Werror=memset-elt-size]
       memset (mp3parse->xing_seek_table_inverse, 0, 256);
       ^~~~~~
2017-02-27 21:01:23 +02:00
Sebastian Dröge
e693d29728 rtpvorbispay: When getting new headers, replace the old version of them
This prevents storing an infinite amount of e.g. comment headers if they
come without a new initialization header in front of them. There can
only be one header of each type.
2017-02-27 19:32:40 +02:00
Sebastian Dröge
f44314c029 vorbispay: Only replace headers when receiving a new config header
If we also replace all headers when receiving any possibly following
comments header, we would throw away the config header before being able
to make use of it.
2017-02-27 19:24:07 +02:00
George Kiagiadakis
9b84513337 splitmuxpartreader: ignore sparse streams when calculating the end offset of a part
A sparse stream's ending timestamp can be considerably smaller
than the ending timestamps of the other streams, which can lead
to skipping considerable time from the next part.

https://bugzilla.gnome.org/show_bug.cgi?id=761086
2017-02-27 12:58:21 +02:00
George Kiagiadakis
99728792cd splitmuxpartreader: identify sparse streams 2017-02-27 12:58:21 +02:00
Edgard Lima
8635258046 Update Edgard Lima's email
https://bugzilla.gnome.org/show_bug.cgi?id=779230
2017-02-27 00:34:19 +00:00
Andrew
76792a5c20 rtpjitterbuffer: Don't always reset PTS to 0 after a gap
In function rtp_jitter_buffer_calculate_pts: If gap in incoming RTP
timestamps is more than (3 * jbuf->clock_rate) we call
rtp_jitter_buffer_reset_skew which resets pts to 0. So components down
the pipeline (playes, mixers) just skip frames/samples until pts becomes
equal to pts before gap.

In version 1.10.2 and before this checking was bypassed for packets with
"estimated dts", and gaps were handled correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=778341
2017-02-26 12:41:19 +02:00
Jochen Henneberg
29f9062016 rtpvorbispay: Update and send out headers when new headers are received
The payloader needs to reset and update the vorbis config data which is
pushed on the network if it receives new headers, or at least, it may
have to do so.

Without this, the stream configuration could change without the
payloader sending the new configuration to the other side.
2017-02-20 14:21:13 +02:00
Olivier Crête
d8868c6339 splitmuxsink: Change files on incompatible caps
https://bugzilla.gnome.org/show_bug.cgi?id=761761
2017-02-17 15:11:02 -05:00
Olivier Crête
f79a7afac2 splitmuxsink: Reset ready_for_output on state change
https://bugzilla.gnome.org/show_bug.cgi?id=761761
2017-02-17 15:11:02 -05:00
Olivier Crête
5059b9b8c9 splitmuxsink: Remove unused next_max_out_running_time
https://bugzilla.gnome.org/show_bug.cgi?id=761761
2017-02-17 15:11:02 -05:00
Olivier Crête
c98d932fb8 splitmuxsink: Remove unused muxed_out_time
https://bugzilla.gnome.org/show_bug.cgi?id=761761
2017-02-17 15:11:02 -05:00
Jan Schmidt
488e8edba4 Revert "qtdemux: Always snap to the start of the keyframe"
This reverts commit 107902ec51.

This commit intended to ensure that keyframe seeks land at the
start timestamp of a keyframe, rather than in the middle of one,
but they cause trouble on files with sparse streams, or with
JPEG 'cover art' tracks that have only one or a few JPEG samples
with very long durations.

That's still desirable for doing seamless cutting of videos,
but needs a rethink for implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=778690
2017-02-17 13:19:58 +11:00
Jan Schmidt
c32bf052a0 audiofx/echo: added surround-delay and surround-mask
Add a new boolean surround-delay property that makes
audioecho just apply a delay to certain channels to create
a surround effect, rather than an echo on all
channels. This is useful when upmixing from stereo - for example.

Add a surround-mask property to control which channels
are considered surround sound channels when adding a
delay with surround-delay = true

Original patch from Jochen Henneberg <jh@henneberg-systemdesign.com>
2017-02-17 01:29:08 +11:00
Sebastian Dröge
71c76e677a udpsrc: Use IP_MULTICAST_ALL for filtering IPv4 packets if available
This goes around the inefficient control message based filtering and
does all the filtering kernel-side. Unfortunately this is Linux-only and
there is no IPv6 variant of it (yet).
2017-02-15 00:14:32 +02:00
Søren Juul
1184429e21 icydemux: reset tags on empty value
Some radio streams uses StreamTitle='' to reset the title after a
track stopped playing, e.g. while the host talks between tracks or
during news segments.
This change forces an empty tag object to be distributed if
StreamTitle or StreamUrl is received with empty value, thus allowing
downstream elements to get notified about this.

https://bugzilla.gnome.org/show_bug.cgi?id=778437
2017-02-14 12:24:13 +02:00
Edward Hervey
49002fa8a7 rtspsrc: Properly notify missing elements
If the srtp elements are not present, post a message on the bus
informing about the missing plugins.
2017-02-13 11:17:25 +01:00
Sebastian Dröge
5c0303708d imagefreeze: Remove now unused done label 2017-02-09 14:18:30 +02:00
Nick Kallen
f9e4fae0b3 imagefreeze: do not cache caps
Upstream elements like videoflip can transform caps, such as changing width and height.
When an imagefreeze downstream receives an ACCEPT_CAPS query it will NOW return
all caps that it can accept.

https://bugzilla.gnome.org/show_bug.cgi?id=778389
2017-02-09 14:04:44 +02:00
Jan Schmidt
2987e66f22 qtmux: Add a comment about how atom_trak_set_elst_entry() works 2017-02-09 11:29:43 +11:00
Tim-Philipp Müller
c7aa449e58 qtdemux: demote some log messages to TRACE level
Don't spam debug log with uninteresting stuff.
2017-02-09 11:17:02 +11:00
Sebastian Dröge
1426a55a83 qtmux: Clear edit lists every time we recalculate them
We recalculate them, so any old information has to be forgotten.
Otherwise we write invalid edit lists when writing headers multiple
times.

https://bugzilla.gnome.org/show_bug.cgi?id=778330
2017-02-08 17:26:21 +02:00
Jan Schmidt
2849ec2963 splitmuxsrc: Allow for buffers before the segment when measuring
Used signed calculations when measuring the max_ts of an input
fragment, so as to calculate the correct duration and offset
when buffers have timestamps preceding their segment
2017-02-07 13:11:30 +11:00
Miguel París Díaz
3aa69ca0bb rtpsession: relate received FIRs and PLIs to source
This is needed in order to:
 - Avoid ignoring requests for different media sources.
 - Add SSRC field in the GstForceKeyUnit event.

https://bugzilla.gnome.org/show_bug.cgi?id=778013
2017-02-02 12:13:59 -05:00
Tim-Philipp Müller
19c9600ea6 qtdemux: sanity check number of segments in edit list
Fixes crash with fuzzed file.

https://bugzilla.gnome.org/show_bug.cgi?id=777940
2017-01-31 20:46:41 +00:00
Seungha Yang
7a6752a7e0 qtdemux: Skip seeking query if upstream format is time
Don't need to querying byte-format seeking for time-format
upstream case

https://bugzilla.gnome.org/show_bug.cgi?id=776715
2017-01-31 17:09:29 +01:00
Seungha Yang
d3f5aa2689 qtdemux: Use upstream's StreamFlags if there are
When multiple demuxer's are used, upstream might want to indicate
default streams using GST_STREAM_FLAG_{SELECT, UNSELECT}

https://bugzilla.gnome.org/show_bug.cgi?id=775440
2017-01-31 16:20:42 +01:00
Vivia Nikolaidou
af47e93b97 qtmux: Timecode track fixes for STSD entry
The n_frames field (frames per second) should follow the nominal frame
rate for drop-frame timecodes.

Also, the trak's timescale (and duration, accordingly) should follow the
STSD entry's timescale and frame duration (fps_n and fps_d accordingly),
not the other way around.

https://bugzilla.gnome.org/show_bug.cgi?id=777832
2017-01-27 16:41:34 +02:00
Matt Staples
a8eb0515f1 rtspsrc: find_stream_by_channel should ignore unconfigured streams
https://bugzilla.gnome.org/show_bug.cgi?id=777101
2017-01-26 15:31:47 +02:00
Brendan Shanks
a9056a8a7e qtmux: Fix debug typo and remove misleading warning
https://bugzilla.gnome.org/show_bug.cgi?id=777362
2017-01-26 15:05:24 +02:00
Rahul Bedarkar
f05c0c036e wavparse: check for not NULL before clearing adapter
In case wavparse receives a manually injected FLUSH_STOP event
while operating in pull mode we get criticals because we'd try
to clear a NULL adapter.

https://bugzilla.gnome.org/show_bug.cgi?id=777123
2017-01-25 09:59:50 +00:00
Sebastian Dröge
d1ce68e840 qtmux: Only write 4 byte zero padding to the Video Sample Description in MOV
For MP4 this is not defined, and it actually breaks things for MSE in
Chrome if we do this. For MOV this is required by some broken software
but the official specification says it's optional:
https://developer.apple.com/library/content/documentation/QuickTime/QTFF/QTFFChap3/qtff3.html

https://bugzilla.gnome.org/show_bug.cgi?id=777540
2017-01-24 17:59:59 +02:00
Santiago Carot-Nemesio
a1e4249131 rtpstats: Keep number of nacks sent/received per source
Currently, the nack packets sent or received are kept at session level,
which makes it impossible to distinguish how many of these packages were
sent/received per ssrc when several sources are in the same session. This
patch is aligned with the https://www.w3.org/TR/webrtc-stats/#dom-rtcrtpstreamstats

https://bugzilla.gnome.org/show_bug.cgi?id=776714
2017-01-24 12:38:50 +02:00
Jonas Holmberg
494246f75c rtph265pay: Fix handling of config-interval
Insert VPS/SPS/PPS before the first NAL unit containing an I-frame in an
access unit only. If an access unit consists of several such NAL units
(tiles) VPS/SPS/PPS should only be inserted before the first of them so
that parameters are only updated between frames.

Do not insert VPS/SPS/PPS before P-frames when config-interval is -1.

https://bugzilla.gnome.org/show_bug.cgi?id=775817
2017-01-23 12:59:15 +02:00
Sebastian Dröge
4f478357ae avidemux: Stop reading a ncdt sub-tag if it goes behind the surrounding tag
https://bugzilla.gnome.org/show_bug.cgi?id=777532
2017-01-20 17:16:10 +02:00
Sebastian Dröge
32d9f3c158 avidemux: Fix various out of bounds reads when parsing ncdt tags
https://bugzilla.gnome.org/show_bug.cgi?id=777500
2017-01-20 07:58:26 +02:00
Sebastian Dröge
1ffef8bf60 qtdemux: Increment current stts index whenever we finished one stts entry
Otherwise we could read more chunks than there are available, doing an
out of bounds read and potentially crash.

https://bugzilla.gnome.org/show_bug.cgi?id=777469
2017-01-19 13:46:58 +02:00
Sebastian Dröge
db1757503d Revert "qtdemux: Increment current stts index in all code paths after reading one chunk"
This reverts commit 99d5d7570d. It broke
playback of various valid files.
2017-01-19 13:25:53 +02:00
Sebastian Dröge
99d5d7570d qtdemux: Increment current stts index in all code paths after reading one chunk
Otherwise we could read more chunks than there are available, doing an
out of bounds read and potentially crash.

https://bugzilla.gnome.org/show_bug.cgi?id=777469
2017-01-19 12:25:41 +02:00
David Warman
642331fd7f qtdemux: avoid XMP tag parsing fatal error.
qtdemux_handle_xmp_taglist() requires a writable taglist,
but qtdemux->tag_list can become non-writable, specifically
after sending global tags (qtdemux.c:958), which adds a
second reference.  Ensure the list is made writable before
calling (make_writable will copy the list if necessary).

https://bugzilla.gnome.org/show_bug.cgi?id=766177
2017-01-17 23:26:02 -03:00
Thiago Santos
5bb7ca8a62 qtdemux: rework taglist handling
Keep taglist around during element existance to avoid having to
create it at different places before usage. Makes code simpler to handle.

https://bugzilla.gnome.org/show_bug.cgi?id=766177
2017-01-17 22:41:43 -03:00
Aurélien Zanelli
6769dce5c1 qtmux: add 4444 and 4444xq variants to video/x-prores pad template caps
They are handled since commit 7b565475bf
(qt: Add support for ProRes 4444 XQ).

https://bugzilla.gnome.org/show_bug.cgi?id=777377
2017-01-17 12:52:05 +02:00
Jan Schmidt
1e1d77a18d matroska: Quiet a WARN when parsing push mode
This warning was noisy when returning EOS, which is
just used to indicate more data is needed from upstream.
2017-01-17 11:50:27 +11:00
Georg Lippitsch
d71c06c8fe qtmux: Don't write Sync Sample Atom for ProRes
https://bugzilla.gnome.org/show_bug.cgi?id=777331
2017-01-16 19:29:08 +02:00
Tim-Philipp Müller
5404304fac qtdemux: boldly assume that first 'covr' image is the front cover 2017-01-14 15:16:53 +00:00
Tim-Philipp Müller
59fd44a56f qtdemux: extract cover art images into GST_TAG_IMAGE not PREVIEW_IMAGE
These are usually much bigger than icon size and required by
iTunes to be certain fairly large sizes. In qtmux it is also
the IMAGE tags which we write out as 'covr' atoms.
2017-01-14 15:13:39 +00:00
Vivia Nikolaidou
05db87de21 splitmuxsink: Add option for timecode-based split
If this option is given, it will calculate the next split point based on
timecode difference.

https://bugzilla.gnome.org/show_bug.cgi?id=774209
2017-01-13 10:37:32 +11:00
Jan Schmidt
b0e38ed374 qtmux: Don't reset request pad numbering across uses
When reset, don't restart request pad numberings, as
request pads can survive across state changes. Only
restart at 0 if all request pads are handed back first.

https://bugzilla.gnome.org/show_bug.cgi?id=777174
2017-01-13 10:37:21 +11:00
Mathieu Duponchelle
191330cba8 rtxqueue: Expose basic statistics as properties.
Statistics about the total number of retransmission requests
and the actual number of retransmitted packets can be helpful
at application-level.

https://bugzilla.gnome.org/show_bug.cgi?id=777182
2017-01-12 19:49:30 +01:00
Aurélien Zanelli
52d1355d87 qtmux: simplify video/x-h264 caps handling
'stream-format' and 'alignment' are defined in pad template caps so
there is no need to check them again here. Also remove bitrate parsing from
caps as bitrate in caps doesn't make sense but from tags, which is
actually the case.

https://bugzilla.gnome.org/show_bug.cgi?id=777181
2017-01-12 19:16:57 +02:00
Aurélien Zanelli
4c6a69fdff qtmux: add basic HEVC/H.265 muxing support
https://bugzilla.gnome.org/show_bug.cgi?id=736752
2017-01-12 19:16:23 +02:00
Georg Lippitsch
fcdba65302 qtmux: Calculate clean aperture size
Calculate clean aperture dimensions by first guessing
display aspect ratio based on pixel aspect ratio and
frame size.

https://bugzilla.gnome.org/show_bug.cgi?id=777100
2017-01-12 19:09:22 +02:00
Sebastian Dröge
e12c94065d qtmux: Write tapt atom for MOV files if PAR not 1/1
Needed for QuickTime 7 to properly play files.

Also write the clap atom for MOV files always, not only when ProRes is
used as a video codec. It's mandatory for MOV.

https://bugzilla.gnome.org/show_bug.cgi?id=777100
2017-01-12 19:09:22 +02:00
Andre McCurdy
29433495d6 qtdemux: free seqh after calling qtdemux_parse_svq3_stsd_data()
The seqh buffer allocated in qtdemux_parse_svq3_stsd_data() needs to
be freed by the caller after use.

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

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
2017-01-12 11:10:50 +02:00
Edward Hervey
4a279f4499 isomp4: Don't spam debug log with knonw/padding atoms
Only output WARNING messages for atoms we don't know how to handle
instead of for padding/known atoms we don't need to do any processing
on

https://bugzilla.gnome.org/show_bug.cgi?id=777095
2017-01-10 16:03:00 +01:00
Tim-Philipp Müller
d7b2820b73 Fix indentation 2017-01-09 19:05:10 +00:00
Matthew Waters
bbe88b190b autodetect: bring the element state down after success
Otherwise some messages that are emitted by the element on NULL->READY
will not reach the application.

https://bugzilla.gnome.org/show_bug.cgi?id=764947
2017-01-10 01:20:18 +11:00
Jan Schmidt
12ad37fdb3 qtmux: Write tfdt atom into fragmented files.
The DASH spec requires that tfdt atoms be present, so
write one out. ISO/IEC 23009-1:2014 6.3.4.2

https://bugzilla.gnome.org/show_bug.cgi?id=708221
2017-01-08 01:23:52 +11:00
Jan Schmidt
1fc3d42f8a qtdemux: Don't reset output timestamps when no tfdt
If a fragmented stream doesn't have a tfdt, don't
reset the output timestamps at each fragment boundary
by erroneously using the default value of 0. Introduced
by commit 69fc48

https://bugzilla.gnome.org/show_bug.cgi?id=754230
2017-01-07 23:57:35 +11:00
Thibault Saunier
9d1942f286 meson: Install presets files 2017-01-05 09:49:21 -03:00
Garima Gaur
a2d02300f8 avidemux: fix some caps leaks
https://bugzilla.gnome.org//show_bug.cgi?id=776789
2017-01-03 11:32:20 +00:00
Vivia Nikolaidou
394be2c318 splitmuxsink: Return a bin with a "location" property as a sink
Splitmuxsink might be called with a custom bin as a sink. If it has a
"location" property, it can be used.
2017-01-03 01:34:02 +11:00
Jan Schmidt
335c9f28d6 splitmux: Rewrite buffer collection and scheduling
Majorly change the way that splitmuxsink collects
incoming data and sends it to the output, so that it
makes all decisions about when / where to split files
on the input side.

Use separate queues for each stream, so they can be
grown individually and kept as small as possible.

This removes raciness I observed where sometimes
some data would end up put in a different output file
over multiple runs with the same input.

Also fixes hangs with input queues getting full
and causing muxing to stall out.
2017-01-03 01:34:02 +11:00
Jan Schmidt
f7009eb5d7 splitmuxsink: Add format-location-full signal
Add a new signal for formatting the filename, which receives
a GstSample containing the first buffer from the reference
stream that will be muxed into that file.

Useful for creating filenames that are based on the
running time or other attributes of the buffer.

To make it work, opening of files and setting filenames is
now deferred until there is some data to write to it,
which also requires some changes to how async state changes
and gap events are handled.
2017-01-03 01:34:02 +11:00
Jan Schmidt
107902ec51 qtdemux: Always snap to the start of the keyframe
When performing a key-unit seek, always snap to the start ts
of the keyframe buffer we landed on so that the keyframe is
entirely within the resulting outgoing segment. That seems
the most sensible result, since the user requested snapping
to the keyframe position.
2017-01-03 01:34:02 +11:00
Jan Schmidt
f415730fdf qtdemux: Omit cslg_shift when snapping seeks
Segments times and seek requests are stored and handled
in raw 'PTS' time, without the cslg_shift - which only applies
to outgoing samples. Omit the cslg_shift portion when
extracting PTS to compare for internal seek snaps.

If the cslg_shift is included, then keyframe+snap-before seeks
generate a segment start/stop time that already includes the
cslg_shift, and it's then added a 2nd time, causing the
first buffer(s) to have timestamps that are out of segment.
2017-01-03 01:34:02 +11:00
Jan Schmidt
db0eddb10f qtmux: Remove bogus check in atom_stsc_add_new_entry()
Remove an old check from atom_stsc_add_new_entry() that
extends the last entry in the STSC if the samples per chunk
matches, as the new interleave merging logic requires that
the final entry by updateable. There's already code
below which simply merges the final entry into the previous
one when needed, so rely on that instead.

Fixes asserts like:

ERROR:atoms.c:2940:atom_stsc_update_entry: assertion failed:
(atom_array_index (&stsc->entries, len - 1).first_chunk == first_chunk)
2017-01-03 01:34:02 +11:00
Seungha Yang
65c5d6d080 qtdemux: Fix key_time in gst_qtdemux_adjust_seek()
time in segment should be PTS based (not DTS).

https://bugzilla.gnome.org/show_bug.cgi?id=765498
2017-01-03 01:34:02 +11:00
Jan Schmidt
389dd4e3d0 splitmuxsrc: Pass seek flags when activating.
Pass all seek flags when activating a part
based on a seek, so that SNAP flags are preserved.
2017-01-03 01:34:02 +11:00
Jan Schmidt
6a16f8ef2e splitmux: Fix a small race in the splitmuxsrc
Make sure the state of the parser is set to
collecting streams before chaining up to the
parent change_state() method, to close a
small window that can cause playback to
never commence.
2017-01-03 01:34:02 +11:00
Tim-Philipp Müller
eb5ee5b7a3 multifilesink: refactor max_files handling a bit
Use GQueue instead of a GSList so we don't have to traverse
the whole list to append something every time. And it also
keeps track of the number of items in it for us.

Add a function to add filenames to the list of old files and
use it in more places, so that memory doesn't build up in
other modes either if no max_files limit is specified.

https://bugzilla.gnome.org/show_bug.cgi?id=766991
2016-12-31 09:58:40 +00:00
Ursula Maplehurst
a10c1cc060 multifilesink: don't leak memory when no max-files limit is set
Technically we weren't leaking the memory, just storing it internally
and never using it until the element is freed. But we'd still use more
and more memory over time, so this is not good over longer periods
of time. Only keep track of files if there's actually a limit set,
so that we will prune the list from time to time.

https://bugzilla.gnome.org/show_bug.cgi?id=766991
2016-12-31 09:58:28 +00:00
Mark Nauwelaerts
e6a251e9c0 matroskademux: adjust segment stop for KEY_UNIT negative rate seeking 2016-12-29 12:48:56 +01:00
Mark Nauwelaerts
867ce71922 qtdemux: implement pull mode SNAP flag seeking 2016-12-29 12:48:56 +01:00
Mark Nauwelaerts
494f4beb40 avidemux: tweak KEY_UNIT SNAP seek handling
Previously, seeking to position y where y is (strictly) within a keyframe
would seek to that keyframe both with SNAP_BEFORE and SNAP_AFTER,
where the latter is now adjusted to really snap to the next keyframe.
2016-12-29 12:48:50 +01:00
Mark Nauwelaerts
3362dceb25 avidemux: correctly perform pull mode KEY_UNIT seeking
Rather amazingly (and equally unnoticed), keyunit seeking resulted in segments
where start != time (which is bogus for simple avi timeline).  So, properly
adjust the segment (start) rather than fiddling with segment time (only).
2016-12-28 13:59:30 +01:00
Mark Nauwelaerts
002cfd00b7 avidemux: restore considering of pull mode KEY_UNIT seeking
... by using the original seek event's flags rather than the corresponding
segment flags, which do not have such counterpart flags (and
do no longer have them covertly sneaking in nowadays).
2016-12-28 13:59:07 +01:00
Nicola Murino
c950672809 matroskamux: only drop actual streamheader buffers with xiph codecs
With Xiph codecs the stream header buffers are both in the caps and are
usually also at the beginning of each input stream, but it's perfectly
possible that the input stream does not have the stream header buffers
inline in the data. Matroskamux would drop the first N buffers assuming
they're stream headers, but this meant it would drop actual payload data
when the stream didn't contain the stream headers inline. Fix this by
only dropping leading buffers if they're flagged as stream headers. This
fixes issues with streams that are being tapped into after streaming
has started.

https://bugzilla.gnome.org/show_bug.cgi?id=749098
2016-12-21 17:02:57 +00:00
Nicola Murino
38265ee1a5 matroskamux: mark all packets of audio-only streams as keyframes
This helps with streaming audio-only streams via multifdsink,
tcpserversink and such.

https://bugzilla.gnome.org/show_bug.cgi?id=754696
2016-12-20 23:35:00 +00:00
Nicola Murino
92626d4085 matroskamux: add G722 audio support
https://bugzilla.gnome.org/show_bug.cgi?id=746574
2016-12-20 12:49:04 +02:00
Wonchul Lee
c7e23476c4 updsrc: Add to join multiple multicast interfaces
https://bugzilla.gnome.org/show_bug.cgi?id=776030
2016-12-19 10:50:14 +02:00
Tim-Philipp Müller
8ad0baccc2 rtpklvdepay: add the SPARSE flag to the outgoing stream-start event 2016-12-18 12:00:38 +00:00
Reynaldo H. Verdejo Pinochet
264be35e3c rtpmanager: place content before Since-version API marker
Avoids confusing the parser
2016-12-14 14:38:38 -08:00
Sebastian Dröge
76c007dd25 qtdemux: Check if we have enough data available when parsing edit lists
Also consume the data entry by entry to get complicated indexing out of
the code.

https://bugzilla.gnome.org/show_bug.cgi?id=776107
2016-12-14 21:48:24 +02:00
Sebastian Dröge
35748dc8f2 qtdemux: Check that the XiTh size is big enough
https://bugzilla.gnome.org/show_bug.cgi?id=775794
2016-12-14 10:17:41 +02:00
Heekyoung Seo
f7c033f4ec qtdemux: Check node length of video sample description
Add check for node length of video sample description and its fields and
for the XiTh atom.

Also unify the code a bit.

https://bugzilla.gnome.org/show_bug.cgi?id=775794
2016-12-14 10:17:41 +02:00
Heekyoung Seo
a5bfaf8a79 qtdemux: Enable xvid/mp2 codec support
Add support for xvid video and mp2 audio, add m2v1 fourcc.

https://bugzilla.gnome.org/show_bug.cgi?id=775794
2016-12-14 10:17:23 +02:00
Sebastian Dröge
63938ef730 gst: Don't declare variables inside the for loop header
This is a C99 feature.
2016-12-13 22:32:46 +02:00
Sebastian Dröge
fe2ae2c0f7 scaletempo: Ensure to reinit buffers whenever they were not allocated yet
That is, whenever we go through start/stop we have to ensure that on the
next opportunity the buffers are reallocated again. Otherwise the
buffers might be NULL because the element was reused with the same
configuration as before (i.e. set_caps() wouldn't have reinited the
buffers).

https://bugzilla.gnome.org/show_bug.cgi?id=775898
2016-12-11 13:27:27 +02:00
Sebastian Dröge
524e43e118 flxdec: Only send SEGMENT events after CAPS
I.e., don't just forward the event but delay it if we don't have caps on
the srcpad yet.
2016-12-09 17:55:39 +02:00
Sebastian Dröge
a08e72547d flxdec: Unref and unmap buffers in all code paths as needed
https://bugzilla.gnome.org/show_bug.cgi?id=775888
2016-12-09 17:49:40 +02:00
Garima Gaur
c3cdae4d6e monoscope: Unref allocation query after finished with it
https://bugzilla.gnome.org/show_bug.cgi?id=775752
2016-12-07 14:20:34 +02:00
Sebastian Dröge
96aaf889af flxdec: Allocate 0-initialized memory for the decoded frame
Otherwise we might leak arbitrary information from the uninitialized
memory if not every pixel is written.

https://scarybeastsecurity.blogspot.gr/2016/12/1days-0days-pocs-more-gstreamer-flic.html
2016-12-06 07:48:47 +02:00
Matt Staples
bc2adef550 rtspsrc: Fix session cleanup when handling redirect on PLAY
Redirect on PLAY wasn't doing the necessary session cleanup. Fixed by
removing code from gst_rtspsrc_send that changed the state varable upon
encountering a redirect. Better to let the redirect handlers in
gst_rtspsrc_retrieve_sdp and gst_rtspsrc_play do their own
state-dependent cleanup.

https://bugzilla.gnome.org/show_bug.cgi?id=775543
2016-12-05 18:23:31 +02:00
Aleix Conchillo Flaque
bc9f06f37b rtspsrc: always send teardown request
Allow CMD_CLOSE to cancel all commands not only CMD_PAUSE
and ignore CMD_WAIT while closing.

https://bugzilla.gnome.org/show_bug.cgi?id=748360
2016-12-05 11:32:43 +02:00
Edward Hervey
e5158ca496 jitterbuffer: Don't leak duplicate items
When providing items with a seqnum, there is a (very small) probability
that an element with the same seqnum already exists. Don't forget
to free that item if it wasn't inserted.

And avoid returning undefined values when dealing with duplicate items
2016-12-02 09:01:57 +01:00
Edward Hervey
50bb6630f5 qtdemux: Sanitize unknown codec caps
We might have non-printable characters in the unknown fourcc, replace
them with '_', in the same way we do it for unknown tags.
2016-12-02 08:52:06 +01:00
Sebastian Dröge
9a4b1e9cdc avidemux: Free vprp chunk also if it existed but we made no use of it
https://bugzilla.gnome.org/show_bug.cgi?id=775479
2016-12-01 20:04:28 +02:00
Sebastian Dröge
7d6cf17498 matroskademux: Fix memory leak when parsing attachments
gst_tag_image_data_to_image_sample() does not take ownership of the
passed memory, so don't set it to NULL to allow us to free it later.

https://bugzilla.gnome.org/show_bug.cgi?id=775472
2016-12-01 17:38:33 +02:00
Sebastian Dröge
d3bc50bc8f matroskademux: Unify zlib/bzip2 decompress loops with the ones from qtdemux
Especially, simplify the code a bit.
2016-12-01 14:56:18 +02:00
Sebastian Dröge
6939399e96 qtdemux: Increase inflate buffer in bigger steps
1024 bytes is quite small, let's do 4096 bytes (or one page).
Also remove redundant if, we're always in that case when getting here.
2016-12-01 14:44:26 +02:00
Sebastian Dröge
b79655d3c9 qtdemux: Ensure that size of the pasp atom is as much as we need
https://bugzilla.gnome.org/show_bug.cgi?id=775455
2016-12-01 14:30:49 +02:00
Sebastian Dröge
d46cc8df6c qtdemux: Free compressed moov node and it's corresponding decompressed data
https://bugzilla.gnome.org/show_bug.cgi?id=775455
2016-12-01 14:30:10 +02:00
Sebastian Dröge
b4d6b2af8e qtdemux: Check size of compressed MOOV header against available data
And actually read the size of the cmvd atom from the right position.

https://bugzilla.gnome.org/show_bug.cgi?id=775455
2016-12-01 14:29:21 +02:00
Sebastian Dröge
5e4883094b qtdemux: Fix zlib inflate loop
Handle errors cleanly, deallocate all memory and return the actual size
of the inflated data.

https://bugzilla.gnome.org/show_bug.cgi?id=775455
2016-12-01 14:27:55 +02:00
Sebastian Dröge
87a2c140ca aacparse: Make sure we have enough data in the codec_data to be able to parse it
Also error out cleanly if mapping the buffer failed.

https://bugzilla.gnome.org/show_bug.cgi?id=775450
2016-12-01 13:38:52 +02:00
Sebastian Dröge
d0949baf3d qtdemux: Fix out of bounds read in tag parsing code
We can't simply assume that the length of the tag value as given
inside the stream is correct but should also check against the amount of
data we have actually available.

https://bugzilla.gnome.org/show_bug.cgi?id=775451
2016-12-01 13:32:22 +02:00
Garima Gaur
50e7096a86 rtp: Fix some memory leaks in usage of gst_pad_get_current_caps()
https://bugzilla.gnome.org/show_bug.cgi?id=775071
2016-12-01 13:04:03 +02:00
Vivia Nikolaidou
f8bf3a84ef qtdemux: Read interlacing information from 'fiel' atom
Read interlacing and TFF/BFF information from the 'fiel' atom and pass it
into the caps

https://bugzilla.gnome.org/show_bug.cgi?id=775414
2016-11-30 18:52:20 +02:00
Sebastian Dröge
499c5139bd qtdemux: Fix compiler warning
qtdemux.c: In function ‘qtdemux_parse_trak’:
qtdemux.c:10184:38: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 9 has type ‘gint {aka const int}’ [-Werror=format=]
           GST_DEBUG_OBJECT (qtdemux, "Found jpeg: len %u, need %lu", len,
                                      ^
2016-11-29 13:55:40 +02:00
Scott D Phillips
4ec5daba5f qtdemux: Change off_t type to gint
off_t is a signed integer type provided by sys/types.h on posix systems.
Replace with gint for building on non-posix systems (like windows).

https://bugzilla.gnome.org/show_bug.cgi?id=775287
2016-11-29 13:12:24 +02:00
Sebastian Dröge
ef42288f3f avidemux: Ensure that tags are valid UTF-8 before adding them to the taglist
https://bugzilla.gnome.org/show_bug.cgi?id=775219
2016-11-28 13:51:41 +02:00
Sebastian Dröge
f48fef2f77 multipartdemux: Post an error message on the bus if we got EOS without having added any pads 2016-11-28 12:22:49 +02:00
Sebastian Dröge
d0f608f60b vrawpay: Error out cleanly if mapping the video frame fails
Instead of later dereferencing NULL and crashing.
2016-11-28 09:30:25 +02:00
Edward Hervey
91f5b4eaa2 rtprtxsend: Update statistics before pushing
If an element queries the number of retransmission buffers pushed
*while* the push is still taking place (and before the object lock
is taken just after) it would end up with the wrong statistic
being reported.

Increment it just before the push, avoids races when getting statistics

https://bugzilla.gnome.org/show_bug.cgi?id=768723
2016-11-27 11:15:49 +01:00
Sebastian Dröge
34db78b645 rtpbin: Handle create_session() returning NULL in bundle code
CID 1394492.
2016-11-23 18:34:04 +02:00
Sebastian Dröge
01682ae95b qtmux: Make sure to only change DTS of writable buffers
And trivial cleanup

https://bugzilla.gnome.org/show_bug.cgi?id=774840
2016-11-23 18:17:06 +02:00
Sebastian Dröge
01e45b25b7 qtmux: Error out much earlier if we don't have a valid PTS
https://bugzilla.gnome.org/show_bug.cgi?id=774840
2016-11-23 18:17:06 +02:00
Sebastian Dröge
6fb5f85354 qtmux: Only use buffer durations if they are actually valid
https://bugzilla.gnome.org/show_bug.cgi?id=774840
2016-11-23 18:17:06 +02:00
Sebastian Dröge
351f2fca0a qtmux: Revert commits that set DTS and duration on buffers unconditionally
39f7e52266 was setting the buffer duration
to 0 if is not valid, under the assumption that this is "the last"
buffer and no others are coming next. This is wrong, last_buf is the
previous buffer and not the very last one.

4e3c13c87c was setting DTS to 0 if there
was none. This will set DTS to 0 for all e.g. audio streams, completely
messing up calculations if streams don't start at 0.

https://bugzilla.gnome.org/show_bug.cgi?id=774840
2016-11-23 18:17:06 +02:00
Sebastian Dröge
9acc0b5d0e qtmux: Only write "gap" edit list if there is a non-zero gap
https://bugzilla.gnome.org/show_bug.cgi?id=774840
2016-11-23 18:17:06 +02:00