Commit graph

9023 commits

Author SHA1 Message Date
Stian Selnes
898d240faa rtph263pay: change log level on bitstream parsing messages 2016-08-25 18:28:44 -04:00
Jonas Holmberg
e43dcd9996 rtph265pay: Set RTP marker bit
Set the RTP marker bit on the last RTP packet of an H.265 access unit.

https://bugzilla.gnome.org/show_bug.cgi?id=770394
2016-08-25 17:22:58 +03:00
Xabier Rodriguez Calvar
569820598f videoflip: added GstVideoDirection interface
It implements now this interface with its video-direction
property. Values are changed to GstVideoOrientationMethod but they have
the same value than the originals.

https://bugzilla.gnome.org/show_bug.cgi?id=768687
2016-08-25 10:16:00 +03:00
Havard Graff
1ef896b29d gstrtpsession: refactor duplicate code into a function
Less code, easier to read, more consistent.

https://bugzilla.gnome.org/show_bug.cgi?id=770293
2016-08-23 15:09:03 -04:00
Vincent Penquerc'h
0fb0c0c8e6 rtpbin: fix typo in max-misorder-time property name 2016-08-23 17:19:17 +01:00
Tim-Philipp Müller
78bb4cc7e2 splitmuxsink: fix printf format compiler warning in debug message
On 32-bit x86: gstsplitmuxsink.c:966:31: warning: format ‘%u’ expects
argument of type ‘unsigned int’, but argument 9 has type
‘guint64 {aka long long unsigned int}’
2016-08-22 00:07:51 +01:00
Nirbheek Chauhan
b09f478e80 Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
2016-08-20 11:21:12 +01:00
Jie Jiang
655856deee Fixed splitmuxsink 32-bit overflow bug
Extend the byte tracking counters to 64-bit on
all platforms, instead of using gsize, which overflows
after 4GB.

https://bugzilla.gnome.org/show_bug.cgi?id=770019
2016-08-20 19:53:11 +10:00
Vivia Nikolaidou
64fd099a3a isomp4: Fix coverity warning
If atom_copy_data fails to write anything, return 0

CID #1371458
2016-08-19 17:53:25 +03:00
Tim-Philipp Müller
0f41d0e75d Revert "flacparse: Add maximum bitrate tag"
This reverts commit c703ab69f5.

https://bugzilla.gnome.org/show_bug.cgi?id=769392
2016-08-18 12:02:01 +01:00
Vivia Nikolaidou
b9a8188704 splitmuxsink: Add option to split at exactly max-size-time
Will try to request a keyframe from the encoder to be sent at the target
running time.

https://bugzilla.gnome.org/show_bug.cgi?id=769664
2016-08-17 17:42:55 +10:00
Vivia Nikolaidou
369d37d227 splitmuxsink: Allow time and bytes to reach their respective thresholds
https://bugzilla.gnome.org/show_bug.cgi?id=769664
2016-08-17 17:42:55 +10:00
Sebastian Dröge
0b0a042781 rtspsrc: Allow mimetypes with properties as long as they're application/sdp
Some servers add properties like charset, e.g.
  application/sdp; charset=utf8

Ideally we should also parse the charset and do conversion of all messages,
but that's for a later time.
2016-08-17 09:49:04 +03:00
Vivia Nikolaidou
cdb7649909 qtmux: Added support for writing timecode track
https://bugzilla.gnome.org/show_bug.cgi?id=767950
2016-08-17 09:03:52 +03:00
Thomas Bluemel
578e93cd0b multiudpsink: Initialize bytes_sent field.
This fixes endpoints not receiving any data intermittently.

https://bugzilla.gnome.org/show_bug.cgi?id=769773
2016-08-12 09:21:20 +02:00
Thomas Bluemel
4dff74358e rtpjitterbuffer: Actually calculate the packet rate for max-dropout and max-misorder calculations.
https://bugzilla.gnome.org/show_bug.cgi?id=751311
2016-08-10 19:49:27 +02:00
Thomas Bluemel
e7d4ad7ac7 rtpjitterbuffer: Don't warn for duplicate packets
This is a normal scenario and should not be a warning.  This can
happen frequently when re-transmits of lost packets are enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=762208
2016-08-10 19:39:42 +02:00
Jan Schmidt
75b601bbd4 splitmux: Fix typo converting to running time.
Use the correct collected timestamp.
2016-08-08 13:49:19 +10:00
Jan Schmidt
5a71334fb0 Revert "splitmuxsink: Use GstBin async-handling instead of our own."
This reverts commit fa008f271a.

