Commit graph

9640 commits

Author SHA1 Message Date
Tim-Philipp Müller
92c80bc879 aacparse: fix sample rate extraction from codec data
In one case we extracted the sample rate index from the codec data
and saved it as sample rate rather than getting the real sample
rate from the table. Fix that, and also make sure we don't access
non-existant table entries by adding a small helper function that
guards against out-of-bounds access in case of invalid input data.
2011-04-08 18:06:58 +01:00
Tim-Philipp Müller
c252137b82 aacparse, amrparse: remove bogus gst_pad_fixate_caps() calls 2011-04-08 18:06:58 +01:00
Tim-Philipp Müller
e74776b3cb baseparse: propagate return value of GstBaseParse::set_sink_caps()
gst_base_parse_sink_setcaps() presumably should fail if the subclass
returns FALSE from its ::set_sink_caps() function.
2011-04-08 18:06:58 +01:00
Tim-Philipp Müller
c59ee281ba baseparse: don't try to GST_LOG an already-freed caps string
The proper way to log caps is via GST_PTR_FORMAT anyway.
2011-04-08 18:06:58 +01:00
Tim-Philipp Müller
fc09fe78af aacparse: set channels and rate on output caps, and keep codec_data
Create output caps from input caps, so we maintain any fields we
might get on the input caps, such as codec_data or rate and channels.
Set channels and rate on the output caps if we don't have input caps
or they don't contain such fields. We do this partly because we can,
but also because some muxers need this information. Tagreadbin will
also be happy about this.
2011-04-08 18:06:57 +01:00
Mark Nauwelaerts
debb9362ef baseparse: fix debug category 2011-04-08 18:06:57 +01:00
Mark Nauwelaerts
f5379229a0 baseparse: fix (regression in) newsegment handling
(aacparse, amrparse, flacparse).  Fixes #580133.
2011-04-08 18:06:57 +01:00
René Stadler
4b80afc22c baseparse: Fix slightly broken buffer-in-segment check (aacparse, amrparse, flacparse) 2011-04-08 18:06:57 +01:00
René Stadler
471bc5730a baseparse: Fix push mode seeking (aacparse, amrparse)
Sending the flush-start event forward before taking the stream lock actually
works, in contrast to deadlocking in downstream preroll_wait (hunk 1).

After that we get the chain function being stuck in a busy loop. This is fixed
by updating the minimum frame size inside the synchronization loop because the
subclass asks for more data in this way (hunk 2).

