Kaydet (Commit) 358d6006 authored tarafından Zolnai Tamás's avatar Zolnai Tamás

Optimize media rendering during slideshow: save one grabFrame() call

'FallbackGraphic' property introduced in:
b862a216
contains the previously called grabFrame's
result, so we can use that instead of render the media
frame again (it affects glTF models too).

Change-Id: Ia93e771e92cc7630480c665dea66fbf571dfa2a0
üst 1caad856
...@@ -196,16 +196,14 @@ namespace slideshow ...@@ -196,16 +196,14 @@ namespace slideshow
if( !mpMediaWindow.get() && !mxPlayerWindow.is() ) if( !mpMediaWindow.get() && !mxPlayerWindow.is() )
{ {
OUString sURL; uno::Reference< graphic::XGraphic > xGraphic;
OUString sMimeType;
uno::Reference< beans::XPropertySet > xPropSet( mxShape, uno::UNO_QUERY ); uno::Reference< beans::XPropertySet > xPropSet( mxShape, uno::UNO_QUERY );
if (xPropSet.is()) if (xPropSet.is())
{ {
xPropSet->getPropertyValue("PrivateTempFileURL") >>= sURL; xPropSet->getPropertyValue("FallbackGraphic") >>= xGraphic;
xPropSet->getPropertyValue("MediaMimeType") >>= sMimeType;
} }
const Graphic aGraphic(avmedia::MediaWindow::grabFrame(sURL,"",sMimeType)); Graphic aGraphic(xGraphic);
const BitmapEx aBmp = aGraphic.GetBitmapEx(); const BitmapEx aBmp = aGraphic.GetBitmapEx();
uno::Reference< rendering::XBitmap > xBitmap(vcl::unotools::xBitmapFromBitmapEx( uno::Reference< rendering::XBitmap > xBitmap(vcl::unotools::xBitmapFromBitmapEx(
......
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