async-handling in GstBin causes the pipeline to spin at 100%
CPU as the top-level pipeline tries to change that state
to PLAYING constantly. This is a workaround for a core
problem, essentially, but an improvement in this case for now.
2016-08-08 03:07:34 +10:00
Jan Schmidt
89af379ff0 splitmux: Recheck state after unlocking mutex.
After dropping the splitmux lock, re-check the state,
don't just fall through and sleep unconditionally,
as we may have already missed the wakeup.

https://bugzilla.gnome.org/show_bug.cgi?id=769514
2016-08-08 00:56:38 +10:00
Jan Schmidt
69df65fabe splitmuxsrc: Don't stop and error on EOS flow return
Don't immediately halt on EOS flow return from downstream
due to out of segment. Let the demuxer handle it and send
EOS.
2016-08-06 01:41:06 +10:00
Thiago Santos
7f0381fdd9 rtpjitterbuffer: avoid unref of null buffer
The current 'l' pointer will be NULL when the loop
is interrupted with a 'break' statement. Need to have
it advance to the next list item before interrupting.
2016-08-04 00:36:28 -03:00
Carlos Rafael Giani
91e302e00d wavparse: Add tags for container format and bitrate for uncompressed PCM
The PCM bitrate is added to help downstream elements (like uridecodebin)
figure out a proper network buffer size

https://bugzilla.gnome.org/show_bug.cgi?id=769390
2016-08-02 15:22:25 +03:00
Carlos Rafael Giani
c703ab69f5 flacparse: Add maximum bitrate tag
https://bugzilla.gnome.org/show_bug.cgi?id=769392
2016-08-02 14:34:54 +03:00
Sebastian Dröge
45db90fdb0 qtdemux: When receiving a DISCONT buffer that does not point to a sample, remember the offset
And don't just reset everything. This makes sure that we can continue to
handle data in the following scenario:

moov: discont
moof: discont
mdat: continuous

Previously this would fail because the offset would be the accumulated offset
from moov and moof at the mdat position, while the buffer offset might be
something completely different.
2016-07-28 17:58:16 +03:00
Sebastian Dröge
3010d1ec2d rtp: Filter with the filter caps in the payloader's getcaps 2016-07-25 13:35:18 +03:00
Jan Schmidt
8b4ceb2ef3 splitmuxsink: Fix debug statement signedness.
The ts variable is a GstClockTime, don't print it
as a GstClockTimeDiff.
2016-07-25 18:20:03 +10:00
Jan Schmidt
6755691b28 splitmuxsink: Handle negative running time
Use signed clock times for running time everywhere
so that we handle negative running times without
going haywire, similar to what queue and multiqueue
do these days.
2016-07-20 00:39:38 +10:00
Jan Schmidt
e2505dd7df splitmuxsink: Drop lock when sending dummy event
When pushing the dummy event into the multiqueue,
drop the splitmux lock or else we might deadlock.
2016-07-20 00:32:30 +10:00
Jan Schmidt
a1838927f7 rtph264pay: Intersect with filter caps in getcaps function.
Always intersect with the filter caps in the getcaps function
to make sure we return a subset of what was requested.

Other payloaders also have this problem and need fixing
in future commits.
2016-07-20 00:31:59 +10:00
Jonas Holmberg
833c530553 rtph265pay: Accept array_completeness=1
When parsing NAL unit type in codec_data, check the 6bits of
NAL_unit_type only and do not require the array_completeness bit to be
0, since the default and mandatory value of array_completeness is 1 for
hvc1.

https://bugzilla.gnome.org/show_bug.cgi?id=768653
2016-07-11 11:49:41 +03:00
Sebastian Dröge
ccdd76fd18 udpsrc: Use correct in6_pktinfo struct instead of in_pktinfo
Fixes the build on FreeBSD, which does not have the latter.

https://bugzilla.gnome.org/show_bug.cgi?id=768623
2016-07-10 21:30:58 +03:00
Mats Lindestam
6fe88d8a76 multipartmux: Use PTS and DTS instead of timestamp
And pass-through both of them.

Based on a patch by Göran Jönsson <goranjn@axis.com>

