Commit graph

9023 commits

Author SHA1 Message Date
Thiago Santos
ab18f5035c qtmux: add AC-3 muxing support
Adds AC-3 muxing support. It is defined for mp4 and 3gp formats.

One extra feature that was added was the ability to add extension
atoms after set_caps as the AC-3 extension atom needs some data
that has to be extracted from the stream itself and is not
present on caps.
2015-06-11 01:11:31 -03:00
Thiago Santos
674e0cc2df qtmux: remove unused type MP4S 2015-06-11 01:11:31 -03:00
Thiago Santos
f83fd7a88f qtmux: remove duplicate attribute value set
It is also set a few lines below
2015-06-11 01:11:18 -03:00
Jan Schmidt
ec5bc9dccb matroska: Implement basic stereoscopic video support
Implement support for the packed video formats WebM
uses, not all the values that Matroska might use.

In practice, it's really hard to find any samples in the
wild of any.

Supported in both the muxer and demuxer.
2015-06-11 12:11:42 +10:00
Jan Schmidt
fff76157d8 qtdemux: Add basic support for MPEG-A stereoscopic video
The MPEG-A format provides an extension to the ISO base media
file format to store stereoscopic content encoded with different
codecs like H.264 and MPEG-4:2. The stereo video media information(svmi)
atom declares the presence and storage method for the video.

Stereo video information for MPEG-A can also be supplied through
the 'stvi' atom (ref: ISO/IEC_14496-12, ISO/IEC_23000-11), which
is not implemented in this patch.

Also missing is support for stereo video encoded as separate video tracks
for now.

Based on a patch by Sreerenj Balachandran <sreerenj.balachandran@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=611157
2015-06-11 12:11:42 +10:00
Sebastian Dröge
dc059efa60 rtp: Use GST_BUFFER_PTS() instead of GST_BUFFER_TIMESTAMP()
The mix between all these in the RTP code is confusing, let's try to be
consistent.
2015-06-10 14:34:47 +02:00
Ilya Konstantinov
c7e168ec70 rtpmanager: clarify negative lost packets in stats
Also:
- Move notes on units before field documentation.
- Unify documentation style.

https://bugzilla.gnome.org/show_bug.cgi?id=750653
2015-06-10 14:10:52 +02:00
Vineeth TM
720ff75c72 qtdemux: fix reverse playback
When performing seek, segment->start is being updated with desired_offset,
but in case of reverse playback segment->start should be 0 and
segment->stop should be updated with desired offset.

https://bugzilla.gnome.org/show_bug.cgi?id=750675
2015-06-10 10:41:13 +02:00
Xavier Claessens
b0b3e8e2cc rtspsrc: Add a GTlsInteraction property
It can be used for TLS client authentication.

https://bugzilla.gnome.org/show_bug.cgi?id=750471
2015-06-09 20:03:18 -04:00
Ilya Konstantinov
0a578c235a rtpmanager: document units of stats and arguments
Also, minor spelling and style corrections.

https://bugzilla.gnome.org/show_bug.cgi?id=750653
2015-06-09 18:21:59 +02:00
Luis de Bethencourt
e56ef6bcf0 goom: possible uninitialized variables warning
Build fails with the latest snapshot of gcc-4.9 because param1 and param2 might
possibly be used uninitialized. They are set depending on the cases of a switch
statement and the compiler sees this as not a complete guarantee.
Set them to 0 if the switch statement falls down to the default case.

https://bugzilla.gnome.org/show_bug.cgi?id=750566#c6
2015-06-08 23:06:39 +01:00
Chris Clayton
e29f231e5d rtpvp8depay: potential access beyond end of array
Compiling (with gcc-4.9-20150603) produces an error because of an access beyond
the end of an array. This patch fixes the error by initializing the loop
control/array index variable (i) to 1 and returning i - 1 when a match is found.
Also, because the values stored in the array increase in value as the index
increases, the >= test unnecessary, so it is removed.
2015-06-08 20:16:20 +01:00
Jan Schmidt
d78502deb1 splitmuxsink: Don't accumulate more than 2 GOPs
Don't allow large amounts of data to queue up - we only need
the GOP we're writing, and the GOP we're accumulating.
2015-06-08 18:58:43 +10:00
Jan Schmidt
23d610140d isomp4: fsync after sending updates in robust mode
Use the new GstBuffer SYNC_AFTER flag to trigger an fsync
after updating the moov or mdat atom, and after updating the free
atom to make it visible.
2015-06-08 14:49:11 +10:00
Jan Schmidt
3e17cd8acb isomp4: Only set moov header into streamheader at EOS
Only update the moov header into the caps if it's the finalised
moov at EOS time. Avoids posting a bogus moov at startup and
repeated updates in robust-recording mode
2015-06-08 14:49:11 +10:00
Jan Schmidt
1d058c7d8a isomp4: Implement robust muxing using ping-pong strategy
Implement a robust recording mode, where the output
file is always in a playable state, seeking and rewriting
the moov header at a configurable interval. Rewriting
moov is done using reserved space at the start of
the file, and a ping-pong strategy where the moov
is replaced atomically so it's never invalid.

Track when tags have actually changed, and don't write them into
the moov unless they've changed. Clear any existing tags when
re-writing them, so we can do progressive moov updating in robust
recording mode.

Write placeholder mdat as a free atom plus a 32-bit mdat
with '0' size, which means "rest of the file" in the spec.

Re-write it later to a full 64-bit extended size atom if needed.
2015-06-08 14:49:11 +10:00
Jan Schmidt
3d7b343525 isomp4: Update edit list when re-writing moov
Correctly update any edit lists each time the moov is recalculated,
updating existing table entries if they already exist instead of just
adding new ones.
2015-06-08 14:16:36 +10:00
Jan Schmidt
0c1bcc629d isomp4: Remove an extra bracket in a comment. 2015-06-08 14:16:36 +10:00
Jan Schmidt
94e113c6c6 splitmuxsrc: Protect total_duration state variable with the object lock.
Prevent deadlocks from downstream querying duration from the streaming thread.
2015-06-08 14:16:36 +10:00
Luis de Bethencourt
0b8c7ab797 goom: clean dereferences of private structure
https://bugzilla.gnome.org/show_bug.cgi?id=742875
2015-06-07 19:24:20 +01:00
Luis de Bethencourt
fce8e5fb26 goom2k1: clean dereferences of private structure
https://bugzilla.gnome.org/show_bug.cgi?id=742875
2015-06-07 19:20:49 +01:00
Sebastian Dröge
a7faa3e0a2 Release 1.5.1 2015-06-07 10:46:34 +02:00
Sebastian Dröge
b549ebd066 rtpsession: Override the SSRC from the packets' SSRC if none was given via caps or property 2015-06-07 10:33:27 +02:00
Sebastian Dröge
d650a310da rtpsession: Only suggest our internal ssrc if it's not a random one and was selected as internal ssrc
https://bugzilla.gnome.org/show_bug.cgi?id=749581
2015-06-05 16:45:54 +02:00
Vineeth TM
0e5631c5c0 interleave: error when channel-positions-from-input=False
self->channels is being incremented only when
channel-positions-from-input is set as TRUE. So in case of FALSE
self->func is not set and hence creating assertion error.
Hence removing the condition to increment self->channels.

https://bugzilla.gnome.org/show_bug.cgi?id=744211
2015-06-05 08:48:25 -03:00
Sebastian Dröge
8f5bdf9690 rtpjitterbuffer: Add support for receiving reduced size RTCP
It worked before but gave warnings, now we just ignore RTCP
packets that don't start with a SR. As all we're interested
in here are SRs.
2015-06-05 10:33:11 +02:00
Jose Antonio Santos Cadenas
f563176349 rtpssrcdemux: Add support for reduce size rtcp
According to RFC 5506, reduce size packages can be sent, this
packages may not be compound, so we need to add support for
getting ssrc from other types of packages.

https://bugzilla.gnome.org/show_bug.cgi?id=750327
2015-06-05 10:30:15 +02:00
Jose Antonio Santos Cadenas
f8f23bbf5d rtpsession: Add support for receiving reduced size rtcp
See RFC 5506

https://bugzilla.gnome.org/show_bug.cgi?id=750332
2015-06-05 10:24:17 +02:00
Sebastian Dröge
ec82eba96b aacparse: Add support for channel configurations 11, 12 and 14 and 7 actually has 8 channels
ISO/IEC 14496-3:2009/PDAM 4 added 11, 12 and 14.
2015-06-04 16:09:41 +02:00
Nicolas Dufresne
3ab70e4677 asteriskh263: Un-rank clashing depayloader
This depayloader clash with the standard one for H263p. It produces an
H263p stream with a modified header. It uses encoding-name that is the
same as H263p (H263-1998) though the resulting ES is not decodable or
parsable in GStreamer, making it unsuable in dynamic pipeline. This
patch unrank this specialized depayloader since it can only be used in
custom pipeline.

https://bugzilla.gnome.org/show_bug.cgi?id=739935
2015-06-03 08:57:57 -04:00
Luis de Bethencourt
ffe7507512 goom2k1: remove variables not needed anymore
https://bugzilla.gnome.org/show_bug.cgi?id=742875
2015-06-02 18:09:48 +01:00
Luis de Bethencourt
8756b6a9d4 goom2k1: rebase to use the audiovisualizer class
Rebase to have goom2k1 using the common GstAudioVisualizer class

https://bugzilla.gnome.org/show_bug.cgi?id=742875
2015-06-02 18:02:08 +01:00
Luis de Bethencourt
89903bf66a goom: rebase to use the audiovisualizer class 2015-06-02 17:47:57 +01:00
Sebastian Dröge
647eefea67 rtpsession: Only schedule a timer when we actually have to send RTCP
Otherwise we will have 10s-100s of thread wakeups in feedback profiles, create
RTCP packets, etc. just to suppress them in 99% of the cases (i.e. if no
feedback is actually pending and no regular RTCP has to be sent).

This improves CPU usage and battery life quite a lot.

https://bugzilla.gnome.org/show_bug.cgi?id=746543
2015-06-02 11:38:15 +02:00
Sebastian Dröge
8ada98964d rtpsession: Remove useless goto
https://bugzilla.gnome.org/show_bug.cgi?id=746543
2015-06-02 11:38:15 +02:00
Sebastian Dröge
0a7823b30f rtspsrc: Set RTP profile on the rtpsession objects
https://bugzilla.gnome.org/show_bug.cgi?id=746543
2015-06-02 11:38:15 +02:00
Sebastian Dröge
506a8a8857 rtpbin: Add rtp-profile property for setting the default profile of newly created sessions
https://bugzilla.gnome.org/show_bug.cgi?id=746543
2015-06-02 11:38:15 +02:00
Sebastian Dröge
0f7e80ed59 rtpsession: Only put RRs and full SDES into regular RTCP packets
If we may suppress the packet due to the rules of RFC4585 (i.e. when
below the t-rr-int), we can send a smaller RTCP packet without RRs
and full SDES. In theory we could even send a minimal RTCP packet
according to RFC5506, but we don't support that yet.

https://bugzilla.gnome.org/show_bug.cgi?id=746543
2015-06-02 11:38:15 +02:00
Sebastian Dröge
6f830e5bd5 rtpsession: Keep track of tp/tn and t_rr_last separately
Otherwise we can't properly schedule RTCP in feedback profiles as we need to
distinguish the time when we last checked for sending RTCP (tp) but might have
suppressed it, and the time when we last actually sent a non-early RTCP
packet.

This together with the other changes should now properly implement RTCP
scheduling according to RFC4585, and especially allow us to send feedback
packets a lot if needed but only send regular RTCP packets every once in a
while.

https://bugzilla.gnome.org/show_bug.cgi?id=746543
2015-06-02 11:38:15 +02:00
Sebastian Dröge
3122ef4ae3 rtpsession: Add property for selecting RTP profile (AVP/AVPF/etc)
And modify our RTCP scheduling algorithm accordingly. We now can send more
RTCP packets if needed for feedback, but will throttle full RTCP packets by
rtcp-min-interval (t-rr-int from RFC4585).

In non-feedback mode, rtcp-min-interval is Tmin from RFC3550, which is
statically set to 1s or 0s by RFC4585. Tmin defines how often we should
send RTCP packets at most.

https://bugzilla.gnome.org/show_bug.cgi?id=746543
2015-06-02 11:38:15 +02:00
Olivier Crête
8fd3e0e125 mulawdec: Let baseclass estimate bitrate
This makes playback directly from a file work with the right caps.
2015-05-30 17:41:44 -04:00
Tim-Philipp Müller
2e5df10ed9 dynudpsink: keep GCancellable fd around instead of re-creating it constantly
And create it only when starting the element.
2015-05-27 17:08:47 +01:00
Tim-Philipp Müller
b33d30621c udpsink, multiudpsink: keep GCancellable fd around instead of re-creating it constantly
Otherwise we constantly create/close event file descriptors,
every time we call g_socket_condition_timed_wait() or
g_socket_send_message(s)(), i.e. a lot. Which is not
particularly good for performance.

Can't create GCancellable in ::start() here because it's used
in client_new() which may be called via the add-client action
signal which may be called before the element is up and running.
2015-05-27 17:08:47 +01:00
Tim-Philipp Müller
11bb21f3c2 udpsrc: keep GCancellable fd around instead of re-creating it constantly
Otherwise we constantly create/close event file descriptors,
every single time we call g_socket_condition_timed_wait() or
g_socket_receive_message(), i.e. twice per packet received!
This was not particularly good for performance.

Also only create GCancellable on start-up.
2015-05-27 17:08:47 +01:00
Luis de Bethencourt
6d06a74f7f matroska: overwritten value assignment
curpos is set and immediately after, set again. Remove the redundant
assignment.

https://bugzilla.gnome.org/show_bug.cgi?id=749909
2015-05-27 16:56:15 +01:00
Tim-Philipp Müller
80998dadba rtpvrawdepay: don't shadow existing outbuf variable
And fix unref of the wrong one which will contain NULL
in an error code path.
2015-05-25 16:16:47 +01:00
Tim-Philipp Müller
2aafb3951d rtpvrawdepay: map/unmap output frame only once, not for every input packet
Map output buffer after creating it and keep it mapped
until we're done with it instead of mapping/unmapping
it for every single input buffer.
2015-05-25 16:16:42 +01:00
Thiago Santos
d03b9513f1 qtdemux: remove fixme from 2006
It has been verified by use over time.
2015-05-25 08:47:47 -03:00
Thiago Santos
fc0a184592 qtdemux: fix reverse playback of fragmented media
qtdemux creates a samples array and gets the timestamps for buffers by
accumulating their durations. When doing reverse playback of fragments,
accumulating samples will lead to wrong timestamps as the timestamps
should go decreasing from fragment to fragment and the accumulation
will produce wrong results.

In this case, when receiving a discont for fragmented reverse playback,
the previous samples information should be flushed before new data
is processed.
2015-05-25 08:46:18 -03:00
Jimmy Ohn
d3997773fc splitfilesrc: Implement binary search in find_part_for_offset
Implement binary search using gst_util_array_binary_search

https://bugzilla.gnome.org/show_bug.cgi?id=749690
2015-05-25 14:23:32 +10:00
Sebastian Dröge
565cd49643 rtpsession: Don't crash if we receive FIR/PLI from a source we don't know 2015-05-21 13:26:53 +03:00
Santiago Carot-Nemesio
2fb1fe2ee3 rtpsession: Fix collection of statistics
Stats should be collected on the media rtp source not in the
sender one.

https://bugzilla.gnome.org/show_bug.cgi?id=749669
2015-05-21 12:56:12 +03:00
Edward Hervey
27c91bc881 multifilesink: Add a new max-duration file switching mode
This new mode ensures that files will never exceed a certain duration
based on incoming buffer PTS (and duration if present)

Note:
* You need timestamped buffers (duh). If some of the incoming buffers don't
  have PTS, then it will just accept them in the current file
2015-05-20 15:50:07 +02:00
Edward Hervey
f1ceaab02f multifilesink: streamline the file-switch code a bit
Use the same functions regardless of the mode we are using
2015-05-20 15:50:07 +02:00
Edward Hervey
db0abbd531 multifilesink: add "aggregate-gops" property to process GOPs as a whole
This property can be used in combination with next-file=max-size
(and perhaps a future next-file=max-duration) to make sure that
each file part starts cleanly with a key frame and the appropriate headers.

In order for this property to work correctly, upstream elements should make
sure than any headers that need to be written in a standalone file are:
1) in the streamheader caps field
2) and/or in the stream as one or more buffers marked with GST_BUFFER_FLAG_HEADER
   that are just before the keyframe buffer

This is useful for MPEG-TS/MPEG-PS file segmenting in
combination with mpegtsmux or mpegpsmux.

Original patch by: Tim-Philipp Müller <tim@centricular.com>
2015-05-20 15:49:57 +02:00
Sebastian Dröge
9b14170355 rtspsrc: Use single-include header for the RTSP library 2015-05-20 16:37:55 +03:00
Tim-Philipp Müller
f54110fd3e udp: don't use soon-to-be-deprecated g_cancellable_reset()
From the API documentation: "Note that it is generally not
a good idea to reuse an existing cancellable for more
operations after it has been cancelled once, as this
function might tempt you to do. The recommended practice
is to drop the reference to a cancellable after cancelling
it, and let it die with the outstanding async operations.
You should create a fresh cancellable for further async
operations."

https://bugzilla.gnome.org/show_bug.cgi?id=739132
2015-05-19 19:00:20 +01:00
Stefan Sauer
168881a186 Revert "doc: Workaround gtkdoc issue"
This reverts commit 1797c8f8b1.

This is fixed by the gtk-doc 1.23 release.
<para> cannot contain <refsect2>:
http://www.docbook.org/tdg/en/html/para.html
http://www.docbook.org/tdg/en/html/refsect2.html
2015-05-18 20:13:01 +02:00
Nicola Murino
5e226d63f9 rtpg726pay: fix caps leak
https://bugzilla.gnome.org/show_bug.cgi?id=749544
2015-05-18 17:40:55 +01:00
Nicola Murino
335afc982b rtpg726depay: don't leak input buffer
https://bugzilla.gnome.org/show_bug.cgi?id=749543
2015-05-18 17:40:39 +01:00
Sebastian Dröge
c60038f188 rtpsource: Queue bad packets instead of dropping them
So we can send them out once we found the next, consecutive sequence number in
case one is following.
2015-05-18 18:43:16 +03:00
Sebastian Dröge
9f18a271f3 rtpsource: Use g_queue_foreach() to unref all buffers in queues 2015-05-18 18:43:16 +03:00
Sebastian Dröge
54e924332e rtpsource: Refactor seqnum comparison code a bit 2015-05-18 18:43:16 +03:00
Sebastian Dröge
1974b24ef4 rtpsource: Allow sequence number wraparound during probation 2015-05-18 18:43:16 +03:00
Sebastian Dröge
3386de7a8a rtpsource: Make sequence number comparison code more readable
... by using gst_rtp_buffer_compare_seqnum() and signed integers
instead of implictly using effects of integer over/underflows.
2015-05-18 18:43:16 +03:00
Sebastian Dröge
ca110fb0b8 rtpjitterbuffer: When detecting a huge seqnum gap, wait for 5 consecutive packets before resetting everything
It might just be a late retransmission or spurious packet from elsewhere, but
resetting everything would mean that we will cause a noticeable hickup. Let's
get some confidence first that the sequence numbers changed for whatever
reason.

https://bugzilla.gnome.org/show_bug.cgi?id=747922
2015-05-18 18:43:15 +03:00
Nicolas Dufresne
1797c8f8b1 doc: Workaround gtkdoc issue
With gtkdoc 1.22, the XML generator fails when a itemizedlist is
followed by a refsect2. Workaround the issue by wrapping the
refsect2 into para.
2015-05-16 23:37:06 -04:00
Stefan Sauer
426eb3e300 qtdemux: avoid wrong warnings on unknown node types
Add 'name' and 'mean' fourccs, as we handle them. Right now each use would
trigger a warning.
2015-05-15 14:56:07 +02:00
Nicola Murino
fefeda5e6c rtpg726depay: add block_align to output caps
It is needed to correctly negotiate caps with matroskamux
and most other muxers.

https://bugzilla.gnome.org/show_bug.cgi?id=749129
2015-05-13 12:39:07 +01:00
Sebastian Dröge
e11a537b65 audiofxbasefirfilter: Fix time-domain convolution with >1 channels
input_samples is the number of frames, but we used it as the number of
samples.

https://bugzilla.gnome.org/show_bug.cgi?id=747204
2015-05-12 13:41:58 +03:00
Tim-Philipp Müller
2e412a447a docs: update example pipelines in element docs
Mostly gst-launch -> gst-launch-1.0
Use autovideosink/autoaudiosink more often.
Sprinkle some converters here and there.
2015-05-10 11:05:00 +01:00
Tim-Philipp Müller
3755409409 splitmuxsrc: minor error message clean-up
Don't put filename in error message shown to user.
2015-05-10 10:53:13 +01:00
Guillaume Desmottes
2bd3685d04 flacparse: fix buffer leak when stored to seektable
Fix a leak with the
validate.file.playback.change_state_intensive.samples_multimedia_cx_flac_Yesterday_flac
scenario.

https://bugzilla.gnome.org/show_bug.cgi?id=749072
2015-05-08 11:11:40 +01:00
Paul Hyunil
3792e9ca9b qtdemux: fix example pipeline in docs
The gst-launch script for example launch line to test qtdemux is
missing a queue before the decodebins, otherwise the gst-launch-1.0
command won't work.

https://bugzilla.gnome.org/show_bug.cgi?id=749054
2015-05-08 11:06:31 +01:00
Sebastian Dröge
27729a2960 Revert "rtpsession: Also report internal sources in on-new-ssrc and on-ssrc-active"
This reverts commit d22ec49632.

Application code might expect that it only gets external sources on those
signals, and get confused by this. If anything we would need to add new
signals.
2015-05-07 14:51:45 +02:00
Sebastian Dröge
d22ec49632 rtpsession: Also report internal sources in on-new-ssrc and on-ssrc-active
Without this it seems impossible for an application to easily get notified
about the internal ssrcs that are created, e.g. sender sources, and also
to know when they are active and produce RTCP packets.

https://bugzilla.gnome.org/show_bug.cgi?id=746747
2015-05-06 11:21:22 +02:00
Sebastian Dröge
9865730cfa rtspsrc: Fix up last commit 2015-05-04 16:50:38 +02:00
Sebastian Dröge
d08f488598 rtspsrc: Only do RTX when using a feedback profile 2015-05-04 16:47:30 +02:00
Sebastian Dröge
9d22ad421b rtpsession: The stats min_interval is in seconds, not nanoseconds
We have to scale it to compare it against our clock times.
2015-05-04 14:12:07 +02:00
Sebastian Dröge
afe1d5a89f rtpsession: Only return TRUE if early feedback was requested already and it's early enough 2015-05-04 14:11:00 +02:00
Luis de Bethencourt
06d1ae313d matroska: remove unused property enum items 2015-04-30 15:43:09 +01:00
Tim-Philipp Müller
377c8405aa qtdemux: fix buffer leak on eos in push mode
Based on patch by Guillaume Desmottes.

scenario: validate.http.playback.seek_with_stop.raw_h264_1_mp4

https://bugzilla.gnome.org/show_bug.cgi?id=748617
2015-04-30 13:35:16 +01:00
Sebastian Dröge
178f0a4522 qtdemux: Check for sizes of the rdrf (redirect) atom before accessing the data and use g_strndup() instead of g_strdup()
Thanks to Ralph Giles for reporting this.
2015-04-29 19:41:29 +02:00
Sebastian Dröge
33693525b9 rtspsrc: Only enable retransmissions if there is retransmission info in the SDP
Otherwise we're going to send early RTCP and NACKs in non-feedback sessions
too, which will confuse servers.

https://bugzilla.gnome.org/show_bug.cgi?id=748627
2015-04-29 15:53:09 +02:00
Guillaume Desmottes
7f4f4131df matroskademux: fix seek event leak
gst_matroska_demux_handle_seek_event() doesn't consume the
event so we have to unref it.

https://bugzilla.gnome.org/show_bug.cgi?id=748584
2015-04-28 19:24:40 +01:00
Sebastian Dröge
9119fbd774 matroska-demux: Send pending tags when adding a new pad
We might've parsed those tags before already and tried to push them to
non-existing pads before. Now let's do it for real.
2015-04-28 15:42:49 +02:00
Sebastian Dröge
73c0c2920f rtpstats: Average RTCP packet size is in bytes, bandwidths in bits
We need to convert the size to bits for our calculations.

https://bugzilla.gnome.org/show_bug.cgi?id=747863
2015-04-27 16:45:40 +02:00
Sebastian Dröge
475b1e607e rtpstats: Use the same lower limit for RTCP bandwidth to stop sending RTCP everywhere
https://bugzilla.gnome.org/show_bug.cgi?id=747863
2015-04-27 16:45:33 +02:00
Sebastian Dröge
7596ed91b8 rtpsession: Use bandwidth calculation by default instead of some arbitrary hardcoded value
https://bugzilla.gnome.org/show_bug.cgi?id=747863
2015-04-27 16:45:25 +02:00
Sebastian Dröge
928cd110bc rtpsession: Bandwidth is supposed to be in bits/s, not bytes/s
https://bugzilla.gnome.org/show_bug.cgi?id=747863
2015-04-27 16:45:14 +02:00
Luis de Bethencourt
9391622579 Rename property enums from ARG_ to PROP_
Property enum items should be named PROP_ for consistency and readability.
2015-04-27 11:22:11 +01:00
Ilya Konstantinov
fd391a5404 rtpjitterbuffer: Fix "stats" property docs
https://bugzilla.gnome.org/show_bug.cgi?id=748436
2015-04-26 21:15:44 +02:00
Tim-Philipp Müller
d753a3eeb1 Remove obsolete Android build cruft
This is not needed any longer.
2015-04-26 17:55:07 +01:00
Thiago Santos
0ade8b813f videocrop: print the property values when set
Instead of printing the currently used values. The log is meant
to show what the properties changed to, not what is being currently
used.
2015-04-24 13:55:51 -03:00
Luis de Bethencourt
671b4d25cd remove unused enum items PROP_LAST
This were probably added to the enums due to cargo cult programming and are
unused. Removing them.
2015-04-24 17:01:12 +01:00
Tim-Philipp Müller
03d3d36053 level: fix infinite loop for very low interval values
https://bugzilla.gnome.org/show_bug.cgi?id=745515
2015-04-24 00:51:29 +01:00
Jesper Larsen
3528046773 rtspsrc: Fix RTCP caps leak
https://bugzilla.gnome.org//show_bug.cgi?id=748353
2015-04-23 14:56:27 +01:00
Sebastian Dröge
edcc5be297 rtpjitterbuffer: When request retransmissions for future packets, consider the packet spacing in the extra delay
We now take the maximum of 2*jitter and 0.5*packet_spacing for the extra
delay. If jitter is very low, this should prevent unnecessary retransmission
requests to some degree.

https://bugzilla.gnome.org/show_bug.cgi?id=748041
2015-04-22 20:27:18 +02:00
Sebastian Dröge
3fe8ceff14 rtpjitterbuffer: Take a running average of the packet spacings instead of just the latest
https://bugzilla.gnome.org/show_bug.cgi?id=748041
2015-04-22 20:25:43 +02:00
Miguel París Díaz
f81c9a9568 rtpjitterbuffer: Add "rtx-next-seqnum" property
If this is set to FALSE, rtpjitterbuffer will not request retransmissions for
future packets based on when they are estimated to arrive.

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

https://bugzilla.gnome.org/show_bug.cgi?id=739868
2015-04-22 19:51:18 +02:00
Sebastian Dröge
68dfe93463 rtxreceive: Put debug output for retransmission requests at the right place
Before it was only ever printed once for every time a ssrc was associated with
a specific stream.
2015-04-22 19:51:18 +02:00
Luis de Bethencourt
c884a3b3a5 equalizer: fix dynamic changes on bands
When we are in passthrough, the transform function doesn't run and if the
passthrough check is in this function it will never be deactivated. Fix this by
checking directly whenever a gain is changed.

Also set the passthrough to TRUE at init because the gains default to 0, so we
can passthrough until any gain property is changed.

https://bugzilla.gnome.org/show_bug.cgi?id=748068
2015-04-22 10:38:39 +01:00
Vincent Penquerc'h
6e3835594c ac3parse: fix memory leak 2015-04-17 13:33:09 +01:00
Alex O'Konski
fc038f1f4e icydemux: Fix segfault if metadata-interval is 0
Prevents an extra unref of GstBuffer when passing a non-icy stream through
icydemux with metadata-interval set to 0.

