Files
odfstudio/avmedia
Michael Weghorn b1576ba17a tdf#165870 qt avmedia: Handle null media player
QtPlayer::m_xMediaPlayer can be null, e.g. in a PPTX file
created in PowerPoint that contains an external video link to
Youtube, so handle that case gracefully instead of asserting/crashing.

Backtrace of assert getting triggered without this change in place:

    1 __pthread_kill_implementation pthread_kill.c 44 0x7ffff789e95c
    2 __pthread_kill_internal pthread_kill.c 89 0x7ffff789e9ff
    3 __GI_raise raise.c 26 0x7ffff7849cc2
    4 __GI_abort abort.c 73 0x7ffff78324ac
    5 __assert_fail_base assert.c 118 0x7ffff7832420
    6 avmedia::qt::QtPlayer::stop QtPlayer.cxx 75 0x7fff980b1675
    7 avmedia::qt::QtPlayer::disposing QtPlayer.cxx 281 0x7fff980b34f7
    8 cppu::WeakComponentImplHelperBase::dispose implbase.cxx 104 0x7ffff5b3de60
    9 cppu::PartialWeakComponentImplHelper<com::sun::star::media::XPlayer, com::sun::star::media::XPlayerNotifier, com::sun::star::lang::XServiceInfo>::dispose compbase.hxx 90 0x7fff980b0455
    10 avmedia::qt::QtManager::createPlayer QtManager.cxx 32 0x7fff980afc7e
    11 non-virtual thunk to avmedia::qt::QtManager::createPlayer(rtl::OUString const&) 0x7fff980afdbc
    12 avmedia::priv::MediaWindowImpl::createPlayer mediawindow_impl.cxx 212 0x7ffff0bf0d40
    13 avmedia::priv::MediaWindowImpl::createPlayer mediawindow_impl.cxx 193 0x7ffff0bf0a7e
    14 avmedia::MediaWindow::createPlayer mediawindow.cxx 364 0x7ffff0be5860
    15 slideshow::internal::ViewMediaShape::implInitializeMediaPlayer viewmediashape.cxx 391 0x7fff65284f52
    16 slideshow::internal::ViewMediaShape::implInitialize viewmediashape.cxx 309 0x7fff652839ab
    17 slideshow::internal::ViewMediaShape::startMedia viewmediashape.cxx 107 0x7fff652832b1
    18 slideshow::internal::(anonymous namespace)::MediaShape::implStartIntrinsicAnimation mediashape.cxx 212 0x7fff6526578e
    19 slideshow::internal::ExternalShapeBase::ExternalShapeBaseListener::enableAnimations externalshapebase.cxx 68 0x7fff65259ccd
    [...]

Change-Id: I6978f27d9b756a0fa8492d06bed57e805ca23a0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183228
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-03-23 06:45:35 +01:00
..
…
…
…

Audio / video Media Implementation.

Provides per-platform implementations of multimedia functionality. Currently no stream API is provided, only a URI based one, so streaming has to be wrapped around it via temp files.

Also provides (in source/framework/mediacontrol.cxx) an implementation of the graphical media playback control that appears in the toolbar / mediaobject bar when media is selected under the .uno:AVMediaToolBox item.

avmedia / gstreamer

The avmedia component is implementation of manager service defined in offapi/com/sun/star/media/. Radek has added implementation based on gstreamer so that we can add audio and video files into impress presentation on Linux with gstreamer.

The implementation is pretty straightforward, sometimes it has problems when gstreamer installation is incomplete.

In the beginning the media files were not embedded, Thorsten added support for that later.

Future Works

it might be worthwhile to revamp the avmedia UI.