diff options
author | Mark Hung <marklh9@gmail.com> | 2019-01-27 13:41:34 +0800 |
---|---|---|
committer | Mark Hung <marklh9@gmail.com> | 2019-02-04 01:15:22 +0100 |
commit | 6b6c0b120f3275be6bd9dbb26480f8f1df355e00 (patch) | |
tree | d25c799cad8b21e4836e3b309425b2271b0615bc /slideshow/source/inc/soundplayer.hxx | |
parent | tdf#44223 oox: import embedded media stream. (diff) | |
download | core-6b6c0b120f3275be6bd9dbb26480f8f1df355e00.tar.gz core-6b6c0b120f3275be6bd9dbb26480f8f1df355e00.zip |
tdf#44223 allow slideshow to play embedded media.
Implement MediaFileManager that create the temp media
file for package urls when making slideshow.
Change-Id: I10a5ddc405928b4322ad72eb603508faf25bf0db
Reviewed-on: https://gerrit.libreoffice.org/67209
Tested-by: Jenkins
Reviewed-by: Mark Hung <marklh9@gmail.com>
Diffstat (limited to 'slideshow/source/inc/soundplayer.hxx')
-rw-r--r-- | slideshow/source/inc/soundplayer.hxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/slideshow/source/inc/soundplayer.hxx b/slideshow/source/inc/soundplayer.hxx index 82af088af462..ea496d88b8cc 100644 --- a/slideshow/source/inc/soundplayer.hxx +++ b/slideshow/source/inc/soundplayer.hxx @@ -25,6 +25,7 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/media/XManager.hpp> #include <com/sun/star/media/XPlayer.hpp> +#include <avmedia/mediaitem.hxx> #include <memory> @@ -39,6 +40,8 @@ namespace slideshow { namespace internal { + class MediaFileManager; + /** Little class that plays a sound from a URL. TODO: Must be explicitly disposed (as long as enable_shared_ptr_from_this @@ -64,7 +67,8 @@ namespace slideshow static ::std::shared_ptr<SoundPlayer> create( EventMultiplexer & rEventMultiplexer, const OUString& rSoundURL, - const css::uno::Reference< css::uno::XComponentContext>& rComponentContext ); + const css::uno::Reference< css::uno::XComponentContext>& rComponentContext, + MediaFileManager& rMediaFileManager); virtual ~SoundPlayer() override; @@ -92,12 +96,15 @@ namespace slideshow SoundPlayer( EventMultiplexer & rEventMultiplexer, const OUString& rSoundURL, - const css::uno::Reference< css::uno::XComponentContext>& rComponentContext ); + const css::uno::Reference< css::uno::XComponentContext>& rComponentContext, + MediaFileManager & rMediaFileManager); EventMultiplexer & mrEventMultiplexer; // TODO(Q3): obsolete when boost::enable_shared_ptr_from_this // is available ::std::shared_ptr<SoundPlayer> mThis; + // Temp file for pakcage url. + ::std::shared_ptr<::avmedia::MediaTempFile> mpMediaTempFile; css::uno::Reference< css::media::XPlayer > mxPlayer; }; |