Reproducible with:
gst-launch-1.0 filesrc location=~/testsong.mp3 ! \
'application/x-icy,metadata-interval=(int)0' ! icydemux ! decodebin ! wavenc ! \
filesink location=~/testsong.wav

https://bugzilla.gnome.org/show_bug.cgi?id=748024
2015-04-17 10:01:02 +01:00
Ravi Kiran K N
fd6a5a5d90 audiofx: fix typo in example pipelines
Fix typo in example pipelines

https://bugzilla.gnome.org/show_bug.cgi?id=748022
2015-04-17 09:53:46 +01:00
Sebastian Dröge
80268e7d37 rtpsource/rtprtxsend: Also pass correct seqnum-offset and payload to the RTX rtpsource
https://bugzilla.gnome.org/show_bug.cgi?id=747394
2015-04-16 17:33:37 +02:00
Arun Raghavan
26bec72e52 rtpsession: Track RTX ssrc caps
This is needed so that we can generate SR for RTX stream correctly (the
clock rate is required).

https://bugzilla.gnome.org/show_bug.cgi?id=747394
2015-04-16 17:33:37 +02:00
Sebastian Dröge
17c6532b75 rtprtxsend: Copy over timestamps from the orignal buffers to the RTX buffers
https://bugzilla.gnome.org/show_bug.cgi?id=747394
2015-04-16 17:33:37 +02:00
Vincent Penquerc'h
f02ad47998 qtdemux: fix tag list leaks on error paths 2015-04-16 13:10:22 +01:00
Vincent Penquerc'h
765faa306a qtdemux: fix tag list leak on unknown stream type 2015-04-16 13:10:21 +01:00
George Kiagiadakis
97c03449a4 splitmuxsink: do not access property variable without the object lock, use the local stack copy instead 2015-04-15 13:30:19 +02:00
George Kiagiadakis
1954726328 splitmuxsink: add probe on the multiqueue's sink pad instead of the ghost pad
because _release_pad tries to release it from ctx->sinkpad, which is
multiqueue's sink pad, and currently fails because the probe is not
installed there
2015-04-15 13:30:19 +02:00
Sebastian Dröge
caa255d2ed rtprtx*: Fix typos 2015-04-14 19:08:38 +02:00
Sebastian Dröge
bd19b08d6d rtpsession: Not sending early RTCP now because of dithering means we send it with the next compound packet 2015-04-14 18:42:44 +02:00
Sebastian Dröge
4223d0c114 rtpsession: Improve debug output a bit if we can't allow early feedback 2015-04-14 18:42:44 +02:00
Olivier Crête
1394a66e62 rtpvp8depay: When dropping intra packet, request keyframe
https://bugzilla.gnome.org/show_bug.cgi?id=747208
2015-04-13 18:13:35 -06:00
Sebastian Dröge
6c27293ffe rtpjitterbuffer: Change resyncing GST_WARNING to GST_INFO
This also happens in the very beginning when we receive the first packet, a
warning would be very confusing here. In all places where we should warn about
this, we would've printed a warning already before.
2015-04-13 20:25:48 +02:00
Tim-Philipp Müller
b745cb8a47 multifilesink: minor docs improvement 2015-04-13 14:31:17 +01:00
Miguel París Díaz
c4bb6a098b rtpjitterbuffer: Add "rtx-max-retries" property
This property allows to limit the maximum number of retransmission
for a specific packet.

https://bugzilla.gnome.org/show_bug.cgi?id=739868
2015-04-13 09:09:03 +02:00
Miguel París Díaz
05bd708fc5 rtpjitterbuffer: Fix expected_dts calc in calculate_expected
Right above we consider lost_packet packets, each of them having duration,
as lost and triggered their timers immediately. Below we use expected_dts
to schedule retransmission or schedule lost timers for the packets that
come after expected_dts.

As we just triggered lost_packets packets as lost, there's no point in
scheduling new timers for them and we can just skip over all lost packets.

https://bugzilla.gnome.org/show_bug.cgi?id=739868
2015-04-13 09:06:33 +02:00
Sebastian Dröge
1a2f253c3a rtpjitterbuffer: Make the next output buffer discont after resetting the jitterbuffer
Resetting the jitterbuffer drops all packets and other things, and will cause
a discontinuity in the packets received by the depayloaders. They should now
also flush anything they had pending as the new data will start at a different
position.

https://bugzilla.gnome.org/show_bug.cgi?id=739868
2015-04-13 09:05:34 +02:00
Hyunjun Ko
7fbd1b472f qtdemux: Update segment.start after key-unit seek
When doing key uint seek, qtdemux calls gst_qtdemux_adjust_seek
to get proper offset. And then this offset is set to
segment.position and segment.time in gst_qtdemux_perform_seek but
segment.start is not updated.

After that, application sends segment query,
qtdemux sets start and stop to query using gst_segment_to_stream_time. Due
to the wrong value in segment.start, the stop position is smaller than
it should.

https://bugzilla.gnome.org/show_bug.cgi?id=746822
2015-04-10 10:12:50 -03:00
Thiago Santos
39c09284e2 qtmux: remove useless variable do_pts
We always write the CTTS in qtmux. Ideally we only want to do that
for streams that need DTS, it should be present on the track information
rather than be decided based on each buffer
2015-04-10 10:05:24 -03:00
Thiago Santos
5780afe131 qtmux: remove subtraction that makes PTS/DTS start from 0
As qt uses durations, it doesn't matter, only the difference
between consecutive buffers is important. Also, collectpads
already replaces PTS/DTS with the running times for them.
2015-04-10 10:05:24 -03:00
Ravi Kiran K N
d8ebddfaf3 smpte: remove unused fields
Remove the fields - format and fps from smpte
as they are unused.

https://bugzilla.gnome.org/show_bug.cgi?id=747597
2015-04-10 10:23:55 +01:00
Vincent Penquerc'h
a862db33b6 splitmuxsink: fix mutex leak 2015-04-09 13:01:23 +01:00
Jan Schmidt
fe739b7f88 isomp4: Refactor various state variables into a mux_mode var
Instead of checking various state variables around the muxer,
track the current muxing mode in a single 'mux_mode' enum.

Add some implementation notes about the different mux modes
2015-04-09 10:20:06 +10:00
Edward Hervey
5e0329235e rtph263depay: Fix framesize parsing
The string passed to the parsing function only contains a framesize, and
not <pt> + <framesize>

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=726416
2015-04-08 11:17:31 +02:00
Vincent Penquerc'h
8cfebfec8c wavparse: clip chunk size above the valid maximum (0x7fffffff)
https://bugzilla.gnome.org/show_bug.cgi?id=722567
2015-04-07 12:12:44 +01:00
Vincent Penquerc'h
3ac119bbe2 wavparse: clip chunk length to available data (when known)
This prevents silly chunk lengths from possibly overflowing
(at least when we know the actual data length).

https://bugzilla.gnome.org/show_bug.cgi?id=722567
2015-04-07 12:12:44 +01:00
Sebastian Dröge
bf95f93c01 qtdemux: Don't accumulate segment bases manually
gst_segment_do_seek() does that for us already, and doing it twice
will break non-flushing seeks in interesting ways. Leftover from 1.0
porting.

Also copy over segment offset and applied_rate, just in case.
2015-04-06 20:17:52 -07:00
Thiago Santos
aeb4d32363 qtdemux: stbl_index is valid from 0 onwards
It indicates the last sample parsed, not the next one to parse.
As it starts in -1, any value from 0 onwards means that it has
some valid data.
2015-04-06 19:29:03 -03:00
Tim-Philipp Müller
2fde2011b2 docs: make GstRTCPSync enum show up in rtpbin docs
https://bugzilla.gnome.org/show_bug.cgi?id=747358
2015-04-05 20:07:19 +01:00
Thiago Santos
cf7d9f676d multifilesink: close files before posting message
Makes sure the files were properly flushed and closed before
the message reaches the application
2015-04-04 11:55:00 -03:00
Thiago Santos
e00f0de4f3 multifilesink: post file message on EOS
When multifilesink is operating in any mode other than one file
per buffer, the last file created won't have a file message posted
as multifilesink doesn't handle the EOS event.

This patch fixes it by using the last position to post a file
message when EOS is received. This should ensure at least the
time related data and the filename are posted to the application
or other elements

https://bugzilla.gnome.org/show_bug.cgi?id=747000
2015-04-04 07:58:44 -03:00
Jan Schmidt
ffa5fce094 qtdemux: Guard against 64-bit overflow
For large-file atoms, guard against overflow in the size field,
which could make us jump backward in the file and cause
infinite loops.
2015-04-03 23:07:07 +11:00
Jan Schmidt
3d59b5f814 isomp4: Make non-seekable downstream an error in normal mode
When not in fast-start or fragmented mode, we need to be able
to rewrite the size of the mdat atom, or else the output just
won't be playable - the mdat placeholder with size == 0 will
cover the rest of the file, including any moov atom we write out.

https://bugzilla.gnome.org/show_bug.cgi?id=708808
2015-04-03 23:07:04 +11:00
Sebastian Rasmussen
cf54d4cc67 rtph263pay/-depay: add framesize SDP attribute
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=726416
2015-04-02 19:38:21 -04:00
Sebastian Rasmussen
896fc20806 rtpjpegpay/-depay: Remove incorrectly introduced framesize SDP attribute
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=726415
2015-04-02 17:52:41 -04:00
Olivier Crête
d410acf649 rtpvp8depay: Parse width/height/profile from keyframes
This makes it possible to mux the result into a container
such as matroska.

https://bugzilla.gnome.org/show_bug.cgi?id=747208
2015-04-01 19:31:18 -04:00
Jan Schmidt
c0d4986c8d flv: When passing seek event upstream, hold a ref.
In case upstream can't handle the seek, make sure we
keep a ref on the event to attempt to handle it ourselves.
2015-03-31 00:20:48 +11:00
Guillaume Desmottes
592cab1512 matroska: fix GValue leaks when parsing tags
gst_tag_list_add_value() doesn't consume the GValue we pass to it so there is
no point copying it.

https://bugzilla.gnome.org/show_bug.cgi?id=746810
2015-03-30 08:59:36 -03:00
Mark Nauwelaerts
71b0b8d943 qtdemux: resurrect some flow return handling
https://bugzilla.gnome.org/show_bug.cgi?id=744572
2015-03-29 13:58:56 +02:00
Mark Nauwelaerts
33cc1b4854 flvdemux: resurrect some flow return handling
https://bugzilla.gnome.org/show_bug.cgi?id=744572
2015-03-29 13:58:56 +02:00
Mark Nauwelaerts
593cfa086c matroskademux: resurrect some flow return handling
https://bugzilla.gnome.org/show_bug.cgi?id=744572
2015-03-29 13:58:56 +02:00
Thiago Santos
d56b11af56 matroska: store stream tags and push as updated
New tags can be found on different parts of the file, so this patch
keeps the stream taglists around for the life cycle of the pad
and adds those new tags as found. Then a new tag is found, the
pad's is marked with a tags changed flag, making the element push
a new tag event on the next check. Before this, we were sending
only the newly found tags, as the element was losing its taglist
when pushing the event.
2015-03-28 11:20:39 -03:00
Ramiro Polla
7b2b619a8f matroskademux: send global tags incrementally
Instead of sending only new tags once they are found, merge the taglist
and send them incrementally.
2015-03-28 10:24:57 -03:00
Ramiro Polla
af45021036 matroskaparse: send global tags
Global tags are already being read in matroskaparse, but they are not
currently being sent.

This patch makes global tags get sent incrementally whenever new ones
are found.

https://bugzilla.gnome.org/show_bug.cgi?id=746242
2015-03-28 10:24:57 -03:00
Vineeth T M
fb5394dbf0 quarktv: fix "planes" property range, a value of 0 is not allowed
When planes property is set to 0, the pipeline executes in
an infinite loop and never exits. Since planes must never
be 0, set the minimum value in the property description
to 1.

https://bugzilla.gnome.org/show_bug.cgi?id=743906
2015-03-28 11:31:42 +00:00
David Schleef
59756c1898 wavparse: Fix up comments regarding DTS 2015-03-26 16:24:52 -07:00
Nicolas Dufresne
84725d62b5 rtspsrc: Fix segment in TCP mode
It is expected that buffers are time-stamped with running time. Set
a segment accordingly. In this case we pick 0,-1 as this is what udpsrc
would do. Depayloaders will update the segment to reflect the playback
position.

https://bugzilla.gnome.org/show_bug.cgi?id=635701
2015-03-26 17:54:08 -04:00
David Schleef
c3bb399fd3 wavparse: be more strict about typefinding DTS
Code now matches comments.
2015-03-26 12:22:43 -07:00
Nicolas Dufresne
32aed67144 rtspsrc: Remove useless function
This function didn't do anything special, let's not use a function for
that.
2015-03-25 15:28:24 -04:00
Nicolas Dufresne
12762ad1a5 rtpjitter: Account for rtx_retry in overflow check
As rtx_retry is part of the substraction, we need to take it into
account, otherwise we may endup with a big value.
2015-03-25 15:25:56 -04:00
Nicolas Dufresne
8afc8c8f3b rtspsrc: Fix seeking query
The segment start/stop in the query is meant to represent the seekable
portion of the stream. It does not match the segment start/stop. Instead
export 0 to duration.
2015-03-24 16:51:12 -04:00
Sebastian Dröge
ac0141b6a0 flvdemux: Only set caps once if they don't change
Previously we were setting new caps with the same content for every H264 or
AAC codec_data we found in the stream, spamming everything and causing
renegotiations.
2015-03-24 16:18:53 +01:00
Sebastian Dröge
c9b42951fe flvdemux: Don't create AAC/H264 caps without codec_data
Instead delay creating the caps until we read the codec_data from the stream,
or fail if we get normal data before the codec_data.

AAC raw caps and H264 avc caps always need codec_data, setting caps on the pad
without them is going to make negotiation fail most of the time. Even if we
later set new caps with the codec_data, that's usually going to be too late.

https://bugzilla.gnome.org/show_bug.cgi?id=746682
2015-03-24 16:15:04 +01:00
Sebastian Dröge
5e88b53212 flvdemux: Fix indention 2015-03-24 15:39:40 +01:00
Sebastian Dröge
0e3609a6e1 rtpsession: Fix another instance of sticky event misordering warnings
Make sure that the sync_src pad has caps before the segment event.
Otherwise we might get a segment event before caps from the receive
RTCP pad, and then later when receiving RTCP packets will set caps.
This will results in a sticky event misordering warning

This fixes warnings in the rtpaux unit test but also in the
rtpaux and rtx examples in tests/examples/rtp

https://bugzilla.gnome.org/show_bug.cgi?id=746445
2015-03-21 19:30:32 +01:00
Sebastian Dröge
17d90b453f rtpsession: Also start the RTCP send thread when receiving RTP or RTCP
Before we only started it when either:
- there is no send RTP stream
or
- we received an RTP packet for sending

This could mean that if the send RTP pads are connected but never receive any
RTP data, and the same session is also used for receiving RTP/RTCP, we would
never start the RTCP thread and would never send RTCP for the receiving part
of the session.

This can be reproduced with a pipeline like:

gst-launch-1.0 rtpbin name=rtpbin \
udpsrc port=5000 ! "application/x-rtp, media=video, clock-rate=90000, encoding-name=H264" ! rtpbin.recv_rtp_sink_0 \
udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \
rtpbin.send_rtcp_src_0 ! fakesink name=rtcp_fakesink silent=false async=false sync=false \
rtpbin.recv_rtp_src_0_2553225531_96 ! decodebin ! xvimagesink \
fakesrc ! valve drop=true ! rtpbin.send_rtp_sink_0 \
rtpbin.send_rtp_src_0 ! fakesink name=rtp_fakesink silent=false async=false sync=false -v

Before this change the rtcp_fakesink would never send RTCP for the receiving
part of the session (i.e. no receiver reports!), after the change it does.

And before and after this change it would send RTCP for the receiving part of
the session if the sender part was omitted (the last two lines).
2015-03-21 17:38:07 +01:00
Sebastian Dröge
1018aacb35 rtprtxsend: Add support for buffer lists 2015-03-19 11:54:37 +01:00
Sebastian Dröge
57ff27f8c8 rtprtxqueue: Implement support for buffer lists 2015-03-19 11:54:37 +01:00
Nicolas Dufresne
1c27002ebd rtspsrc: Improve trace readability
Change the command number into strings.
2015-03-18 17:32:36 -04:00
Jan Alexander Steffens (heftig)
be8e3196a3 flvdemux: Don't repeatedly warn after no_more_pads (v2)
This can get rather spammy for such a high log level.
Only warn once per stream.

https://bugzilla.gnome.org/show_bug.cgi?id=746274
2015-03-16 12:01:43 +00:00
Jan Alexander Steffens (heftig)
ac8a272381 flvdemux: Introduce constant for no-more-pads threshold
https://bugzilla.gnome.org/show_bug.cgi?id=746274
2015-03-16 12:01:43 +00:00
Jan Alexander Steffens (heftig)
f2a1f74cec flvdemux: Fix warning to contain 'video'
https://bugzilla.gnome.org/show_bug.cgi?id=746274
2015-03-16 12:01:43 +00:00
Nicola Murino
bb3d82ef04 matroskademux: for dts only stream set pts=dts for intra only formats
https://bugzilla.gnome.org/show_bug.cgi?id=745192
2015-03-15 14:28:36 +00:00
Ramiro Polla
0fad053497 matroskademux: fix sending of tags
* Fix critical when new tags are found after segment event has already
  been sent.
* Send global tags before stream tags.
* Split sending of tags out of gst_matroska_demux_send_event() into its
  own function.

https://bugzilla.gnome.org/show_bug.cgi?id=745973
2015-03-14 18:17:48 +00:00
Ramiro Polla
90be7b4e1e rtspsrc: properly escape percent sign in documentation 2015-03-14 14:22:39 +00:00
Ramiro Polla
63944753b0 rtpdtmfmux: properly escape percent sign in documentation 2015-03-14 14:22:26 +00:00
Tim-Philipp Müller
3c595f308a multiudpsink: fix crash with GST_DEBUG enabled
g_inet_socket_address_get_address() does not give
us a ref to the address, so don't unref it.
2015-03-13 18:38:42 +00:00
Sebastian Dröge
7b90bf3215 level: Don't read over the end of the input memory
Previously we advanced the in_data pointer by bps for every channel, and then
later again for block_size*bps. This caused us to be one sample further than
expected if an input buffer covered two analysis frames. And in the end lead
to completely bogus values reported by level.

https://bugzilla.gnome.org/show_bug.cgi?id=746065
2015-03-12 13:51:56 +00:00
Tim-Philipp Müller
c4fa54da17 Fix double semicolons 2015-03-10 09:31:20 +00:00
Jan Schmidt
d441140cd6 splitmux: Shut down element before downward state change
Make sure the state change won't hang trying to shut down pads
by making sure the streaming has stopped before chaining up.
2015-03-10 15:49:33 +11:00
Luis de Bethencourt
823194284c rtph264depay: remove unused value
CID #1226474
2015-03-09 16:22:33 +00:00
Luis de Bethencourt
5cd293fe76 rtph263pay: fix leak
CID 1212156
2015-03-09 16:17:45 +00:00
Luis de Bethencourt
e87113781a rtph263pay: remove uneeded variable
We just need to save the ebit information in case there is an error decoding.
2015-03-09 16:17:45 +00:00
Luis de Bethencourt
db3ade5bfb matroska: error mode if can't push buffer
If gst_pad_push() fails, inform and return flow error.
2015-03-09 12:51:21 +00:00
Luis de Bethencourt
f494da89b4 matroska: unused value
Value set in ret will be overwritten just before exiting the function.

CID #1226469
2015-03-09 12:13:40 +00:00
Sebastian Dröge
9e934d076b rtpjitterbuffer: Drop packets with sequence numbers before the seqnum-base
These are outside the expected range of sequence numbers and should be
clipped, especially for RTSP they might belong to packets from before a seek
or a previous stream in general.
2015-03-09 11:10:35 +01:00
Linus Svensson
398296d978 rtspsrc: Don't include payload type in the caps for framesize
When the sdp media attribute framesize are converted to caps
the <payload> should not be included.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725335
2015-03-09 10:18:35 +01:00
Sebastian Dröge
38bf3d3808 rtpjitterbuffer: Don't forget to unlock the mutex when receiving GAPs in TCP streams 2015-03-09 10:05:14 +01:00
Mark Nauwelaerts
d0587467fc avidemux: resurrect some flow return handling 2015-03-07 20:22:33 +01:00
Nicolas Huet
5ead23a14a aacparse: fix LOAS parsing issue
Fix missing index in syncword searching

https://bugzilla.gnome.org/show_bug.cgi?id=745585
2015-03-06 14:34:08 -03:00
Jan Schmidt
b0ce43cde3 splitmuxsink: Protect property variables with the object lock.
Use the object lock instead of the splitmux lock to protect
internal property variables, so they're not locked when
switching to a new file.

https://bugzilla.gnome.org/show_bug.cgi?id=744420
2015-03-07 00:55:47 +11:00
Sebastian Dröge
c34a7cb90d rtspsrc: Fix handling of interleaved (TCP) streams
We need to set up the transport in any case, not just if we have a container
stream or a non-interleaved stream. Only if we have an interleaved stream and
are retrying, we should not set up the stream again.

https://bugzilla.gnome.org/show_bug.cgi?id=745599
2015-03-05 12:15:04 +01:00
Sebastian Dröge
b4aaa11f97 rtspsrc: Don't unref caps we don't own 2015-03-05 09:56:37 +01:00
Sebastian Dröge
297d808acc rtspsrc: Push RTCP caps on the RTCP pads
Otherwise we will get not-negotiated later from rtpbin, and will never be able
to send RTCP packets back to the server. Note that error flow returns from the
RTCP pads are ignored, that's why it didn't fail more visible before.
2015-03-05 09:47:29 +01:00
Sebastian Dröge
788074733c rtspsrc: Make sure to send SEGMENT events on all pads 2015-03-05 09:47:29 +01:00
Santiago Carot-Nemesio
e05378ec16 rtp: Add Full Intra Request (FIR) packets to statistics
https://bugzilla.gnome.org/show_bug.cgi?id=745587
2015-03-04 12:04:40 +01:00
Santiago Carot-Nemesio
22791413f9 rtp: Add Packet Loss Indication (PLI) to statistics
This is helpful to provide statistics in the format defined in
http://w3c.github.io/webrtc-stats/#dictionary-rtcrtpstreamstats-members.

https://bugzilla.gnome.org/show_bug.cgi?id=745587
2015-03-04 12:04:07 +01:00
Nicola Murino
c4e542de69 matroskamux: Remove duration accumulation logic
Duration accumulation can cause rounding errors and generate wrong
duration with different buffers that share the same timestamp.

https://bugzilla.gnome.org/show_bug.cgi?id=745192
2015-03-04 11:37:48 +01:00
Nicola Murino
f727762c1f matroska: Add an helper method to get buffer timestamps
... and replace GST_BUFFER_TIMESTAMP that always return PTS with this method
that return PTS or DTS based on stream type.

https://bugzilla.gnome.org/show_bug.cgi?id=745192
2015-03-04 11:36:24 +01:00
Sebastian Dröge
8984e18ef7 rtpsession: Add explanation why we have space for 32 hash tables
And also create only one, there's no need yet to create all 32 until
we implement RFC2762.
2015-03-04 11:30:43 +01:00
Sebastian Dröge
af2bdd6e15 Revert "rtpsession: Do not use an array of maps if they are not being used"
This reverts commit 1591adf4cd.

https://bugzilla.gnome.org/show_bug.cgi?id=745586#c1:
It's the beginning of an implementation of RFC 2762, which is needed for
large multicast groups. The implementation is not yet complete but why
not leave what is there and implement RFC 2762 instead?
2015-03-04 11:26:57 +01:00
Santiago Carot-Nemesio
1591adf4cd rtpsession: Do not use an array of maps if they are not being used
rtpsession declares an array of maps to store srrcs but only the
the key 0 is being used. This patch replaces the array of maps
for just one map and remove useless parameters in rtpsession

https://bugzilla.gnome.org/show_bug.cgi?id=745586
2015-03-04 11:25:30 +01:00
Jimmy Ohn
42599eab76 avidemux: remove not needed code
In gst_avi_demux_handle_src_query, there is not needed code.
We already check about stream is vbr or not at the upper line.
o, we don't need to check this condition becase stream is not
vbr 100% in this case.

https://bugzilla.gnome.org/show_bug.cgi?id=745276
2015-03-04 10:08:21 +01:00
Matej Knopp
f75e443a7a qtdemux: fix key unit seek
Unlike many other seek flags, the KEY_UNIT seek
flag is not copied over into the GstSegment,
since it's only relevant for the seek itself,
so we need to pass it explicitly to the seek
handler here.

https://bugzilla.gnome.org/show_bug.cgi?id=745339
2015-03-01 13:06:55 +00:00
Nicola Murino
e676b8ba9c matroskamux/demux: initialize dts_only
https://bugzilla.gnome.org/show_bug.cgi?id=745192
2015-02-27 09:56:06 +02:00
Nicola Murino
09b8f0efc3 matroskamux: store DTS for V_MS/VFW/FOURCC streams
https://bugzilla.gnome.org/show_bug.cgi?id=745192
2015-02-27 09:56:06 +02:00
Tim-Philipp Müller
f5b511b42b multifile: attempt to fix docs build issue on build bot 2015-02-26 19:48:33 +00:00
Arun Raghavan
0c06553fb2 interleave: Drop custom latency query handling
This is implemented by the default query handler now.
2015-02-27 00:59:43 +05:30
Arun Raghavan
dbc142afec videomixer: Drop custom latency querying logic
This is now implemented in the default latency query handler.
2015-02-27 00:59:43 +05:30
Sebastian Rasmussen
d331d931db rtpvorbispay: fix payloader description and author e-mail
https://bugzilla.gnome.org/show_bug.cgi?id=745226
2015-02-26 15:57:08 +00:00
Matej Knopp
fa283f407f matroskademux: V_MS/VFW/FOURCC streams have DTS instead of PTS
When such stream is present demuxer should set DTS on buffers instead
of PTS. This is consistent with how VLC and libav/ffmpeg handle VFW
streams.

Sample file
https://s3.amazonaws.com/MatejK/Samples/Matroska-VFW-DTS-Only.mkv

https://bugzilla.gnome.org/show_bug.cgi?id=745192
2015-02-26 11:12:34 +02:00
Krzysztof Kotlenga
e3ca4d1c86 rtspsrc: improve error message when unauthorized
Make use of NOT_AUTHORIZED error code instead of falling back to generic
READ error.

https://bugzilla.gnome.org/show_bug.cgi?id=601733
2015-02-24 11:08:27 +02:00
Thibault Saunier
fa0870658d qtdemux: All segment resulting from a seek should have the same seqnum
https://bugzilla.gnome.org/show_bug.cgi?id=744983
2015-02-23 20:05:20 +01:00
Vincent Penquerc'h
dc73d153cb rtpvp8pay: default encoding name to VP8
https://bugzilla.gnome.org/show_bug.cgi?id=737810
2015-02-19 14:29:02 +00:00
Vincent Penquerc'h
b88ea286d2 rtpvp8pay: make caps writable before truncating them
https://bugzilla.gnome.org/show_bug.cgi?id=737810
2015-02-19 14:06:51 +00:00
Vincent Penquerc'h
b866c989f5 rtpvp8pay: negotiate encoding name
Chrome uses a different one than gstreamer.

https://bugzilla.gnome.org/show_bug.cgi?id=737810
2015-02-19 13:52:29 +00:00
Sebastian Dröge
939a95d44b rtpsession: Send initial events on sync_rtcp pad when using RTP/RTCP muxing
Otherwise we will just send buffers on the pad without any events beforehand
and will get g_warnings() about that.
2015-02-19 13:34:47 +02:00
Thiago Santos
84b7cf6795 qtmux: remove not needed condition
gst_buffer_replace can handle NULL inputs by itself
2015-02-18 10:36:06 -03:00
Thiago Santos
a12e41c106 qtdemux: prefer the tfdt timestamp over the buffer's that is less accurate
The tfdt should be more accurate as the buffer timestamp is provided
by the fragmented format manifest and it might just be an approximation.
2015-02-18 09:57:48 -03:00
Sebastian Dröge
735c6c40f8 rtpjitterbuffer: When resetting the jitterbuffer because of packet discont, don't flush sticky events
We will otherwise flush away STREAM_START, CAPS or SEGMENT events and will
confuse downstream with buffers that come before such events.
2015-02-17 16:57:55 +02:00
Edward Hervey
6798dc7912 isomp4: Redefine gst_isoff_ symbols to gst_isoff_qt_
We need different symbol names, because these symbols are also present
in the fragmented plugin ... which will cause conflicts when doing
static linking
2015-02-17 12:31:06 +01:00
Luis de Bethencourt
ea1d67abe3 goom2k1: use fractional part of float division 2015-02-16 14:31:05 +00:00
Luis de Bethencourt
4af5a2b760 splitmuxsin: remove dead code
Every instance of goto beach has buf_info equal NULL. Don't check
for a condition that never happens.

