-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QtAvplayer itself compiles on 6.7.1 but C++ code fails #476
Comments
Thanks for contribution! I just tested: qml_video % mkdir build
qml_video % cd build
build % cmake ../ -DQT_AVPLAYER_MULTIMEDIA=ON -DCMAKE_PREFIX_PATH=/opt/Qt/6.7.1/macos/lib/cmake -DCMAKE_LIBRARY_PATH=/opt/homebrew/Cellar/ffmpeg/7.0_1/lib
build % make -j8 And it worked. Could you please compare https://github.com/valbok/QtAVPlayer/blob/master/examples/qml_video/CMakeLists.txt with your cmake? |
No problem @valbok, glad if it helped in any way. But the issue comes when I include the QtAvplayer headers & library in my Qt 6.7.1 project. That gives the above errors during linking. This used to work fine on 6.7.0. |
Isso deve ser um problema específico do macos. No Arch Linux compila bem com a versão 6.7.1 e ficou até melhor que a versão 6.5.2 do meu sistema. |
Did you try to compile https://github.com/valbok/QtAVPlayer/blob/master/examples/qml_video/CMakeLists.txt ? |
Oh, you might forgot to provide -DQT_AVPLAYER_MULTIMEDIA=ON during cmake? |
Feel free to reopen if you have still issues. |
Platform: ios
OS: MacOS
XCode: 15.3
Qt: 6.7.1
An older version of QtAvplayer compiled fine on 6.7.0 but gave errors compiling on 6.7.1.
I used the latest version along with 'QtAVPlayer.cmake' including inside it. It compiles fine but while linking the final binary for ios, we get these errors:
Undefined symbols for architecture arm64: "QAVPlayer::audioFrame(QAVAudioFrame const&)", referenced from: QAVPlayerPrivate::doPlayAudio()::$_2::operator()(QAVFrame const&) const in libQtAVPlayer.a[2](qavplayer.cpp.o) LiveVideoPlayer::setVideoSink(QVideoSink*) in libbackend_APP.a[16](LiveVideoPlayer.o) "QAVPlayer::videoFrame(QAVVideoFrame const&)", referenced from: QAVPlayerPrivate::doPlayVideo()::$_1::operator()(QAVFrame const&) const in libQtAVPlayer.a[2](qavplayer.cpp.o) LiveVideoPlayer::setVideoSink(QVideoSink*) in libbackend_APP.a[16](LiveVideoPlayer.o) "QAVPlayer::stateChanged(QAVPlayer::State)", referenced from: QAVPlayerPrivate::setState(QAVPlayer::State) in libQtAVPlayer.a[2](qavplayer.cpp.o) "QAVPlayer::errorOccurred(QAVPlayer::Error, QString const&)", referenced from: QAVPlayerPrivate::setError(QAVPlayer::Error, QString const&) in libQtAVPlayer.a[2](qavplayer.cpp.o) "QAVPlayer::sourceChanged(QString const&)", referenced from: QAVPlayer::setSource(QString const&, QSharedPointer<QAVIODevice> const&) in libQtAVPlayer.a[2](qavplayer.cpp.o) "QAVPlayer::subtitleFrame(QAVSubtitleFrame const&)", referenced from: QAVPlayerPrivate::doPlaySubtitle()::$_3::operator()(QAVSubtitleFrame const&) const in libQtAVPlayer.a[2](qavplayer.cpp.o) "QAVPlayer::durationChanged(long long)", referenced from: QAVPlayerPrivate::setDuration(double) in libQtAVPlayer.a[2](qavplayer.cpp.o) "QAVPlayer::seekableChanged(bool)", referenced from: QAVPlayerPrivate::setSeekable(bool) in libQtAVPlayer.a[2](qavplayer.cpp.o) "QAVPlayer::staticMetaObject", referenced from: LiveVideoPlayer::setVideoSink(QVideoSink*) in libbackend_APP.a[16](LiveVideoPlayer.o) QtPrivate::MetaObjectForType<QAVPlayer*, void>::metaObjectFunction(QtPrivate::QMetaTypeInterface const*) in libbackend_APP.a[22](mocs_compilation.o) QMetaTypeIdQObject<QAVPlayer*, 8>::qt_metatype_id() in libbackend_APP.a[22](mocs_compilation.o) "QAVPlayer::mediaStatusChanged(QAVPlayer::MediaStatus)", referenced from: QAVPlayerPrivate::setMediaStatus(QAVPlayer::MediaStatus) in libQtAVPlayer.a[2](qavplayer.cpp.o) "QAVPlayer::videoFrameRateChanged(double)", referenced from: QAVPlayerPrivate::setVideoFrameRate(double) in libQtAVPlayer.a[2](qavplayer.cpp.o) "QAVPlayer::paused(long long)", referenced from: QAVPlayerPrivate::doStep(PendingMediaStatus, bool) in libQtAVPlayer.a[2](qavplayer.cpp.o) "QAVPlayer::played(long long)", referenced from: QAVPlayerPrivate::doStep(PendingMediaStatus, bool) in libQtAVPlayer.a[2](qavplayer.cpp.o) "QAVPlayer::seeked(long long)", referenced from: QAVPlayerPrivate::doStep(PendingMediaStatus, bool) in libQtAVPlayer.a[2](qavplayer.cpp.o) "QAVPlayer::stepped(long long)", referenced from: QAVPlayerPrivate::doStep(PendingMediaStatus, bool) in libQtAVPlayer.a[2](qavplayer.cpp.o) "QAVPlayer::stopped(long long)", referenced from: QAVPlayerPrivate::doStep(PendingMediaStatus, bool) in libQtAVPlayer.a[2](qavplayer.cpp.o) "vtable for QAVAudioOutput", referenced from: QAVAudioOutput::QAVAudioOutput(QObject*) in libQtAVPlayer.a[30](qavaudiooutput.cpp.o) QAVAudioOutput::~QAVAudioOutput() in libQtAVPlayer.a[30](qavaudiooutput.cpp.o) NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. "vtable for QAVAudioOutputDevice", referenced from: QAVAudioOutputDevice::QAVAudioOutputDevice(QObject*) in libQtAVPlayer.a[31](qavaudiooutputdevice.cpp.o) NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. "vtable for QAVPlayer", referenced from: QAVPlayer::QAVPlayer(QObject*) in libQtAVPlayer.a[2](qavplayer.cpp.o) NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
LiveVideoPlayer is my custom C++ code that worked fine so far. It is a thin wrapper to QtAvPlayer, URL to file code: https://pastebin.com/7HDErnd5
The text was updated successfully, but these errors were encountered: