Commit graph

3029 commits

Author SHA1 Message Date
Wim Taymans
016d036137 Merge branch 'master' into 0.11
Conflicts:
	configure.ac
	gst-libs/gst/audio/gstbaseaudiosink.c
	gst/audioconvert/channelmixtest.c
	gst/playback/gstplaybasebin.c
	gst/playback/gstsubtitleoverlay.c
	tests/examples/Makefile.am
	tests/examples/audio/Makefile.am
2011-10-27 15:44:58 +02:00
Jan Schmidt
f35c51c149 playsinkaudioconvert: Fix warning when there is no target pad yet 2011-10-27 00:23:27 +11:00
Nicolas Dufresne
cf9da5c280 decodebin2: Link elements before testing if they can reach the READY state
This is made possible by filtering errors. This is required to let
harware accelerated element query the video context. The video context
is used to determine if the HW is capable, and thus if the element is
supported or not.

Fixes bug #662330.
2011-10-22 08:27:31 +02:00
René Stadler
54be243757 playbasebin: remove avoidable call to gst_object_set_name 2011-10-21 22:24:14 +02:00
René Stadler
0a5fcbb080 audioconvert: bury dead test program 2011-10-21 22:24:14 +02:00
Stefan Sauer
53d7d2e966 interfaces: clean up the use of iface and class/klass 2011-10-21 14:46:48 +02:00
René Stadler
6ffaccd284 subtitleoverlay: fix leaks of pad templates and internal proxy pads 2011-10-19 19:47:38 +02:00
René Stadler
56419cce77 subtitleoverlay: fix leak of element reference through pad block
If the pad block never happens because there is no data flow at all, the
callback is never fired and the reference is never released. This causes a
reference cycle between the pad and element, so valgrind is not very vocal
about it (memory is still reachable).
2011-10-19 19:47:38 +02:00
René Stadler
becba526d9 subtitleoverlay: fix event unref in (rare) error case 2011-10-18 13:02:43 +02:00
Tim-Philipp Müller
a586547b0c audiotestsrc: fix crash when setting the wave property before having negotiated a format
https://bugzilla.gnome.org/show_bug.cgi?id=661911
2011-10-17 15:47:31 +01:00
Vincent Penquerc'h
5e9862b2ba decodebin2: fire drained signal where appropriate
This will allow playbin2 to send its about-to-finish signal.
Taken out (apparently by mistake) by the EOS rewrite in july.

https://bugzilla.gnome.org/show_bug.cgi?id=661202
2011-10-17 15:36:25 +02:00
Edward Hervey
1c10fbcd33 audioconvert: We can handle channels conversion 2011-10-17 12:28:58 +02:00
Wim Taymans
5560d44e7a Merge branch 'master' into 0.11 2011-10-13 08:53:34 +02:00
Thiago Santos
6eb5f5b13e audiotestsrc: update blocksize when caps or samples-per-buffer change
Blocksize needs to be updated so we get a correct size buffer on
_fill function.
2011-10-10 12:31:46 -03:00
Brian Cameron
ded27cc61a videotestsrc: fix LDADD missing GST_LIBS 2011-10-10 13:11:59 +02:00
Wim Taymans
f1088ed647 update for UNEXPECTED -> EOS flowreturn 2011-10-10 11:39:52 +02:00
Wim Taymans
73b894107a Merge branch 'master' into 0.11
Conflicts:
	ext/vorbis/gstvorbisdec.c
	ext/vorbis/gstvorbisenc.c
	ext/vorbis/gstvorbisenc.h
	gst/audiotestsrc/gstaudiotestsrc.c
2011-10-08 10:19:06 +02:00
Vincent Penquerc'h
70239887e8 audiotestsrc: add missing break
And make violet noise usable

https://bugzilla.gnome.org/show_bug.cgi?id=661105
2011-10-06 20:45:09 +02:00
Vincent Penquerc'h
8d617f4037 playsink: fix caps negotiation through the new convenience bins
The bins' getcaps was bypassing the inner elements, and thus
failing to account for the caps transformations they allow,
which caused YUV video pipelines to fail with ximagesink, which
does not support YUV, even though the convenience bin includes
a colorspace converter for just this purpose.