CID #1268399
2015-02-16 13:59:17 +00:00
Nicolas Dufresne
b8142bde07 spectrum: Fix min and max for bands property
The number of FFTs is calculated with the following formula:

  guint nfft = 2 * bands - 2;

nfft is passed to gst_fft_f32_new() as the len argument and is of type
unsigned integer. This method required that len is at leas 1, then
maximum G_MAXINT, as other values would be negative. If we extrapolate
from the formula above it means we need "bands" to be between 2 and
((guint)G_MAXINT + 2) / 2).

https://bugzilla.gnome.org/show_bug.cgi?id=744213
2015-02-15 21:34:28 -05:00
Thiago Santos
afa5481c50 qtdemux: do not use sparse streams in push-based seeking
Using the sparse streams can make the push-based seeking return
too far in the stream. It also can lead to issues as the
sparse streams will be ignored when restarting playback and,
 if the sparse stream is the one that has the earliest sample,
it will confuse qtdemux's offsets as one stream will have
an earlier offset than the demuxer's one which might lead to
early EOS.

https://bugzilla.gnome.org/show_bug.cgi?id=742661
2015-02-14 11:36:11 -03:00
Tim-Philipp Müller
3f5b690e78 splitmuxsink: flag as sink from the start 2015-02-13 20:40:48 +00:00
Philippe Normand
3a9b0188cd qtdemux: Initial 'sidx' atom parsing support
Parse the 'sidx' atom and update the total duration according to the
parser result. The isoff parser code is imported from
gst-plugins-bad's dashdemux and a gst_isoff_sidx_parser_add_data()
function was factored out of the gst_isoff_sidx_parser_add_buffer()
function.

https://bugzilla.gnome.org/show_bug.cgi?id=743578
2015-02-12 14:23:21 -03:00
Jan Schmidt
2e00311fe1 flvdemux: Use gst_video_guess_framerate()
Use gst_video_guess_framerate() from libgstvideo to guess
sensible common framerates where possible from the
floating point fps in the stream.
2015-02-12 23:38:47 +11:00
Sebastian Dröge
f4b5107796 Improve and fix LATENCY query handling
This now follows the design docs everywhere, especially the maximum latency
handling.

https://bugzilla.gnome.org/show_bug.cgi?id=744106
2015-02-11 13:53:02 +01:00
Sebastian Dröge
b79eff7f9b rtpsession: Handle first RTCP packet and early feedback correctly
According to RFC 4585 section 3.5.3 step 1 we are not allowed to send
an early RTCP packet for the very first one. It must be a regular one.

Also make sure to not use last_rtcp_send_time in any calculations until
we actually sent an RTCP packet already. In specific this means that we
must not use it for forward reconsideration of the current RTCP send time.
Instead we don't do any forward reconsideration for the first RTCP packet.
2015-02-11 10:32:46 +01:00
Wim Taymans
009a62fddb rtph263depay: fix compilation with gcc 5.0 2015-02-10 18:54:24 +01:00
Tim-Philipp Müller
90badeebad splitmuxsink: fix example pipeline properly
x264enc might not have a max-key-int property, but it
has a key-int-max property...
2015-02-10 16:00:07 +00:00
Luis de Bethencourt
102ae8511a splitmux: fix typo 2015-02-10 14:57:55 +00:00
Luis de Bethencourt
12aa2428e0 splitmux: update example pipeline
Element x264enc doesn't have a max-key-int property
2015-02-10 14:56:23 +00:00
Luis de Bethencourt
0373fd8f65 splitmux: fix memory leak
If execution goes to the beach in line 981, buf_info goes out of scope without
the memory being free'd. Handle this case.

CID #1268403
2015-02-10 13:33:09 +00:00
Tim-Philipp Müller
603c1d71a1 rtspsrc: fix awkward if clause 2015-02-08 12:03:10 +00:00
Jan Schmidt
8ceb58122e splitmux: Add unit test for file splitting
Add a unit test for file splitting, and fix the leaks in the
splitmuxsink it found
2015-02-07 03:58:30 +11:00
Luis de Bethencourt
eb975ce880 wavparse: fix which stop variable is used in assignment
Assignment is done to variable segment.stop when the intention was to assign to
local variable stop. Instead of overwriting it, the value is now clamped and
segment.stop is set to it soon after.

CID #1265773
2015-02-06 14:46:14 +00:00
Jan Schmidt
aa4c29c5d6 splitmux: Fix memory leaks until the test valgrinds clean 2015-02-07 00:19:36 +11:00
Jan Schmidt
ace6be8abb splitmux: Handle early EOS during part preparation
Handle the case where a short file reaches EOS while we're still
waiting for no-more-pads, and make sure we continue to the internal
READY state for real playback to work properly later.
2015-02-06 06:42:17 +11:00
Jan Schmidt
5e2214d309 splitmux: Implement new elements for splitting files at mux level.
Implement 2 new elements - splitmuxsink and splitmuxsrc.

splitmuxsink is a bin which wraps a muxer and takes 1 video stream,
plus audio/subtitle streams, and starts a new file
whenever necessary to avoid overrunning a threshold of either bytes
or time. New files are started at a keyframe, and corresponding audio
and subtitle streams are split at packet boundaries to match
video GOP timestamps.

splitmuxsrc is a corresponding source element which handles
the splitmux:// URL and plays back all component files,
reconstructing the original elementary streams as it goes.
2015-02-06 04:26:59 +11:00
Thiago Santos
a6d73797d0 rtph264depay: prevent trying to get 0 bytes from adapter
This causes an assertion and would lead to getting a NULL instead
of a buffer. Without proper checking this would easily lead to
a segfault

https://bugzilla.gnome.org/show_bug.cgi?id=737199
2015-02-04 21:37:50 -03:00
Jan Schmidt
a3059bec1f qtdemux: Simple implementation of GST_SEGMENT_FLAG_TRICKMODE_KEY_UNITS
When the trickmode key-units flag is set on the segment, simply skip
any sample on a video stream that isn't a keyframe
2015-02-04 21:58:31 +11:00
Wim Taymans
852c040c89 rtspsrc: fix container handling
We detect a container correctly now so we need to revert the weird
check there was before.
Use gst_rtspsrc_stream_push_event() to push the caps event on the
right pad.

See https://bugzilla.gnome.org/show_bug.cgi?id=739391
2015-02-03 17:39:10 +01:00
Thiago Santos
7772a25fdc matroskamux: store and write stream tags
Separate global from stream tags storage and write them to the
appropriate tags entry in the output
2015-02-02 20:07:13 -03:00
Thiago Santos
75dee31b0d qtdemux: parse stream tags
Keep global and stream tags separately and parse the udta node
that can be found under the trak atom. The udta will contain
stream specific tags and will be pushed as such

https://bugzilla.gnome.org/show_bug.cgi?id=692473
2015-02-02 14:05:51 -03:00
Thiago Santos
e52b2cb2cf qtmux: store stream and container tags separately
Tags received via events, when marked as stream tags, will
be stored on that stream's trak atom instead of being stored
in the main tags atom. This allows the resulting file to have
global and stream tags stored.

https://bugzilla.gnome.org/show_bug.cgi?id=692473
2015-01-31 17:23:01 -03:00
Thiago Santos
6321cdedb3 qtmux: refactor tags functions to accomodata UDTA at trak level
Refactor the functions that were bound to the 'moov' atom to
directly pass the desired 'udta' that should receive the tags.
This allows the tags to be written to 'udta' at the 'moov' or
the 'trak' level, creating tags that are for the container or
for a stream only.

https://bugzilla.gnome.org/show_bug.cgi?id=692473
2015-01-31 17:22:57 -03:00
Thiago Santos
f0fde8be88 qtmux: map application name to _swr tag
It refers to the application name and version used to create the
file

https://bugzilla.gnome.org/show_bug.cgi?id=692473
2015-01-31 17:22:44 -03:00
Jan Schmidt
4a77c8a84f matroska: Fix seeking past the end of the file in reverse mode.
Snap to the end of the file when seeking past the end in reverse mode,
and also fix GST_SEEK_TYPE_END and GST_SEEK_TYPE_NONE handling
for the stop position by always seeking on a segment in stream time
2015-01-31 06:15:44 +11:00
Sebastian Dröge
075eb10e65 rtpsession: Fix signal name
This wasn't meant to be pushed at all yet, but now that it's there
already it won't hurt to make it correct at least.
2015-01-30 18:22:31 +01:00
Sebastian Dröge
ec99bbb5e1 rtpstats: Fix typo in documentation 2015-01-30 16:56:35 +01:00
Sebastian Dröge
77511b156e rtpsession: Add new on-receiving-rtcp signal
This will be emitted whenever an RTCP packet is received. Different to
on-feedback-rtcp, this signal gets every complete RTCP packet and not
just the individual feedback packets.
2015-01-30 16:50:36 +01:00
Thiago Santos
9a9d4eccea qtdemux: simplify segment.base math
Remove a fix for heavily edited files added for fixing
https://bugzilla.gnome.org/show_bug.cgi?id=345830 to work
with seeks and proper gaps playback. The fix was replaced
for a more general solution that bases on using previous
segment's duration, just like it works for media segments
playback.

https://bugzilla.gnome.org/show_bug.cgi?id=743518
2015-01-28 15:20:58 -03:00
Luis de Bethencourt
5ff1229754 videomixer: update orc files 2015-01-27 14:00:35 +00:00
Thiago Santos
2586a219f6 qtdemux: Fix data dropping for fragmented streams
For fragmented streams with extra data at the end of the mdat
qtdemux was not dropping those bytes and would try to use
that extra data as the beginning of a new atom, causing the
stream to fail.

https://bugzilla.gnome.org/show_bug.cgi?id=743407
2015-01-27 08:54:19 -03:00
Sebastian Dröge
e4ed852041 rtpsession: Deprecate rtcp-immediate-feedback-threshold property
It had no effect since quite some time and also is not needed in general,
especially not to switch between immediate feedback mode and early feedback
mode. The latest understanding of the RFC is that from the endpoint point of
view, both modes are exactly the same. RTCP is only allowed to use the
bandwidth as given by the RFC constraints, as such it is only ever possible
to schedule a RTCP packet early but it's against the RFC to schedule more RTCP
packets.

The difference between immediate feedback mode and early feedback mode is that
the former guarantees that an RTCP packet can be sent for every event
"immediately", which means that the bandwidth calculations from the RFC have
resulted in an RTCP scheduling interval that is small enough. Early feedback
mode on the other hand means that we can schedule some packets early to make
that happen, but it's not guaranteed at all that it's possible to schedule
an RTCP packet per event (i.e. they need to be accumulated or dropped).
2015-01-26 18:49:31 +01:00
Sebastian Dröge
b07b7736b3 rtpsession: Delay the next regular RTCP packet after early RTCP
This is required to not exceed the short term average RTCP bitrate when
using early feedback as compared to without early feedback.
2015-01-26 18:49:31 +01:00
Sebastian Dröge
bc9111a03d rtpsession: Add new send-rtcp-full signal
This indicates with a boolean return value if scheduling a new RTCP packet
within the requested delay was possible. Otherwise it behaves exactly like
send-rtcp. The only reason for adding a new signal is ABI compatibility.
2015-01-26 18:49:31 +01:00
Luis de Bethencourt
1e15808563 matroskademux: remove unnecessary check
No matter if gst_matroska_read_common_parse_index_cuetrack () returns that the
flow is OK or not, the check there will be a break from the switch. Removing the
check since the outcome is the same.

CID #1265762
2015-01-23 17:35:51 +00:00
Edward Hervey
932b32bb6e matroskamux: Avoid using freed variable
the name variable might have been attributed to pad_name, make sure we
free it only *after* pad_name has been used.

Coverity CID : 1265774
2015-01-23 15:16:25 +01:00
Edward Hervey
8abfd9d720 avimux: Avoid using freed variable
the name variable might have been attributed to pad_name, make sure we
free it only *after* pad_name has been used.

Coverity CID : 1265775
2015-01-23 15:15:07 +01:00
Sebastian Dröge
60e2d0c84f rtpsession: Fix indention 2015-01-22 11:03:25 +01:00
Edward Hervey
7203c4751c qtdemux_dump: Bypass even more code if debugging is disabled
And avoid using variables that won't exist when debugging is disabled
2015-01-21 17:36:26 +01:00
Edward Hervey
906f4c4360 qtdemux: Only traverse/dump nodes if guaranteed to be used
__gst_debug_min is the "global" lowest debug level set. There's no
guarantee the qtdemux debug category is actually set at that level.
2015-01-21 15:32:01 +01:00
Edward Hervey
9fa85f72e1 matroska: Avoid debugging below category threshold
This part alone was what made the matroska thread take a full core
on an android phone ...
2015-01-21 15:26:41 +01:00
Sebastian Dröge
d5aab81a77 Constify some static arrays everywhere 2015-01-21 09:55:53 +01:00
Vincent Penquerc'h
d854cfff9d qtdemux: fix deadlock seeking in files without seek entries
A mutex unlock was missing.

https://bugzilla.gnome.org/show_bug.cgi?id=739975
2015-01-19 17:49:54 +00:00
Vincent Penquerc'h
84c44fceac videomixer: fix illegal memory access in blend function with negative ypos
https://bugzilla.gnome.org/show_bug.cgi?id=741115
2015-01-19 12:34:25 +00:00
Sebastian Dröge
dc2251a664 qtmux: Add support for v210 2015-01-13 19:05:40 +01:00
Sebastian Dröge
b7134435ee qtdemux: v210 is v210, not UYVY and yuv2 is YUY2, not I420
Also add a few other raw video formats we support: v308, v216
and add comments for a few others we don't support yet.

https://developer.apple.com/library/mac/technotes/tn2162/
2015-01-13 19:05:40 +01:00
Thiago Santos
3e0be85840 qtdemux: fix stream time conversion
Use the right macro to convert to the correct scale or the
segment information will be wrong

https://bugzilla.gnome.org/show_bug.cgi?id=742572
2015-01-09 11:40:40 -03:00
Matej Knopp
ff5b235c32 ac3parse: request at least 8 bytes to properly parse header
https://bugzilla.gnome.org/show_bug.cgi?id=742325
2015-01-08 14:45:23 +01:00
Michael Smith
e8f3d596bc wavparse: skip an additional uninteresting chunk type before the fmt chunk. 2015-01-07 16:20:03 -08:00
Luis de Bethencourt
42535107ca audiodynamic: assert func_index is inside bounds
Bringing back the check removed in the previous commit but have that check be a
g_assert. Changing the function to static void since return can never be False,
because audio format will never be unkown.
2015-01-07 18:16:12 +00:00
Luis de Bethencourt
1db92a91de audiodynamic: remove always-true conditional
func_index is set by the sum of three ternary operators which add, 0:4, 0:2,
and 1:0. Minimum value would be 0+0+0=0, and maximum would be 4+2+1=7.
The conditional checking if func_index is >= 0 and < 8 will always be true.
Removing it.

CID 1226442
2015-01-07 17:31:39 +00:00
Sebastian Dröge
87c8c163a8 rtpjitterbuffer: If we get a gap with a buffer without DTS, error out
We (currently?) can't really handle gaps between RTP packets if they're not
properly timestamped. The current code would go into calculations with
GST_CLOCK_TIME_NONE and then cause assertions everywhere. It's probably
better to error out cleanly instead.
2015-01-07 18:05:18 +01:00
Aleix Conchillo Flaqué
07c5d1820a rtspsrc: set PLAYING state after configuring caps
We set to PLAYING after we have configured the caps, otherwise we
might end up calling request_key (with SRTP) while caps are still
being configured, ending in a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=740505
2014-12-31 12:49:11 +00:00
Sebastian Dröge
67d4b85d6a matroskademux: Improve detection of being stuck at the same offset
Only error out if we read from the same position again and got the
same length. Just the same position is not necessarily enough.
2014-12-29 15:35:19 +01:00
Sebastian Dröge
e596a3b6a7 matroskademux: Don't get stuck at the same offset when searching for clusters
This could happen if there is an invalid cluster with size 0, and in that
case just error out instead of looping forever.
2014-12-29 15:02:52 +01:00
Tim-Philipp Müller
aa94fc6beb qtmux: fix ALAC muxing
Actually copy the codec data instead of copying nothing
and then bombing out because there's no data.

Fixes: gst-launch-1.0 audiotestsrc ! avenc_alac ! qtmux ! fakesink

https://bugzilla.gnome.org/show_bug.cgi?id=741783
2014-12-25 21:37:49 +00:00
Tim-Philipp Müller
c62209d050 rtpptdemux: just drop invalid rtp packets instead of erroring out
Apparently linphone sends an invalid RTP packet as very
first packet. We want to ignore that instead of erroring
out (same for any other invalid packets really).

https://bugzilla.gnome.org/show_bug.cgi?id=741398
2014-12-25 15:48:04 +00:00
Tim-Philipp Müller
bcad30510b rtpptdemux: fix 0.10-ism in docs 2014-12-25 15:44:15 +00:00
Edward Hervey
cbe56d2331 matroska-demux: Cache upstream length
Instead of constantly querying upstream, just cache the last duration,
and in the unlikelyness we might have gone over query again before
deciding we are EOS.

Cut 15% cpu off matroskademux streaming thread (srsly...)
2014-12-19 10:59:18 +01:00
Vincent Penquerc'h
b7413279d9 matroska: mux/demux the OpusHead header
This is meant to be so (https://wiki.xiph.org/MatroskaOpus - while
it is marked as a draft, this part was confirmed to be correct on
IRC), and allows one to determine whether a demuxed stream is
multistream or not, and thus set the multistream caps field
accordingly. In turn, this means downstream does not have to guess.

https://bugzilla.gnome.org/show_bug.cgi?id=740744
2014-12-18 11:38:49 +00:00
Sebastian Dröge
d18b893d28 rtspsrc: Don't dereference NULL if a suitable stream for the AUX element can't be found
CID 1258717
2014-12-18 11:51:12 +01:00
Tim-Philipp Müller
4dd7d79b52 udpsink: allocate scratch space for render functions on the heap
and not the stack. Our allocations could get a bit too large
to be sure it's not going to cause trouble using the stack.
2014-12-16 20:26:36 +00:00
Tim-Philipp Müller
97a2eb7afb multiudpsink: re-use send_buffers() code path for render() function
It's like rendering a buffer list, just with one buffer.
Has the added advantage that if there are multiple clients
we can send the buffer to all the clients in one go.
2014-12-16 20:26:36 +00:00
Tim-Philipp Müller
54a9a436ba multiudpsink: keep client list consistent during removals
We unlock and re-lock the client lock while emitting the
removed signal, which causes inconsistencies in the client
list vs. the client counts. Instead, remove the client from
the list already before emitting the signal and put it into
a temporary list of clients to be removed. That way things
look consistent to the streaming thread, but signal callbacks
can still do things like get stats from removed clients.
2014-12-16 20:26:36 +00:00
Tim-Philipp Müller
fa3ef2e54c multiudpsink: fix client count after removal 2014-12-16 20:26:36 +00:00
Tim-Philipp Müller
7bdf7500a1 multiudpsink: keep client list sorted by socket family
We make use of in the send_buffers() function if we
need to use different sockets to send to IPv4 and
IPv6 destinations.
2014-12-16 20:26:36 +00:00
Tim-Philipp Müller
e1a7deb27f multiudpsink: add sendmmsg-ready render_list function prototype
Add prototype for a render_list() function that can use a
sendmmsg-style g_socket_send_messages() function once it lands
in GLib. We can use this infrastructure to send multiple buffers
made up by multiple memories to multiple clients in one go, which
drastically reduces the number of syscalls made when sending
high-bitrate video streams.

https://bugzilla.gnome.org/show_bug.cgi?id=732152
2014-12-16 20:26:36 +00:00
Tim-Philipp Müller
dead5c2476 multiudpsink: make udp client structure refcounted
Use the refcount for memory management and keep track
of the number of duplicate clients in a separate
variable. This will be useful later, and means we
don't have to hold the OBJECT_LOCK all the time.

https://bugzilla.gnome.org/show_bug.cgi?id=732866
2014-12-16 20:26:36 +00:00
Tim-Philipp Müller
675384a8cb multiudpsink: keep count of number of unique and non-unique IPv4 and IPv6 clients
This will come in handy later.
2014-12-16 20:26:36 +00:00
Sebastian Dröge
6b2fc2de8d rtspsrc: Add something to the debug logs if an RTX AUX element can't be added
... because the application already has a signal handler set up here.
2014-12-16 16:40:08 +01:00
Matthew Waters
bf0a19bf02 rtspsrc: add retransmission support according to RFC4588
Based on the client-rtpaux example
2014-12-16 16:40:08 +01:00
Nicolas Dufresne
9c468ef2da videocrop: Remove todo about caps filter
The filter is already interected.
2014-12-15 18:30:01 -05:00
Nicolas Dufresne
36f1a9bce1 videocrop: Make sure new crop is applied
Since "basetransform: Fix caps equality check" commit a7f357,
set_info() will not be called anymore if crop didn't change
the caps. This is fixed by setting "need_update" boolean when
cropping properties has been changed, and then applying these
if they where not applied before rendering the next frame. This
patch also fixed the locking, dropping un-needed custom lock,
and no holding needless lock while doing the operation as we
already hold the streaming lock.

https://bugzilla.gnome.org/show_bug.cgi?id=740787
2014-12-15 18:27:09 -05:00
Thibault Saunier
76944350c0 Deinterlace: in query_caps return only supported formats if filter is interlaced
In some cases the currently set GstVideoInfo is not interlaced, but
upstream caps are interlaced and the info is passed in the filter,
we should take that info into account and make sure that we do not
consider that case as a "pass through" case.

https://bugzilla.gnome.org/show_bug.cgi?id=741407
2014-12-14 12:41:16 +01:00
Edward Hervey
6b69ef24a1 qtdemux: Fix debug statement
It was using the non-increasing offset variable, which made that statement
not so useful :)
2014-12-12 11:06:17 +01:00
Edward Hervey
d1ae39d6d6 qtdemux: Add macros for the various timescale conversions
This helps make the code more readable and avoid future bad usage of
scaling function argument order.
2014-12-12 11:03:15 +01:00
Patrick Radizi
0a359cdbdc rtph264pay: fix potential crash when shutting down
A race condition in the state change function may cause buffers
to be unreffed while they are still used by the streaming thread
in gst_rtp_h264_pay_send_sps_pps() resulting in a crash. Chain
up to the parent class first in the state change function to
make sure streaming has stopped and only then free those buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=741381
2014-12-11 14:00:19 +00:00
Jan Schmidt
de8d00348e qtdemux: Copy flags of the overall segment to output segments
Preserve the segment flags of the overall demux segment on the output
segments for each pad.
2014-12-12 00:56:49 +11:00
Matej Knopp
2505e343b1 qtmux: use 64bit chunk_offset
https://bugzilla.gnome.org/show_bug.cgi?id=741279
2014-12-10 18:42:30 -03:00
Edward Hervey
9a903c994f qtdemux: Fix rounding errors in duration update
Make sure we store updated segment stop/duration with the same
granularity as the duration timescale.

And add more debug
2014-12-10 17:39:17 +01:00
Edward Hervey
b40cfcfffb qtdemux: Update duration when we get more information
When dealing with fragmented files, we will get more accurate duration
information via the mfra and moof atoms.

In order for playback to not stop at the initial duration (from the
moov atom), we need to check and update the various duration variables
when we find more information.

Fixes playback of fragmented files in pull mode
2014-12-10 16:55:44 +01:00
Edward Hervey
799609583e qtdemux: Remove variable assignments never read
As detected by clang/scan-build
2014-12-10 15:09:25 +01:00
Edward Hervey
7828f73516 qtdemux: Use GstClockTime for nanosecond-based time variables/fields
Avoids confusion with timescaled-based variables and bytes (offset)
variables.
And use GST_CLOCK_TIME_NONE where applicable
2014-12-10 15:09:25 +01:00
Edward Hervey
0a381b9edd pushfilesrc: Add TIME SEGMENT capability
Adds a new set of properties to make pushfilesrc output a TIME SEGMENT
(instead of the filesrc BYTE SEGMENT).

When time-segment is set to True the following will happen:
* Seeks are refused (data starts from the beginning of the file)
* The BYTE segment will be replaced by a TIME segment with the values
  specified in the various properties
* The first outgoing buffer will have a timestamp set on it (by default
  it has a value of GST_CLOCK_TIME_NONE)
2014-12-10 15:09:25 +01:00
Sebastian Dröge
f5d26af3c9 aacparse: Also only unref caps if they're not NULL 2014-12-10 11:35:29 +01:00
Sebastian Dröge
6d6c6aac13 aacparse: gst_pad_get_allowed_caps() will return NULL if there is no peer 2014-12-10 11:35:02 +01:00
Thibault Saunier
52a1773b40 rtpsession: Use an empty iterator in iterate_internal_link when no links
And not a NULL Iterator, so it is consistent with the way it usually
works and avoid user to need a different code paths to handle that.
2014-12-09 20:38:22 +01:00
Patrick Radizi
fef1a8d88a rtph264pay: Fixes buffer leak when using SPS/PPS
Fixes a buffer leak that would occurr if the pipeline was shutdown
while a SPS/PPS header was being created.

https://bugzilla.gnome.org/show_bug.cgi?id=741271
2014-12-09 09:47:23 +01:00
Mathieu Duponchelle
a5694b213a agingtv: fix memcpy when no color aging requested.
video_size is the size in pixels, actual size of the memcpy
has to be stride * height.
2014-12-09 04:44:40 +01:00
Nicola Murino
c466ff4748 matroskademux: set framerate 0/1 when duration is not known
https://bugzilla.gnome.org/show_bug.cgi?id=740130
2014-12-04 18:20:37 +01:00
Jan Schmidt
f4ca3c255a qtdemux: More fixes for reverse playback
When seeking or finding the previous keyframe, do
comparisons against targets and segments using composition time
to correctly decide which sample times match.
2014-12-04 22:53:07 +11:00
Thibault Saunier
aa89278ade rtpjitterbuffer: Use an empty iterator in iterate_internal_link when no links
We used to setup an iterator with 1 GValue set with a NULL object
pointer which is not the normal way to do that. Instead we should make
sure that the first call to gst_iterator_next returns GST_ITERATOR_DONE.
2014-12-03 11:17:11 +01:00
Jan Schmidt
b3d1ab5267 qtdemux: Handle seeks past EOS as a seek to the end
Fix reverse playback of every frame by making seeks past/to EOS
find the last segment and start there.
2014-12-03 13:23:35 +11:00
Olivier Crête
e3b0fb2a5d rtpmpadepay: Relax caps to allow any clock-rate
Some Wowza setups seem to send an invalid non-90000 clock-rate.
2014-12-02 15:33:25 -05:00
Thiago Santos
148da6210a qtdemux: don't use GST_CLOCK_TIME_NONE in non GstClockTime variables
Use -1 instead as those are gint64/guint64 variables and not GstClockTime
2014-12-02 00:46:35 -03:00
Tim-Philipp Müller
d65c3bbe7e qtdemux: implement seeking in fragmented mp4 files in pull mode based on the mfra table 2014-11-30 15:33:13 +00:00
Tim-Philipp Müller
77f37a6b22 qtdemux: use track fragment decoding time (tfdt) in parse_trun() for interpolation
As fallback if we don't have any existing samples
as reference point yet.

Based on patch by David Corvoysier <david.corvoysier@orange.com>
2014-11-30 15:33:13 +00:00
Tim-Philipp Müller
e24f903b13 qtdemux: parse mfra random access box for fragmented mp4 files
If it's present, and we operate in pull mode.
2014-11-30 15:33:13 +00:00
Tim-Philipp Müller
8a0f4e74e4 qtdemux: stop parsing headers for fragmented mp4s at the first moof
Currently during header parsing, we scan through the entire file
and skip every moof+mdat chunk for fragmented mp4s, which makes
start-up incredibly slow. Instead, just stop at the first moof
chunk when have a moov, and start exposing the streams, so we
can go and start handling the moofs for real.
2014-11-30 15:30:04 +00:00
Olivier Crête
ccac1f8c0b rtprtxreceive: Use offset when copying header
The header is not always at the start of the packet, so we need to compute
the offset first.
2014-11-29 18:38:12 -05:00
Andrei Sarakeev
6348de195d aspectratiocrop: Handle resolution changes properly
When an caps-event is received, we must immediately change the crop
to videocrop correctly changed caps-event dimension, otherwise the
videocrop will first use the previous value of the crop that when
resizing video to a smaller resolution may cause an error.

