Commit graph

10179 commits

Author SHA1 Message Date
Mark Nauwelaerts
9de9d7e4d4 qtdemux: push mode; fix buffered streaming
That is, in case where no seek is peformed to moov, but preceding
limited mdat is buffered.
2011-08-30 14:23:49 +02:00
Mark Nauwelaerts
5ea19b0696 qtdemux: avoid overflow wraparound in timestamp when adding durations
Do some type juggling to avoid overflow, while still allowing for 'negative'
durations (which would need a wraparound effect).
2011-08-29 15:16:16 +02:00
Vincent Penquerc'h
3968dc7688 v4l2src: make this work more than once in a row
We used to skip frame rate setup if the camera was already setup
with the requested frame rate. This breaks some cameras though,
causing them to not output data (several models of Thinkpad cameras
have this problem at least).
So, don't skip.

https://bugzilla.gnome.org/show_bug.cgi?id=638300
2011-08-26 10:33:10 +02:00
Vincent Penquerc'h
f3fc3e1f69 aacparse: only require two frames in a row when we do not have sync
This avoids a single bit error dropping two frames unnecessarily.
The two consecutive frames check is still required when we don't
have sync.

https://bugzilla.gnome.org/show_bug.cgi?id=657080
2011-08-24 08:26:31 +02:00
Arun Raghavan
bd604175c5 pulsesink: Trivial indentation fix 2011-08-23 22:48:34 +05:30
Monty Montgomery
799c8e3d04 flacdec: Correct sample number rounding resulting in timestamp jitter
flacdec converts the src timestamp to a sample number, uses that internally, then reconverts the sample number to a timestamp for the output buffer.  Unfortunately, sample numbers can't be represented in an integer number of nanoseconds, and the conversion process was truncating rather than rounding, resulting in sample numbers and output timestamps that were often off by a full sample.

This corrects the time->sample convesion
2011-08-23 10:09:41 +02:00
David Schleef
88557c4792 breakmydata: element is not passthrough 2011-08-21 15:15:14 -07:00
David Schleef
2a83da13fc multifilesrc: quiet debugging 2011-08-21 15:15:14 -07:00
David Schleef
0446787e65 deinterlace: change field handling through methods
This likely breaks stuff.  The good: all of the methods now create
field images aligned with input frames, without timestamp mangling.
The bad: this touches a lot of code, much of which is hairy and in
need of cleanup.  However, at this point we can reasonably create a
PSNR-based test.
2011-08-21 15:15:14 -07:00
Alessandro Decina
ad996feb28 multifilesink: reset ->streamheaders to NULL on _stop
Fixes invalid memory access reusing multifilesink
2011-08-21 14:41:59 +02:00
David Henningsson
e70020b456 pulsesink: Allow writes in bigger chunks
There's no use in splitting the incoming data down to the segsize
limit - by writing as much as possible in one chunk, we increase
performance and avoid PulseAudio unnecessary rewinds.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-08-19 09:48:27 +02:00
Vincent Penquerc'h
e032d26674 matroskademux: ensure no-more-pads is always emitted
In particular, do so even if failing to read while prerolling,
such as when reading from a partial file (eg, while it is being
downloaded).

This fixes a wedge in playbin2.

https://bugzilla.gnome.org/show_bug.cgi?id=651965
2011-08-18 11:30:07 +02:00
Vincent Penquerc'h
3e0134f51f flacdec: avoid timestamp/offset tracking going out of sync
The libFLAC API is callback based, and we must only call it to
output data when we know we have enough input data. For this
reason, a single processing step is done when receiving a buffer.
However, if there were metadata buffers still pending, a step
intended for the first audio frame might end up writing that
leftover metadata. Since a single step is done per buffer, this
will cause every buffer to be written one step late.