https://bugzilla.gnome.org/show_bug.cgi?id=767900
2016-07-08 16:58:26 +03:00
Edward Hervey
85b0c3a83d qtdemux: Let upstream events go through upstream
There's no real reason to avoid sending QOS/NAVIGATION events upstrea.
Some elements might want to have that information.
2016-07-08 15:00:28 +02:00
Edward Hervey
781d3f0208 avidemux: Let upstream events go through upstream
There's no real reason to avoid sending QOS/NAVIGATION events upstrea.
Some elements might want to have that information.
2016-07-08 15:00:28 +02:00
Sebastian Dröge
f0ba7a5ca4 matroskamux: Remove suspicious checks for pads being active and linked
We should add all pads, no matter if they are linked or active or not at this
point. Skipping some that are not will cause different behaviour than with
other muxers.
2016-07-07 18:26:48 +03:00
Sebastian Dröge
dbb8ec4639 matroskamux: Error out if we start writing data with some pads not having a codec id yet
This can only happen if a) upstream somehow gets around the CAPS event failing
or b) there never being any CAPS event.

The following code assumes that all pads have a codec-id.

https://bugzilla.gnome.org/show_bug.cgi?id=768509
2016-07-07 18:26:48 +03:00
Sebastian Dröge
cc636760b6 matroskamux: Consistently use gst_matroska_mux_set_codec_id() for setting the codec id 2016-07-07 18:26:48 +03:00
Jonas Holmberg
a06152c40a rtph265pay/depay: Sync against RFC 7798
Handle sprop-vps, sprop-sps and sprop-pps in caps instead of
sprop-parameter-sets.

rtph265pay works with byte-stream and hvc1 formats but not hev1 yet. It
handles profile-id, tier-flag and level-id in caps query.

https://bugzilla.gnome.org/show_bug.cgi?id=753760
2016-07-07 14:59:50 +03:00
Jan Alexander Steffens (heftig)
b3cfbe575c flvdemux: Push nominal bitrate tags
Add per-stream tag lists, which are used to send nominal
bitrate tags. When remuxing FLV => FLV, this now passes
through the upstream bitrate.

https://bugzilla.gnome.org/show_bug.cgi?id=768440
2016-07-07 10:21:21 +03:00
Jan Alexander Steffens (heftig)
ee44e60f7b flvdemux: Refactor metadata tag handling
The FLV header cannot be trusted to indicate video or
audio presence, as the comments already mention. Don't
delay pushing tags waiting for streams that might never
appear.

Tags are now pushed immediately after they change:
  - After parsing an onMetaData script object
  - After negotiating caps on a pad

https://bugzilla.gnome.org/show_bug.cgi?id=768440
2016-07-07 10:21:21 +03:00
Luis de Bethencourt
a85dbfc246 qtdemux: fix AAC codec_data values
As seen in the parent switch for object_type_id, the 4 possible values are
0x40, 0x66, 0x67 and 0x68. Fixing the nested switch to match these values.

Looks like it was a typo making them decimal instead of hexadecimal.

CID 1363328
2016-07-06 12:47:18 +01:00
Steven Hoving
ec59291b2e rtspsrc: Fix error messages to first convert to doubles before division 2016-07-06 11:22:53 +03:00
Sebastian Dröge
b9532527ec rtspsrc: Set to PLAYING after a seek again after setting up the segment and everything else
There's a small window for a race condition otherwise.
2016-07-05 21:11:35 +03:00
Sebastian Dröge
fd261e1099 aacparse: Reject raw AAC if no codec_data is found in the caps
If necessary, a demuxer will have to invent something here but this is only a
problem with non-conformant files anyway.
2016-07-04 16:58:38 +02:00
Sebastian Dröge
df454fa28f qtdemux: Invent AAC codec_data if none is present
Without, raw AAC can't be handled and we have some information available in
the decoder that most likely allows us to decode the stream in one way or
another. This is the same code already used by matroskademux for the same
reasons, and ffmpeg/vlc play such files just fine too by guesswork.
2016-07-04 16:55:32 +02:00
Sebastian Dröge
5b24841f66 qtmux: Reject raw AAC caps without codec_data
The resulting file is not going to be playable without guesswork and raw caps
should always have codec_data.
2016-07-04 14:54:13 +02:00
Edward Hervey
e3923df800 qtdemux: Handle upstream GAP in push-mode/time segment
This is to handle cases where upstream handles the fragmented streaming in TIME
segments and sends us data with gaps within fragments. This would happen when dealing
with trick-modes.