https://bugzilla.gnome.org/show_bug.cgi?id=740671
2014-11-28 11:19:23 +01:00
Edward Hervey
5b5e9f320f isomp4: Check presence of mfhd in moof
The 'mfhd' atom is mandatory in 'moof'. We can later on check whether
the fragment number properly increases
2014-11-26 16:36:39 +01:00
Edward Hervey
5e3e97353d isomp4: Fix mfro and tfra atom dumping
mfro was skipping the version/flags
tfra had wrong byte_reader return value checks
2014-11-26 16:36:39 +01:00
Edward Hervey
c45533bcd7 isomp4: Add mfhd atom dumping 2014-11-26 16:36:39 +01:00
Jan Schmidt
61bbd2d226 qtdemux: Handle empty segments when seeking in reverse play.
Empty segments in an edit list have a media_start time of -1,
as they don't actually play any media. Allow for that when
aligning to the reference stream in reverse play.
2014-11-27 00:17:03 +11:00
Tim-Philipp Müller
69ec922c16 icydemux: does not need to link against zlib 2014-11-23 16:24:06 +00:00
Miguel París Díaz
6daa57868f rtpjitterbuffer: ensure rtx_retry_period >= 0
https://bugzilla.gnome.org/show_bug.cgi?id=739344
2014-11-22 14:48:57 +00:00
Arun Raghavan
45e716e75d rtpbin: Fix up new_jitterbuffer signal prototype 2014-11-20 22:42:59 +05:30
Arun Raghavan
56436ccced rtpbin: Document how to control per-SSRC retransmission 2014-11-20 20:24:42 +05:30
Wim Taymans
3d7b0f30d7 rtpgstpay: put 0-byte at the end of events
Put a 0-byte at the end of the event string. Does not break ABI because
old depayloaders will skip the 0 byte (which is included in the length).
Expect a 0-byte at the end of the event string or a ; for old
payloaders.

See https://bugzilla.gnome.org/show_bug.cgi?id=737591
2014-11-20 13:14:14 +01:00
Wim Taymans
9d2902d978 rtpgstdepay: avoid buffer overread.
Check that a caps event string is 0 terminated and the event string is
terminated with a ; to avoid buffer overreads.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=737591
2014-11-20 12:44:26 +01:00
Tim-Philipp Müller
488d0b93cd qtmux: don't limit max video resolution to 4096x4096
MAX isn't entirely correct as upper limit either,
it should really be MAXUINT32, but it's unlikely
to be a problem in the near future.

https://bugzilla.gnome.org/show_bug.cgi?id=740407
2014-11-20 10:45:53 +00:00
Aleix Conchillo Flaqué
00ca83629b rtspsrc: fix leak for mikey base64 decoded key-mgmt
https://bugzilla.gnome.org/show_bug.cgi?id=740392
2014-11-20 09:15:56 +01:00
Wim Taymans
e95da8410f videobalance: fix unhandled format in passthrough
In passthrough we can handle all formats.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=740387
2014-11-20 09:02:36 +01:00
Jan Alexander Steffens (heftig)
bf73d834b2 flvdemux: Restrict resyncing to TS regressions
The behavior of resyncing video and audio indepen-
dently can cause A/V desyncs. Lets restrict resyncs
to jumps backward for now.

https://bugzilla.gnome.org/show_bug.cgi?id=736397
2014-11-19 11:58:19 -05:00
Matthew Waters
0053ad0847 videomixer: fix up QoS handling for live sources
Only attempt adaptive drop when we are not live

https://bugzilla.gnome.org/show_bug.cgi?id=739996
2014-11-17 23:16:03 +11:00
Arun Raghavan
1c3b233fef rtpmanager: Trivial typo fix 2014-11-10 13:16:50 +05:30
Sebastian Dröge
7a909917b5 matroska-mux: Use G_DEFINE_TYPE() to register the pad instead of manually registering it 2014-11-09 11:04:33 +01:00
Göran Jönsson
ec05d3b6d8 matroskamux: make GstMatroskamuxPad get_type() function thread-safe
https://bugzilla.gnome.org/show_bug.cgi?id=739722
2014-11-07 21:20:31 +00:00
Josep Torra
038cc7b004 rtsp: fix build in gst-uninstalled setup 2014-11-06 21:38:43 +01:00
Thibault Saunier
99bbc2bbe4 imagefreeze: Handle seqnums
https://bugzilla.gnome.org/show_bug.cgi?id=739366
2014-11-06 12:20:25 +01:00
Wim Taymans
26d682d23f videomixer2: reverse order of params for converter 2014-11-03 15:26:06 +01:00
Tim-Philipp Müller
c756fd6a55 goom2k1: post QoS messages when dropping frames due to QoS 2014-11-02 19:42:03 +00:00
Tim-Philipp Müller
b03056eede goom: post QoS messages when dropping frames due to QoS 2014-11-02 19:31:01 +00:00
Tim-Philipp Müller
85c3c36712 matroskamux: tweak writing app tag string a little 2014-11-02 19:02:35 +00:00
Tim-Philipp Müller
3956f5addc Sprinkle some G_PARAM_DEPRECATED and #ifndef GST_REMOVE_DEPRECATED 2014-11-02 16:58:30 +00:00
Tim-Philipp Müller
d940c21b78 rtpjitterbuffer: implement get/set for new rtx-min-retry-timeout property
Properties are so much more useful if you can actually set
and get their values.
2014-11-02 13:06:33 +00:00
Nicolas Dufresne
0f4f948f5f rtpvp8: Use VP8 encoding name
Both Firefox and Chrome uses VP8 as the encoding in their SDP.
Adding this now defacto standard name removes the need for special
case in SDP parsing code.

https://bugzilla.gnome.org/show_bug.cgi?id=737810
2014-11-01 11:26:26 -04:00
Tim-Philipp Müller
92c1d289b8 rtpmp2tpay: fix up template caps so we can output the default pt 33
Add fixed payload type for mp2t to template caps as well, so
our output caps match the advertised default pt. Fixes a
regression from 1.2.

There's still something wrong with caps negotiation though,
rtpmp2tpay payload=96 ! fakesink will not output caps with
payload=96.
2014-11-01 12:40:07 +00:00
Aleix Conchillo Flaqué
d15ebcbf62 rtspsrc: mikey related memory leaks
https://bugzilla.gnome.org/show_bug.cgi?id=739430
2014-10-31 10:03:47 +00:00
Sebastian Dröge
4aac09e708 aacparse: Always set profile/level on the caps
We have the information already, so why not use it?
2014-10-26 11:47:25 +01:00
Tim-Philipp Müller
b02d73a0ed rtpjitterbuffer: fix crash on some 32-bit systems
Make sure to pass right number of bits to gst_structure_new()
which is a vararg function.

Fixes elements/rtpaux unit test on ppc32.
2014-10-25 12:45:31 +01:00
Tim-Philipp Müller
401782c19d interleave: intersect result with filter caps in caps query
Fixes crash in audiotestsrc because of an unsupported format
getting negotiated on big-endian systems with
audiotestsrc ! interleave ! audioconvert ! wavenc
2014-10-25 11:08:48 +01:00
Wim Taymans
bd09dc96e9 rtpjitterbuffer: limit the retry frequency
When the RTT and jitter are very low (such as on a local network), the
calculated retransmission timeout is very small. Set some sensible lower
boundary to the timeout by adding a new property. We use the packet
spacing as a lower boundary by default.
2014-10-22 15:04:24 +02:00
Miguel París Díaz
4b5243c43d gstrtpjitterbuffer: add "rtx-min-delay" property
This property is useful to set a min time to wait before sending a
retransmission event.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=735378
2014-10-22 15:00:27 +02:00
Wim Taymans
0b81b316b5 jitterbuffer: Refactor code
Refactor some code dealing with calculating various timeouts.

See https://bugzilla.gnome.org/show_bug.cgi?id=735378
2014-10-22 14:59:57 +02:00
Miguel París Díaz
e6504e3a65 rtpsession: fix Early Feedback Transmission
In early retransmission we are allowed to schedule 1 regular RTCP packet
at an earlier time. When we do that, we need to set allow_early to FALSE
and ignore/drop (or merge) all future requests for early transmission.
We now first check if we can schedule an early RTCP and if we can,
actually prepare the data for the next RTCP interval.

After we send the next regular RTCP after the early RTCP, we set
allow_early to TRUE again to allow more early requests.

Remove the condition for the immediate feedback for now.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=738319
2014-10-22 13:13:47 +02:00
Wim Taymans
09f179139d rtpjitterbuffer: make debug line less confusing 2014-10-21 13:10:53 +02:00
Wim Taymans
2e7f5c08cf jitterbuffer: rework resync handling
Add a need-resync state, this is when we need to try to lock on to a
time/RTPtime pair.
Always check the RTP timestamps and if they go backwards, mark ourselves
as need-resync.
Only resync when need-resync is TRUE and we have a valid time. Otherwise
we keep the old values. This avoids locking on to an invalid time and
causing us to timestamp everything with -1.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=730417
2014-10-21 11:57:34 +02:00
Aleix Conchillo Flaqué
bd392d72ee rtspsrc: set full stream caps on internal src TCP pads
Set the complete stream caps on the TCP internal src pads. Otherwise,
ptdemux will not properly detect the caps change.

https://bugzilla.gnome.org/show_bug.cgi?id=737868
2014-10-21 11:33:01 +02:00
Sjoerd Simons
0ee384b251 rtpmux: Don't set PROXY_CAPS flag on the src pad
rtpmux behaves like a funnel in that it forwards whatever upstream is
sending buffers. So setting proxy caps doesn't make sense as the
upstream don't have to have compatible caps, thus resulting in an empty
caps set as a result of a caps query. Instead set fixed caps just
as funnel does.

https://bugzilla.gnome.org/show_bug.cgi?id=738722
2014-10-21 10:52:00 +02:00
Vineeth T M
1131db8c1f videobox: critical error when element properties set as max/min
left, right, top, bottom can be set from range of -2147483648 to 2147483647
when i launch the videobox element with that values, it gives a critical error

(gst-check-1.0:29869): GStreamer-CRITICAL **: gst_value_set_int_range_step: assertion 'start < end' failed
This happens because min cannot be equal to max.

https://bugzilla.gnome.org/show_bug.cgi?id=738838
2014-10-20 12:53:51 +02:00
Tim-Philipp Müller
f3fec86bc9 Revert "rtp: add h265 RTP payloader + depayloader"
This reverts commit d06ba9051f.

This breaks the build, as it depends on parser API in -bad.
2014-10-15 17:48:46 +01:00
Jurgen Slowack
d06ba9051f rtp: add h265 RTP payloader + depayloader 2014-10-15 17:34:50 +02:00
Peter G. Baum
b5e46c05d7 wavenc: Support RF64 format
https://bugzilla.gnome.org/show_bug.cgi?id=725145
2014-10-14 10:24:50 +02:00
David Sansome
8154c90c9b equalizer: Don't call iirequalizer's transform_ip in passthrough mode
It tries to map the read-only buffer with GST_MAP_READWRITE and crashes.

https://bugzilla.gnome.org/show_bug.cgi?id=737886
2014-10-13 08:30:03 +02:00
Olivier Crête
51a8bedced rtpsource: Rename seqnum-base to seqnum-offset in caps
This was modified back in 1.0 in GstRtpBasePayload
2014-10-10 18:33:34 -04:00
Olivier Crête
155ed569c3 rtpdtmfsrc: clock-base and seqnum-base -> timestamp-offset and seqnum-offset
These were renamed in GstRTPBasePayload in 1.0
2014-10-10 18:12:32 -04:00
Olivier Crête
b3069634bd rtpmux: clock-base and seqnum-base -> timestamp-offset and seqnum-offset
These were renamed in GstRTPBasePayload in 1.0
2014-10-10 18:12:23 -04:00
Luis de Bethencourt
cff880401d goom2k1: removing block of code that does nothing
The loop in zoomFilterSetResolution is meant to change the values in the
zf->firedec[] array. Each iteration writes the value of decc onto the arrya,
but no conditions that change the value of decc are ever met and the array is
filled with zero for each element. Which is the initial state of the
array before the loop begins.

The loop does nothing.

https://bugzilla.gnome.org/show_bug.cgi?id=728353
2014-10-08 14:07:56 +01:00
Stefan Sauer
98222a67ff rtpjitterbuffer: don't log all clock_rate changes as warnings.
We never initialize clock_rate explicitly, therefore it is 0 by default. The
parameter is a uint32 and the only caller ensure that it is >0, therefore it
won't become -1 ever.
2014-10-04 17:17:13 +02:00
Matej Knopp
e1d275cfec aacparse: fix memory leak when prepending ADTS headers
https://bugzilla.gnome.org/show_bug.cgi?id=737761
2014-10-02 10:41:28 +03:00
Antonio Ospite
7ae7f657fa interleave: interleave samples following the Default Channel Ordering
In order to have a full mapping between channel positions in the audio
stream and loudspeaker positions, the channel-mask alone is not enough:
the channels must be interleaved following some Default Channel Ordering
as mentioned in the WAVEFORMATEXTENSIBLE[1] specification.

As a Default Channel Ordering use the one implied by
GstAudioChannelPosition which follows the ordering defined in SMPTE
2036-2-2008[2].

NOTE that the relative order in the Top Layer is not exactly the same as
the one from the WAVEFORMATEXTENSIBLE[1] specification; let's hope users
using so may channels are already aware of such discrepancies.

[1] http://msdn.microsoft.com/en-us/library/windows/hardware/dn653308%28v=vs.85%29.aspx
[2] http://www.itu.int/dms_pub/itu-r/opb/rep/R-REP-BS.2159-2-2011-PDF-E.pdf

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=737127
2014-10-02 10:21:26 +03:00
Sebastian Dröge
7729f4ce81 wavenc: Send CAPS event after the pad was activated
Otherwise the CAPS event will be dropped and we never configure any caps at
all, leading to weird behaviour in many situations. Especially header
rewriting is not going to work if a capsfilter is after wavenc.

https://bugzilla.gnome.org/show_bug.cgi?id=737735
2014-10-02 10:10:11 +03:00
Sebastian Dröge
1a2adf5123 videomixer: Actually use the correct GstVideoInfo for conversion 2014-10-01 17:29:29 +03:00
Sebastian Dröge
c1a96113db videomixer: Revert the last commit and handle resolutions differences properly
This is about converting the format, not about converting any widths and
heights. Subclasses are expected to handler different resolutions themselves,
like the videomixers already do properly.
2014-10-01 17:24:59 +03:00
Sebastian Dröge
af7916ca4a videomixer: GstVideoConverter currently can't rescale and will assert
Leads to ugly assertions instead of properly erroring out:
CRITICAL **: gst_video_converter_new: assertion 'in_info->width == out_info->width' failed
2014-10-01 17:12:59 +03:00
Antonio Ospite
eca3e2474d wavenc: print channel masks in hexadecimal 2014-09-29 17:45:59 +03:00
Sebastian Dröge
d1c7f2e4d1 rtspsrc: Fix compiler warnings
gstrtspsrc.c:7939:11: error: implicit conversion from enumeration type 'GstSDPResult' to different enumeration type
      'GstRTSPResult' [-Werror,-Wenum-conversion]
    res = gst_sdp_message_new (&sdp);
        ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~
gstrtspsrc.c:7944:11: error: implicit conversion from enumeration type 'GstSDPResult' to different enumeration type
      'GstRTSPResult' [-Werror,-Wenum-conversion]
    res = gst_sdp_message_parse_uri (uri, sdp);
        ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2014-09-26 13:46:16 +03:00
Jonas Holmberg
1371fa0c61 matroskademux: make demuxer reusable
Remove pads from flow combiner and reset last
flow return to FLOW_OK by resetting the flow combiner.
This prevents FLOW_FLUSHING when trying to re-use the
demuxer after setting it back to NULL/READY state.

https://bugzilla.gnome.org/show_bug.cgi?id=737359
2014-09-25 16:14:18 +01:00
Wim Taymans
84ec78bd86 videomixer: use video library code instead of copy 2014-09-24 16:46:36 +02:00
Sanjay NM
323683db96 audioparsers: Added index check before using the index
https://bugzilla.gnome.org/show_bug.cgi?id=736878
2014-09-24 10:21:35 +03:00
Matej Knopp
9f85dfd733 qtmux: Do not infer DTS on buffers from sparse streams.
DTS delta is used to calculate sample duration. If buffer has missing DTS, we take either segment start or previous buffer end time, whichever is later.
This must only be done for non sparse streams, sparse streams can have gaps between buffers (which is handled later by adding extra empty buffer with duration that fills the gap)

https://bugzilla.gnome.org/show_bug.cgi?id=737095
2014-09-23 22:25:47 -03:00
Sanjay NM
36140ccf69 goom: Clarified precedence between % and ?
https://bugzilla.gnome.org/show_bug.cgi?id=736887
2014-09-24 00:48:09 +01:00
Sanjay NM
f62076e49c rtsp: clarify expression so operator precedence is clear
https://bugzilla.gnome.org/show_bug.cgi?id=736903
2014-09-24 00:48:09 +01:00
Sanjay NM
26a1344f37 Miscellaneous minor cleanups
Fix redundant variables and assignments,
and unreachable breaks.

https://bugzilla.gnome.org/show_bug.cgi?id=736875
https://bugzilla.gnome.org/show_bug.cgi?id=736876
https://bugzilla.gnome.org/show_bug.cgi?id=736879
https://bugzilla.gnome.org/show_bug.cgi?id=736880
https://bugzilla.gnome.org/show_bug.cgi?id=736881
https://bugzilla.gnome.org/show_bug.cgi?id=736888
https://bugzilla.gnome.org/show_bug.cgi?id=736890
https://bugzilla.gnome.org/show_bug.cgi?id=736892
https://bugzilla.gnome.org/show_bug.cgi?id=736893
https://bugzilla.gnome.org/show_bug.cgi?id=736894
2014-09-24 00:45:31 +01:00
Tim-Philipp Müller
208e12dca2 videobox: remove duplicate assignments
https://bugzilla.gnome.org/show_bug.cgi?id=736897
2014-09-24 00:12:14 +01:00
Sebastian Dröge
91a3d044f0 flacparse: Only calculate with durations != -1 2014-09-23 22:56:21 +03:00
Matej Knopp
fd3e8c5672 qtmux: collect pad for sparse stream should be created with lock set to false
Avoids waiting for buffers from sparse streams

https://bugzilla.gnome.org/show_bug.cgi?id=737095
2014-09-23 15:25:45 -03:00
Matej Knopp
6695341583 qtmux: fix subtitle buffer duration and strip null termination
Strip the \0 off the subtitle as we already know the size and also remember
to set the duration as buffer copying doesn't do it.

https://bugzilla.gnome.org/show_bug.cgi?id=737095
2014-09-23 15:25:28 -03:00
Matej Knopp
f57e9c4516 qtmux: move subtitle layer above video and set alternate group
layer -1 is above video, that is 0
And having all subtitles in alternate group 2 means that only one
should be selected at a time.

https://bugzilla.gnome.org/show_bug.cgi?id=737095
2014-09-23 15:20:37 -03:00
Matej Knopp
8a4931726d qtdemux: Handle mp4a without ESDS atom
https://bugzilla.gnome.org/show_bug.cgi?id=736986
2014-09-22 13:04:52 -03:00
Sanjay NM
89eb378598 dtmf: Removed unused structure members
https://bugzilla.gnome.org/show_bug.cgi?id=736883
2014-09-19 15:42:04 -04:00
Reynaldo H. Verdejo Pinochet
e655d47dfc isomp4: fix wrong DAR calculation for PAR <= 1
CID #1226452

https://bugzilla.gnome.org/show_bug.cgi?id=736396
2014-09-18 18:53:38 -03:00
Sanjay NM
ba4b9b22d0 flv: Removed unreachable break statements
https://bugzilla.gnome.org/show_bug.cgi?id=736884
2014-09-18 09:42:43 -04:00
Ognyan Tonchev
f7ae4288a2 rtpbin: do not leak encsink pad in error case
https://bugzilla.gnome.org/show_bug.cgi?id=736807
2014-09-18 12:49:53 +03:00
Ognyan Tonchev
3bf81ad12c multipartdemux: do not leak new stream event
https://bugzilla.gnome.org/show_bug.cgi?id=736805
2014-09-18 12:49:53 +03:00
Ravi Kiran K N
5480f6d2dd y4menc: port y4menc to use GstVideoEncoder base class
https://bugzilla.gnome.org/show_bug.cgi?id=735085
2014-09-17 18:28:00 -03:00
Ognyan Tonchev
7cd335e9b9 flacparse: do not leak uid after parsing TOC event
https://bugzilla.gnome.org/show_bug.cgi?id=736739
2014-09-17 09:51:15 +03:00
Sebastian Dröge
4bc10e755a rtpvrawdepay: Declare some more required caps fields in the sink template caps
Now only missing are width and height, which are expressed as strings
for RTP... so we can't put them into the template caps.
2014-09-16 22:47:13 +03:00
Wim Taymans
711e1407a1 capssetter: update to 1.0 transform_caps sematics
In 1.0, we pass the complete caps to transform_caps to allow for better
optimizations. Make this function actually work on non-simple caps
instead of just ignoring the configured filter caps.
2014-09-15 18:14:06 +02:00
Peter G. Baum
f8f61237f8 wavenc: use WAVE_FORMAT_EXTENSIBLE for more than 2 channels
https://bugzilla.gnome.org/show_bug.cgi?id=733444
2014-09-15 11:19:23 +03:00
Sebastian Dröge
a9d7c1d95e wavparse: Fix parsing of adtl chunks
We have to skip 12 bytes of data for the chunk, and the data size
passed to the sub-chunk parsing functions should have 4 bytes less
than the data size.

Also when parsing the sub-chunks, check if we actually have enough
data to read instead of just crashing.

https://bugzilla.gnome.org/show_bug.cgi?id=736266
2014-09-12 15:08:23 +03:00
Sanjay NM
66810a32f6 udp: include string.h for memcmp and memset
https://bugzilla.gnome.org//show_bug.cgi?id=736528
2014-09-12 10:45:39 +01:00
Anuj Jaiswal
4242495ea7 matroskamux: don't bitwise OR the same flag twice
https://bugzilla.gnome.org//show_bug.cgi?id=736543
2014-09-12 10:37:31 +01:00
Tim-Philipp Müller
4c08f2694d matroskademux: handle real audio 28_8
Fixes duplicate check for 14_4.

https://bugzilla.gnome.org//show_bug.cgi?id=736543
2014-09-12 10:35:36 +01:00
Anuj Jaiswal
86579c59bf multifilesink: don't OR the same flag twice
https://bugzilla.gnome.org/show_bug.cgi?id=736462
2014-09-11 11:05:35 +01:00
Tim-Philipp Müller
e6f77948ac udpsrc: more efficient memory handling
Drop use of g_socket_get_available_bytes() which is
not useful on all systems (where it returns the size
of the entire buffer not that of the next pending
packet), and is yet another syscall and apparently
very inefficient on Windows in the UDP case.

Instead, when reading UDP packets, use the more featureful
g_socket_receive_message() call that allows to read into
scattered memory, and allocate one memory chunk which is
likely to be large enough for a packet, while also providing
a larger allocated memory chunk just in case the packet
is larger than expected. If the received data fits into the
first chunk, we'll just add that to the buffer we return
and re-use the fallback buffer for next time, otherwise we
add both chunks to the buffer.

This reduces memory waste more reliably on systems where
get_available_bytes() doesn't work properly.

In a multimedia streaming scenario, incoming UDP packets
are almost never fragmented and thus almost always smaller
than the MTU size, which is also why we don't try to do
something smarter with more fallback memory chunks of
different sizes. The fallback scenario is just for when
someone built a broken sender pipeline (not using a
payloader or somesuch)

https://bugzilla.gnome.org/show_bug.cgi?id=610364
2014-09-09 17:38:52 +01:00
Tim-Philipp Müller
39505584e1 udpsrc: rework memory allocation bits and ensure we always have two chunks of memories to read into
First chunk is the likely/expected buffer size, second is as
fallback in case the packet is larger in the end.

Next step: actually use these.
2014-09-09 17:35:38 +01:00
Tim-Philipp Müller
305e4c2f46 udpsrc: track max packet size and save allocator negotiated by GstBaseSrc 2014-09-09 17:35:14 +01:00
Tim-Philipp Müller
8e28994207 audioecho: fix example command line 2014-09-08 16:15:32 +01:00
Tim-Philipp Müller
7271ff253b avidemux: fix crash with certain videos
This is a regression from 1.2 caused by the port
to the pad flow combiner.

https://bugzilla.gnome.org/show_bug.cgi?id=736192
2014-09-07 12:48:16 +01:00
Sebastian Dröge
a3a5530518 matroska-demux: Don't handle parse errors at the end of file as an error
But only if they happen after the Matroska segment.

https://bugzilla.gnome.org/show_bug.cgi?id=735833
2014-09-05 11:36:30 +03:00
Andrei Sarakeev
558f9a2a6f videomixer: Fix synchronization if dynamically changing the FPS
https://bugzilla.gnome.org/show_bug.cgi?id=735859
2014-09-04 11:34:26 +03:00
Ravi Kiran K N
ea43ef214a smpte: Check if input caps are the same and create output caps from video info
This makes sure that also properties like the pixel-aspect-ratio are the same
between both streams and that the output caps contain all fields necessary for
complete video caps.

https://bugzilla.gnome.org/show_bug.cgi?id=735804
2014-09-04 10:47:34 +03:00
Vineeth T M
6ff397eccc imagefreeze: replace with gst_buffer_copy
gst_buffer_ref and gst_buffer_writable is being used to create a writable copy of source buffer.

replacing the same with gst_buffer_copy as the functionality is same.

https://bugzilla.gnome.org/show_bug.cgi?id=735880
2014-09-03 21:33:09 -03:00
Tim-Philipp Müller
884f81ba28 qtdemux: mark jpeg and png as parsed so avdec_mjpeg can be used too
https://bugzilla.gnome.org/show_bug.cgi?id=735971
2014-09-03 23:08:16 +01:00
Jan Schmidt
9375e90203 qtdemux: Silence some warnings for normal file contents 2014-09-03 23:47:49 +10:00
Nicolas Huet
15894c1853 aacparse: Fix parsing issue when the buffer does not have a complete ADTS/LOAS frame
https://bugzilla.gnome.org/show_bug.cgi?id=735520
2014-09-02 09:43:14 +03:00
Vineeth T M
3a1e010221 imagefreeze: Don't call gst_caps_unref() on template caps when already unreferenced
Adding an extra condition while calling gst_caps_unref (templ)
and replacing gst_caps_make_writable (gst_caps_ref (caps)) with
gst_caps_copy (caps) in line 177, since the functionality is same.

https://bugzilla.gnome.org/show_bug.cgi?id=735795
2014-09-01 14:34:43 +03:00
Sebastian Dröge
f5df8af59e wavparse: Store size of data tag in a 64 bit integer locally too
Otherwise we will clip the DS64 value of RF64 files to 32 bits again.
2014-08-29 11:55:26 +03:00
Sebastian Dröge
d924f8a955 wavparse: Use 64 bit scaling functions now that fact is a 64 bit integer 2014-08-29 11:53:23 +03:00
Peter G. Baum
5c838af300 wavparse: support rf64 format
https://bugzilla.gnome.org/show_bug.cgi?id=735627
2014-08-29 11:49:42 +03:00
Jason Litzinger
bcbdcbf638 multipartdemux: Ensure caps before pad added.
This stores the stream-start, sets caps, and then adds the pad,
which ensures that the caps are set for the "pad-added" callback.

https://bugzilla.gnome.org/show_bug.cgi?id=735626
2014-08-29 11:38:19 +03:00
Nicolas Dufresne
356defdfea flvmux: Fallback to PTS if DTS is missing
Fixing a regression introduce when fixing:
https://bugzilla.gnome.org/show_bug.cgi?id=731352
2014-08-28 15:05:56 -04:00
Vineeth T M
d46631c5c7 imagefreeze: Remove impossible error condition
We return EOS after the first buffer, and GstPad will make sure now that we
won't get any other buffer afterwards until a flush happens. No need to check
for it ourselves.

https://bugzilla.gnome.org/show_bug.cgi?id=735581
2014-08-28 14:55:00 +03:00
Nicolas Dufresne
a7a3cb343a flvmux: Correctly offset timestamp
The previous method would break AV sync in the case audio or video
didn't start at the same point in running time.

