Commit graph

981 commits

Author SHA1 Message Date
Thiago Santos 0a07701164 playsinkconvertbin: Be more consistent with ghostpad targets
Set up targets on READY->PAUSED state change to passthrough by
default. This prevents the targets from being unset on the
first run, while the 'raw' variable would mean that some
target is set.
2011-11-03 10:03:07 +01:00
Thiago Santos f9ea3fdda8 playsinkconvertbin: No need to remove the identity
The identity element should be handled by the GstBin's cleanup,
removing it on the remove_elements function might remove it
too soon, as this function can be called directly from playsink
2011-11-03 10:02:58 +01:00
Thiago Santos 34f72da9cc playsinkconvertbin: Adding some debug messages
Adds a couple debug messages and some g_assert to make debugging
easier
2011-11-03 10:02:49 +01:00
Thiago Santos 80971a3b33 playsink-videoconvert: Fix warning on build
Remove unused variable
2011-11-03 10:02:39 +01:00
Vincent Penquerc'h ae3ba53391 playsink: handle after-the-fact changes in converters/volume booleans
The playsink was nastily poking a boolean in the structure.
Make those booleans properties, so we are told when they change,
and rebuild the conversion bin when they do.

Some cleanup to go with it too.

https://bugzilla.gnome.org/show_bug.cgi?id=661262
2011-11-03 10:02:31 +01:00
Vincent Penquerc'h c08a23169d playsink: handle NULL cached caps in getcaps
https://bugzilla.gnome.org/show_bug.cgi?id=661262
2011-11-03 10:02:01 +01:00
Vincent Penquerc'h 3939457b00 playsink: consider both passthrough and converter caps in getcaps
Since we can switch between both modes.

https://bugzilla.gnome.org/show_bug.cgi?id=661262
2011-11-03 10:01:52 +01:00
Vincent Penquerc'h b34dac9a87 playsink: cache inner converter bin caps
https://bugzilla.gnome.org/show_bug.cgi?id=661262
2011-11-03 09:58:03 +01:00
Vincent Penquerc'h 6925c02bc2 playsink: keep both raw and non raw pipelines at all times
and switch between them as needed.

https://bugzilla.gnome.org/show_bug.cgi?id=661262
2011-11-03 09:57:46 +01:00
Vincent Penquerc'h 69d98d08c1 playsink: only compare against the media type we expect
ie, audio/x-raw- for audio, video/x-raw- for video.

Add a trailing - to be more specific. I doubt there's anything
like audio/x-rawhide or something, but you never know.

https://bugzilla.gnome.org/show_bug.cgi?id=661262
2011-11-03 09:57:32 +01:00
Vincent Penquerc'h fd27e34582 playsink: refactor the converter bins since they are almost identical
https://bugzilla.gnome.org/show_bug.cgi?id=661262
2011-11-03 09:57:21 +01:00
Vincent Penquerc'h c8e0d215cb playsink: fix passthrough mode (hopefully)
The code was doing counterintuitive rewiring of pads when the
bin did not contain any elements. We now add an identity element
in that case, which makes it simpler, and should fix the AC3
passthrough mode when using pulseaudio (but I don't see the bug
here so can't test).

https://bugzilla.gnome.org/show_bug.cgi?id=661262
2011-11-03 09:56:40 +01:00
Vincent Penquerc'h 2b84b328b1 playsink: handle NULL ghost pad target
For the src pad anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=661262
2011-11-03 09:56:26 +01:00
Sebastian Dröge a583b63722 Revert "playsinkaudioconvert: Fix warning when there is no target pad yet"
This reverts commit f35c51c149.

Better patch coming soon.
2011-11-03 09:56:14 +01:00
Tim-Philipp Müller b6c424018b subtitleoverlay: don't use soon-to-be-deprecated gst_filter_run() 2011-10-30 20:00:47 +00: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 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
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
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
Robert Swain ef4a4a0e94 playsink: Add audio- and text-sink props 2011-10-05 12:45: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
Raimo Järvi c0956342b2 playbin2: Fix compiler warnings on 64 bit mingw-w64
Fixes bug #660301.
2011-09-27 23:54:04 +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
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
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
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
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