Finally, this leads to a very probable crash because the subclass can find a
valid frame with a size greater than the currently available data in the
adapter. This makes the subsequent gst_adapter_take_buffer call return NULL,
which is not expected (hunk 3).
2011-04-08 18:06:57 +01:00
Mark Nauwelaerts
4deaa95eda baseparse: Delay newsegment as long as possible.
If newsegment is sent (too) early, caps may not yet be fixed/set,
and downstream may not have been linked.
2011-04-08 18:06:57 +01:00
René Stadler
179632dc02 aacparse: Fix busyloop when seeking. Fixes #575388
The problem is that after a discont, set_min_frame_size(1024) is called when
detect_stream returns FALSE. However, detect_stream calls check_adts_frame
which sets the frame size on its own to something larger than 1024. This is the
same situation as in the beginning, so the base class ends up calling
check_valid_frame in an endless loop.
2011-04-08 18:06:57 +01:00
René Stadler
2856da8601 aacparse: Refactor check_valid_frame to expose broken code
Just moving code around and removing an unhelpful/misleading comment.
2011-04-08 18:06:57 +01:00
Stefan Kost
4ffb2499d3 baseparse: revert last change and properly fix
Baseparse internaly breaks the semantics of a _chain function by calling it with
buffer==NULL. The reson I belived it was okay to remove it was that there is
also an unchecked access to buffer later in _chain. Actually that code is wrong,
as it most probably wants to set discont on the outgoing buffer.
2011-04-08 18:06:57 +01:00
Stefan Kost
675dc650ca baseparse: remove checks for buffer==NULL
Accordifn to docs for GstPadChainFunction buffer cannot be NULL. If we would
leave the check, we would also need more such check below.
2011-04-08 18:06:57 +01:00
René Stadler
2bfa7bc456 aacparse: Fix license specified in plugin details. 2011-04-08 18:06:56 +01:00
Jan Schmidt
06f4cbd7f3 Fix the return value of the default parse_frame function.
Fix the return value of the default parse_frame function in both
copies of GstBaseParse
2011-04-08 18:06:56 +01:00
Stefan Kost
8b20a1d46f Log aac details found in codec_data. 2011-04-08 18:06:56 +01:00
Wim Taymans
76d9b6deaa gst/aacparse/gstaacparse.c: Don't autoplug aacparse until it works.
Original commit message from CVS:
* gst/aacparse/gstaacparse.c: (plugin_init):
Don't autoplug aacparse until it works.
2011-04-08 18:06:56 +01:00
Stefan Kost
c3faaa2daa tests/check/: Add unit tests for new parsers.
Original commit message from CVS:
* tests/check/Makefile.am:
* tests/check/elements/aacparse.c:
* tests/check/elements/amrparse.c:
Add unit tests for new parsers.
2011-04-08 18:06:56 +01:00
Stefan Kost
16e3a36dc6 gst/: Fix baseparse type name.
Original commit message from CVS:
* gst/aacparse/gstbaseparse.c:
* gst/amrparse/gstbaseparse.c:
Fix baseparse type name.
2011-04-08 18:06:56 +01:00
Stefan Kost
fe9e6d3469 Add two new baseparse based parsers (aac and amr) from Bug #518857.
Original commit message from CVS:
* configure.ac:
* gst/aacparse/Makefile.am:
* gst/aacparse/gstaacparse.c:
* gst/aacparse/gstaacparse.h:
* gst/aacparse/gstbaseparse.c:
* gst/aacparse/gstbaseparse.h:
* gst/amrparse/Makefile.am:
* gst/amrparse/gstamrparse.c:
* gst/amrparse/gstamrparse.h:
* gst/amrparse/gstbaseparse.c:
* gst/amrparse/gstbaseparse.h:
Add two new baseparse based parsers (aac and amr) from Bug #518857.
2011-04-08 18:06:56 +01:00
Havard Graff
e71a908d96 jitterbuffer: Make src_query MT-safe
It is possible that the element might be going down while the event arrives
2011-04-08 15:23:05 +02:00
Sebastian Dröge
b784173e4a jpegdec: Unref event if the parent element disappeared 2011-04-08 15:22:47 +02:00
Sebastian Dröge
4c36ca30b2 jitterbuffer: Unref event if the parent element disappeared 2011-04-08 15:22:19 +02:00
Havard Graff
9386448649 jpegdec: Make upstream events MT-safe 2011-04-08 15:21:52 +02:00
Havard Graff
342686bb02 jitterbuffer: Make upstream events MT-safe 2011-04-08 15:21:46 +02:00
Sebastian Dröge
31af4fe33e rtp: Unref events if the parent element disappeared 2011-04-08 15:20:51 +02:00
Ole André Vadla Ravnås
046f170d6a rtpmanager: fix pad callbacks so they handle when parent goes away
1) We need to lock and get a strong ref to the parent, if still there.
2) If it has gone away, we need to handle that gracefully.

This is necessary in order to safely modify a running pipeline. Has been
observed when a streaming thread is doing a buffer_alloc() while an
application thread sends an event on a pad further downstream, and from
within a pad probe (holding STREAM_LOCK) carries out the pipeline plumbing
while the streaming thread has its buffer_alloc() in progress.
2011-04-08 15:16:56 +02:00
Havard Graff
f8370bb2a8 rtpsession: make iterate_internal_links MT-safe 2011-04-08 14:41:34 +02:00
Sebastian Dröge
11bcac7c90 Revert "Pulsesink: Allow chunks up to bufsize instead of segsize"
This reverts commit 1e2c1467ae.

The commit causes pulsesink to ignore the latency-time baseaudiosink property.
2011-04-08 14:35:04 +02:00
Alexey Fisher
9b15f9c6a1 rtpspeexpay: Do not transmitt samples with GAP flag
If we get GAP samples, there is no need to transmitt it.
In some situations, microphone is muted, we can drop net traffick
usage to ~1 kbit/s. Without patch it will stay ~20 kbit/s
2011-04-08 13:56:13 +02:00
Alexey Fisher
0016ceaa2b speexenc: Use speex intern silence detection
Speex has build in silence detection. If speex_encode_int returns 0,
than there is silence and sample do not need to be transmitted.
This work only if vbr=1 and dtx=1 optionas are enabled.
So if we get 0, we add GAP flag to the sample.
2011-04-08 13:54:49 +02:00
Wim Taymans
547c97f590 rtspsrc: handle * control correctly
Parse session control attributes when no media control attribute is
present. Threat * control attributes as an empty string, just like the
spec says.