https://bugzilla.gnome.org/show_bug.cgi?id=731352
2014-08-27 21:09:57 -04:00
Nicolas Dufresne
aa5bd99127 flvmux: Save dts from buffer
We no longer set dts in muxed buffer. This would lead to encoding tags
with timestamp 0 instead of the timestamp of previous buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=731352
2014-08-27 21:08:21 -04:00
Nicolas Dufresne
c1e7bec616 flvmux: Ensure Timestamp starts at 0
FLV documentation stipulates that timestamp must start at zero.
In order to respect this rule, keep the first timestamp around
and offset the timestamp from this value. This allow for longer
recording time in presence of timestamp that does not start
at 0 already.

https://bugzilla.gnome.org/show_bug.cgi?id=731352
2014-08-26 16:46:03 -04:00
Nicolas Dufresne
ff2bce7b26 flv: Tag timestamp are DTS not PTS
The tags in FLV are DTS. In audio cases, and for many video format this makes
no difference, but for AVC with B-Frames, PTS need to be computed from
composition timestamp CTS, with PTS = DTS + CTS.

https://bugzilla.gnome.org/show_bug.cgi?id=731352
2014-08-26 16:45:59 -04:00
Youness Alaoui
a98341397d jitterbuffer: Allow rtp caps without clock-rate
The jitterbuffer shouldn't force clock-rate on its sink pad, this will cause a negotiation issue since rtpssrcdemux doesn't have the clock-rate and doesn't add it to the caps. The documentation states that the clock-rate can either be specified through the caps or through the request-pt-map signal, so we must remove clock-rate from the pad templates and we must accept the GST_EVENT_CAPS if the caps don't have the clock-rate.

https://bugzilla.gnome.org/show_bug.cgi?id=734322
2014-08-21 18:32:58 -04:00
Thiago Santos
fa103ca5ad qtdemux: avoid crashing on dash streams
DASH/fragmented moov might have no samples as those are carried
in moof fragments. Avoid crashing or failing the stream because
of that.
2014-08-18 14:05:52 -03:00
Víctor Manuel Jáquez Leal
419332e287 udp: fix udpsrc documentation
udpsrc gtk-doc documentation refers to sockfd and closefd properties which has
been removed. This patch replaces those references to socket and close-socket
respectively.

https://bugzilla.gnome.org/show_bug.cgi?id=734987
2014-08-18 11:01:31 +01:00
Jan Schmidt
6e7930a10c qtmux: Make the default timescale 1/1800 second
The old default timescale of 1 millisecond produces irrational
numbers for a lot of framerate/audio-packet-duration multiples.
1/1800 is a nicer number, as it tends to produce better fractions
and therefore slightly higher accuracy overall
2014-08-15 13:03:52 +10:00
Jan Schmidt
f1c3a40547 matroska: Use gst_video_guess_framerate() function
Remove local framerate guessing function in favour of
the new gst_video_guess_framerate() function.
2014-08-15 01:17:27 +10:00
Jan Schmidt
ca068865c3 qtdemux: Improve framerate calculation/guessing
Change the way the output framerate is calculated
to ignore the first sample (which is sometimes truncated
in my testing) and use the new gst_video_guess_framerate()
function to recognise common standard framerates better.

Remove the code that was sorting the first 20 sample
durations and then ignoring the result.
2014-08-15 01:12:20 +10:00
Sebastian Dröge
ce1d4d9f21 videomixer: Use the best width/height/etc if downstream can handle that
Before it was always using whatever downstream preferred, while
the code and documentation claimed something different.

https://bugzilla.gnome.org/show_bug.cgi?id=727180
2014-08-14 16:36:44 +03:00
Ravi Kiran K N
61fe02a018 videomixer: Avoid double free of VideoConvert
https://bugzilla.gnome.org/show_bug.cgi?id=734764
2014-08-14 15:31:48 +03:00
Tim-Philipp Müller
6ee2665b7c flvdemux: fix indentation 2014-08-13 11:59:39 +01:00
Tim-Philipp Müller
9afeb9652b flvdemux: un-break duration querying
Commit 2b9493b5 broke this in two ways: a) we should only
pass duration queries in TIME format upstream (or at least
not those in DEFAULT or BYTE format), and b) we mustn't
overwrite the default value of 'res' from TRUE to FALSE
and not set it again later. This led to bogus durations
being reported for FLV playback from file, because TIME
queries would fail (as 'res' had been set to FALSE) and
parsers then do a BYTE query as fallback and try to
guesstimate something in return, which of course goes
horribly wrong since the BYTE size returned is for the
muxed file.
2014-08-13 11:59:39 +01:00
Sebastian Dröge
0911307d7d videobalance: Allow any raw caps in passthrough mode, not just the ones we handle 2014-08-13 13:25:36 +03:00
Sebastian Dröge
a9eda81978 videobalance: Allow ANY capsfeatures, but only in passthrough mode
When changing the properties to not be in passthrough mode anymore,
we will only accept caps we can process ourselves, potentially causing
a not-negotiated error.

https://bugzilla.gnome.org/show_bug.cgi?id=720345
2014-08-13 13:24:38 +03:00
George Kiagiadakis
9dd48c503c qtdemux: forward DISCONT from upstream to the output streams
This makes sense in DASH reverse playback, where the upstream dashdemux
will download DASH segments in reverse order, but push their buffers
forward to qtdemux and mark each segment start as DISCONT. This needs
to be forwarded downstream to the parser/decoder, otherwise it won't work.

https://bugzilla.gnome.org/show_bug.cgi?id=734443
2014-08-11 10:28:14 +02:00
Sebastian Rasmussen
70a43758bb shapewipe: Unref caps and element after usage
https://bugzilla.gnome.org/show_bug.cgi?id=734478
2014-08-10 11:09:09 +01:00
Tim-Philipp Müller
e8321af983 qtdemux: improve debug logging of fourccs
If we can't show ASCII, at least show them
in big endian order.
2014-08-09 20:50:01 +01:00
Tim-Philipp Müller
f41d03cd4d qtdemux: add support for 'wma ' mapping as found in some ismv files
e.g. To_The_Limit_720_2962.ismv
2014-08-09 20:49:53 +01:00
Tim-Philipp Müller
6183f83190 qtdemux: add support for 'vc-1' mapping as found in some ismv files
e.g. To_The_Limit_720_2962.ismv
2014-08-09 20:49:49 +01:00
Sebastian Rasmussen
276269d956 rtph263ppay: Unref pad template caps after use
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734435
2014-08-08 16:02:24 -03:00
Sebastian Rasmussen
1fa61632fe videomixer: Unref allowed caps after usage
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734474
2014-08-08 15:59:36 -03:00
Sebastian Rasmussen
c85ae43a6e imagefreeze: Unref pad template caps after usage
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734475
2014-08-08 15:54:39 -03:00
Sebastian Rasmussen
edf8728016 navseek: Unref peer pad after usage
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734476
2014-08-08 15:50:55 -03:00
Sebastian Rasmussen
1a35bf9647 rtpmux: Unref pad template caps after usage
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734473
2014-08-08 15:38:32 -03:00
Srimanta Panda
421b00cd17 rtph264pay: append packetization mode parameter to SDP
Append packetization-mode parameter to SDP description.
Packetization mode signals the properties of an RTP payload type.

https://bugzilla.gnome.org/show_bug.cgi?id=733556
2014-08-08 13:41:36 +01:00
Jan Schmidt
d9e1aa4959 isomp4/qtmux: Write correct file duration when gaps exist.
When writing out a trak with an edit list, make sure the
overall file duration is also updated to reflect the
lengthening of the stream.

Add some more debug to qtdemux to warn about streams that
are longer than the file and get truncated.
2014-08-08 04:01:19 +10:00
Sebastian Dröge
add40de469 rtspsrc: Push the correct segment in TCP mode when seeking 2014-08-05 16:28:04 +02:00
Mark Nauwelaerts
d5d28055c1 rtph264pay: unbreak au aligned byte-stream payloading 2014-08-03 14:42:45 +02:00
Srimanta Panda
dd9f716892 rtph264pay: append profile-level-id to SDP
Append profile-level-id to SDP if available.

https://bugzilla.gnome.org/show_bug.cgi?id=733539
2014-08-01 16:01:07 +01:00
Philippe Normand
b8b5704445 interleave: set output caps layout to interleaved
Set output caps layout independently from input caps layout which can
be either non-interleaved or interleaved.

https://bugzilla.gnome.org/show_bug.cgi?id=733866
2014-07-29 11:49:32 +02:00
Tim-Philipp Müller
5122410f11 qtdemux: fix language code parsing for 3-letter codes starting with 'a'
And handle special value for 'unspecified' explicitly.

https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/QTFFChap4/qtff4.html
2014-07-21 18:21:50 +01:00
Sebastian Dröge
b1f7681555 videobox: Don't overwrite the first component with the alpha value for BGRx
Instead leave the x component unset when filling the borders.

https://bugzilla.gnome.org/show_bug.cgi?id=733380
2014-07-19 11:31:45 +02:00
Sebastian Dröge
638a700463 aacparse: Properly report in the CAPS query that we can convert ADTS<->RAW
https://bugzilla.gnome.org/show_bug.cgi?id=733190
2014-07-16 17:27:57 +02:00
Sebastian Rasmussen
f45657f604 rgvolume: Avoid taking unnecessary refs
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=733122
2014-07-16 16:45:43 +02:00
Sebastian Rasmussen
ca22ad8da9 rtpdtmfmux: Avoid taking an unnecessary ref
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=733122
2014-07-16 16:45:31 +02:00
Tim-Philipp Müller
c2614e5253 rtspsrc: fix query leak
https://bugzilla.gnome.org/show_bug.cgi?id=733003
2014-07-10 17:19:42 +01:00
Sebastian Dröge
dd5144fd4e wavenc: Return not-negotiated if we got no caps or caps negotiation failed
And do it always, not inside a g_return_val_if_fail().

See https://bugzilla.gnome.org/show_bug.cgi?id=732939
2014-07-10 14:37:31 +02:00
Tim-Philipp Müller
deeef84d2c videomixer: fix double unlock in segment seek segment code path
We only want to unlock if we push an event downstream and
jump to done_unlock label afterwards. We would also unlock
in case of a segment seek and then unlock again later, and
nothing good can come of that.

(This code looks a bit dodgy anyway though, shouldn't it
also bail out with FLOW_EOS here in case of a segment seek
scenario, just without the event?)
2014-07-04 20:26:46 +01:00
Sebastian Rasmussen
d33d8cf026 avidemux, wavparse: Print invalid fourcc in hex
Previously this was printed as characters which caused later processing
of the error message to sometimes warn about non-UTF-8 characters.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732714
2014-07-04 09:21:07 +01:00
Wim Taymans
db1d9444d6 rtspsrc: fix for mikey api change 2014-07-02 16:01:47 +02:00
Vincent Penquerc'h
bbb1a8de1f videomixer: reset QoS on segment event
https://bugzilla.gnome.org/show_bug.cgi?id=732540
2014-07-01 16:35:05 +01:00
Vincent Penquerc'h
5653b1a25a matroskademux: send gap events instead of segment tricks
This fixes missing frames from being time skipped.

https://bugzilla.gnome.org/show_bug.cgi?id=732372
2014-07-01 15:14:34 +01:00
Sebastian Dröge
2f47105129 rtpbin: Don't leak caps 2014-06-29 23:55:19 +02:00
Sebastian Dröge
bbca040336 rtpssrcdemux: Fix compiler warning when compiling with G_DISABLE_ASSERT 2014-06-29 19:59:53 +02:00
Sebastian Dröge
5500dd4a20 matroskamux: Fix compiler warnings when compiling with G_DISABLE_ASSERT 2014-06-29 19:57:57 +02:00
Sebastian Dröge
b03a4d9155 deinterlace: Fix compiler warnings when compiling with G_DISABLE_ASSERT 2014-06-29 19:54:44 +02:00
Tim-Philipp Müller
155a3fec93 matroskaparse: don't error out if there's not enough data in the adapter
gst_matroska_parse_take() would return FLOW_ERROR instead of
FLOW_EOS in case there's less data in the adapter than requested,
because buffer is NULL in that case which triggers the error
code path. This made the unit test fail (occasionally at least,
because of a bug in the unit test there's a race and it would
happen only sporadically).
2014-06-28 17:39:36 +01:00
Sebastian Dröge
c0f5644b80 videomixer: Update dist generated ORC files 2014-06-28 16:56:18 +02:00
Sebastian Dröge
db43a39bbf videomixer: Update videoconvert code from -base
And also rename the remaining symbols to prevent conflicts
during static linking.

https://bugzilla.gnome.org/show_bug.cgi?id=728443
2014-06-28 16:56:18 +02:00
Tim-Philipp Müller
8b7f0ae3fe autovideosrc: use videotestsrc as fallback element instead of fakesrc
fakesrc doesn't announce video caps, so most video pipelines will
just error out with not-negotiated if a fallback element is created.
2014-06-28 14:25:25 +01:00
Tim-Philipp Müller
7dcc3ffe5a autoaudiosrc: use audiotestsrc as fallback element instead of fakesrc
fakesrc doesn't announce audio caps, so most audio pipelines will
just error out with not-negotiated if a fallback element is created.
2014-06-28 14:25:25 +01:00
Thibault Saunier
45b9ef1825 videomixer: Declare as Compositor in 'klass' 2014-06-26 17:49:23 +02:00
Tim-Philipp Müller
e9f2d63011 flvdemux: fix speex caps
Decoder complains about "notification: Invalid mode encountered.
The stream is corrupted" though, even if it works, so there's
probably something wrong with the generated codec headers.
2014-06-26 13:50:19 +01:00
Tim-Philipp Müller
d98b996523 flvmux: fix speex in FLV
Speex in FLV is always mono @ 16kHz, see
http://download.macromedia.com/f4v/video_file_format_spec_v10_1.pdf
section E.4.2.1: "If the SoundFormat indicates Speex, the audio is
compressed mono sampled at 16 kHz, the SoundRate shall be 0, the
SoundSize shall be 1, and the SoundType shall be 0"

Also see https://bugzilla.gnome.org/show_bug.cgi?id=683622
2014-06-26 13:43:33 +01:00
Jan Schmidt
8da6ee0312 isomp4: Add object type id and fourcc for DTS/DTS-HD
Enables playback for files with DTS audio tracks.
Also add an extra AC-3 variant fourcc from Nero
2014-06-26 19:57:41 +10:00
David Fernandez
4ed74d3ab0 videomixer2: Solve segmentation fault when src caps are configured
Change function pointers to NULL while holding the lock to avoid
race conditions

https://bugzilla.gnome.org/show_bug.cgi?id=701110
2014-06-25 16:44:38 +02:00
Wim Taymans
ca9cfd40dd jitterbuffer: improve SR packet handling
Implement 3 different cases for handling the SR:

 1) we don't have enough timing information to handle the SR packet and
    we need to wait a little for more RTP packets. In that case we keep
    the SR packet around and retry when we get an RTP packet in the
    chain function.

 2) the SR packet has a too old timestamp and should be discarded. It is
    labeled invalid and the last_sr is cleared.

 3) the SR packet is ok and there is enough timing information, proceed
    with processing the SR packet.

Before this patch, case 2) and 1) were handled in the same way,
resulting that SR packets with too old timestamps were checked over and
over again for each RTP packet.
2014-06-25 16:14:46 +02:00
Olivier Crête
64f28e2552 avimux: Add UYVY format 2014-06-23 19:55:29 -04:00
Miguel París Díaz
b22aed9bbc gstrtpssrcdemux: manage ssrc of RTCP RR packets
https://bugzilla.gnome.org/show_bug.cgi?id=731324
2014-06-23 16:23:00 -04:00
Sebastian Dröge
efaf996b1a wavparse: Update offset after parsing adtl chunk
Otherwise we will parse it over and over again without ever
getting past it.

https://bugzilla.gnome.org/show_bug.cgi?id=731533
2014-06-23 20:53:50 +02:00
Sebastian Dröge
daf25482ed matroskademux: Don't call GST_DEBUG_OBJECT() and other macros with non-GObject objects
It will crash with latest GLib GIT and was never supposed to work before
either.
2014-06-22 19:26:03 +02:00
Tim-Philipp Müller
41c895de4d multiudpsink: optimisation: avoid unnecessary memory ref/unrefs
We know the buffer will stay valid and we will also not
modify the buffer, we just want to send out the data.
2014-06-20 12:21:05 +01:00
Tim-Philipp Müller
3512ad3be0 multiudpsink: avoid some unnecessary run-time type checks 2014-06-20 12:06:57 +01:00
Wim Taymans
98a4ee0f92 rtspsrc: pass the stream id when asking for crypto params
This way the app can choose different parameters for each stream.
2014-06-19 16:17:23 +02:00
Aleix Conchillo Flaqué
7ce0ea3946 rtspsrc: add support for key length parameters
This patch adds supports for the incoming key management parameters for
encryption and authentication key lengths.

It also adds a new signal request-rtcp-key that allows the user to
provide the crypto parameters and key for the RTCP stream.

https://bugzilla.gnome.org/show_bug.cgi?id=730473
2014-06-19 16:11:19 +02:00
Wim Taymans
8a78fa1ff5 vp8depay: fix header size checking
Use a different variable name to make it clear that we are calculating
the header size.
Correctly check that we have enough bytes to read the header bits. We
were checking if there were 5 bytes available in the header while we
only needed 3, causing the packet to be discarded as too small.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=723595
2014-06-19 15:29:46 +02:00
Guillaume Desmottes
f00c2b7155 rtph264pay: propagate the GST_BUFFER_FLAG_DISCONT flag
Similarly to what we did with the DELTA_UNIT flag, this patch
propagates the DISCONT flag to the first RTP packet being used to transfer a
DISCONT buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=730563
2014-06-19 12:22:49 +02:00
Guillaume Desmottes
4be99ec7d5 rtph264pay: propagate the GST_BUFFER_FLAG_DELTA_UNIT flag
Downstream elements may be interested knowing if a RTP packet is the start
of a key frame (to implement a RTP extension as defined in the
ONVIF Streaming Spec for example).

We do this by checking the GST_BUFFER_FLAG_DELTA_UNIT flag we receive from
upstream and propagate it to the *first* RTP packet outputted to transfer this
buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=730563
2014-06-19 12:22:38 +02:00
Guillaume Desmottes
42ff642372 gstrtpmp4gpay: propagate the GST_BUFFER_FLAG_DISCONT flag
Propagate the DISCONT flag to the first RTP packet being used to transfer
a DISCONT buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=730563
2014-06-18 16:25:07 +02:00
Guillaume Desmottes
9a7479fb0d rtpjpegpay: propagate the GST_BUFFER_FLAG_DISCONT flag
Propagate the DISCONT flag to the first RTP packet being used to transfer
a DISCONT buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=730563
2014-06-18 16:25:07 +02:00
Tim-Philipp Müller
460ab3dd76 avidemux: don't leak flow combiner 2014-06-18 15:03:25 +01:00
Tim-Philipp Müller
6347ec522d rtpjp2kpay: pre-allocate buffer-list of the right size 2014-06-18 14:54:59 +01:00
Tim-Philipp Müller
ccb7380689 rtpjpegpay: pre-allocate buffer list of the right size 2014-06-18 14:54:59 +01:00
Tim-Philipp Müller
70bfc35756 rtpmp4vpay: pre-allocate buffer list of the right size 2014-06-18 14:54:59 +01:00
Tim-Philipp Müller
4b1f771e4d rtpvp8pay: allocate bitreader on the stack 2014-06-18 14:54:59 +01:00
Tim-Philipp Müller
725b8f272b rtpvp8pay: post error message on bus on error and don't use g_message() 2014-06-18 14:54:59 +01:00
Tim-Philipp Müller
f4db7443ae rtpvp8pay: couple of minor optimisations
Pre-allocate buffer list of the right size to avoid re-allocs.
Avoid plenty of double runtime cast checks and re-doing the
same calculation over and over again in rtp_vp8_calc_payload_len().
Only call gst_buffer_get_size() once.
2014-06-18 14:54:58 +01:00
Tim-Philipp Müller
6c9e2194d2 rtpgstpay: pre-allocate buffer list of the right size
To avoid re-allocs.
2014-06-18 14:54:58 +01:00
Tim-Philipp Müller
01ee993d8d rtph264pay: pre-allocate bufferlist of the right size
To avoid unnecessary re-allocs.
2014-06-18 14:54:58 +01:00
Tim-Philipp Müller
c7c72c00b1 rtph264pay: push single buffer directly, no need to wrap it in a bufferlist
No point in a buffer list if we just have one single
buffer to push. Fix up unit test to handle that case
as well.
2014-06-18 14:54:58 +01:00
Tim-Philipp Müller
0f5da64de3 rtpvrawpay: make chunks per frame configurable
Bit of a misnomer because it's really chunks per field
and not per frame, but we're going to ignore that for
the time being.
2014-06-18 14:54:58 +01:00
Tim-Philipp Müller
2cf13b603f rtpvrawpay: remove unused variables 2014-06-18 14:54:58 +01:00
Tim-Philipp Müller
a09e237b85 rtpvrawpay: pre-allocate buffer lists of sufficient size
Avoids unnecessary reallocs when appending buffers
to the bufferlist.
2014-06-18 14:54:58 +01:00
Tim-Philipp Müller
15a33ccc65 rtpvrawpay: micro-optimise variable access in inner loop
Store some values that don't change during the execution
of the inner loops locally, so the compiler knows that too.
2014-06-18 14:54:58 +01:00
Tim-Philipp Müller
fdf95fecbd rtpvrawpay: use buffer lists
Collect buffers to send out in buffer lists instead of
pushing out single buffers one at a time. For HD video
each frame might easily add up to a couple of thousand
packets, multiply that by the frame rate and that's a
lot of push() and sendmsg() calls per second.

A good reason to push out buffers as early as possible is
latency, so we don't accumulate the whole frame in a single
buffer list, but instead push it out in a few chunks, which
is hopefully a reasonable compromise.
2014-06-18 14:54:58 +01:00
Tim-Philipp Müller
884d1af074 udp: improve element descriptions for dynudpsink and multiudpsink 2014-06-18 14:54:58 +01:00
Tim-Philipp Müller
6c1231eed3 udp: remove suppression of compiler warnings for deprecated GLib API
Not needed any more.
2014-06-18 14:54:58 +01:00
Ravi Kiran K N
3c4c130c5e videobox: Fix caps negotiation issue
Make sure that if AYUV is received it will detect that it can produce
both RGB and YUV formats

Signed-off-by: Ravi Kiran K N <ravi.kiran@samsung.com>

https://bugzilla.gnome.org/show_bug.cgi?id=725248
2014-06-17 09:27:45 -03:00
Tim-Philipp Müller
054f774455 rtptheoradepay: fix double frees
Fix double-frees introduced to fix another coverity report.

CID 1223053
2014-06-16 12:03:38 +01:00
Tim-Philipp Müller
bb51ec5842 dynudpsink: return FLUSHING when sendto got canceled, not an error 2014-06-13 10:12:07 +01:00
Vincent Penquerc'h
25c26a4c4c rtptheordepay: fix leaks
Coverity 1212163
2014-06-12 11:24:15 +01:00
Vincent Penquerc'h
8e80478cf7 rtpg729pay: leak fixes
Coverity 1212159
2014-06-12 11:16:08 +01:00
Vincent Penquerc'h
fe4c5b92b1 rtph263pay: fix leak
Coverity 1212157
2014-06-12 11:11:38 +01:00
Vincent Penquerc'h
6ef26e4a8a rtph263pay: fix leaks
Coverity 1212149
2014-06-12 10:43:53 +01:00
Vincent Penquerc'h
c58a2d9bbb rtpdvpay: catch failures to map buffer
Coverity 1139741
2014-06-12 10:31:47 +01:00
Vincent Penquerc'h
7e278e6b22 multipartdemux: guard against having no MIME type
The code would previously crash trying to insert a NULL string
into a hash table.
It does seem a little broken that indexing is done by MIME type
and not by index though, unless the spec says there cannot be
two parts with the same MIME type.

https://bugzilla.gnome.org/show_bug.cgi?id=659573
2014-06-11 17:44:56 +01:00
Nicolas Dufresne
9966fdfa75 multipartdemux: Send stream-start event
This event was not sent. Send it before caps, this requires the pad to
be parented. This removes warning like: "Got data flow before
stream-start event".

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=731475
2014-06-10 15:43:21 -04:00
Thiago Santos
9fda7b107f qtdemux: avoid looping indefinitely in broken svq3 files
Abort if an atom with size 0 is read from within the svq3 stsd
atoms

https://bugzilla.gnome.org/show_bug.cgi?id=726512
2014-06-10 15:33:33 -03:00
Edward Hervey
f7fc8d74c9 flvdemux: Attempt upstream seek first
If we have an upstream element that can handle the seek (such as
rtmpsrc), try to do that first before attempting it ourself.
2014-06-09 10:04:38 +02:00
Vincent Penquerc'h
40ae581ef2 wavparse: do not include codec_data on raw audio caps
If the wav header contains an extended chunk, we want to keep
the codec_data field, but not for raw audio.

This fixes some elements (such as adder) from failing to intersect
raw audio caps which would otherwise be intersectable.
2014-06-05 10:34:49 +01:00
Edward Hervey
2b9493b5f0 flvdemux: Query duration upstream first
Upstream elements (like rtmpsrc) might be able to provide the duration
more accurately than flvdemux. Especially with index-less vod files
2014-06-05 09:38:29 +02:00
Jan Alexander Steffens (heftig)
303883752e flvdemux: set RESYNC buffer flag when bridging large PTS gaps
So downstream gets notified when this happens.

https://bugzilla.gnome.org/show_bug.cgi?id=725903
2014-06-04 10:28:47 -04:00
Tim-Philipp Müller
341b691b18 matroskademux: don't leak doctype string in error code path
CID 1212145.
2014-06-02 09:57:42 +02:00
Thiago Santos
c25d94b7ef qtdemux: upstream handles seek if fragmented and on time segment
Otherwise we can reject seeks on local files that contain fragmented-like
atoms like 'mvex'. Also improve a message log

https://bugzilla.gnome.org/show_bug.cgi?id=730722
2014-05-30 15:01:50 -03:00
Wim Taymans
a5a7649831 h264depay: make sure we call handle_nal for each NAL
Call handle_nal for each NAL in the STAP-A RTP packet. This makes
sure we correctly extract the SPS and PPS.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=730999
2014-05-30 16:51:37 +02:00
Thiago Santos
fd6b348898 avidemux: remove stream last flow return
GstPad already stores that information

https://bugzilla.gnome.org/show_bug.cgi?id=709224
2014-05-26 19:51:13 -03:00
Thiago Santos
2b454bf87f qtdemux: remove last flow return from stream struct
It is already stored on GstPad on core

https://bugzilla.gnome.org/show_bug.cgi?id=709224
2014-05-26 19:51:12 -03:00
Thiago Santos
3b887887be flvdemux: Use GstFlowCombiner
Use the flow combiner to have the standard combination results and avoid
repeating the same code

https://bugzilla.gnome.org/show_bug.cgi?id=709224
2014-05-26 19:51:07 -03:00
Thiago Santos
c7c25071e3 matroskademux: use GstFlowCombiner
Use the flow combiner to have the standard combination results and avoid
repeating the same code

https://bugzilla.gnome.org/show_bug.cgi?id=709224
2014-05-26 19:51:02 -03:00
Thiago Santos
da3c031627 avidemux: use GstFlowCombiner
Removes flow return combination code to use the newly added GstFlowCombiner
2014-05-26 15:30:12 -03:00
Thiago Santos
4b0ce7dc30 qtdemux: use GstFlowCombiner
Removes the common code to combining flow returns to let it be
handled by core gstutils' GstFlowCombiner

https://bugzilla.gnome.org/show_bug.cgi?id=709224
2014-05-26 15:30:12 -03:00
Thiago Santos
d423b9f63e qtdemux: parse tkhd transformation matrix and add tags if appropriate
Handle the transformation matrix cases where there are only simple rotations
(90, 180 or 270 degrees) and use a tag for those cases. This is a common scenario
when recording with mobile devices

