24#include <com/sun/star/awt/Size.hpp>
25#include <com/sun/star/uno/Reference.hxx>
26#include <com/sun/star/media/XPlayerListener.hpp>
32#define AVMEDIA_FRAMEGRABBER_DEFAULTFRAME -1.0
38 class XPlayerNotifier;
56 namespace priv {
class MediaWindowImpl; }
64 std::function<void(
const css::uno::Reference<css::media::XPlayer>&)>
m_aFn;
66 using WeakComponentImplHelperBase::disposing;
68 PlayerListener(std::function<
void(
const css::uno::Reference<css::media::XPlayer>&)> fn);
69 virtual void SAL_CALL
dispose()
override;
72 virtual void SAL_CALL preferredPlayerWindowSizeAvailable(
const css::lang::EventObject& rSource)
override;
73 virtual void SAL_CALL disposing(
const css::lang::EventObject& rSource)
override;
75 void startListening(
const css::uno::Reference<css::media::XPlayerNotifier>& rNotifier);
87 void setURL(
const OUString& rURL,
const OUString& rReferer );
88 const OUString& getURL()
const;
91 Size getPreferredSize()
const;
101 void updateMediaItem(
MediaItem& rItem )
const;
102 void executeMediaItem(
const MediaItem& rItem );
106 bool isVisible()
const;
129 static bool executeMediaURLDialog(
weld::Window* pParent, OUString& rURL,
bool *
const o_pbLink);
130 static void executeFormatErrorBox(
weld::Window* pParent);
131 static bool isMediaURL(std::u16string_view rURL,
const OUString& rReferer,
bool bDeep =
false,
134 static css::uno::Reference< css::media::XPlayer > createPlayer(
const OUString& rURL,
const OUString& rReferer,
const OUString* pMimeType =
nullptr );
136 static css::uno::Reference<css::graphic::XGraphic>
137 grabFrame(
const css::uno::Reference<css::media::XPlayer>& rPlayer,
138 const css::uno::Reference<css::graphic::XGraphic>& rGraphic =
nullptr);
140 static css::uno::Reference< css::graphic::XGraphic > grabFrame(
const OUString& rURL,
const OUString& rReferer,
143 static void dispatchInsertAVMedia(
const css::uno::Reference<css::frame::XDispatchProvider>&,
144 const css::awt::Size& rSize,
const OUString& rURL,
bool bLink);