Bug 161387 - Can't create instance of com.sun.star.media.Manager
Summary: Can't create instance of com.sun.star.media.Manager
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-03 04:49 UTC by Mike Kaganski
Modified: 2024-08-20 12:47 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2024-06-03 04:49:05 UTC
The com.sun.star.media.Manager service is documented here:
https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1media_1_1Manager.html

It is implemented in four places:
https://opengrok.libreoffice.org/xref/core/avmedia/source/gstreamer/gstmanager.cxx?r=8b091048#63
https://opengrok.libreoffice.org/xref/core/avmedia/source/gtk/gtkmanager.cxx?r=61717b21#46
https://opengrok.libreoffice.org/xref/core/avmedia/source/qt6/QtManager.cxx?r=441d8ed9#50
https://opengrok.libreoffice.org/xref/core/avmedia/source/win/manager.cxx?r=bbcf2357#67

But it is impossible to create its instance using this Basic call:

  CreateUnoService("com.sun.star.media.Manager")

On the other hand, it is possible to create it using e.g. (on Windows):

  CreateUnoService("com.sun.star.media.Manager_DirectX")

because that undocumented service name is defined in

https://opengrok.libreoffice.org/xref/core/avmedia/source/win/avmediawin.component

It is possibly required to keep this undocumented name supported (because of countless uses of this); but the correct name needs also be properly defined in .component files, to enable its cross-platform construction.
Comment 1 Mike Kaganski 2024-06-03 04:56:09 UTC
By the way, the mac implementation even broke the service name in the implementation:

https://opengrok.libreoffice.org/xref/core/avmedia/source/macavf/manager.mm?r=9ece0ae7
Comment 2 Buovjaga 2024-08-20 12:47:45 UTC
I believe you, so I will set to NEW.