https://bugzilla.gnome.org/show_bug.cgi?id=660816
2011-10-06 20:43:43 +02:00
Vincent Penquerc'h
76b29367e7 playbin2: fix mismatch between video/ and video/x-dvd-subpicture
The new code was checking for a prefix, and would find video/
first. Check in two passes, first checking for a perfect match,
and falling back to a prefix check if nothing was found.

https://bugzilla.gnome.org/show_bug.cgi?id=657261
2011-10-06 20:41:53 +02:00
Thiago Santos
59f0b29c3f encodebin: Re-enable parsers
Re-enable parsers in encodebin to allow more passthrough scenarios
to work. Specially the ones that require changing 'stream formats'.
i.e. h264 in mkv to mpegts.
2011-10-05 14:55:42 -03:00
Robert Swain
ef4a4a0e94 playsink: Add audio- and text-sink props 2011-10-05 12:45:49 +02:00
Stefan Sauer
7ce811f1ed auditestsrc: indent fix 2011-10-04 23:10:05 +02:00
Wim Taymans
1261c08a2f playbin2: port new bits to 0.11 2011-10-04 18:06:07 +02:00
Wim Taymans
a00927ad03 Merge branch 'master' into 0.11 2011-10-04 17:58:49 +02:00
Robert Swain
ddcda53714 playsink: Add video-sink property
The video-sink property allows manual specification via g_object_set ()
of the video sink element to be used.
2011-10-04 16:24:01 +02:00
Sebastian Dröge
12a54ae4dd playbin2: Minor cleanup of decoder-sink compatibility checking code 2011-10-03 15:20:06 +02:00
Thibault Saunier
a123195dd0 playbin2: Make sure that the decoders we plug are compatible with the fixed sink
The fact that a decoder is not compatible with the fixed sink
is currently happenning in the case where we have hardware accelerated
video decoders on the system (especially vaapi elements that are actually plugged),
and the user is providing a sink that doesn't support the surface.

A simple example that shows how it used to crash on a system where gstreamer-vaapi
is installed:
    gst-launch playbin2 video-sink=xvimagesink uri=/codec/supported/by/vaapi

What we are now doing in this case, is avoid using the accelerated
decoder and plug a "normal" decoder instead (if avalaible).

This commit doesn't handle the case where we have hardware accelerated
demuxing.
2011-10-03 15:17:54 +02:00
Sebastian Dröge
9117681b35 decodebin2: Use a TIME limit for pre-rolling in live streams and not in non-live streams
Fixes bug #647769 for real.
2011-10-03 10:55:53 +02:00
Wim Taymans
e787c7a5e2 Merge branch 'master' into 0.11
Conflicts:
	ext/pango/gsttextoverlay.c
	gst/encoding/gstencodebin.c
2011-10-03 10:11:19 +02:00
Thiago Santos
a223775089 encodebin: Fix typo on formatter adding condition
The condition is if the muxer doesn't have tag setter *and* isn't
a formatter itself. Any of those two conditions makes the muxer
good enough to not need a formatter.
2011-09-30 10:56:06 -03:00
Wim Taymans
bf57108e6a Revert "sbutitleoverlay: fix compiler warning"
This reverts commit ed792293e7.

Not needed anymore because of another commit
2011-09-30 11:45:51 +02:00
Wim Taymans
ed792293e7 sbutitleoverlay: fix compiler warning 2011-09-30 11:04:19 +02:00
Tim-Philipp Müller
4b43972cf4 subitleoverlay: fix compiler warning
gstsubtitleoverlay.c: In function 'gst_subtitle_overlay_video_sink_event':
gstsubtitleoverlay.c:1736:22: error: 'target' may be used uninitialized in this function
2011-09-29 21:30:52 +01:00
Wim Taymans
19346c2c3b Merge branch 'master' into 0.11
Conflicts:
	gst-libs/gst/audio/gstaudioencoder.c
	gst/playback/gstplaybin2.c
	gst/videotestsrc/videotestsrc.c