https://bugzilla.gnome.org/show_bug.cgi?id=679522
2014-05-24 15:38:54 -04:00
Thiago Santos
f0b99d96a9 qtdemux: add tag mappings for _swr, _mak and _mod tags
swr -> Application name
mak -> device manufacturer
mod -> device model
2014-05-23 03:15:42 -03:00
Sebastian Dröge
1cdd3765d6 goom: Use fabs() instead of abs() to calculate the floating point absolute value
tentacle3d.c:268:7: error: using integer absolute value function 'abs' when
      argument is of floating point type [-Werror,-Wabsolute-value]
  if (abs (tmp - fx_data->rot) > abs (tmp - (fx_data->rot + 2.0 * G_PI))) {
      ^
2014-05-19 11:24:06 +02:00
Sebastian Dröge
97fb3655df debugutils: Properly calculate the difference with unsigned types
tests.c:161:16: error: taking the absolute value of unsigned type
      'unsigned long' has no effect [-Werror,-Wabsolute-value]
    t->diff += labs (GST_BUFFER_TIMESTAMP (buffer) - t->expected);
2014-05-19 11:21:36 +02:00
Aleix Conchillo Flaqué
782d65cab1 rtspsrc: always use a random ssrc for the internal session
Use a random SSRC different than 0 for the internal session SSRC.

https://bugzilla.gnome.org/show_bug.cgi?id=730212
2014-05-16 16:58:44 +02:00
Wim Taymans
d004eda79d rtpsession: update last_activity when sending RTP
Also update last_activity when doing something with the internal
source to make sure don't timeout early.

See https://bugzilla.gnome.org/show_bug.cgi?id=730217
2014-05-16 16:55:17 +02:00
Aleix Conchillo Flaqué
a62b280873 rtpbin: update rtp encoder/decoder docs
Use %u in RTP encoder/decoder pads to match other rtpbin pads.

https://bugzilla.gnome.org/show_bug.cgi?id=730146
2014-05-15 15:48:21 +02:00
George Kiagiadakis
7e2138794f rtpsession: remove unused if branch
1) sources that have sent BYE in the past cannot be senders, since
they would have timed out to being receivers in the meantime...
2) sources that have sent BYE are now being removed earlier inside
this function
2014-05-14 16:01:50 +02:00
George Kiagiadakis
85d4c031d4 rtpsession: cleanup sources that have sent BYE 2014-05-14 16:01:50 +02:00
George Kiagiadakis
7d7840cc4a rtpsession: unify nested if clauses 2014-05-14 16:01:50 +02:00
George Kiagiadakis
0e6a31411b rtpsession: timeout internal sources that are inactive for a long time and send BYE 2014-05-14 16:01:50 +02:00
Aleix Conchillo Flaqué
bcd469ff31 rtpjitterbuffer: don't stop looping if event found in the queue
If we are inserting a packet into the jitter queue we need to keep
looping through the items until the right position is found. Currently,
the code stops as soon as an event is found in the queue.

Regarding events, we should only move packets before an event if there
is another packet before the event that has a larger seqnum.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=730078
2014-05-14 10:23:28 +02:00
Adrien SCH
8ac30d4c26 matroskamux: fix the memory leak of language attribute
https://bugzilla.gnome.org/show_bug.cgi?id=728418
2014-05-13 19:55:21 -03:00
Edward Hervey
420661bd95 qtdemux: Fix leak of palette_data in error cases
CID #1212151
2014-05-12 16:56:35 +02:00
Edward Hervey
112d948b7e qtmux: Free node_header in error cases
CID #1212134
2014-05-12 16:53:32 +02:00
Edward Hervey
6c4882996f flvdemux: Don't use WARNING for not-linked flow return
Pollutes debug logs for no reason. It's only an error if all pads
return not-linked
2014-05-12 13:46:01 +02:00
Edward Hervey
c09b14c931 flvdemux: Skip unknown tags in push-mode
We add a new mode (SKIP) in push-mode to skip tags that we don't known about

Partially fixes https://bugzilla.gnome.org/show_bug.cgi?id=670712
2014-05-12 13:45:06 +02:00
Wim Taymans
b2e1598e4a rtpjitterbuffer: increment accepted packets after loss
When we detect a lost packet, expect packets with higher
seqnum on the input.

Also update the unit test.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=729524
2014-05-09 18:10:32 +02:00
Jason Litzinger
9068e1bb8e Add new test case. 2014-05-09 18:10:32 +02:00
Eric Trousset
bd51aa7aa8 qtdemux: don't respond to a position query in BYTE format with a TIME position
https://bugzilla.gnome.org/show_bug.cgi?id=729553
2014-05-09 16:12:45 +01:00
Tim-Philipp Müller
9872c19491 matroskademux: don't leak doctype string in error code path
CID 1212145.
2014-05-09 14:22:42 +01:00
Tim-Philipp Müller
615f6e55c1 flacparse: skip PICTURE headers without any image data
Fixes warning if the image length is 0.
2014-05-07 00:58:15 +01:00
Guillaume Desmottes
d089f99a39 rtp/README: update pipelines to work with 1.0
- Use gst-libav encoders/decoders instead of gst-ffmpeg
- gstrtpjitterbuffer -> rtpjitterbuffer
- gst-launch-0.10 -> gst-launch-1.0
- Add 'videoconvert' element
- xvimagesink -> autovideosink

https://bugzilla.gnome.org/show_bug.cgi?id=729247
2014-05-05 20:23:56 -04:00
Vincent Penquerc'h
ec38c62563 matroska: rejig test to avoid undefined shift behavior
Coverity 1195121, 1195120
2014-05-05 14:44:57 +01:00
Vincent Penquerc'h
9589c43516 matroskamux: ensure we don't dereference a NULL pointer
while working out the codec ID.

Coverity 1195148
2014-05-05 14:32:06 +01:00
Olivier Crête
b2a52035bf rtprtxreceive: Wait until timeout to clear association requests
If two streams request a retranmission for the same SSRC, ignore the second
one if the first oen is less than one second old, otherwise time out the first
one and ignore the second.
2014-05-04 22:36:59 -04:00
Olivier Crête
0742a5a257 rtpmux: Always let upstream chose the ssrc if it wishes 2014-05-04 19:11:03 -04:00
Mark Nauwelaerts
6c584bc833 rtpjitterbuffer: avoid stall by corrupted seqnum accounting 2014-05-04 13:38:26 +02:00
Olivier Crête
2e54d38dd0 rtpsession: Keep local conflicting addresses in the session
As we now replace the local RTPSource on a conflict, it's no longer possible
to keep local conflicts in the RTPSource, so they instead need to be kept
in the RTPSession.

Also fix the rtpcollision test to generate multiple collisions instead of
one by change the address, as otherwise we detected that it was a single one.
2014-05-03 18:30:20 -04:00
Sebastian Dröge
1d4404d883 Release 1.3.1 2014-05-03 18:02:23 +02:00
Sebastian Dröge
859c751a5d imagefreeze: Set segment position to the stop position of the buffer 2014-05-02 17:14:29 +02:00
Sebastian Dröge
4282d75597 imagefreeze: Properly report errors before stopping the srcpad task 2014-05-02 17:14:29 +02:00
Sebastian Dröge
4933394d35 imagefreeze: Error out if we have no caps yet 2014-05-02 17:14:29 +02:00
Vincent Penquerc'h
218294b9f3 wavparse: avoid dividing by a 0 blockalign
This can be 0. In that case, do not try to cut off the last few
bytes from the last buffer.

Coverity 1146971
2014-05-02 14:49:27 +01:00
Vincent Penquerc'h
590e20cbc9 matroskamux: do not use uinitialized clut on error
If we're missing part of the clut, do not try to use it. It seems
very likely the break was meant to break out of the switch rather
than from the loop.

Coverity 1139878
2014-05-02 14:25:01 +01:00
Vincent Penquerc'h
d917c94037 flxdec: fix integer overflow
Coverity 1139859
2014-05-02 14:18:08 +01:00
Vincent Penquerc'h
60ba2d7aee rtpqdmdepay: remove pointless check
Besides, the pointer was dereferenced earlier anyway.

Coverity 1139853
2014-05-02 14:09:02 +01:00
Vincent Penquerc'h
a846e84349 rtspsrc: remove duplicate test
item was dereference previously.

While there, reorder some test for faster early out.

Coverity 1139844
2014-05-02 14:06:25 +01:00
Vincent Penquerc'h
5c22bcf6e9 matroska: blindly fix writing variable length negative values
Spotted while fixing something else in the area.

Nothing calls this with a negative value.
2014-05-02 13:33:02 +01:00
Vincent Penquerc'h
5b9fa4e63a matroska: do not lose the top bits when writing a > 32 bit value
Coverity 1139806
2014-05-02 13:29:33 +01:00
Vincent Penquerc'h
10663decd9 videoflip: add missing break in switch
Coverity 1139755
2014-05-02 12:10:26 +01:00
Vincent Penquerc'h
a0bc24558e matroska: do not try to call gst_pad_query_default on a NULL pad
gst_matroska_parse_query can be called explicitely with a NULL pad.
If we reach this point with a NULL pad, fail the query.

Coverity 1139715
2014-05-02 11:39:39 +01:00
Vincent Penquerc'h
3915884017 matroska: do not return GST_FLOW_OK if we did not get a buffer
Coverity 1139714 (which will likely come back in another guise,
as the _read_init call can have a failing _map)
2014-05-02 11:28:01 +01:00
Vincent Penquerc'h
f5a9f5e221 matroska: catch failure to map buffer
Avoids dereferencing NULL.

Coverity 1139712
2014-05-02 11:20:33 +01:00
Vincent Penquerc'h
94720fd3a1 avimux: refuse caps with invalid framerate
Coverity 1139701
2014-05-02 10:53:00 +01:00
Vincent Penquerc'h
1be86ebb2a qtmux: handle 0 size packets without dividing by 0
Coverity 1139691
2014-05-02 10:21:09 +01:00
Vincent Penquerc'h
b692539b55 qtdemux: guard against invalid frame size to avoid division by 0
Coverity 1139690
2014-05-02 09:49:32 +01:00
Vincent Penquerc'h
436c8c11a0 qtdemux: trivial typo fix 2014-05-02 09:49:17 +01:00
Vincent Penquerc'h
0253db6d36 mpegaudioparse: remove dead code
A stricer check is already done earlier, and integer overflows
do not seem possible here.

Coverity 1139675
2014-04-30 17:48:53 +01:00
Vincent Penquerc'h
a55b8e9c00 rtpvrawpay: guard against pathological "no space" condition
Even if one woul hope one pixel can fit in a MTU, ensure we do not
overwrite a buffer if this is not the case.

Spotted while looking at Coverity 1208786
2014-04-30 14:50:44 +01:00
Vincent Penquerc'h
dfa2df1c88 rtpjpegdepay: sanity check for NULL qtable
Can happen (at least in crafted stream)

Coverity 1208778
2014-04-30 11:52:10 +01:00
Tim-Philipp Müller
b1473491cf wavparse: pass on tags from upstream if there are any
Don't just ignore upstream tags from e.g. an ID3 tag before
the .wav data, pass them on downstream.

https://bugzilla.gnome.org/show_bug.cgi?id=729223
2014-04-30 01:08:41 +01:00
Wim Taymans
eba3bba524 rtpjitterbuffer: optimize timer update
When we are not doing retransmission, we just need to find the current
seqnum so we can stop when we found it.
2014-04-29 16:26:53 +02:00
Wim Taymans
b2c9646acb rtpjitterbuffer: small optimizations
Small optimizations where we can.
Add some more debug.
2014-04-29 16:21:44 +02:00
Wim Taymans
df04fcbb5d rtpjitterbuffer: signal when next_seqnum changed
Signal the pushing thread when the next_seqnum changed and we might be
able to push a buffer now.
2014-04-29 16:16:17 +02:00
Wim Taymans
3cd0e8ae88 rtpjitterbuffer: only signal event when head changed
After adding a buffer, only signal the pushing thread when the head
buffer changed or else we cause a useless wakeup.
2014-04-29 16:12:29 +02:00
Wim Taymans
18b69419fd rtpjitterbuffer: rework packet insert
Rework the packet queue so that the most common action (insert a packet
at the tail of the queue) goes very fast.

Report if a packet was inserted at the head instead of the tail so that
we can know when to retry _pop or _peek.
2014-04-29 16:02:37 +02:00
Wim Taymans
9994ff2c6c rtpvraw: use plane pointers when needed
Pack/unpack planar formats to/from the first plane.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=729058
2014-04-28 14:45:57 +02:00
Nicolas Dufresne
d87cc7bacf goom: Remove french comment saying to prefix functions
All non-static function in this file are already prefixed with goom_.
2014-04-27 21:57:38 -04:00
Tim-Philipp Müller
02436f52c6 goom: fix compilation on ios-arm7-10.9 and osx-x86_64
uint is not a standard type, and the rest of the code uses
Uint which is locally typedefed to unsigned int.

https://bugzilla.gnome.org/show_bug.cgi?id=729067
2014-04-28 00:24:16 +01:00
Luis de Bethencourt
3943c3ec08 goom: fix undefined behaviour of left-shift
Don't left-shift into the sign bit, the result is undefined and potentially
an overflow could flip the sign.
2014-04-27 18:31:48 -04:00
Luis de Bethencourt
5dc2e6bef1 qtdemux: check return from qt_demux_video_caps
Now qtdemux_video_caps() can return NULL. We need to check this return before
using it's value.

https://bugzilla.gnome.org/show_bug.cgi?id=728987
2014-04-26 20:51:36 -04:00
Tim-Philipp Müller
c9597298f9 docs: remove outdated and pointless 'Last reviewed' lines from docs
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.
2014-04-26 23:35:17 +01:00
Luis de Bethencourt
c073a6c779 qtdemux: initialize caps pointer to null
Make sure the caps pointer returns initialized when using it in
qtdemux_parse_tree ().

https://bugzilla.gnome.org/show_bug.cgi?id=728987
2014-04-25 18:23:23 -04:00
Jan Schmidt
f2d0ddf113 rtpjitterbuffer: Clear last_pt on flush-stop.
Otherwise, we don't recheck the buffer caps for clock-rate
properly on the next chain.
2014-04-23 18:54:16 +10:00
Sebastian Dröge
25ed0a30a4 deinterlace: Fix compiler warning
gstdeinterlace.c: In function 'gst_deinterlace_output_frame':
gstdeinterlace.c:1537:57: error: 'pattern.length' may be used uninitialized in this function [-Werror=maybe-uninitialized]

This actually is always initialized before it is used there, but
let's just silence gcc here.
2014-04-22 17:29:02 +02:00
Vincent Penquerc'h
f10c3f1a76 rtpmux: fix buffer list drop check
While porting to 0.11, the check was mistakenly made constant,
instead of testing for the return value of process_buffer_locked.

Coverity 1139663
2014-04-21 17:21:20 +01:00
Vincent Penquerc'h
d9eb5f7fde matroska: fix content encoding scope validity check
It's 3 bits, and http://matroska.org/technical/specs/index.html
says it can't be 0.

Coverity 1139660
2014-04-21 17:21:20 +01:00
Vincent Penquerc'h
54c5710adb matroskamux: fix PAR fraction sanity check
It was checking par_num twice, and never par_denum.

Coverity 1139634
2014-04-21 17:21:20 +01:00
Vincent Penquerc'h
25fa88f8aa multiidpsink: warn when setsockopt fails
This doesn't seem to be fatal, but it's good to let the user know
in the logs.

Coverity 1139630
2014-04-21 17:21:20 +01:00
Vincent Penquerc'h
e526412afa interlace: catch failure to create audio info from caps
Coverity 1139627, 1139628
2014-04-21 17:21:20 +01:00
Göran Jönsson
80967c7638 gstrtph264pay: Reset sps pps variable when state change.
Reset last_spspps and sps/pps arrays  when state transition
GST_STATE_CHANGE_PAUSED_TO_READY.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=726015
2014-04-21 12:07:20 +02:00
Wim Taymans
3e11ce43b9 jitterbuffer: improve EOS handling
Make a new method to disable the jitterbuffer buffering.
Rework the update_estimated_eos() method. Calculate how much time
there is left to play. If we have less than the delay of the
jitterbuffer, we disabled buffering because we might never be able to
fill the complete jitterbuffer again.
If we receive an EOS event, disable buffering. We will drain the
buffer and eventually push the EOS event out.
When we reach the estimated NPT timeout and we didn't receive an EOS
event, make one and queue it so that it can be pushed.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=728017
2014-04-18 14:07:31 +02:00
Wim Taymans
38a486b374 rtpsession: send reconfigure when internal-ssrc changes
When the internal-ssrc property changes, we want to send a reconfigure
upstream to make payloaders use the new suggested ssrc.
Using the internal-ssrc property to change the SSRC of a stream is not a
good idea and doesn't work when there are multiple senders, we want to
set the SSRC directly on the payloaders. Therefore, deprecate this
property.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725361
2014-04-18 10:21:27 +02:00
Wim Taymans
42cfedde7f jitterbuffer: assume a full buffer when eos
Rework the logic to make buffering messages a little, make sure we
don't make the same message multiple times.
Consider the buffer full when EOS was received.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=728017
2014-04-18 04:27:39 +02:00
Sebastian Dröge
27cf71e209 rtprtxsend: Require clock-rate in the caps and handle no ssrc in the caps properly 2014-04-17 17:58:58 +02:00
Sebastian Dröge
897c02cace rtpjitterbuffer: Unref clock id when waiting for the clock is interrupted 2014-04-17 17:00:37 +02:00
Tim-Philipp Müller
77badda6b9 videomixer: name collectpads object based on videomixer name
Makes it easier to track things in debug logs when there
are multiple mixers and muxers.
2014-04-16 21:40:45 +01:00
Tim-Philipp Müller
f8d15b1e56 videomixer: better logging of incoming events
The pad and parent names are already logged as part of logging
the object. Instead log the full event details.
2014-04-16 21:38:35 +01:00
Sebastian Dröge
b21b46a07a level: Use the correct number of samples to iterate over the input array
Fixes invalid memory accesses and accesses to uninitialised data.
2014-04-16 18:50:50 +02:00
Sebastian Dröge
bd65c36cbb icydemux: Unref dropped events 2014-04-16 18:50:50 +02:00
Vincent Penquerc'h
457712b933 matroska: fix check for amount of data to read
History shows length==0 should set data to NULL and return,
so we do that too instead of trying to read nothing.

Coverity 206205
2014-04-16 17:44:51 +01:00
Vincent Penquerc'h
46a39bdd4f deinterlace: fix sign comparison
history_count is unsigned, so the whole comparison will be made
as unsigned, and fail to reject what it was meant to.

Coverity 206204
2014-04-16 17:44:51 +01:00
Vincent Penquerc'h
c6acd6368b avidemux: remove dead code
sub may not be NULL in this switch, there is a bail out just
before it if so.

Coverity 206098
2014-04-16 17:44:51 +01:00
Vincent Penquerc'h
937269d02e flacparse: remove dead code
The block_size == 0 was shortcut earlier, and the variable is not
modified in the meantime.

Coverity 206097
2014-04-16 17:44:50 +01:00
Vincent Penquerc'h
2e120c9440 videomixer: remove dead code
While it seems to keep a compile time selection, I traced it
to some code copied from videoconvert, where it was removed,
with the following comment:

    Also remove the high-quality I420 to BGRA fast-path as it needs
    the same fix, which causes an additional instruction, which causes
    orc to emit more than 96 variables, which then just crashes.
    This can only be fixed in orc by breaking ABI and allowing more
    variables.

Thus, I remove it here as well.

Coverity 206064
2014-04-16 17:44:50 +01:00
Vincent Penquerc'h
595a9cb5c5 isomp4: fix incorrect masking for multiple tags
Coverity 206058
2014-04-16 17:44:50 +01:00
Vincent Penquerc'h
a5b7c12e35 isomp4: fix wrong atom flags set when adding samples
Coverity 206057
2014-04-16 17:44:50 +01:00
Vincent Penquerc'h
d2b682c271 audiofx: fix comparison of delta time to a threshold
Coverity 206055
2014-04-16 17:44:50 +01:00
Vincent Penquerc'h
7ebfdbeaf8 wavparse: do not rely on call failure keeping return data unmodified
This is clearer this way too.

Coverity 206029
2014-04-16 17:44:50 +01:00
Vincent Penquerc'h
b344b29ff2 isomp4: catch fseek error
Coverity 206028
2014-04-16 17:44:50 +01:00
Vincent Penquerc'h
88eccee88c isomp4: report failures to caller
Coverity 206027
2014-04-16 17:44:50 +01:00
Wim Taymans
783b4ba2c4 rtpjitterbuffer: refuse serialied query when buffering
When we are buffering, we can't block and wait for the serialized query
to complete because the jitterbuffer will not try to forward the query
while buffering. Instead, just refuse the query.
2014-04-16 18:16:33 +02:00
Wim Taymans
233e9e64b8 rtpjitterbuffer: don't free the serialized query
We should never free a serialized query in the queue, it is the upstream
caller that will free it.
2014-04-16 18:16:32 +02:00
Sebastian Dröge
74c23f0f4f videomixer: Create hashtable only when we actually use it
In error cases we previously returned without freeing it.
2014-04-16 17:33:46 +02:00
Sebastian Dröge
d3a2b3c73a videomixer: Chain up to the parent class' dispose function 2014-04-16 17:30:59 +02:00
Marc Leeman
5b4681dfe7 udpsrc: correct LOG msg for -1
Signed-off-by: Marc Leeman <marc.leeman@gmail.com>
2014-04-16 13:54:40 +01:00
Sebastian Dröge
b038fd4eff interleave: Fix negotiation to work at all again
The caps query handling function for the sinkpads was called for
the srcpad, and the sinkpads had none. This commit moves it to the
right pad, but nonetheless the negotiation still looks wrong.

This makes the test pass again after the recent coverity fix
and also allows interleave to work again, but someone should
really review the negotiation code and fix it.
2014-04-15 21:36:30 +02:00
Josep Torra
eaee14aff4 rtph264depay: only guess AU boundaries when aren't indicated by marker
The marker bit isn't mandatory and we had in place code to guess AU
boundaries by detecting a new picture start. This guessing code
didn't work with interlaced content that has proper marker bits
to indicate the AU boundaries. It was leaking the first field buffer
and producing a corrupted output.

fixes: https://bugzilla.gnome.org/show_bug.cgi?id=728041
2014-04-12 04:42:36 +02:00
Jimmy Ohn
ecf188e6cd qtdemux: replace duplicated variable when parsing trex atom
https://bugzilla.gnome.org/show_bug.cgi?id=727878
2014-04-10 09:03:02 +02:00
Sebastian Dröge
d47806320d qtdemux: Properly return stream flags when parsing trex atom
https://bugzilla.gnome.org/show_bug.cgi?id=727867
2014-04-09 08:58:48 +02:00
Edward Hervey
9859515605 interleave: Add missing break in switch statement
The caps query is handled entirely already before.

CID #1139757
2014-04-08 11:31:06 +02:00
Vincent Penquerc'h
31f36d805a avidemux: use frames, not bytes, for position query in VBR streams
Coverity 1139648
2014-04-07 12:58:23 +01:00
Vincent Penquerc'h
42298f65e8 smpte: fix copy/paste error causing unmap on wrong buffer
Coverity 1139647
2014-04-07 12:43:57 +01:00
Vincent Penquerc'h
1d7735b1d6 deinterlace: guard against finding no suitable pattern
The code handles a -1 pattern index, and it seems plausible
that a pattern might be found later, so it seems best to not
send an element error here.

Coverity 1139766
2014-04-07 12:20:12 +01:00
Wim Taymans
5b9945e0a6 rtspsrc: update for new MIKEY API 2014-04-04 17:38:14 +02:00
Wim Taymans
6210cbe1e2 rtspsrc: send sender SSRC in the MIKEY message
Allocate a new SSRC for our RTCP messages back to the server and set
this in the MIKEY message.
2014-04-03 17:40:01 +02:00
Wim Taymans
4f641ef18b rtspsrc: make random number for the CSB
As recommended in the RFC
2014-04-03 17:39:30 +02:00
Wim Taymans
f932da3be6 rtspsrc: don't put spaces in keymgmt header 2014-04-03 12:21:27 +02:00
Wim Taymans
2edd450369 rtspsrc: create and send the RTCP encryption key
Create and make a key for encrypting the RTCP packets back to the server
and wrap this in a MIKEY message that we send as a header in the SETUP
request.
2014-04-03 12:21:27 +02:00
Wim Taymans
a52b7eadfd rtspsrc: free the srtpdec element 2014-04-03 12:18:39 +02:00
Wim Taymans
f0f9451523 rtspsrc: cleanup stream_free function
There is no reason to NULL all fields, we will free the stream anyway.
2014-04-03 12:16:25 +02:00
Wim Taymans
c3de599c4f jitterbuffer: demote warning to debug
For TCP, it is normal that we don't have timestamps so don't WARN on
it.
2014-04-03 12:09:24 +02:00
Thibault Saunier
b95d9cfb21 avidemux: Always set PTS=DTS on raw video streams 2014-03-31 18:38:28 +02:00
Thibault Saunier
511202d50c avidemux: Always set pixel-aspect-ratio on raw video streams
That field is mandatory in caps and if it is not present in the
AVI container, it means square pixels thus 1/1.
2014-03-31 18:38:22 +02:00
Tim-Philipp Müller
821c68822b matroska-mux: add mapping for Opus audio
Might want to consider adding channels/rate
requirement to template caps, but requires
fixing up of encoder and parser first.
2014-03-30 00:35:07 +00:00
Tim-Philipp Müller
b158a1c068 matroska-demux: add mapping for Opus audio codec
https://bugzilla.gnome.org/show_bug.cgi?id=727305
2014-03-30 00:31:11 +00:00
Tim-Philipp Müller
273f389d57 rtpmanager: copy sticky events when exposing pads in more places
https://bugzilla.gnome.org/show_bug.cgi?id=724712
2014-03-29 13:23:02 +00:00
Ognyan Tonchev
2143a6e452 jpegpay: consider header len when calculating payload len
Fixed https://bugzilla.gnome.org/show_bug.cgi?id=726777
2014-03-27 09:45:20 +01:00
Mark Nauwelaerts
3414e3d0b9 matroskademux: segment closing not needed in 1.x
... as sender should keep track of segment base accumulation.
Rather, it may have some adverse effects as a spurious segment event,
e.g. in collectpads.
2014-03-25 21:02:45 +01:00
Mark Nauwelaerts
9a30726226 matroskademux: early sending pending codec-data for all streams
... at least before syncing across all streams might cause some gap
activity on any of those streams, notably sparse streams.

See also #712134
2014-03-25 21:02:45 +01:00
Mark Nauwelaerts
1e135a38cc matroskamux: handle both sticky and non-sticky custom event 2014-03-25 21:02:45 +01:00
Wim Taymans
e7c8fa1127 rtspsrc: only expose streams on dataflow
Only probe on buffers, we don't want to expose the streams on events.
2014-03-25 11:44:27 +01:00
Wim Taymans
3b497bf7d5 rtspsrc: copy sticky events to ghostpad
When we expose internal pads as ghostpads, first copy the sticky events
so that we have the caps and segment etc.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=724712
2014-03-25 11:36:40 +01:00
Wim Taymans
67f3113759 rtspsrc: srtp handling 2014-03-25 10:23:24 +01:00
Wim Taymans
4846be1491 rtspsrc: set SSRC on caps if known 2014-03-25 10:23:00 +01:00
Wim Taymans
5ec8c96966 rtspsrc: put caps on udpsrc instead of using the signals
Try to avoid using the request-pt-map to get caps but set them directly
on the udpsrc element. That way, the caps get nicely transformed as they
pass through the different elements in the rtpbin, including the AUX and
decoder/encoder elements.
2014-03-24 17:07:06 +01:00
Wim Taymans
2b59828e0b rtspsrc: use profile to set rtcp caps
Use the negotiated profile to set x-rtcp or x-srtcp caps
2014-03-24 15:35:09 +01:00
Wim Taymans
a7b55d7687 rtspsrc: set udpsrc to READY
READY is enough to allocate ports now
2014-03-24 15:34:26 +01:00
Wim Taymans
d3c736c50f udpsrc: improve caps handling
Protect caps with the lock.
Don't push the caps event from the set_property function but mark the
pad for reconfiguration so that it will renegotiate and push the new
caps event in the streaming thread.
2014-03-24 15:22:04 +01:00
Wim Taymans
5e44fa3e31 udpsrc: open/close socket in NULL<->READY state
We should open the socket when going to NULL<->READY and not in the
start/stop vemthod, which is called in READY<->PAUSED. This makes it
possible to allocate a socket without going to PAUSED (and starting the
negotiation).
2014-03-24 15:15:34 +01:00
Wim Taymans
a4f6f963ec rtspsrc: free caps in ptmap array
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=726696
2014-03-24 14:35:01 +01:00
Wim Taymans
d6c5fbc87c rtspsrc: handle NULL rtpmap and parse error better 2014-03-20 11:12:51 +01:00
Mathieu Duponchelle
6cf0f19c14 videomixer: Port to new collectpads API
See: https://bugzilla.gnome.org/show_bug.cgi?id=724705
2014-03-16 17:44:40 +01:00
Per x Johansson
2a362c6fb1 matroskademux: fix assert on fps lower than 1
Fixes assert caused by gst_duration_to_fraction calling
gst_util_uint64_scale_int with a denominator of 0 when fps is less
than 1.