Fixes #646800
2011-04-05 17:12:28 +02:00
Sebastian Dröge
cea556b75c matroskamux: Add support for A-Law and µ-Law
Fixes bug #646567.
2011-04-05 14:29:59 +02:00
Jon Nordby
d68dd46084 jack: Fix build with jack 0.120.1
9544622674 checked
for 0.120.2 and later, but the deprecation was introduced in
0.120.1
2011-04-05 13:12:28 +03:00
Stefan Kost
270dd376bc docs: fix docuemntation warnings (and reindent) 2011-04-05 12:06:55 +03:00
Alessandro Decina
30ce2680dc videomixer: update orc dist files 2011-04-04 17:39:04 +02:00
Stefan Kost
6c704e0b1e Automatic update of common submodule
From 1ccbe09 to c3cafe1
2011-04-04 15:57:10 +03:00
Arun Raghavan
dc48eaac13 pulsesink: Always call pa_stream_new_with_proplist()
pa_stream_new_with_proplist() can take a NULL proplist, so we don't need
to concern ourselves with whether it's NULL or not.
2011-04-04 17:23:21 +05:30
Mark Nauwelaerts
234609844e rtspsrc: perform post-flush state tricks downstream to upstream
... so downstream is set when upstream resumes data flow.
2011-04-04 11:49:00 +02:00
Mark Nauwelaerts
226a7cb32e rtspsrc: distribute new base_time to manager children following flush seek
... by forcing a state changed to PLAYING, which should otherwise be a
no-op as elements should already be in that state.

In particular, jitterbuffer needs new base_time as soon as possible to perform
proper timing (e.g. eos timeout handling) and can't wait for the new base_time
that will be distributed when the whole pipeline returns to PLAYING.

See bug #646397.
2011-04-04 11:49:00 +02:00
Mark Nauwelaerts
e5bcaa45e6 Revert "jitterbuffer: reset element base_time upon flush"
This reverts commit f84b8a69cb.

Fixes bug #646397.
2011-04-04 11:49:00 +02:00
Zaheer Abbas Merali
d44d498aa4 flv: Specify the only possible stream-format for h264 in the pad templates. 2011-04-04 10:35:03 +01:00
Sebastian Dröge
fb12172810 qtdemux: Check for invalid (empty) classification info entity strings
Otherwise the classification string can be empty and gst_tag_list_add() will
complain or have a \0 in the first four bytes, which is wrong too.
2011-04-04 10:07:42 +02:00
Sebastian Dröge
17d9447ea5 qtdemux: Year 0 is not a valid year for GDate and the proleptic gregorian calendar 2011-04-04 10:01:26 +02:00
Sebastian Dröge
6fd1546bce flacenc: Add support for writing METADATA_BLOCK_PICTURE blocks for GST_TAG_IMAGE and GST_TAG_PREVIEW_IMAGE 2011-04-01 13:18:55 +02:00
Sebastian Dröge
ce66aea7b0 videomixer[2]: Use orc_memset() instead of memset() 2011-04-01 11:35:26 +02:00
Lane Brooks
ef5ac986f1 videomixer: Add transparent background option for alpha channel formats 2011-04-01 11:35:26 +02:00
Lane Brooks
69b5aedc58 videomixer2: Add transparent background option for alpha channel formats
This option allows the videomixer2 element to output a valid alpha
channel when the inputs contain a valid alpha channel. This allows
mixing to occur in multiple stages serially.

The following pipeline shows an example of such a pipeline:

gst-launch videotestsrc background-color=0x000000 pattern=ball ! video/x-raw-yuv,format=\(fourcc\)AYUV ! videomixer2 background=transparent name=mix1 ! videomixer2 name=mix2 ! ffmpegcolorspace ! autovideosink  videotestsrc ! video/x-raw-yuv,format=\(fourcc\)AYUV ! mix2.

The first videotestsrc in this pipeline creates a moving ball on a
transparent background. It is then passed to the first videomixer2.
Previously, this videomixer2 would have forced the alpha channel to
1.0 and given a background of checker, black, or white to the
stream. With this patch, however, you can now specify the background
as transparent, and the alpha channel of the input will be
preserved. This allows for further mixing downstream, as is shown in
the above pipeline where the a second videomixer2 is used to mix in a
background of an smpte videotestsrc. So the result is a ball hovering
over the smpte test source. This could, of course, have been
accomplished with a single mixer element, but staged mixing is useful
when it is not convenient to mix all video at once (e.g. a pipeline
where a foreground and background bin exist and are mixed at the final
output, but the foreground bin needs an internal mixer to create
transitions between clips).

Fixes bug #639994.
2011-04-01 11:35:26 +02:00
Mark Nauwelaerts
176b8ffbff pulsesink: also uncork during EOS waiting (and after EOS is rendered)
Pulsesink was recently changed to defer uncorking until there is data
to write. This condition will however never occur when EOS in being
rendered (since that marks the end of data). Changing to PAUSED state
while EOS is being waited on results in a hang: pausing corks the
stream, which will never be undone since there is no more data when
going back to PLAYING. If pulsesink is the clock provider, deadlock
ensues since time doesn't continue in corked state and the clock id
for EOS wait never fires.

Fixes #645961.
2011-03-31 13:25:19 +02:00