i tried several methods, and i would like some informations about solve them
from https://github.com/videolan/vlc, compilation run fine
that extract libvlc.12.dylib, libvlccore.9.dylib, and /plugins/*/
a) There are two examples of use
i) vlc/doc/libvlc/QtGL
at run time, there is 2 error log messages, the second make crash:
QOpenGLShader::compile(Fragment): ERROR: 0:9: ';' : syntax error: syntax error
Assertion failed: (psz_mrl), function InputSourceInit, file vlc/extras/package/macosx/../../../src/input/input.c, line 2568.
>>> Question : Should we insist in this direction, and if so, how?
ii) vlc/doc/libvlc/QtPlayer
X11 is necessary (from https://www.xquartz.org/)
integraton resumed : libvlc_media_player_set_nsobject(vlcPlayer, (void *)videoWidget->winId());
at excecution, I have the following error:
dyld: Symbol not found: _gll_noop
Referenced from: /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
that I solve by copying the dylib missing in Contents/ (Frameworks/ [with Frameworks/plugins/] and PlugIns/)
then, with
Code: Select all
vlcInstance = libvlc_new(0, NULL); (in player.cpp)
Code: Select all
[00007ff3c20a6850] macosx window error: Cannot create vout as Mac OS X interface was not found
[00007ff3be913a00] videotoolbox decoder: Using Video Toolbox to decode 'h264'
[00007ff3c20992c0] main video output error: video output display creation failed
[00007ff3be913a00] videotoolbox decoder error: decoder failure, Abort.
[h264 @ 0x7ff3bf0fd400] get_buffer() failed
[h264 @ 0x7ff3bf0fd400] thread_get_buffer() failed
[h264 @ 0x7ff3bf0fd400] decode_slice_header error
[h264 @ 0x7ff3bf0fd400] no frame!
and with,
Code: Select all
const char * const vlc_args[] = {
"--verbose=4"
,"--vout=macosx"
//,"--no-plugins-cache"
};
vlcInstance = libvlc_new(sizeof(vlc_args) / sizeof(*vlc_args), vlc_args);
Code: Select all
[00007fea806ada50] macosx window error: Cannot create vout as Mac OS X interface was not found
[00007fea82419c40] main video output error: video output display creation failed
[00007fea81872600] videotoolbox decoder error: decoder failure, Abort.
b) Integration into my own project works (without X11), but nothing is displayed, black screen again.
Changing @rpath of 2 libraries to be compatible with my tree structure
echo $RPWD | sudo -S install_name_tool -add_rpath @executable_path/../Frameworks plugins/gui/libmacosx_plugin.dylib
echo $RPWD | sudo -S install_name_tool -add_rpath @executable_path/../Frameworks plugins/audio_filter/libebur128_plugin.dylib
Code: Select all
const char * const vlc_args[] = {
"--verbose=2"
,"--vout=macosx"
//,"--no-plugins-cache"
};
QScreen *screen=QGuiApplication::primaryScreen();
_videoWindow = new QWindow(screen);
_videoWidget=QWidget::createWindowContainer(_videoWindow,this);
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(_videoWidget);
setLayout(layout);
_vlcinstance = new VLC::Instance(sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args);
_m = new VLC::Media(*_vlcinstance, file.toLatin1().data(), VLC::Media::FromLocation);
_mp = new VLC::MediaPlayer(*_m);
_mp->eventManager() ...
int windid = _videoWidget->winId();
_mp->setNsobject((void*)windid);
_mp->play();
Code: Select all
[00007f8bfa8e8990] main libvlc debug: VLC media player - 4.0.0-dev Otto Chriek
[00007f8bfa8e8990] main libvlc debug: configured with /Users/amn/vlc/extras/package/macosx/../../../configure '--prefix=/' '--enable-macosx' '--enable-merge-ffmpeg' '--enable-osx-notifications' '--enable-faad' '--enable-flac' '--enable-theora' '--enable-shout' '--enable-ncurses' '--enable-twolame' '--enable-libass' '--enable-macosx-avfoundation' '--disable-skins2' '--disable-xcb' '--disable-caca' '--disable-pulse' '--disable-sdl-image' '--disable-vnc' '--build=x86_64-apple-darwin19' '--host=x86_64-apple-darwin19' '--with-macosx-version-min=10.11' '--with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' 'build_alias=x86_64-apple-darwin19' 'host_alias=x86_64-apple-darwin19' 'CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' 'CFLAGS=-g' 'LDFLAGS=' 'CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++' 'CXXFLAGS=-g' 'OBJC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' 'OBJCFLAGS=-g'
[00007f8bfa8e8990] main libvlc debug: CPU has capabilities MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 FPU
[h264 @ 0x7f8bf9d06800] Reinit context to 1280x720, pix_fmt: yuv420p
[h264 @ 0x7f8bf9d06800] get_buffer() failed
[h264 @ 0x7f8bf9d06800] thread_get_buffer() failed
[h264 @ 0x7f8bf9d06800] decode_slice_header error
[h264 @ 0x7f8bf9d06800] no frame!
thanks for your help.