This would add some latency (a bufferfull's worth), possibly
lose a buffer when seeking or the like, and also cause timestamp
and offset to be applied to the wrong buffer, as updates to
the "current" segment last_stop (from incoming buffer timestamp)
will be applied to an output buffer originating from the previous
incoming buffer.

This fixes the issue by ensuring that, upon receiving the first
audio frame, processing is done till all metadata is processed,
so the next "single step" done will be for the audio frame. After
this, we should keep to 1 input buffer -> 1 output buffer and so
avoid getting out of sync.

https://bugzilla.gnome.org/show_bug.cgi?id=650960
2011-08-17 13:40:59 +01:00
Vincent Penquerc'h
e09eb95a5f flacdec: bail on reserved value
Now that we look at the right bits, we can test against the reserved
value as we do for other fields.

https://bugzilla.gnome.org/show_bug.cgi?id=650960
2011-08-17 00:02:38 +01:00
Vincent Penquerc'h
64beef4610 flacdec: fix bit twiddling
Right shifting a 8 bit value by 8 bits is twice too much
to get the high 4 bits.

https://bugzilla.gnome.org/show_bug.cgi?id=650960
2011-08-17 00:01:37 +01:00
Vincent Penquerc'h
1549aaba27 flacdec: warn if we see a variable block size where unsupported
https://bugzilla.gnome.org/show_bug.cgi?id=650960
2011-08-17 00:01:07 +01:00
Vincent Penquerc'h
f8a9f5bc1c spectrum: avoid crashing by resetting the correct number of channels
https://bugzilla.gnome.org/show_bug.cgi?id=656606
2011-08-16 22:44:07 +01:00
Vincent Penquerc'h
6ac7ad8a2c flacparse: fix off by one in frame size check
Yes, I was tracking another bug and the small test file I generated
to test with improbably just happened to trigger this, with a second
and last frame of 1615 bytes.

https://bugzilla.gnome.org/show_bug.cgi?id=656649
2011-08-16 13:25:30 +01:00
Tim-Philipp Müller
5866c3a413 id3demux: remove specs from git as well now that parsing code is in -base 2011-08-14 20:46:01 +01:00
Mark Nauwelaerts
1ca89389e4 id3demux: use -base provided id3 tag parsing
https://bugzilla.gnome.org/show_bug.cgi?id=654388
2011-08-13 23:19:32 +01:00
Tim-Philipp Müller
26a3a12513 jackaudiosrc: fix error message code
And also post 'not found' error if jackd is not even installed.
2011-08-13 16:52:53 +01:00
Stefan Kost
a1b1d19105 qtdemux: initialize bitrate variable and reset for each loop
Don't check eventually unset variable and don't accidentially use values from last
cycle.
2011-08-12 16:32:58 +02:00
Edward Hervey
d08e0ccc48 rtspsrc: Properly error out if SDP contains no streams
Also fixes unitialized variable error on macosx.
2011-08-09 11:28:17 +02:00
Vincent Penquerc'h
26993420c0 ximagesrc: clear flags on buffer reuse
This will ensure a logically new buffer does not keep flags from
a previous use of that buffer (eg, DISCONT would be set on the first
buffer, and mistakenly kept when reused).

https://bugzilla.gnome.org/show_bug.cgi?id=653709
2011-08-09 10:19:46 +02:00
Vincent Penquerc'h
639abf01f9 v4l2: take care not to change the current format where appropriate
Some drivers are buggy are will change the current format when
processing VIDIOC_TRY_FMT. Save and restore the current format
to ensure the format is kept unchanged.

https://bugzilla.gnome.org/show_bug.cgi?id=649067
2011-08-09 09:53:33 +02:00
Sjoerd Simons
8edb15d12f v4l2src: Use fraction compare util function.
Use the fraction compare utility to compare function, not the
handcrafted one. The handcrafted one is buggy as it doesn't take into
account rounding error. For example comparing a framerate of 20/1 on a
camera configured as 30/1 fps would yield true: 1 == (1 * 20)/30 and not
re-configure the camera. Fixes #656104
2011-08-07 16:41:53 +02:00
Jan Schmidt
1438bf26ac matroska: Register new debug category
Register the matroskareadcommon debug category when the
plugin is loaded to avoid assertion output when debug is turned on.
2011-08-03 22:52:07 +10:00
Philippe Normand
0424368cfc qtdemux: soften assertion check on stream size
https://bugzilla.gnome.org/show_bug.cgi?id=655570
2011-08-03 10:11:59 +02:00
Robert Krakora
f7893b8721 rtpjpegpay: Add support for H.264 payload in MJPEG container
See http://www.quickcamteam.net/uvc-h264/USB_Video_Payload_H.264_0.87.pdf

Fixes bug #655530.
2011-08-03 10:09:42 +02:00
Tristan Matthews
c26442a3ba jackaudiosink: Don't call g_alloca() in process_cb
g_alloca() is not RT-safe, so instead we should allocate the
memory needed in advance. Fixes #655866
2011-08-03 09:44:05 +02:00
Tim-Philipp Müller
a1712ad87c docs: fix two more Since: tags 2011-08-02 23:42:58 +01:00
Mart Raudsepp
62cd1215c7 deinterlace: Fix Since tags for fieldanalysis related new properties
commit c1b100cf9c is after 0.10.29 and 0.10.30 was a branched release.
So fix Since tags from 0.10.29 to 0.10.31 for the new properties.
2011-08-02 23:38:13 +01:00
Tim-Philipp Müller
25ace0e524 pulsesink: fix variable-set-but-not-used compiler warning with older pulse versions 2011-07-29 13:05:42 +01:00
Mark Nauwelaerts
c03648c8bb rtpsession: properly init rtcp_min_interval 2011-07-29 12:08:42 +02:00
Arun Raghavan
ac7cad431c pulsesink: Add support for compressed formats
This adds support for various compressed formats (AC3, E-AC3, DTS and
MP3) payloaded in IEC 61937 format (used for transmission over S/PDIF,
HDMI and Bluetooth).

The acceptcaps() function allows bins to probe for what formats the sink
being connected to support. This only works after the element is set to
at least READY.

If the underlying sink changes and the format we are streaming is not
available, we emit a message that will allow upstream elements/bins to
block and renegotiate a new format.
2011-07-29 01:25:15 +05:30
Arun Raghavan
a67b536741 pulsesink: Use the extended stream API if available
This uses the new extended API for creating streams. This will allow us
to support compressed formats natively in pulsesink as well.
2011-07-29 01:25:15 +05:30
Arun Raghavan
379049809c pulsesrc: Add a source-output-index property
This exposes the source output index of the record stream that we open
so that clients can use this with the introspection if they want (to
move the stream, for example).
2011-07-29 00:07:52 +05:30
Mark Nauwelaerts
3a98f6f0fd rtpssrcdemux: keep a ref on the src pad while using it
Prevent a possible race if clear_ssrc() is called between getting the pad and
doing the push.

Based on patch by <olivier.crete@collabora.com>

https://bugzilla.gnome.org/show_bug.cgi?id=650916
2011-07-28 14:51:01 +02:00
Olivier Crête
c7b9b98648 rtpssrcdemux: Make the pads lock recursive and hold it across the signal emit
We need to keep the lock held because we don't want a push before the "new-ssrc-pad"
handler has completed. But we may want to push an event from inside that handler, hence
the recursive mutex.

https://bugzilla.gnome.org/show_bug.cgi?id=650916
2011-07-28 14:50:59 +02:00
Olivier Crête
e26b5391c2 rtpssrcdemux: Use PADs lock
https://bugzilla.gnome.org/show_bug.cgi?id=650916
2011-07-28 14:50:57 +02:00
Sjoerd Simons
4c73439ee3 rtph264depay: Cope with FU-A E bit not being set
Some h264 payloaders are unfortunately buggy and don't correctly set the
E bit in FU-A NAL when they have ended. Work around this by assuming
such a fragmentation unit has ended when there was no packet loss and a
new NAL is started
2011-07-27 18:18:13 +01:00
Arun Raghavan
89564fcb69 ac3parse: Support switching alignment on-the-fly
This allows switching of alignment for E-AC3 streams at run-time. This
is requested by downstream elements via a custom event.

https://bugzilla.gnome.org/show_bug.cgi?id=650313
2011-07-27 20:43:56 +05:30
Arun Raghavan
96972eb462 ac3parse: Add support for IEC 61937 alignment
When pushing out buffers over S/PDIF or HDMI, IEC 61937 payloading
requires each buffer to contain 6 blocks from each substream. This adds
code to collect all the frames needed to meet this requirement before
pushing out a buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=650313
2011-07-26 10:40:00 +05:30
Olivier Crête
6095d2a3f0 rtpsession: Always send application requested feedback in immediate mode
Send as many application requested feedback messages in immediate mode, even if they
have already been sent.

https://bugzilla.gnome.org/show_bug.cgi?id=654583
2011-07-25 17:20:59 +02:00
Olivier Crête
354faabda0 rtpsession: Don't let the computed RTP bandwidth fall too low
If it falls too low, the computed RTCP bandwidth will be near zero and
the RTCP thread will be stopped.

https://bugzilla.gnome.org/show_bug.cgi?id=654583
2011-07-25 16:19:00 +02:00
Olivier Crête
4d48109f9d rtpsession: Wait longer to timeout SSRC collision
Using the current RTCP interval to timeout SSRC collision can lead to
collisions being timed out immediately if a BYE packet is sent because
it is sent immediately, so the interval is 0. This is not what we
want. So just set a static 10 times the default RTCP interval, it
should be enough

https://bugzilla.gnome.org/show_bug.cgi?id=648642
2011-07-25 16:18:58 +02:00
Mark Nauwelaerts
9764b57b0a rtspsrc: set SOURCE flag at init time
Fixes #654816.
2011-07-25 12:44:38 +02:00
Olivier Crête
2591a882ae rtph264depay: Complete merged AU on marker bit
The marker bit on a RTP packet means the AU has been completed, so push it out
immediately to reduce the latency.

https://bugzilla.gnome.org/show_bug.cgi?id=654850
2011-07-21 17:11:08 +02:00
Olivier Crête
118a7cc36a rtph264pay: Only set the marker bit on the last NALU of a multi-NALU access unit
An access unit could contain multiple NAL units, in that case, only the last
RTP packet of the last NALU should have its marker bit set.

https://bugzilla.gnome.org/show_bug.cgi?id=654850
2011-07-21 17:11:06 +02:00
Alessandro Decina
216dc602c3 multipart: fix compiler warning 2011-07-20 08:53:25 +02:00