When upstream (push-based, TIME SEGMENT) wishes to send discontinuous samples,
it must obey the following rules:
* The buffer containing the [moof] must have a valid GST_BUFFER_OFFSET
* The buffers containing the first sample after a gap:
 * MUST start at the beginning of a sample,
 * MUST have the DISCONT flag set,
 * MUST have a valid GST_BUFFER_OFFSET relative to the beginning of the fragment.

https://bugzilla.gnome.org/show_bug.cgi?id=767354
2016-07-01 14:21:04 +02:00
Brad Lackey
6d3071f200 rtspsrc: Don't disable UDP protocols on redirecting
https://bugzilla.gnome.org/show_bug.cgi?id=768232
2016-07-01 12:21:43 +02:00
Seungha Yang
231018bcfe qtdemux: Push caps only when it was updated
Commit 7873bede31 caused new caps
event per moof without consideration of duplication.

https://bugzilla.gnome.org/show_bug.cgi?id=768268
2016-07-01 11:37:20 +02:00
Jonas Holmberg
850a8bc077 rtph265depay: fix invalid memory access
10 bytes was allocated for stream_format but size of "byte-stream" is
more. Use g_strdup() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=753760
2016-06-30 16:56:24 +01:00
Sebastian Dröge
75963b47f4 udpsrc: Windows has no ipi_spec_dst in struct in_pktinfo 2016-06-28 16:44:50 +03:00
Sebastian Dröge
cdd5fa4d96 udpsrc: #define __APPLE_USE_RFC_3542 to be able to use IPV6_PKTINFO on OSX/iOS 2016-06-28 15:15:14 +03:00
Sebastian Dröge
36a154fa96 udpsrc: Move #includes around to a) work around broken glibc header and b) Windows 2016-06-28 15:08:04 +03:00
Sebastian Dröge
7e47579f17 udpsrc: Fix compilation on Windows and *BSD/OSX 2016-06-28 14:25:03 +03:00
Sebastian Dröge
123d62712c udpsrc: Filter out multicast packets that are not for our multicast address
https://bugzilla.gnome.org/show_bug.cgi?id=767980
2016-06-28 13:40:06 +03:00
Sebastian Dröge
c18b609c06 rtspsrc: When seeking, consider the current element state or pending state instead of the RTSP state
If we consider the RTSP state, what can happen is that it is PLAYING but the
element already asynchronously tried to PAUSE and it just did not happen yet.

We would then override this setting to PAUSED (while the element actually is
in PAUSED) and set the RTSP state to PLAYING again. This would then cause us
to produce packets while the sinks are all PAUSED, piling up thousands of
packets in the rtpjitterbuffer and other elements and finally failing.
2016-06-28 11:01:24 +03:00
Sebastian Dröge
d6f597db20 flvdemux: Add comment about H263/MPEG4P2 being non-standard for FLV
They are however supported by ffmpeg and apparently used out there.

https://bugzilla.gnome.org/show_bug.cgi?id=768006
2016-06-27 09:20:35 +03:00
Vivia Nikolaidou
6ac02f8595 flvdemux: Add support for H263 and MPEG4 part2
https://bugzilla.gnome.org/show_bug.cgi?id=768006
2016-06-24 15:30:03 +03:00
Aaron Boxer
f07c704b49 gstrtpj2kpay: use tile bit and tile number to determine if there are multiple tiles in packet
Now we don't have to rely on a special value for the tile number.

https://bugzilla.gnome.org/show_bug.cgi?id=767817
2016-06-21 13:03:09 +01:00
Tim-Philipp Müller
323244bc04 rtpj2kpay: fix compiler warning on OS/X
gstrtpj2kpay.c:364:21: error: implicit truncation from 'int' to bitfield changes value from -1 to 65535

https://bugzilla.gnome.org/show_bug.cgi?id=767817
2016-06-21 09:34:56 +01:00
Sebastian Dröge
5f2b32e642 rtph264pay: Deprecated sprop-parameter-set property
This is supposed to be either in the codec_data (avc stream format) or inside
the stream, and we extract it from there. It should not be set from a
property as it's stream specific.