2011-09-28 11:35:46 +02:00
Raimo Järvi
ceea972b42 videotestsrc: Fix compiler warning on 64 bit mingw-w64
Fixes bug #660304.
2011-09-28 00:07:36 +01:00
Raimo Järvi
c0956342b2 playbin2: Fix compiler warnings on 64 bit mingw-w64
Fixes bug #660301.
2011-09-27 23:54:04 +01:00
Wim Taymans
f71511edd2 Merge branch 'master' into 0.11
Conflicts:
	gst-libs/gst/audio/gstaudiodecoder.c
	gst-libs/gst/audio/gstaudioencoder.c
	gst/encoding/gstencodebin.c
2011-09-26 19:22:05 +02:00
Tim-Philipp Müller
09e06add66 typefindfunctions: backport some const-ifications from 0.11 branch
To keep code identical as much as possible between the two branches,
for easier merging.
2011-09-25 15:33:35 +01:00
Tim-Philipp Müller
bfb33e09a9 typefindfunctions: fix indentation 2011-09-25 15:33:35 +01:00
Tim-Philipp Müller
754b22d7ee libs: remove unused floatcast header-only library
There's no code whatsoever that uses these macros. If anyone
ever feels the need to resurrect them, we should add them to
gstutils.h in core or libgstaudio or so.
2011-09-23 21:18:47 +01:00
Edward Hervey
17bfba09f1 Merge branch 'master' into 0.11
Conflicts:
	ext/ogg/gstoggdemux.c
	ext/pango/gsttextoverlay.c
	gst-libs/gst/audio/gstaudioencoder.c
	gst-libs/gst/audio/gstbaseaudiosrc.c
	gst/playback/gstsubtitleoverlay.c
	gst/videorate/gstvideorate.c
2011-09-23 18:27:11 +02:00
Robert Swain
635d2411cc encodebin: Avoid unnecessary read only caps copy 2011-09-23 17:50:31 +02:00
Sjoerd Simons
b9b5b133fd videorate: Add a max-rate property
In various use-case you want to dynamically change the framerate (e.g.
live streams where the available network bandwidth changes). Doing this
via capsfilters in the pipeline tends to be very cumbersome and racy,
using this property instead makes it very painless.
2011-09-21 11:24:59 +01:00
Sjoerd Simons
ec7ca80c9e videorate: Add more strict caps negotiation
When in drop-only mode we can never provide a framerate that is higher
then the input, so let the caps negotiation reflect this.
2011-09-21 11:24:59 +01:00
Tim-Philipp Müller
f57bbc585d videorate: don't unref event we don't own
http://bugzilla.gnome.org/show_bug.cgi?id=659562
2011-09-20 13:35:55 +01:00
Sebastian Dröge
61c6fcb2cd decodebin2: Only check if this is a discarded type if we have fixed caps
For unfixed caps we will get here again later when the caps are fixed.
2011-09-20 14:06:51 +02:00
Sebastian Dröge
8e114c427a decodebin2: Only call autoplug-continue with fixed caps
With unfixed caps we can't reliably decide if the final caps
are going to be "raw" (e.g. supported by a sink) or not.

We will get here again later when the caps are fixed.
2011-09-20 14:06:42 +02:00
Sebastian Dröge
01d37532b6 subtitleoverlay: Get the target of the video sinkpad, not the target sinkpad in the video setcaps handler 2011-09-19 14:02:00 +02:00
Youness Alaoui
27058c1bc6 decodebin2: Initialize variable correctly
If subdrained isn't initialized to FALSE then a chain might think
that its group is drained when in fact it's not and this can cause
a switch too early or even cause a deadlock.
2011-09-19 12:36:48 +02:00
Edward Hervey
9d2bcb08fe decodebin2: Rewrite EOS-handling code
This is now really threadsafe and improves switching
between different groups.
2011-09-19 12:34:51 +02:00
Sebastian Dröge
936e87cdcf decodebin2: Fix non-prerolling pipelines and not-linked errors if a parser is available but no decoder
Fixes bug #658846.
2011-09-19 11:54:27 +02:00
Sebastian Dröge
b1bb1e9b26 subtitleoverlay: Implement support for switching between raw and non-raw video streams 2011-09-19 11:24:47 +02:00
Alessandro Decina
a330ff0721 playbin2: fix compiler warning
Remove a check for gchar >= 128
2011-09-15 22:05:34 +02:00
Stefan Sauer
b678f6cf69 adder: don't access the event after pushing
Fixes valgrind warnings.
2011-09-15 16:47:26 +02:00
Sebastian Dröge
bd52f00796 Revert "playbin2: autoplug sink if stream is incompatible to the configured one"
This reverts commit b0b4e286c8.

