summaryrefslogtreecommitdiff
path: root/avmedia
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-04-23 20:12:49 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-04-29 21:35:24 +0200
commit1df99a2155751a1874f45b57a637ee9ecc4dc110 (patch)
tree248a38281af584a9e29efcc1d83ff8072e670a79 /avmedia
parent32122e89310bd1d72aa796823965eadd766a84fc (diff)
Use getXWeak in avmedia
Change-Id: I1dc1e597c50b0081375b9216ac4e6436b84aaa0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150832 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'avmedia')
-rw-r--r--avmedia/source/framework/soundhandler.cxx2
-rw-r--r--avmedia/source/gtk/gtkplayer.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/avmedia/source/framework/soundhandler.cxx b/avmedia/source/framework/soundhandler.cxx
index 2392c3dd1ae1..14870c9ee9be 100644
--- a/avmedia/source/framework/soundhandler.cxx
+++ b/avmedia/source/framework/soundhandler.cxx
@@ -195,7 +195,7 @@ void SAL_CALL SoundHandler::dispatchWithNotification(const css::util::URL&
m_xPlayer.set( avmedia::MediaWindow::createPlayer( aURL.Complete, aDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_REFERRER, OUString()) ), css::uno::UNO_SET_THROW );
// OK- we can start async playing ...
// Count this request and initialize self-holder against dying by uno ref count ...
- m_xSelfHold.set(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY);
+ m_xSelfHold.set(getXWeak());
m_xPlayer->start();
m_aUpdateIdle.SetPriority( TaskPriority::HIGH_IDLE );
m_aUpdateIdle.Start();
diff --git a/avmedia/source/gtk/gtkplayer.cxx b/avmedia/source/gtk/gtkplayer.cxx
index 51978c3e5b45..47a57e3a4cd2 100644
--- a/avmedia/source/gtk/gtkplayer.cxx
+++ b/avmedia/source/gtk/gtkplayer.cxx
@@ -163,7 +163,7 @@ void GtkPlayer::notifyListeners()
return;
css::lang::EventObject aEvent;
- aEvent.Source = static_cast<cppu::OWeakObject*>(this);
+ aEvent.Source = getXWeak();
comphelper::OInterfaceIteratorHelper2 pIterator(*pContainer);
while (pIterator.hasMoreElements())
@@ -374,7 +374,7 @@ GtkPlayer::addPlayerListener(const css::uno::Reference<css::media::XPlayerListen
if (gtk_media_stream_is_prepared(m_pStream))
{
css::lang::EventObject aEvent;
- aEvent.Source = static_cast<cppu::OWeakObject*>(this);
+ aEvent.Source = getXWeak();
rListener->preferredPlayerWindowSizeAvailable(aEvent);
}
else