https://bugzilla.gnome.org/show_bug.cgi?id=726106
2014-03-12 09:08:31 +01:00
Thiago Santos
373eceef7c videomixer2: store video info with buffers to keep it in sync
Instead the queued buffer might have an old caps while the pad
is already storing the information for a new caps. Mixing those
while handling buffers will often lead to issues

https://bugzilla.gnome.org/show_bug.cgi?id=725948
2014-03-11 00:49:19 -03:00
Olivier Crête
15d276058e rtp: Remove caps restrictions from RTP depayloader sink caps
Remove caps restrictions that correspond to the default and are not
required in SDP. With the new usage of having pads require a subset
of the caps, they will make the negotiation fail.
2014-03-06 12:06:43 -05:00
Olivier Crête
5a9b988b85 rtpspeexdepay: Remove caps restrictions for depayloader
The "encoding-params" is optional in the SDP, because we now require
a subset of the caps, it would fail caps negotiatioin if it wasn't present.
So removed it from the template caps.
2014-03-06 11:03:04 -05:00
Wim Taymans
224239096d rtspsrc: skip streams with same control url
Keep track of what streams we did the SETUP for. We only need to
configure caps, wait for pads and push events on setup streams. We can
remove the disabled state of the stream and simplify some checks.
After we setup a stream, skip the other streams that have the same
control url. Use a skipped flag to mark streams that should be skipped.
2014-03-06 12:30:54 +01:00
Wim Taymans
3b27fc2f0f rtspsrc: remove obsolete code 2014-03-06 12:30:54 +01:00
Wim Taymans
27d883fe64 rtspsrc: just use the SDP index as the stream id
Use the index of the media stream in the SDP as the stream id instead of
keeping a separate counter.
2014-03-06 12:30:54 +01:00
Wim Taymans
99a9d2873c rtspsrc: handle NULL control urls better 2014-03-05 15:44:25 +01:00
Wim Taymans
d2f93e3afc session: small cleanups
It's nicer to explicitly check for NULL on pointer types to make it
clear that it's a pointer and not a boolean.
2014-03-05 14:28:26 +01:00
Wim Taymans
5818a0de1a session: handle unknown SSRC in FIR
https://bugzilla.gnome.org/show_bug.cgi?id=725712
2014-03-05 14:27:47 +01:00
Alessandro Decina
c4bf6e8b7e rtspsrc: fix seeking
Call gst_rtspsrc_connection_flush (src, FALSE) to reset connections as
non-flushing before sending PAUSE and PLAY with the new npt range. Without this
patch, those commands would fail with EINTR as the connections were still
flushing.
2014-03-05 11:39:09 +01:00
Thiago Santos
fd12ff4c29 avidemux: expose xsub as a subtitle instead of as a video
It is placed inside a 'vids' struct, so it was being exposed on
a pad named video_%d. XSUB are subtitles and this patch adds
an special case for it to be exposed in a subpicture_%d pad
2014-03-04 20:29:45 -03:00
Thiago Santos
dee861630a avidemux: do not try to add a tag with tag_name set to NULL
This can happen if there are subtitles in the stream, leading to
an assertion
2014-03-04 20:29:45 -03:00
Wim Taymans
70de0e4e99 rtspsrc: Add support for multiple payload types
A media stream can have multiple payload types. Parse all the payload
types and collect the caps information. We then have to store the
pt<->caps mapping instead of 1 pt and 1 caps.
Parse the profile from the SDP and use that to negotiate the transport
instead of always using AVP.
Rework how we do some tweaks for ASF and Realmedia.
2014-03-04 16:40:34 +01:00
Wim Taymans
dbe92c9147 rtspsrc: refactor payload handling 2014-03-04 11:34:39 +01:00
Wim Taymans
b4caf09011 jitterbuffer: fix buffer level with invalid DTS
It is possible that the DTS is invalid (when we receive RTP packets from
TCP, for example). As a fallback, use the reconstructed PTS value to
calculate the buffer level.
2014-03-03 11:34:00 +01:00
Thiago Santos
0443c2593a Revert "aacparse: put codec data on caps for loas format"
This reverts commit e459cf3e01.

This was pushed by accident, the bug should likely be fixed in
libav https://bugzilla.libav.org/show_bug.cgi?id=644
2014-02-27 23:15:04 -03:00
Thiago Santos
e459cf3e01 aacparse: put codec data on caps for loas format
gst-libav audio decoder also needs codec data for LOAS format, otherwise
it will complain about not having a decoder config and skip all packets

https://bugzilla.gnome.org/show_bug.cgi?id=596772
2014-02-27 17:10:03 -03:00
Tim-Philipp Müller
f3163fb45f matroskademux: align raw audio memory to powers of two
https://bugzilla.gnome.org/show_bug.cgi?id=725008
2014-02-27 00:46:39 +00:00
Tim-Philipp Müller
c3dc53e551 matroskademux: calculate alignment properly for audio depths not a multiple of 8 2014-02-27 00:46:39 +00:00
Matej Knopp
d33b4dce63 matroskademux: fix crash with 24-bit raw audio
Do not try to align audio buffers to odd numbers,
which will get us a NULL buffer which we then
crash on.

https://bugzilla.gnome.org/show_bug.cgi?id=725008
2014-02-27 00:46:28 +00:00
Tim-Philipp Müller
5bad2d8b70 rtpmanager: re-enable -Werror 2014-02-27 00:12:13 +00:00
Tim-Philipp Müller
1d7f5c7a83 rtpjitterbuffer: fix compiler warning
gstrtpjitterbuffer.c: In function 'gst_rtp_jitter_buffer_loop':
gstrtpjitterbuffer.c:2978:3: error: 'result' may be used uninitialized in this function
   while (result == GST_FLOW_OK);
   ^
2014-02-27 00:11:11 +00:00
Sebastian Dröge
d4bdf5a1b1 rtpjitterbuffer: Fix uninitialized variable compiler warning 2014-02-26 21:11:23 +01:00
Jake Foytik
6dd9142592 rtpjitterbuffer: Remove raw comparisons of RTP sequence numbers
Several conditional statements perform comparison on RTP sequence
numbers without taking the sequence number rollover into account.
Instead, use the gst_rtp_buffer_compare_seqnum function to perform the
comparison.

https://bugzilla.gnome.org/show_bug.cgi?id=725159
2014-02-26 21:11:21 +01:00
Göran Jönsson
53ffd9e1ca rtph264pay: only update last_spspps time if all sps/pps got sent successfully
This fixes an issue with gst-rtsp-server where no sps and pps are
sent for the first intra frame, because the payloader starts working
already when receiving DESCRIBE but there is no transports so it tries
to send sps and pps, but that fails with a FLUSHING flow. But the time
for last sent sps and pps would still be set, so when PLAY arrives and
the first intra frame is to be sent there is no sps and pps sent due to
that time since last sps pps is less than spspps_interval.

https://bugzilla.gnome.org/show_bug.cgi?id=724213
2014-02-25 10:48:24 +00:00
Santiago Carot-Nemesio
b9a953161f rtspsrc: Fix deadlock when task creation is no successful
https://bugzilla.gnome.org/show_bug.cgi?id=725124
2014-02-25 10:10:31 +01:00
Stefan Sauer
fdb5d460de autodetect: demote candidate error to warning and plug fake{sink,src}
In the case where we have no suitable candidate we post a warning and plug a
fake-element. Do the same when non of the candidate work.

This is more consistent and plugin the fakesink as a fallback is probably
helpful for running unit tests without requiring hardware src/sink elements.

Fixes #722981
2014-02-23 20:34:43 +01:00
Darryl Gamroth
7a65277119 audiofxbaseiirfilter: check if coefficients are provided inside filter lock
https://bugzilla.gnome.org/show_bug.cgi?id=719524
2014-02-22 20:01:41 +01:00
Reynaldo H. Verdejo Pinochet
0898de65c8 aacparse: be more strict at ADTS header parsing
Adds two extra checks:

- Sampling frequency on header can't be 15.
- Frame size should be at least 9 or 7, depending
  on whether CRC protection is present.

https://bugzilla.gnome.org/show_bug.cgi?id=724638
2014-02-21 15:04:11 -03:00
Reynaldo H. Verdejo Pinochet
c3a4bb1657 aacparse: make sure we have enough ADTS data
We need at least 6 bytes to pass over to _get_frame_len()
but we were just checking for a minimum of 2 bytes for the
syncword.

https://bugzilla.gnome.org/show_bug.cgi?id=724638
2014-02-21 15:04:11 -03:00
Stefan Sauer
0566ea06e5 autodetect: check if the kid has a sync property
previously autovideosrc did not have a sync property and v4l2src has none either.
2014-02-20 22:52:57 +01:00
Stefan Sauer
bf6a2f9afd autodetect: use a common baseclass
This makes the actual elements super simple. We're using the ELEMENT_FLAG to
configure source/sink and a string for the Audio/Video type.
2014-02-20 21:28:43 +01:00
Aleix Conchillo Flaqué
62f5a27416 rtspsrc: add tls-database property
Add support for a new property: tls-database. If the property is set,
the certificate database will be given to the rtsp connection if TLS
protocol is being used. If the server certificate can't be verified with
the default database, this additional database will be used.

https://bugzilla.gnome.org/show_bug.cgi?id=724396
2014-02-20 20:03:40 +01:00
Stefan Sauer
c0fd8e0c39 autodetect: extract common helper code
The function to generate the pretty names is basically the same. Use one and add
a parameter.
2014-02-19 21:27:17 +01:00
Stefan Sauer
a4fd0f9351 docs: use docbook markup for xi:include
It turns out that the change in gtk-doc-1.20 which wraps the |[]| content in
CDATA break xi:inlcude examples. As in a whole jhbuild checkout these where
the only 4, we're fixing them instead.
2014-02-18 22:54:45 +01:00
Stefan Sauer
9d9ffba17e isomp4mux: fix copy and paste
This fixes doc warnings.
2014-02-18 22:35:45 +01:00
Stefan Sauer
35da463618 docs: use the gtk-doc syntax to link to properties
Don't use docbook unless needed. Also stip other docbook tags in the the files we fix.
2014-02-18 22:35:00 +01:00
William Jon McCann
577d873009 docs: fix mismatched para tags
newer gtkdoc is more sensitive to mismatched docbook tags.
This fixes the build in master.
2014-02-14 22:26:08 +01:00
Wim Taymans
353e510f94 rtpjitterbuffer: add support for serialized queries
See https://bugzilla.gnome.org/show_bug.cgi?id=723850
2014-02-14 15:59:46 +01:00
Wim Taymans
bbe6d9a258 rtpsession: proxy caps and allocation on RTP pads
recv_rtp_sink: allow proxying of the allocation query.
send_rtp_sink: allow proxying of caps and allocation. This allows us to
query caps downstream as well as get an allocator from downstream.
send_rtp_src: allow proxy of caps, this makes the caps query do
upstream.

See https://bugzilla.gnome.org/show_bug.cgi?id=723850
2014-02-14 12:05:55 +01:00
Thiago Santos
7f1d51ba90 qtdemux: handle tags in mac encoding
Check the charset from (C)*** tags and set the charset
to convert from MAC encoding if suitable.

https://bugzilla.gnome.org/show_bug.cgi?id=723166
2014-02-13 12:37:03 -03:00
divhaere
19a307930a matroska: add support for GRAY8, BGR and RGB video colourspaces in V_UNCOMPRESSED codec
https://bugzilla.gnome.org/show_bug.cgi?id=723849
2014-02-11 21:22:33 +01:00
Sebastian Dröge
4ecccb6ff6 goom: Remove unused functions 2014-02-09 23:38:44 +01:00
Sebastian Dröge
aafcbbb2fe matroskaparse: Comment out some unused functions used only from the commented out pull-mode code 2014-02-09 23:21:20 +01:00
Sebastian Dröge
3bc53f0840 rtprtxsend: Fix unitialized variable compiler warning
variable 'rtx_ssrc' is used uninitialized whenever
'if' condition is false [-Werror,-Wsometimes-uninitialized]
2014-02-08 17:24:06 +01:00
Sebastian Dröge
3d8f078b61 rtpac3depay: Remove unused variable 2014-02-08 17:21:19 +01:00
Sebastian Dröge
29ea0db5a3 flx: Fix typo in header include guard
error: '__GST_FLX_FMT__H__' is used as a header guard here,
followed by #define of a different macro [-Werror,-Wheader-guard]
2014-02-08 17:19:39 +01:00
Thiago Santos
f5f27f7d0d qtmux: remove have_dts flag from pads
It was used in the past in 0.10 when there was no explicit DTS
field in buffers, now we have it in 1.x series and we can
check it directly with GST_BUFFER_DTS_IS_VALID
2014-02-07 13:10:25 -03:00
Thiago Santos
f89ba82f29 qtmux: improve support for sparse streams
Do not try to use subsequent buffer timestamps to calculate
sparse streams durations because the stream is sparse and
the buffers might not be 'time adjacent'. So rely on the
duration and give the option to the pad to provide
custom 'empty' buffers to represent the gaps in the
stream, this can vary on how the data is represented.

Right now, the only sparse stream supported is tx3g subtitles.
2014-02-07 13:10:24 -03:00
Thiago Santos
99e966e2e1 qtmux: add support for text/x-raw subtitles
Adds it to mp4mux, qtmux and gppmux.

Buffers need to be prefixed with 2 bytes for the text length before
being muxed.

https://bugzilla.gnome.org/show_bug.cgi?id=581295
2014-02-07 13:10:24 -03:00
Thiago Santos
d644cda79b qtmux: add support for the TX3G atoms
Adds functions for creating and setting values related to the
tx3g atom for raw text subtitle support.

QTFF spec has information on those atoms

https://bugzilla.gnome.org/show_bug.cgi?id=581295
2014-02-07 13:10:24 -03:00
Thiago Santos
2ae1897273 qtmux: add subtitle support to qtmuxmap structures
adds basic stubs for subtitle support around the qtmux and
qtmuxmap structures. Still no real subtitle implemented, but
basic functions in place

https://bugzilla.gnome.org/show_bug.cgi?id=581295
2014-02-07 13:10:24 -03:00
Reynaldo H. Verdejo Pinochet
2f8a1aa870 matroska: factor out read context init/reset
While at this, move _track_reset() to track-ids
so it can be called from the common read context
reset routine.

https://bugzilla.gnome.org/show_bug.cgi?id=722705
2014-02-06 13:25:12 -03:00
Wim Taymans
575332d127 effectv: fix doc section of revtv element 2014-02-06 12:21:07 +01:00
Matthieu Bouron
200eb7498d deinterlace: do not try set deinterlace method if passthrough is enabled
Fixes an issue with progressive content and unsupported video formats
for the deinterlace method.

https://bugzilla.gnome.org/show_bug.cgi?id=719636
2014-02-04 21:44:35 +01:00
Rafał Mużyło
ac4df5e2c5 gst: Don't use endianness-specific S8 audio format
It does not exist.

https://bugzilla.gnome.org/show_bug.cgi?id=723331
2014-02-04 13:44:29 +01:00
Per x Johansson
46bc1677a4 matroskamux: Fix constantly growing used uid list
Moves the used uid list to the class to avoid having it grow forever.

https://bugzilla.gnome.org/show_bug.cgi?id=723269
2014-01-30 11:59:28 -03:00
Mike Sheldon
659939f0f0 wavparse: Ignore Broadcast Wave Format (BWF) tags when searching for 'fmt' chunk
https://bugzilla.gnome.org/show_bug.cgi?id=723125
2014-01-29 20:16:48 +01:00
Mark Nauwelaerts
d25a183ccc ac3parse: custom get_sink_caps handling for private stream caps
... now that those are transformed rather than parsed, some transforming
of caps is required as well to make auto-plugging succeed.
2014-01-27 20:07:41 +01:00
Sebastian Dröge
8054cd5df3 Revert "rtspsrc: Proxy rtpjitterbuffer do-retransmission property"
This reverts commit 9f7b1128b1.

This should be handled automatically be rtspsrc if the AVPF profile
is used, and manual enabling of it can be done with the new-manager
signal.
2014-01-24 12:37:39 +01:00
Wim Taymans
43feb82feb rtspsrc: add signal to notify of new manager
So that you can configure and connect to signals on the rtpbin.

See https://bugzilla.gnome.org/show_bug.cgi?id=722866
2014-01-24 10:22:59 +01:00
Aleix Conchillo Flaqué
9f7b1128b1 rtspsrc: Proxy rtpjitterbuffer do-retransmission property
https://bugzilla.gnome.org/show_bug.cgi?id=722866
2014-01-24 09:14:59 +01:00
Wim Taymans
204bd715d2 rtpjitterbuffer: handle expected packet being an RTX packet
If the expected packet (do_next_seqnum is TRUE) is the one we requested
for retranmission earlier, do the logic to update the retransmission
statistics as well before setting up the timers for the next expected
packet.
Also reset the retransmission counter if the timer is reused for another
seqnum.
2014-01-21 17:52:44 +01:00
Wim Taymans
ddb0b9c422 rtpbin: add a caps accumulator for the request-pt-map signal
Add an accumulator that stops the signal emission as soon as a caps has
been retrieved. Otherwise the default handler would continue emitting
the signal and possibly overwrite the result with NULL again.
2014-01-21 15:48:20 +01:00
Wim Taymans
ef20dfe031 rtxreceive: copy flags and timestamps from original buffer 2014-01-21 15:29:27 +01:00
Wim Taymans
9a3d4d7cbe rtpjitterbuffer: ignore invalid timestamps in rtt calculation
When the input buffer does not have a valid timestamp, don't try to
calculate the round-trip-time.
2014-01-21 15:29:26 +01:00
Reynaldo H. Verdejo Pinochet
cf0c780138 matroskaparse: better default caps when none set
Uses information gathered during EBML parsing to
forge a more suitable set of caps instead of blindly
assuming everything is video/x-matroska.

For consistency, stream type reset was added to
matroska-demux too.

https://bugzilla.gnome.org/show_bug.cgi?id=722311
2014-01-21 11:11:46 -03:00
George Kiagiadakis
1a300eb509 rtprtxsend: ensure that no rtx buffers are sent after EOS
To do that, enqueue the EOS event to be sent from the srcpad task
thread and flush the queue right afterwards, so that no more rtx
buffers can be sent, even if there are more requests coming in.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=722370
2014-01-21 15:00:37 +01:00
George Kiagiadakis
133913a11a rtprtxsend: run a new GstTask on the src pad
The reason behind this is to minimize the retransmission delay.
Previously, when a NACK was received, rtprtxsend would put a
retransmission packet in a queue and it would send it from chain(),
i.e. only after a new buffer would arrive.

This unfortunately was causing big delays, in the order of 60-100 ms,
which can be critical for the receiver side.

By having a separate GstTask for pushing buffers out of rtxsend,
we can push buffers out right after receiving the event, without
waiting for chain() to get called.
2014-01-21 14:54:01 +01:00
Sebastian Dröge
e178cf60ae rtpvp8pay: Don't leak input buffers
https://bugzilla.gnome.org/show_bug.cgi?id=722414
2014-01-20 10:13:19 +01:00
Mark Nauwelaerts
829cec51c7 avimux: reset some more audio pad data when needed 2014-01-19 17:53:45 +01:00
Mark Nauwelaerts
3ea338ce27 avimux: write correct blockalign for vbr audio
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=720659
2014-01-19 17:53:45 +01:00
Aleix Conchillo Flaqué
cdbb2ba6b8 rtpjitterbuffer: do not drop serialized events when latency is set
Serialized events are now queued in the jitter buffer, so we don't
want to drop them even latency is set.

https://bugzilla.gnome.org/show_bug.cgi?id=722372
2014-01-18 10:38:46 +01:00
Michael Olbrich
447556fe6b avimux: don't make the buffer writable unless absolutely necessary
https://bugzilla.gnome.org/show_bug.cgi?id=722396
2014-01-17 19:25:15 -03:00
Sebastian Dröge
809d105982 matroskademux: Don't skip all video frames until the first keyframe
Instead do it like all other demuxers and let parsers and decoders
handle that. The keyframe information inside the container might
be completely wrong like in the sample file of the bug report,
and if it is correct and we push no keyframes, then the parsers
and decoders will handle that properly anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=682276
2014-01-15 22:49:58 +01:00
Thiago Santos
52fc078310 qtdemux: remove elst_offset variables
They are not used anymore
2014-01-15 15:33:45 -03:00
Thiago Santos
5fe1b3eb28 qtdemux: remember reverse playback when verifying the segment end
Check if the rate is positive or negative to correctly compare the current
position with the segment to make reverse playback work
2014-01-15 15:33:45 -03:00
Thiago Santos
90a5565229 qtdemux: do not ignore empty segments
Make sure empty segments are used and pushed with a gap event
to represent its data (or lack of it)

Each QtSegment is mapped into a GstSegment with the corresponding
media range. For empty QtSegments a gap event is pushed instead
of GstBuffers and it advances to the next QtSegment.

To make this work with seeks, need to keep track of the starting
'base' to make sure it remains consistently increasing when
pushing new segment events.
For example: if a seek makes qtdemux start from 5s, the first
segment will have a base=0. When the next segment is activated,
its base time will be QtSegment.time - qtdemux.segment_base so
that it doesn't include the first 5s that weren't played and
shouldn't be accounted on the running time

This purposedly will remove the fix made for
https://bugzilla.gnome.org/show_bug.cgi?id=700264, at this
point it was decided to respect the gaps, even if they cause
a delay on playback, because that's the way the file was crafted.

https://bugzilla.gnome.org/show_bug.cgi?id=345830
2014-01-15 15:33:45 -03:00
George Kiagiadakis
397c4ed7a0 rtprtxsend: remove wrong check for payload type not having been set
1) pt can be lower than 96
2) there is no point in checking that because rtprtxsend will not
   even store buffers for payload types that it doesn't know about,
   so this case will never be reached
2014-01-15 10:13:12 +01:00
George Kiagiadakis
55746eaa4c rtprtxsend: fix data locking when creating rtx packets
This patch moves the creation of rtx packets to be done early,
in the src_event() function, when they are requested. The purpose
is to run gst_rtp_rtx_buffer_new() with the object locked to
protect internal data, because if it is done at the pushing stage,
we would have to lock and unlock multiple times in a row while we
are pushing the rtx buffers.

Previously there was no locking at all, which was terribly wrong.
2014-01-15 10:13:11 +01:00
George Kiagiadakis
3d9ca102c9 rtprtxsend: lock access to internal data in sink_event() function 2014-01-15 10:13:11 +01:00
George Kiagiadakis
ee8ae3000e rtprtxsend: remove unnecessary call to reset() from finalize()
...and use _free_full() on the pending buffers queue now that
reset() is not being called
2014-01-15 10:13:11 +01:00
George Kiagiadakis
f9f7e6e721 rtprtxsend: remove unused parameter from the internal reset() method 2014-01-15 10:13:11 +01:00
George Kiagiadakis
6d588ad6bb rtprtxsend: Use g_slice_* for allocating internal structures 2014-01-15 10:13:11 +01:00
George Kiagiadakis
75859ae924 rtprtxreceive: remove stupid mutex unlock in the middle of chain() 2014-01-15 10:13:11 +01:00
George Kiagiadakis
bf347dc50c rtprtxreceive: use GST_DEBUG_OBJECT / GST_WARNING_OBJECT instead of GST_DEBUG / g_warning 2014-01-15 10:13:11 +01:00
George Kiagiadakis
47788929d3 rtprtxreceive: fix integer format specifiers in GST_DEBUG
seqnum in this function is 32-bit, so G_GUINT16_FORMAT would
produce undefined output on big endian systems
2014-01-15 10:13:11 +01:00
George Kiagiadakis
252dfc34c8 rtprtxsend: change the rtx_pt_map directly in set_property() instead of delaying it for chain()
The same lock is held, so there is no point in complicating it...
2014-01-15 10:13:11 +01:00
George Kiagiadakis
8a0ae00ea8 rtprtxreceive: change the rtx_pt_map directly in set_property() instead of delaying it for chain()
The same lock is held, so there is no point in complicating it...
2014-01-15 10:13:11 +01:00
George Kiagiadakis
513ffc45b5 rtprtxreceive: simplify the code of finalize() 2014-01-15 10:13:11 +01:00
George Kiagiadakis
0fdae5f2f7 rtprtxreceive: use the GstObject lock instead of a new one 2014-01-15 10:13:11 +01:00
George Kiagiadakis
c945200ff2 rtprtxsend: use the GstObject lock instead of a new one 2014-01-15 10:13:11 +01:00
Vincent Penquerc'h
2ad1f20e7b Revert "aacparse: relax the detection of ADTS"
This was pushed by mistake along with the V4L2 fix.

This reverts commit 8eb4b032be.
2014-01-14 09:43:56 +00:00
Justin Joy
70be4fa24a rtpg726pay: don't leak encoding_name string
https://bugzilla.gnome.org/show_bug.cgi?id=722159
2014-01-14 10:29:47 +01:00
Akihiro Tsukada
8eb4b032be aacparse: relax the detection of ADTS
According to ISO/IEC 13818-7, "channel_config" field in ADTS header
may have value of 0, as in the case of frame with PCE.
gst_aac_parse_detect_streams() returned FALSE for those frames
and discarded them.
2014-01-13 09:08:50 +00:00
Tim-Philipp Müller
88ac735af3 matroskademux: don't leak TOC chapter list 2014-01-10 16:50:11 +00:00
Vincent Penquerc'h
f8158baa93 matroskamux: remove obsolete write-dummy-and-overwrite-on-eos code
The need for rewriting apparently is obsolete 0.10 leftover.
We now have caps for subtitles when we create the headers,
so we always write the correct data in the first place.
2014-01-10 08:54:04 +00:00
Tim-Philipp Müller
335b619cd5 rtprtxsend: remove duplicate assignment
Coverity CID 1151680
2014-01-09 23:55:16 +00:00
Vincent Penquerc'h
1c6ee3fba4 matroskamux: write subtitle codec ID and data at start when known
This avoids issues with writing dummy data first, then having
to come back and write correct data later. Doing so prevents
the muxed stream from being actually streamable.

https://bugzilla.gnome.org/show_bug.cgi?id=712134
2014-01-09 18:29:32 +00:00
Thiago Santos
5adedf9f5a qtmux: respect the HDLR box string format for mov and isomedia
Mov spec says it uses a pascal style string, while isomedia uses
a null terminated one. Store the current atoms flavor into the HDLR
to be able to generate the correct output.

https://bugzilla.gnome.org/show_bug.cgi?id=705982
2014-01-09 11:58:46 -03:00
Wim Taymans
7f8c4dceb4 Revert "matroskamux: Use the running time for container timestamps, not buffer timestamps"
This reverts commit b3aa8755fe.

We are already using the running-time because they were placed on the
buffers with gst_collect_pads_clip_running_time(). Arguably it would be
better to not modify the incomming buffers but collectpads seems to want
to use absolute timestamps from the buffers for finding the best buffer
(this can be changed with a custom compare function..).
2014-01-08 11:32:54 +01:00
Aleix Conchillo Flaqué
441f286e28 rtpbin: remove unused list of decoders
remove list of decoders, which are already handled by the list of elements.

https://bugzilla.gnome.org/show_bug.cgi?id=719938
2014-01-08 10:23:52 +01:00
Sebastian Dröge
2cddf3a0a9 matroskamux: Error out if ADPCM caps don't contain the layout field 2014-01-08 09:57:48 +01:00
Nicola Murino
bbb5a2853e matroskamux: Add support for g726 ADPCM
https://bugzilla.gnome.org/show_bug.cgi?id=720995
2014-01-08 09:57:48 +01:00
Wim Taymans
2e9e80badf rtspsrc: use new method to get media-type
Use the new method to get the media type of a transport.
2014-01-07 15:04:02 +01:00
Sebastian Dröge
5506dc3076 matroskamux: Add HEVC / h265 support 2014-01-06 14:55:36 +01:00
Sebastian Dröge
77745289c4 matroskademux: Add HEVC / h265 support 2014-01-06 14:55:36 +01:00
Stefan Sauer
73fe1d1f6f wavparse: remove ifdef'ed code
We do have adtl and cue parse as part of toc handling alreday. The fmt code is a left over from <0.10 times.
2014-01-06 13:55:36 +01:00
Stefan Sauer
9dde5e29da avidemux, waveparse: more logging for unhandled chunks
Always print a warning with the tag and if possible do a memdump.
2014-01-06 13:55:36 +01:00
Stefan Sauer
addf5c79a2 avidemux: expose 'strn' - stream name - as title tag 2014-01-05 22:47:42 +01:00
Stefan Sauer
5384da2a1f avidemux: parse fuji strd
We can get maker, model and capture date from this chunk.
Fixes #636143
2014-01-05 22:42:10 +01:00
Stefan Sauer
1be2922802 avidemux: ... and use the local api both times 2014-01-05 21:47:00 +01:00
Stefan Sauer
9a203fceeb avidemux: copy the riff api for ncdt into the element
This chunk is avi specific, no need to expose this as public api.
2014-01-05 21:40:21 +01:00
Sebastian Dröge
a4a7dafc32 matroskamux: Add missing semicolon from last commit 2014-01-05 10:28:34 +01:00
Sebastian Dröge
b3aa8755fe matroskamux: Use the running time for container timestamps, not buffer timestamps
Buffer timestamps have no real meaning here, and for selecting the next
buffer we already use the running time anyway.
2014-01-05 10:23:44 +01:00
Stefan Sauer
f48bb20b4f avi: use new riff api to extract nikon metadata
Fixes #636143
2014-01-04 21:34:38 +01:00
George Kiagiadakis
9226091235 rtprtxreceive: modify to use a payload-type map like rtprtxsend 2014-01-03 20:48:29 +01:00
George Kiagiadakis
c8a04bc7b2 rtprtxsend: do not keep history of packets with an unknown payload type
This allows to disable retransmission per payload type by not putting
a certain payload type in the map.
2014-01-03 20:48:29 +01:00
Wim Taymans
130ad1b1fa rtprtxsend: Allow SSRC-multiplexing and multiple payload types in the original stream
Conflicts:
	tests/examples/rtp/server-rtpaux.c