https://bugzilla.gnome.org/show_bug.cgi?id=767789
2016-06-21 10:03:04 +03:00
Aleix Conchillo Flaqué
12eb5d6912 rtspsrc: make all srtp encoder properties explicit
The Session Data Protocol doesn't allow specifying a cipher for the
SRTCP, so it will use the SRTP one. In the "srtpenc" element the cipher
"aes-128-icm" is the default for SRTP and SRTCP, but if we want to have
an SRTCP with the "aes-256-icm" cipher then we also need to set the SRTP
cipher to "aes-256-icm", otherwise "aes-128-icm" will be used instead.

https://bugzilla.gnome.org/show_bug.cgi?id=767799
2016-06-20 09:53:24 +02:00
Sebastian Dröge
5a7217a147 qtmux: The prores variant is stored in the variant field, not format
And the caps in the sink pad template already used variant (only).
2016-06-17 16:08:08 +03:00
Jonas Holmberg
83ec89abdd rtph265pay: Remove sprop-parameter-sets property
There is no valid use case when this property is needed since the values
must be in either codec_data or buffer data.

https://bugzilla.gnome.org/show_bug.cgi?id=753760
2016-06-17 15:25:57 +03:00
Jonas Holmberg
2039e0d881 rtph265pay: Read NALU type the same way everywhere
Cosmetic change to read NALU type in gst_rtp_h265_pay_decode_nal() the
same way as in other places.

https://bugzilla.gnome.org/show_bug.cgi?id=753760
2016-06-17 15:25:57 +03:00
Aurélien Zanelli
f8f8935c77 rtpjitterbuffer: fix RTPJitterBufferMode documentation
Documentation lacks '@' before each enum values and there was an extra
line after symbol section which confuses GTK-Doc parser.

https://bugzilla.gnome.org/show_bug.cgi?id=767788
2016-06-17 15:16:45 +03:00
Miguel París Díaz
83f4c08747 rtpsession: take the lock when changing stats
https://bugzilla.gnome.org/show_bug.cgi?id=766025
2016-06-17 12:52:29 +03:00
Jürgen Slowack
98b62e397b rtph265: fix NAL unit type parsing and SPS/PPS/VPS detection
Fixes sps/pps/vps insertion via the config-interval property.

https://bugzilla.gnome.org//show_bug.cgi?id=767680
2016-06-15 13:10:50 +01:00
Tim-Philipp Müller
51a0dc2df2 flvdemux: fix indentation 2016-06-10 13:51:39 +01:00
Tim-Philipp Müller
c51831a245 flvdemux: fix date parsing when there are trailing spaces
Fixes parsing of "Thu May 11 15:57:46 2006 ".

https://bugzilla.gnome.org/show_bug.cgi?id=767496
2016-06-10 13:51:39 +01:00
Aaron Boxer
b4a4fa19a1 gstrtpj2k: set sampling field required by RFC
This field is now required in the sink caps.

https://bugzilla.gnome.org/show_bug.cgi?id=766236
2016-06-10 13:14:44 +03:00
Seungha Yang
4e23d206b9 flvdemux: Fix unref assertion failure
Fix unref assertion failure

https://bugzilla.gnome.org/show_bug.cgi?id=767424
2016-06-08 22:01:11 -04:00
Olivier Crête
5328378132 rtpjitterbuffer: Work with non-TIME segments
With non-time segments, it now assumes that the arrival time of packets
is not relevant and that only the RTP timestamp matter and it produces
an output segment start at running time 0.

https://bugzilla.gnome.org/show_bug.cgi?id=766438
2016-06-08 14:49:49 -04:00
Edward Hervey
30d2918ab0 qtdemux: Show state name in debugging
Makes it easier to trace what's going on
2016-06-07 18:40:14 +03:00
Edward Hervey
7d309d3f4b qtdemux: Remove useless variable
That variable is only needed for a debug statement, move it there
2016-06-07 18:40:14 +03:00
Edward Hervey
d8f1a6c58e qtdemux: Add/Fix comments on the various structure variables
No variables were added/removed. This was just a good excuse to:
* Comment what most variables are used for (and when)
* Order them in such a way as to show first the common variables used
  in all cases, followed by those only used in push-mode
2016-06-07 18:40:14 +03:00
Edward Hervey
6f1eed7f02 qtdemux: Remove unused structure
Let's just remove it, been commented for 7+ years :)
2016-06-07 18:40:14 +03:00
Sebastian Dröge
24862c2f74 qtdemux: Forward segments directly if we are operating in PUSH mode on fragmented streams
We shouldn't go through segment activation as we will only have a limited
understanding of how the whole stream timeline looks like from the moof. We
only know about the current fragment, while upstream knows about the whole
stream.