We agreed that the previous (pre-.35) behaviour is broken and a bug and the
current behaviour is correct, deterministic and allows the application to
handle stuff properly while the old behaviour can't be handled properly by
applications and just worked in some applications by luck.

The solution to the problem that was solved by relying on the old, broken
behaviour would be, to make decodebin2/playbin2 more aware of decoders and
improve the autoplugging of decoders by considering the caps supported by the
sink instead of just using something with the highest rank.

See bug #656923.
2011-09-15 14:27:35 +02:00
Josep Torra
b0b4e286c8 playbin2: autoplug sink if stream is incompatible to the configured one
Fixes regression since 0.10.33 where sinks that can cope with non raw
caps or custom caps are not autoplugged if there's a sink configured
with the properties video-sink and audio-sink which cannot handle
the stream. This change checks for compatibility on the configured one
and use it if success. Otherwhise it tries with the found factories.
2011-09-15 09:30:25 +02:00
Josep Torra
8f8ad316ce Revert "playsink: only add text overlay if vido sink also accepts raw caps"
This reverts commit a22faad18a. Instead
of disabling subtitles completelly when video stream have custom caps,
just let the sutbtileoverlay cope with them as now it's able to.
2011-09-14 11:05:45 +02:00
Josep Torra
596c75b541 subtitleoverlay: gracefully handle non raw video streams
Implement handling of non raw video streams by avoiding colorspace
elements and autoplugging a compatible renderer if available. Fallback
to passthrough if no compatible renderer is found.
2011-09-14 11:05:45 +02:00
Tim-Philipp Müller
14a79628a7 playbin2: try to catch malformed URIs
Only log in debug log for now, since the check is a bit
half-hearted, its purpose is mostly to make sure people
use gst_filename_to_uri() or g_filename_to_uri().

https://bugzilla.gnome.org/show_bug.cgi?id=654673
2011-09-13 21:57:10 +01:00
Vincent Penquerc'h
4095551b31 typefind: recognize Asylum modules
Note that there is already a AMF detection for a different
magic, I'm not sure if that's a different format with the
same initials or not. AMF is used for a few different formats
(including video), so...

This fixes playbin2 playing Asylum modules.

https://bugzilla.gnome.org/show_bug.cgi?id=658514
2011-09-09 13:54:45 +02:00
Nicolas Dufresne
25939e0218 subparse: Improve subrip type check regex
This patch prevents timestamp like "1 1:00:00", which would have been seen
as hour 101 by our parser, and allow single digit hour, minute and seconds
as it's already supported by the parser, and also by other implementation
like in mplayer. This fixes bug 657872.

https://bugzilla.gnome.org/show_bug.cgi?id=657872
2011-09-08 14:52:15 +02:00
Sebastian Dröge
21bc8ddcb7 Revert "Revert "decodebin2: Do a subset check before actually using a factory""
This reverts commit 5f5d832a3b.
2011-09-08 14:42:13 +02:00
Sebastian Dröge
0f654f3feb Merge branch 'master' into 0.11
Conflicts:
	docs/libs/Makefile.am
	tests/check/elements/decodebin2.c
2011-09-08 14:42:00 +02:00
Sebastian Dröge
5f5d832a3b Revert "decodebin2: Do a subset check before actually using a factory"
This reverts commit 50a88396ae.