2014-01-03 20:48:29 +01:00
George Kiagiadakis
41285697ac rtprtxsend: Add an rtx-ssrc property to allow external control of the ssrc
This is useful when one needs to know the SSRC beforehands, so that it can
be used for SRTP for example.
2014-01-03 20:48:29 +01:00
Wim Taymans
679b5a8682 session: also push EOS event to RTCP srcpad 2014-01-03 20:48:29 +01:00
Wim Taymans
03e4a180da session: place SSRC in Retransmission event 2014-01-03 20:48:29 +01:00
George Kiagiadakis
0a8b149e9e rtprtxsend: use a realistic limit for the value of max-size-packets
G_MAXINT16 is chosen because if the queue contains more than
G_MAXINT16 packets, seqnum comparison will not work properly.
2014-01-03 20:48:28 +01:00
George Kiagiadakis
51edc07127 rtprtxsend: use a GSequence to implement the buffer queue
This has the advantage that searching the queue to find the
buffer with the requested seqnum is done with binary search.
2014-01-03 20:48:28 +01:00
George Kiagiadakis
487fa8c989 rtprtxsend: retransmit packets in the same order as the rtx requests 2014-01-03 20:48:28 +01:00
George Kiagiadakis
7d530ab59f rtprtxsend: Handle the max_size_time property
This property allows you to specify the amount of buffers
to keep in the retransmission queue expressed as time (ms)
instead of buffer count (which is the max_size_buffers property).
2014-01-03 20:48:28 +01:00
George Kiagiadakis
920a55532c rtprtxsend: keep important buffer information in a private structure
This is to avoid mapping a buffer every time we need to read a seqnum
or a timestamp.
2014-01-03 20:48:28 +01:00
Julien Isorce
5a1aa75961 rtpmanager: add new rtprtxsend / rtprtxreceive elements
The purpose of the sender RTX object is to keep a history
of RTP packets up to a configurable limit (in time). It will
listen for custom retransmission events from downstream. When
it receives a request for retransmission, it will look up the
requested seqnum in its list of stored packets. If the packet
is available, it will create a RTX packet according to RFC 4588
and send this as an auxiliary stream.

The receiver will listen to the custom retransmission events
from the downstream jitterbuffer and will remember the SSRC1
of the stream and seqnum that was requested. When it sees a
packet with one of the stored seqnum, it associates the SSRC2
of the stream with the SSRC1 of the master stream. From then
on it knows that SSRC2 is the retransmission stream of SSRC1.
This algorithm is stated in RFC 4588. For this algorithm to
work, RFC4588 also states that no two pending retransmission
requests can exist for the same seqnum and different SSRCs or
else it would be impossible to associate the retransmission with
the original requester SSRC.
When the RTX receiver has associated the retransmission packets,
it can depayload and forward them to the source pad of the element.

RTX is SSRC-multiplexed

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=711084
2014-01-03 20:47:59 +01:00
Matthieu Bouron
0bbdb9bb1d deinterlace: support any video formats and any caps features if deinterlace mode allows it
https://bugzilla.gnome.org/show_bug.cgi?id=719636
2014-01-03 11:22:01 +01:00
Wim Taymans
bb2d37b11d rtpbin: add some docs about AUX elements 2013-12-31 15:08:49 +01:00
Wim Taymans
d08e05b4ef rtpbin: add support for AUX sender and receiver
AUX elements are elements that can be inserted into the rtpbin
pipeline right before or after 1 or more session elements.

The AUX elements are essential for implementing functionality such
as error correction (FEC) and retransmission (RTX).

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=711087
2013-12-31 15:08:48 +01:00
Wim Taymans
ae22c95881 rtpbin: make request_element method internally
We can use the same method to create encoder and decoder elements, they
are just internal elements that we create.
2013-12-31 15:08:48 +01:00
Stéphane Cerveau
e7912641c3 wavparse: Skip id3 tag
Skip id3 tag during wav parse.

https://bugzilla.gnome.org/show_bug.cgi?id=721241
2013-12-31 10:39:21 +01:00
Edward Hervey
711c73290c avimux: Add missing break
I guess no-one noticed we no longer could mux WMV3 ...

COVERITY CID 1139759
2013-12-30 17:23:22 +01:00
Edward Hervey
91c5b09fb4 rtpvrawpay: Add missing break
COVERITY CID 1139762
2013-12-30 17:20:37 +01:00
Wim Taymans
ee7f41ba2e rtpsession: internal-ssrc is no longer deprecated 2013-12-30 17:00:45 +01:00
Wim Taymans
e721d26c68 rtpbin: add Since tags 2013-12-30 16:59:20 +01:00
Wim Taymans
5a2bc1405e rtpbin: add signal for new jitterbuffer
Emit a signal when a new jitterbuffer is created so that the app can
have a chance to configure it.
2013-12-30 16:52:28 +01:00
Wim Taymans
3f3b2d0886 rtpbin: handle multiple encoder instances
Keep track of elements that are added to multiple sessions and make sure
we only add them to the rtpbin once and that we clean them when no
session refers to them anymore.
2013-12-30 16:28:57 +01:00
Wim Taymans
05c8edc174 rtpbin: fix memory leaks 2013-12-30 15:17:05 +01:00
Wim Taymans
9345c2280a rtpbin: expect the pads on the encoders
Don't use request pads for the encoder elements, the signal handler
should request the pads and make sure they are available with the right
name.
2013-12-30 15:17:05 +01:00
Wim Taymans
cbc80d10dd rtpbin: request-rtp-encoder are no action signals
The request-rtp-encoder signals are not action signals so mark them
correctly and use an accumulator to collect the result value.
2013-12-30 15:17:05 +01:00
Stefan Sauer
2e277bb341 wavparse: emit midi-base-note tag from data in 'smpl' chunk
Add parsing of the 'smpl' chunk. Right now we only grab the midi-base-note and
emit it as a tag.
2013-12-30 14:41:47 +01:00
George Kiagiadakis
5ddf6a5e32 gstrtpsession: suggest upstream to use the new "internal-ssrc" after a collision
When a collision is found on the internal ssrc, we have to change it.
Ideally, we want also the payloader upstream to follow this change and use
the new internal ssrc. Ideally we want this condition to be always met:
if there is one payloader sending on this session, its ssrc should match the
internal ssrc.
2013-12-30 14:03:05 +01:00
George Kiagiadakis
17517ca491 rtpsession: allow setting internal-ssrc again 2013-12-30 14:03:05 +01:00
Edward Hervey
e732b86b8e y4mencode: Remove dead code
set/get property isn't used
2013-12-30 13:50:35 +01:00
Edward Hervey
ac40045d0d rtpqcelpdepay: Remove uneeded variable 2013-12-30 13:50:35 +01:00
Aleix Conchillo Flaqué
47c65fc269 rtpbin: allow dynamic RTP/RTCP encoders/decoders
* gst/rtpmanager/gstrtpbin.[ch]: four new action signals have been
  added (request-rtp-encoder, request-rtp-decoder, request-rtcp-encoder
  and request-rtcp-decoder). The user will be able to provide encoders
  or decoders dynamically. The encoders must follow the srtpenc API and
  the decoders the srtpdec API. Having separate signals for RTP and RTCP
  allows the user to use different encoders/decoders or provide the same
  one (e.g. that would be the case for srtpenc).

  Also, rtpbin now allows application/x-srtp in its pads.

  https://bugzilla.gnome.org/show_bug.cgi?id=719938
2013-12-30 11:24:00 +01:00
Wim Taymans
f48bbabafc rtpjitterbuffer: dynamically recalculate RTX parameters
Use the round-trip-time and average jitter to dynamically calculate the
retransmission interval and expected packet arrival time.

Based on patches from Torrie Fischer <torrie.fischer@collabora.co.uk>

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=711412
2013-12-30 11:18:51 +01:00
Wim Taymans
416bd9a2c3 rtpjitterbuffer: calculate average jitter 2013-12-30 11:18:51 +01:00
Wim Taymans
7181a21ca9 rtpsession: use RTT from the Retransmission event
Place the estimated RTT in the Retransmission event and let the session
manager use that instead of the hardcoded value.
2013-12-30 11:18:50 +01:00
Wim Taymans
e996f73d0c jitterbuffer: take more accurate running-time for NACK
Don't use the current time calculated from the tmieout loop for when we
last scheduled the NACK because it might be unscheduled because of a max
packet misorder and then we don't accurately calculate the current time.
Instead, take the current element running time using the clock.
2013-12-30 11:18:50 +01:00
Thiago Santos
c1cd2f81f9 qtdemux: improve mss_mode/fragmented special handling
Make it clear what should be handled purely by mss mode:
1) Expose the streams on the first moof as there are no moov atoms
2) Properly cleanup streams on flushes

Add a note about the meaning of upstream_newsegment and mss_mode
for future reference.

Make all other special fragment handling shared for both dash
and mss streams.
2013-12-27 12:04:49 -03:00
Thiago Santos
a82f3418fd qtdemux: drain the adapter before pushing EOS
In a fragmented scenario, qtdemux is operating in push mode
and it gets a fragmented buffer. While processing its data
downstream gets unlinked (or a input-selector changes its
active pad and returns not-linked). Qtdemux stops processing
this fragment and returns not-linked upstream, leaving the
remaining data in its adapter.

When it gets an EOS it should make sure that all the data it
had received is pushed before pushing EOS.
2013-12-27 12:00:27 -03:00
Wim Taymans
bf878d75d1 rtspsrc: use aggregate control for PLAY/PAUSE/TEARDOWN
Use the aggregate control instead of the original request url to perform
PAUSE/PLAY and TEARDOWN.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=721003
2013-12-26 11:27:30 +01:00
Sebastian Dröge
2f07b570f7 rndbuffersize: Proxy CAPS, ALLOCATION, SCHEDULING and srcpad events properly 2013-12-24 14:40:25 +01:00
Nicola Murino
5b1108dd5f matroskamux: adpcm max block align is 8192 2013-12-24 10:00:16 +01:00
Sebastian Dröge
4baf8080f2 matroskamux: Use correct codec id for ADPCM/DVI 2013-12-23 15:46:48 +01:00
Sebastian Dröge
7cae8922cb matroskademux: Check for the correct size of codec_data in the ACM case 2013-12-23 15:46:43 +01:00
Nicola Murino
00ea1cb003 matroskamux: basic adpcm support
https://bugzilla.gnome.org/show_bug.cgi?id=664339
2013-12-23 15:31:04 +01:00
Sebastian Dröge
371482a90c qtdemux: Fix calcuation of descriptor length
https://bugzilla.gnome.org/show_bug.cgi?id=720813
2013-12-23 15:09:49 +01:00
Tim-Philipp Müller
9c9efffd8c udpsrc: on receive error only unmap and unref buffer if one was alloced and mapped
coverity CID 1139866.
2013-12-19 20:35:03 +00:00
Tim-Philipp Müller
627109ce4d multiudpsink: fix misleading comment
Those are not allocated on the stack.
2013-12-19 12:47:22 +00:00
Todd Agulnick
8bab119af9 Some compiler warning fixes to satisfy XCode compiler
https://bugzilla.gnome.org/show_bug.cgi?id=720513
2013-12-16 16:52:40 +01:00
Sebastian Dröge
2927805749 wavpackparse: Post AUDIO_CODEC tag 2013-12-16 10:03:06 +01:00
Sebastian Dröge
753d3c23a2 sbcparse: Post AUDIO_CODEC tag 2013-12-16 10:03:06 +01:00
Sebastian Dröge
05e196cbb6 flacparse: Post AUDIO_CODEC tag
https://bugzilla.gnome.org/show_bug.cgi?id=720512
2013-12-16 10:03:06 +01:00
Sebastian Dröge
29f2cae129 dcaparse: Post AUDIO_CODEC tag 2013-12-16 10:03:05 +01:00
Sebastian Dröge
d2ab5199bc amrparse: Post AUDIO_CODEC tag 2013-12-16 10:03:05 +01:00
Sebastian Dröge
6f89b430ea ac3parse: Post AUDIO_CODEC tag 2013-12-16 10:03:05 +01:00
Sebastian Dröge
b3abbe3f5e aacparse: Post AUDIO_CODEC tag 2013-12-16 10:03:05 +01:00
Sebastian Dröge
c07424a534 mpegaudioparse: Use pbutils functionality to create the AUDIO_CODEC tag 2013-12-16 10:03:05 +01:00
Olivier Crête
ada6ea668b rtpsession: Add error message if the app tries to set the internal-ssrc 2013-12-13 17:36:36 -05:00
Olivier Crête
d715010d78 rtpsession: Only count nacks when a nack packet is received
Not when any RTCP feedback packet is.
2013-12-13 16:08:35 -05:00
Olivier Crête
7af9fdbca6 rtpsession: Process PSFB FIR requests which lack the media ssrc
According to RFC 5104 section 4.3.1.2, RTCP PSFB FIR message SHALL
have a media_ssrc field set to 0. The actual media ssrc is in the FCI.
So in that case, we ignore the retained feedback and just let it through
to the rtp_session_process_fir() function which will check for the actual
SSRC inside the FCI.

Fixes a regression introduced by commit 57c27ec3
2013-12-13 16:01:07 -05:00
George Kiagiadakis
6a2de911fa rtpsession: fix rb blocks disappearing after the first rtcp cycle with multiple senders
Previously, when the session had multiple internal sender SSRCs, it would
issue SR reports with RB blocks only on the first RTCP timeout and afterwards
SR reports would be sent empty. This was because the "generation" number
in RTPSource would increase more than once during the same cycle and afterwards
it would always be greater than the session's generation, which would cause
it to be skipped from being included in RBs.

This commit fixes this problem by:
1) Increasing the RTPSource generation only at the end of each cycle,
which essentially fixes the problem but only when the internal senders
are less than GST_RTCP_MAX_RB_COUNT.
2) Keeping for each RTPSource a set of SSRCs which stores which SSRC's
SR the given RTPSource has been reported in, which also fixes the problem
when the internal senders are more than GST_RTCP_MAX_RB_COUNT. This is
necessary because of the fact that any RTPSource is marked as reported
in itself's SR and makes it impossible to know if it has been reported
in other SRs too or not, and which.
2013-12-12 16:44:27 +01:00
George Kiagiadakis
c78a115154 rtpsession: keep extra stats for scheduling BYE
Keep an extra stats structure for scheduling the BYE packets. When we
decide to schedule BYE, make a copy of the current stats into the
bye_stats. Then while we schedule the BYE, update and use only the
bye_stats. When we finished scheduling the BYE packet, we use the
regular stats again.
2013-12-12 10:38:43 +01:00
George Kiagiadakis
282028e753 rtpsession: when we schedule BYE, only deal with BYE sources
When we are doing the RTCP timeout to schedule BYE packets, don't
generate RTCP for all sources but only for the sources marked as BYE.
2013-12-12 10:34:38 +01:00
George Kiagiadakis
6a421c3d81 rtpsession: reset state after scheduling BYE
After we do RTCP, we are not scheduling bye anymore.
2013-12-12 10:32:48 +01:00
George Kiagiadakis
0a0ff100ef rtpsession: also count NACKS when no signal was pending 2013-12-12 10:31:38 +01:00
George Kiagiadakis
bec9c04ea0 session: ignore RTCP packets for the BYE sources
When we are scheduling BYE packets, ignore all RTCP for the sources that
are scheduling a BYE packet. Other sources that are not scheduling BYE
should continue receiving RTCP packets as usual.
2013-12-12 10:09:25 +01:00
Julien Isorce
33b398e345 rtpsession: determine if the session is doing point-to-point
In this case T_dither_max is set to 0 according to RFC 4585
2013-12-10 16:57:56 +01:00
Wim Taymans
eee515cb2c rtpjitterbuffer: serialize events in the buffer
Serialize events into the jitterbuffer by inserting them with a -1
seqnum.
Update unit test to expect events from the streaming thread.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=652986
2013-12-10 11:57:37 +01:00
Wim Taymans
36e78bc5ca rtpjitterbuffer: detect -1 seqnum
Keep the seqnum as a full guint so that we can check for -1 entries and
deal with them correctly.
Immediately try to push -1 seqnum.
2013-12-10 11:04:06 +01:00
Wim Taymans
4a2e0f4ff4 rtpjitterbuffer: reorganize jitterbuffer items
Keep the oldest item at the head and the newest items on the tail. This
makes it easier to deal with -1 seqnums.
2013-12-10 11:01:03 +01:00
Wim Taymans
ea2a222cef jitterbuffer: correctly check for invalid values
Check for -1 on the guint from the buffer item instead of on the guint16
or guint32.
Also insert -1 seqnum at the head of the jitterbuffer.
2013-12-09 23:34:10 +01:00
Sebastian Dröge
f3c3dee148 mulawdec: Require caps to be set before accepting any data 2013-12-05 12:15:29 +01:00
Sebastian Dröge
d585bd7bbd rtptheorapay: Don't send headers twice if we got them from the caps already 2013-12-04 21:58:29 +01:00
Sebastian Dröge
d105de6e0f rtptheorapay: Don't leak config data when receiving a second CAPS event 2013-12-04 21:58:29 +01:00
Sebastian Dröge
0915d696c7 rtpvorbispay: Don't send headers twice if we got them from the caps already 2013-12-04 21:58:29 +01:00
Sebastian Dröge
967280df42 rtpvorbispay: Don't leak config data when receiving a second CAPS event 2013-12-04 21:58:29 +01:00
Sebastian Dröge
d87f6cf483 rtpstreamdepay: Add RFC4571 RTP stream depayloading element
https://bugzilla.gnome.org/show_bug.cgi?id=719829
2013-12-04 21:58:29 +01:00
Sebastian Dröge
c5284dc047 rtpstreampay: Add RFC4571 RTP stream payloading element
https://bugzilla.gnome.org/show_bug.cgi?id=719829
2013-12-04 21:58:29 +01:00
Thiago Santos
1fd094d96b qtdemux: improve fragment-start tracking
Some buffers can have multiple moov atoms inside and the strategy
of using the gst_adapter_prev_pts timestamp to get the base timestamp
for the media of the fragment would fail as it would reuse the same
base timestamp for all moofs in the buffer instead of accumulating
the durations for all of them.

Heres a better explanation of the issue:
qtdemux receives a buffer where PTS(buf) = X
buf -> moofA | moofB | moofC

The problem was that PTS(buf) was used as the base timestamp for
all 3 moofs, causing all buffers to be X based. In this case we want
only moofA to be X based as it is what the PTS on buf means, and the
other moofB and moofC just use the accumulated timestamp from the
previous moofs durations.

To solve this, this patch uses gst_adapter_prev_pts distance
result, this allows qtdemux to calculate if it should use the
resulting pts or just accumulate the samples as it can identify
if the moofs belong to the same upstream buffer or not.

https://bugzilla.gnome.org/show_bug.cgi?id=719783
2013-12-04 10:36:38 -03:00
Wim Taymans
0d55724a2b audioparsers: don't leak template caps 2013-12-04 09:12:07 +01:00
Wim Taymans
e0a5c07e8d audioparsers: use ACCEPT_INTERSECT flag
The parser can accept input that is not completely specified. Use the
ACCEPT_INTERSECT flag on the sinkpad to tweak the acceptcaps function to
check for intersection only. This allows us to proxy downstream
constraints while still allowing non-subset caps as input.
We can then also remove the appended template caps workaround.
Make a unit-test to check the new feature.

This reverts commit 26040ee38c

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=705024
2013-12-03 22:26:44 +01:00
Wim Taymans
e3f393f7e6 audioparsers: remove fields from filter
We need to remove the fields from the filter when we can convert
between them.
2013-12-03 21:39:57 +01:00
Wim Taymans
e8313a1e70 audioparsers: refactor code to remove caps fields 2013-12-03 21:29:13 +01:00
Tim-Philipp Müller
a424fb289b deinterlace: microoptimisation: avoid some unnecessary GValue copies 2013-12-02 00:10:43 +00:00
Tim-Philipp Müller
63b0e84add deinterlace: fix off-by-one crash when downstream caps contain a list of framerates
https://bugzilla.gnome.org/show_bug.cgi?id=719544
2013-12-01 23:33:04 +00:00
Thiago Santos
079dde49ed qtdemux: Use the timestamp of the moof as the base fragment start
In SmoothStreaming fragmented scenario, the timestamps are calculated
starting from the fragment buffer timestamp. When there is a not-linked
return from downstream, qtdemux will return upstream and will keep the
non-pushed data into its adapter.

On a new fragment buffer pushed to qtdemux, the new buffer timestamp
would overwrite the previous one that should be used on the still
to be pushed buffers. Because of this, this patch will also
update the fragment_start timestamp from the adapter last pts
to make sure the moof and timestamps are in sync and will result
in correct timestamps for all fragments.
2013-11-29 17:28:48 -03:00
Thiago Santos
45c16599ff qtdemux: avoid re-reading the same moov and entering into loop
In the scenario of "mdat | moov (with fragmented artifacts)" qtdemux
could read the moov again after the mdat because it was considering the
media as a fragmented one.

To avoid this loop this patch makes it store
the last processed moov_offset to avoid parsing it again.
And it also checks if there are any samples to play before
resturning to the mdat, so that it knows there is new data to be played.

https://bugzilla.gnome.org/show_bug.cgi?id=691570
2013-11-29 17:28:48 -03:00
Thiago Santos
fcc78aa3bd qtdemux: do not free streams if they were not created locally
When parsing a trak only free streams on failures if those streams
were created locally. They could have been created from a previous
fragment, in this case we they have valid info from the other fragment.
Including pads.

https://bugzilla.gnome.org/show_bug.cgi?id=691570
2013-11-29 17:28:48 -03:00
Sebastian Dröge
220a947dc7 videomixer: Simplify NV12/21 blending code macros 2013-11-29 19:57:46 +01:00
Sebastian Dröge
b0529e0fe8 videomixer: Fix segfault when filling the background of a UYVY frame
https://bugzilla.gnome.org/show_bug.cgi?id=712401
2013-11-29 19:52:34 +01:00
Tim-Philipp Müller
4278ab18ff qtdemux: fix compilation with gst debuging disabled
qtdemux.c:9452:1: error: label at end of compound statement
2013-11-29 09:21:52 +00:00
Jonas Holmberg
0ab0421759 rtph264pay: Map inbuffer once only
Do not call gst_buffer_extract() twice since each call will map and
unmap the biffer.

https://bugzilla.gnome.org/show_bug.cgi?id=719434
2013-11-28 16:08:40 -05:00
Tim-Philipp Müller
b8f689a9d9 videoflip: don't crash on tag events without orientation tag
Would crash in g_free() trying to free an uninitialised pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=719497
2013-11-28 16:09:04 +00:00
Wim Taymans
e8edecc56e rtpsession: don't unref buffer twice
Cleaning the packet info will already unref the buffer.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=715078
2013-11-28 16:51:13 +01:00
Jan Schmidt
b3b89dfec1 qtdemux: Add HydrogenAudio ReplayGain tags
Identical to the itunes (tm) version, but labelled with
org.hydrogenaudio.replaygain as the producer.
2013-11-28 22:36:44 +11:00
Mathieu Duponchelle
532598e360 videomixer: explicitly fail when alpha information would have been lost. 2013-11-27 16:35:46 +01:00
Sebastian Dröge
fb14f66696 matroska-demux: Allow a bit more variation when detecting common framerates
Instead of +/- 1ns we allow 2ns now. Due to rounding errors there are
some Matroska files out there with 33.333331ms per frame for 30fps.
2013-11-26 11:17:42 +01:00
Sebastian Dröge
20ad174679 matroska-demux: Use gst_util_double_to_fraction() instead of GValue magic 2013-11-26 10:21:04 +01:00
Nicolas Dufresne
c42bc9efa0 videoflip: Set default method at contruction
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=712333
2013-11-25 14:03:21 -05:00
Wim Taymans
710d1f3a2a rtpjitterbuffer: improve clear-pt-map handling
Don't reset the expected output seqnum when clearing the pt map because this
could stall the jitterbuffer forever.
Add a unit test for this.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=709800
2013-11-25 15:52:22 +01:00
Jan Schmidt
fdfc6a2a86 qtdemux: Discard 2 byte subpicture packets
As for text subtitles and as suggested in #712643, throw
away the 2 byte terminator packets that some encoders insert.

This will make things better when remuxing and causes generation
of gap events.
2013-11-25 12:24:22 +11:00
Tim-Philipp Müller
901ec63462 rtpjitterbuffer: fix wake-up when new buffers come in after running empty
Spotted by 'gratias' on IRC. Probably introduced in recent refactoring.

https://bugzilla.gnome.org/show_bug.cgi?id=715039
2013-11-25 00:37:50 +00:00
Mark Nauwelaerts
643e6fdc36 matroskamux: correctly handle negative relative timestamps
... rather than scaling these as unsigned.

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

Based on patch by Krzysztof Kotlenga <pocek@users.sf.net>
2013-11-23 12:25:05 +01:00
MathieuDuponchelle
83f8ee1d41 videomixer2: Merge tag events to send them in collected.
Otherwise there were race conditions where we would send tags
on a flushing srcpad.

We have a test for that in GES, but this should be tested
systematically with harness in the future as I believe it
is useful for exactly that kind of cases.

https://bugzilla.gnome.org/show_bug.cgi?id=708165
2013-11-22 18:54:35 -03:00
Thibault Saunier
a45d470236 qtdemux: Use GstVideoInfo helper to create caps for raw video
This way we do not miss mandatory fields in caps.
At the same time use the gst_pb_utils_get_codec_description
helper to get codec description.

https://bugzilla.gnome.org/show_bug.cgi?id=712335
2013-11-22 18:52:54 -03:00
Thibault Saunier
6ff7522ba2 matroskademux: Use GstVideoInfo helper to create caps for raw video
This way we do not miss mandatory fields in caps.
At the same time use the gst_pb_utils_get_codec_description helper to
get codec description.

https://bugzilla.gnome.org/show_bug.cgi?id=712328
2013-11-22 18:52:54 -03:00
Thibault Saunier
1fc591238b multifilesrc: Implement seeking in case of multiple images
https://bugzilla.gnome.org/show_bug.cgi?id=712254
2013-11-22 18:52:54 -03:00
Wim Taymans
4c9474905b rtpjitterbuffer: pass downstream flowreturn to upstream
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=712722
2013-11-22 12:27:31 +01:00
Tim-Philipp Müller
d9c2914c90 g_memmove() is deprecated
Just use plain memmove(), g_memmove() is deprecated in
recent GLib versions.

https://bugzilla.gnome.org/show_bug.cgi?id=712811
2013-11-21 15:30:34 +00:00
Wim Taymans
3a1199c2f7 rtpvorbisdepay: handle packets > 0xffff
Handle input packet sizes larger than 16 bits in the depayloader.
Remove size restrictions on the payloader.
2013-11-21 11:32:15 +01:00
Wim Taymans
43e9b56122 rtptheoradepay: handle packets > 0xffff
Reorganize some things in the depayloader so that it can handle packets larger
than 16 bits.
Remove the size restriction on the payloader.
2013-11-21 11:30:28 +01:00
Jan Schmidt
81e2c8130a isomp4: Handle mp4s subpicture streams better.
Clean up the handling of mp4s streams. Use the generic esds
descriptor function to extract the palette, instead of hard coding
a wrong magic offset.

Add some more size safety checks when parsing ES descriptors, and
replace magic numbers with the descriptive constants that are already
defined.

Enhance dump output for stsd atoms.

Streams from both bug 712643 and historic bug 568278 now both work
correctly.

Fixes: #712643
2013-11-21 02:28:27 +11:00