Kaydet (Commit) 539017f1 authored tarafından Zolnai Tamás's avatar Zolnai Tamás

fdo#72400: slideshow: display a snapshot of movie until its not started

Change-Id: Ibd81f2aada458dd7437053b59882d3200f78747e
üst 4e939b95
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <vcl/canvastools.hxx> #include <vcl/canvastools.hxx>
#include <vcl/syschild.hxx> #include <vcl/syschild.hxx>
#include <vcl/window.hxx> #include <vcl/window.hxx>
#include <vcl/graph.hxx>
#include <basegfx/tools/canvastools.hxx> #include <basegfx/tools/canvastools.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx>
...@@ -186,14 +187,16 @@ namespace slideshow ...@@ -186,14 +187,16 @@ namespace slideshow
if( !mpMediaWindow.get() && !mxPlayerWindow.is() ) if( !mpMediaWindow.get() && !mxPlayerWindow.is() )
{ {
// draw placeholder for no-video (no window) case OUString sURL;
// no window and player == audio icon uno::Reference< beans::XPropertySet > xPropSet( mxShape, uno::UNO_QUERY );
// no window and no player == broken icon if (xPropSet.is())
BitmapEx aAudioLogo(mxPlayer.is() ? xPropSet->getPropertyValue("PrivateTempFileURL") >>= sURL;
avmedia::MediaWindow::getAudioLogo() : avmedia::MediaWindow::getEmptyLogo() );
const Graphic aGraphic(avmedia::MediaWindow::grabFrame(sURL,"", true));
const BitmapEx aBmp = aGraphic.GetBitmapEx();
uno::Reference< rendering::XBitmap > xBitmap(vcl::unotools::xBitmapFromBitmapEx( uno::Reference< rendering::XBitmap > xBitmap(vcl::unotools::xBitmapFromBitmapEx(
pCanvas->getUNOCanvas()->getDevice(), aAudioLogo)); pCanvas->getUNOCanvas()->getDevice(), aBmp));
rendering::ViewState aViewState; rendering::ViewState aViewState;
aViewState.AffineTransform = pCanvas->getViewState().AffineTransform; aViewState.AffineTransform = pCanvas->getViewState().AffineTransform;
...@@ -201,7 +204,7 @@ namespace slideshow ...@@ -201,7 +204,7 @@ namespace slideshow
rendering::RenderState aRenderState; rendering::RenderState aRenderState;
::canvas::tools::initRenderState( aRenderState ); ::canvas::tools::initRenderState( aRenderState );
const ::Size aBmpSize( aAudioLogo.GetSizePixel() ); const ::Size aBmpSize( aBmp.GetSizePixel() );
const ::basegfx::B2DVector aScale( rBounds.getWidth() / aBmpSize.Width(), const ::basegfx::B2DVector aScale( rBounds.getWidth() / aBmpSize.Width(),
rBounds.getHeight() / aBmpSize.Height() ); rBounds.getHeight() / aBmpSize.Height() );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment