XOverlay lost after setting playbin state to Null
Hoyt, David
hoyt6 at llnl.gov
Fri Dec 2 11:41:26 PST 2011
> WOW!!! I've just tested d3dvideosink and I am really impressed - it's
> FAST!!! It is 24-32% faster than dshowvideosink depending on the machine.
> Good job, Dave, really well done!
Glad to hear that!
> ...It does not stretch the video to fill the available
> space, it deliberately changes the aspect ratio to 4:3 leaving black borders
> on top and bottom. This is a sample 10-second video file:
> http://ralphos.com/video/test1.avi.
Try the following pipelines:
gst-launch playbin2 uri=http://ralphos.com/video/test1.avi video-sink=dshowvideosink
gst-launch playbin2 uri=http://ralphos.com/video/test1.avi video-sink=d3dvideosink
gst-launch playbin2 uri=http://ralphos.com/video/test1.avi video-sink="d3dvideosink force-aspect-ratio=true"
Both those seem to be exactly alike. I see no black bars added to the video. Now the video *itself* has black bars on the side and bottom -- but that's got nothing to do with the video sink. Both behave exactly the same. d3dvideosink does have a force-aspect-ratio property you can use, but by default it should stretch to the window it's in (in each one of those example pipelines, try resizing the window during playback). You might want to examine your application's code and see if it's not doing something to cause the problem you're seeing.
> 2. I cannot get it to work with a full screen window on my primary screen
> (1920x1200), it displays black surface. It works without any problems if I
> place the full screen window on my secondary screen(1680x1050). It is the
> same instance of a window, just hidden, repositioned and shown on another
> screen, I have no problems with it using other video sinks. Is it a bug or
> am I doing something wrong?
Sounds like an issue either with the direct 3d driver for your card or your application. How are you doing "full screen"? I don't recommend using a direct x style full screen -- instead create a normal window that fills the screen and use xoverlay to place the video in the appropriate window. My app takes over every monitor attached to a system -- so that's typically 2, 3, or 4 at a time w/ 4-5 videos running on each screen and never had a problem. It's likely your app that's the issue. I can't rule out a bug, but I can point to very similar scenarios where it's known to be working...so it's more unlikely it's on the d3dvideosink end. However, since it's working with other video sinks, it's definitely suspect. But, directdrawsink uses an older technology and direct show, if my memory serves me right, will fall back to direct draw if necessary.
What OS are you running this on? If it's Win XP, try re-running your app w/ the same setup but in Win 7 and see how well it does. It's my experience that manufacturer direct 3d drivers seem to be better w/ Win 7.
If it's still a problem, we can try and work on it to see what's causing the problem.
More information about the gstreamer-devel
mailing list