See bug #658541.
2011-09-08 13:25:27 +02:00
Sebastian Dröge
9e2ce5bbb5 decodebin2: Make sure to fixate Parser/Converter caps before continuing autoplugging 2011-09-07 16:44:59 +02:00
Josep Torra
a22faad18a playsink: only add text overlay if vido sink also accepts raw caps
Fixes regression, pipeline fails with not negotiated, on media
containing subtitles when decoder/sink with custom caps is used.
2011-09-07 16:08:38 +02:00
Sebastian Dröge
46e26824d4 decodebin2: Intersect the factory caps with the current caps for the capsfilter
Otherwise we'll include many incompatible caps in the capsfilter that
will only slow down negotiation.
2011-09-07 14:20:36 +02:00
Stefan Sauer
abc96efb2a docs: add two mising enum docs 2011-09-07 14:14:02 +02:00
Tim-Philipp Müller
f93748fbd4 decodebin2: fix element factory refcounting
g_value_get_object() does not give us our own ref.

Fixes "Trying to dispose object "flacparse", but it still has a parent "registry0".
You need to let the parent manage the object instead of unreffing the object directly."
and similar warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=658416
2011-09-07 12:34:06 +01:00
Wim Taymans
c0d31dd555 rename IS_LE/BE to _IS_LITTLE_ENDIAN/BIG_ENDIAN 2011-09-06 16:46:02 +02:00
Wim Taymans
8ee3da5bba Merge branch 'master' into 0.11
Conflicts:
	gst/playback/gstsubtitleoverlay.c
	tests/check/elements/decodebin2.c
2011-09-06 15:31:53 +02:00
Wim Taymans
7012e88090 Merge branch 'master' into 0.11
Conflicts:
	gst-libs/gst/audio/audio.h
	gst-libs/gst/audio/gstaudiodecoder.c
	gst-libs/gst/audio/gstaudiodecoder.h
	gst-libs/gst/audio/gstaudioencoder.c
	gst-libs/gst/audio/gstbaseaudioencoder.h
	gst/playback/Makefile.am
	gst/playback/gstplaybin.c
	gst/playback/gstplaysink.c
	gst/playback/gstplaysinkvideoconvert.c
	gst/playback/gstsubtitleoverlay.c
	gst/videorate/gstvideorate.c
	gst/videoscale/gstvideoscale.c
	win32/common/libgstaudio.def
2011-09-06 15:24:32 +02:00
Sebastian Dröge
50a88396ae decodebin2: Do a subset check before actually using a factory
This prevents autoplugging if the caps have a non-empty intersection
but are not accepted by the next element's pad.
2011-09-06 14:16:10 +02:00
Sebastian Dröge
c5733632ee subtitleoverlay: Use subset check instead of non-empty-intersection check to check if pads are compatible 2011-09-06 14:04:34 +02:00
Sebastian Dröge
e3530f434b playbin2: Use subset check instead of non-empty-intersection check to check if pads are compatible 2011-09-06 14:03:31 +02:00
Sebastian Dröge
4be8c44b08 decodebin2: Fix memory leak 2011-09-06 13:16:44 +02:00
Sebastian Dröge
20f9d0bec5 decodebin2: Correctly negotiate format for parsers that can convert different stream formats
This is done by adding a capsfilter after every parser/converter that contains
all possible caps supported by downstream elements. A capsfilter is necessary
here because the decoder is only selected after the parser selected a format
and the parser can't know what downstream would support otherwise.
2011-09-06 13:16:44 +02:00
Sebastian Dröge
1df9fa9ee8 playbin2: If a audio/video sink was already selected don't check caps of all other possible sinks 2011-09-06 13:16:44 +02:00
Wim Taymans
33196cdd2c audio: change audio format syntax a little
Remove the _ in front of the endianness prefix.
Remove the _3 postfix for the 24 bits formats.
Add a _32 postfix after the formats that occupy extra space beyond their
natural size.
The result is that the GST_AUDIO_NE() macro can simply append the endianness
after all formats and that we only specify a different sample width when it is
different from the natural size of the sample. This makes things more consistent
and follows the pulseaudio conventions instead of the alsa ones.
2011-09-06 12:06:39 +02:00
Vincent Penquerc'h
78f50f2d25 videorate: don't take the object lock twice in {set,get}_property
https://bugzilla.gnome.org/show_bug.cgi?id=658294
2011-09-06 09:44:38 +01:00
Thiago Santos
2768ed75e0 encodebin: Select muxer further
Sort muxers based on their caps and ranking before iterating to
find one that fits the profile.

