GNOME Bugzilla – Bug 624697
Add 'video/x-raw-va' in DEFAULT_RAW_CAPS for va api support
Last modified: 2012-09-12 08:47:42 UTC
1. raw caps are defined in $gst-plugins-base/gst/playback/gstrawcaps.h: #define DEFAULT_RAW_CAPS \ "video/x-raw-yuv; " \ "video/x-raw-rgb; " \ "video/x-raw-gray; " \ "audio/x-raw-int; " \ ... decodebin depends on this raw caps to stop auto-plug (expose_pad). 2. libva is designed to enable hardware accelerated video decode/encode at various entry-points (VLD, IDCT, Motion Compensation etc.) http://freedesktop.org/wiki/Software/vaapi 3. we need a new raw caps like 'video/x-raw-va' adding to DEFAULT_RAW_CAPS for libva support in gst.
proposed patch attached: diff --git a/gst/playback/gstrawcaps.h b/gst/playback/gstrawcaps.h index 0297e33..a791869 100644 --- a/gst/playback/gstrawcaps.h +++ b/gst/playback/gstrawcaps.h @@ -29,6 +29,7 @@ G_BEGIN_DECLS "video/x-raw-yuv; " \ "video/x-raw-rgb; " \ "video/x-raw-gray; " \ + "video/x-raw-va; " \ "audio/x-raw-int; " \ "audio/x-raw-float; " \ "text/plain; " \
Is the va stuff autoplugged? Are the va elements only working (e.g. setting them to READY succeeds) if the hardware supports the required features?
in some condition, va stuff is autoplugged, because playbin2 could stop auto-plug when it realize it has come to a sink element. but if we set playbin2 'video-sink' property with customized sink, customized sink doesn't work. 1. decodebin2 auto-plug doesn't stop when it comes to 'video/x-raw-va' 2. then it will comes to a sink (vaimagesink for example) 3. playbin2 will stop auto-plug in autoplug_select_cb() when it find a sink element is reached. 4. playbin2 will use vaimagesink in no_more_pads_cb(), while not the sink set by 'video-sink' property. va element only works if the hardware supports the required features.
(In reply to comment #3) > in some condition, va stuff is autoplugged, because playbin2 could stop > auto-plug when it realize it has come to a sink element. > but if we set playbin2 'video-sink' property with customized sink, customized > sink doesn't work. > 1. decodebin2 auto-plug doesn't stop when it comes to 'video/x-raw-va' That's what the autoplug-continue is used for. playbin2 checks (should check) if the sink supports the caps and tell decodebin2 to stop autoplugging in that case. > 2. then it will comes to a sink (vaimagesink for example) That's a bug in your sink then, decodebin2/uridecodebin must not autoplug sinks and will not autoplug sinks unless they have the wrong classification in the element details (does your sink say it's a Decoder or Parser or Demuxer or Depayloader? If it does: that's the problem) > va element only works if the hardware supports the required features. Does that mean, that changing the state of those elements to READY will fail? Or will the elements fail later? If they fail later that's a problem for autoplugging (e.g. if you have the va elements on hardware that doesn't support va).
(In reply to comment #4) > (In reply to comment #3) > > 1. decodebin2 auto-plug doesn't stop when it comes to 'video/x-raw-va' > > That's what the autoplug-continue is used for. playbin2 checks (should check) > if the sink supports the caps and tell decodebin2 to stop autoplugging in that > case. I mean decodebin2 doesn't 'goto expose_pad' in analyze_new_pad() because are_raw_caps() fail for 'video/x-raw-va'. > > > 2. then it will comes to a sink (vaimagesink for example) > > That's a bug in your sink then, decodebin2/uridecodebin must not autoplug sinks > and will not autoplug sinks unless they have the wrong classification in the > element details (does your sink say it's a Decoder or Parser or Demuxer or > Depayloader? If it does: that's the problem) > > > va element only works if the hardware supports the required features. > > Does that mean, that changing the state of those elements to READY will fail? > Or will the elements fail later? If they fail later that's a problem for > autoplugging (e.g. if you have the va elements on hardware that doesn't support > va). those elements fail when setting to READY.
somebody works on VA project or gst VA support ?
> somebody works on VA project or gst VA support ? Yes.
What's up with this? Is this still needed. I thought it Just Worked(tm) now in playbin2, even in 0.10?
gstreamer-vaapi works in playbin2: https://gitorious.org/vaapi/gstreamer-vaapi. so, you can close it if you like. however, I don't think it works perfect now, because: auto-plug ends when a sink element is connected (vaapisink), not by pre-defined caps type. maybe we can add 'video/x-surface;' to the list. use raw_caps (default one or set from app) to control auto-plug is more flexible than ends with a sink element. for example: we sometimes do require raw caps, thumbnail generation is one case. in such case vaapidownload element can be auto-pluged to get the raw data of a hw surface.
For 1.0 we will not add this. It should have caps of video/x-raw and use/expose the needed GstMeta. So if it works in 0.10 ... shall we close this ?
Yes, I'd prefer to close this and focus on making it work nicely in 1.0. I'm reluctant to add this to 0.10 at this point (and it'd be unlikely to ever get released anyway, so probably not so useful anyway).