This fixes seeking in DASH streams, both for seeks after the current moof and
for seeks into the current moof. The former would fail because the moof ends
and we can't activate any segment, the latter would cause a segment that stops
at the moof end, and no further fragments would be played because we end up
being EOS.

https://bugzilla.gnome.org/show_bug.cgi?id=767071
2016-06-07 16:19:39 +03:00
Michael Olbrich
c5da4dc66a matroskademux: preserve seek flags
Without this some flags get lost in streaming mode.

https://bugzilla.gnome.org/show_bug.cgi?id=767194
2016-06-06 10:50:02 +03:00
Miguel París Díaz
389e0abeb0 rtpsource: complete warn log with SSRC
https://bugzilla.gnome.org/show_bug.cgi?id=767195
2016-06-06 10:47:17 +03:00
Olivier Crête
91a2a790e9 rtpvp9depay: Don't assert on flexible mode packets
Instead just post a warning on the bus for now.
2016-06-02 16:17:19 -04:00
Edward Hervey
1d2db2ba4f deinterlace: Ensure DISCONT flag is properly propagated
The output of deinterlace at startup, or when receiving a new DISCONT
buffer, should have the DISCONT flag set on the first buffer.
2016-06-02 11:35:27 +03:00
Sebastian Dröge
4498e57c10 qtdemux: Use the demuxer segment instead of a new one for MSS streams
Upstream might have told us something about the to be expected segment, so
let's use that information instead of coming up with a [0,-1] segment.

https://bugzilla.gnome.org/show_bug.cgi?id=767071
2016-06-01 09:32:03 +03:00
Sebastian Dröge
84e698c531 qtdemux: Only activate segments and send SEGMENT events if we have streams
But in that case also remove the pending newsegment event, otherwise we would
later send a possibly outdated event.

https://bugzilla.gnome.org/show_bug.cgi?id=767071
2016-06-01 09:32:03 +03:00
Sebastian Dröge
f8eb909d90 qtdemux: In PULL mode, nothing is ever going to send us a SEGMENT event
https://bugzilla.gnome.org/show_bug.cgi?id=767071
2016-06-01 09:32:03 +03:00
Sebastian Dröge
f3e68164e4 qtdemux: Don't override TIME segments from upstream that we just saw
The point of d8fb7a9c96 was to not have any
spurious segments stored for later if we do BYTES->TIME conversion, but
overriding any TIME segments from upstream does not make any sense.

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

https://bugzilla.gnome.org/show_bug.cgi?id=767071
2016-06-01 09:32:03 +03:00
Prashant Gotarne
4bdd192fb3 multifilesrc: set position as offset from start-index
query position in GST_FORMAT_BUFFER returns
offset from start-index rather than index.

https://bugzilla.gnome.org/show_bug.cgi?id=752462
2016-05-27 20:32:08 +01:00
Pierre Lamot
3c50fd7669 rtpj2kpay: Fix buffer memory leak
Input buffer memory was not unmapped

https://bugzilla.gnome.org/show_bug.cgi?id=766870
2016-05-27 12:46:23 +01:00
Tim-Philipp Müller
3d979d4e87 videocrop mark crop properties as mutable in playing state 2016-05-23 19:17:08 +01:00
Sebastian Dröge
7cd9d34c80 qtdemux: Set seek event seqnum on all SEGMENT events
Some were forgotten.

See https://bugzilla.gnome.org/show_bug.cgi?id=765935
2016-05-20 11:15:44 +03:00
Sebastian Dröge
9e5cda59f8 avidemux: Pass through seek event seqnums in all SEGMENT/EOS events and SEGMENT_DONE messages/events
See https://bugzilla.gnome.org/show_bug.cgi?id=765935
2016-05-20 11:12:44 +03:00
Sebastian Dröge
0345ba78f5 matroskademux: Set seek event seqnum in EOS and SEGMENT_DONE messages/events
Also actually store the seqnum in pull mode seeks.

See https://bugzilla.gnome.org/show_bug.cgi?id=765935
2016-05-20 10:57:30 +03:00
Guillaume Desmottes
47a358783e deinterlace: fix caps leak
The caps returned by gst_pad_get_current_caps() was never unreffed when
not early returning.

Fix a leak with the elements/deinterlace test.

https://bugzilla.gnome.org/show_bug.cgi?id=766558
2016-05-20 09:36:09 +03:00
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