Sorting is done by putting the elements that have a pad template
that can produce the exact caps that is on the profile. For example:
when asking for "video/quicktime, variant=iso", muxers that
have this exact caps on their pad templates will be put first on
the list than ones that have only "video/quicktime".

https://bugzilla.gnome.org/show_bug.cgi?id=651496
2011-09-05 17:48:36 -03:00
Sebastian Dröge
de4fc848fa decodebin2: Actually iterate over the factories instead of only taking the first one 2011-09-05 20:32:42 +02:00
Tim-Philipp Müller
b1c00adf31 Revert "playsink: Try include 'pitch', if no other sink is provided"
This reverts commit 105814e2c7.

The general consensus seems to be that we should revert this for
now. If such behaviour is desired, we should probably enable it
via a flag. And maybe use the scaletempo plugin instead.
2011-09-05 14:44:27 +01:00
Sebastian Dröge
705ca1d55a playsink: Don't leak the videochain ts-offset element
Also don't leak the audiochain ts-offset element if one is
found but the sink doesn't support volume settings.
2011-09-05 12:02:37 +02:00
Sebastian Dröge
89a899fd9d playsink: Use gst_object_unref() instead of g_object_unref() for better debugging 2011-09-05 11:55:59 +02:00
David Schleef
4e38577b30 videoscale: Add modified Lanczos scaling method
Adds a Lanczos-derived scaling method, which is rather slow, but very
high quality.  Adds a few properties that can be used to tune various
scaling properties: sharpness, sharpen, envelope, dither.  Not currently
Orcified, but was designed with that in mind.
2011-09-01 15:16:50 -07:00
David Schleef
924f743981 playback: Add define for colorspace element
Single point of change if you want to switch from ffmpegcolorspace
to colorspace.
2011-09-01 11:41:31 -07:00
Sjoerd Simons
08ac05a06c videorate: fix dynamically changing average period
The average_period_set variable can be accessed in different threads, so
always lock it when reading. Furthermore when switching to averaging
mode we should make sure we don't have cached buffers that aren't used
in that mode. And any modeswitch will cause the latency to change, so we
should post a NewLatency message
2011-08-31 14:13:56 +01:00
Sjoerd Simons
ea46b3c706 videorate: Port to basetransform 2011-08-31 14:13:56 +01:00
Sjoerd Simons
f2438913f9 Correct added versions 2011-08-31 14:13:55 +01:00
Sebastian Dröge
49b301bcd6 playsink: Only unref ts_offset elements if they're not NULL 2011-08-31 14:45:08 +02:00
Sebastian Dröge
425d3ae7bc decodebin2: Keep the chain mutex locked while connecting to the notify::caps signal 2011-08-31 12:40:30 +02:00
Jan Schmidt
105814e2c7 playsink: Try include 'pitch', if no other sink is provided
As a default, try the pipeline 'pitch ! audioconvert ! autoaudiosink'
before trying plain autoaudiosink
2011-08-30 18:21:31 +10:00
Wim Taymans
811a8961bf playsink: fix ts_offset refcounting 2011-08-29 13:33:49 +02:00
Wim Taymans
e694528155 base: port to 0.11 2011-08-29 13:28:08 +02:00
Wim Taymans
e1287b97ab Merge branch 'master' into 0.11
Conflicts:
	ext/ogg/gstoggmux.c
	gst-libs/gst/audio/audio.c
	gst-libs/gst/audio/audio.h
	gst-libs/gst/audio/multichannel.h
	gst-libs/gst/pbutils/Makefile.am
	gst-libs/gst/pbutils/gstdiscoverer.c
	gst/playback/gstplaysinkaudioconvert.c
	gst/playback/gstplaysinkvideoconvert.c
	win32/common/libgstaudio.def
2011-08-29 11:37:36 +02:00
Wim Taymans
82d82203f6 base: fix for allocation methods rename 2011-08-26 14:26:37 +02:00
David Schleef
a912374342 playback: reference count ts_offset
Apparently this object is being used after it's freed.  This is one
way to fix it, although perhaps not the best way.  Fixes: #656715.
2011-08-25 14:08:34 -07:00
Wim Taymans
81457756f0 audiotestsrc: use base class fill method 2011-08-25 13:21:14 +02:00