wang-bin / mdk-sdk

multimedia development kit. download:
https://sourceforge.net/projects/mdk-sdk/files/
291 stars 33 forks source link

The video is not displayed when using QUdpSocket #196

Closed He11c0der closed 7 months ago

He11c0der commented 7 months ago

Hi I have a problem Previously, I did not use qudpsocket in my application and the method "bind" ( m_videoSocket->bind(QHostAddress::Any,port)) indicating the port to which the video stream is coming. Now that I initialized it, the video is not displayed in the QML element. Maybe the problem is that I declared the following in the constructor of the server class: m_player = new QMediaPlayer(this); m_videoBuffer.open(QIODevice::ReadWrite); m_videoStream.setDevice(&m_videoBuffer);

wang-bin commented 7 months ago

https://github.com/wang-bin/mdk-sdk/wiki/Troubleshooting#custom-io

He11c0der commented 7 months ago

Do I just have to do "Change mdk include path to mdk-sdk/include/abi and rebuild the project. ", after downloading mdk-sdk-abi and the video will be displayed and I can use QUdpSocket?

wang-bin commented 7 months ago

Do I just have to do "Change mdk include path to mdk-sdk/include/abi and rebuild the project. ", after downloading mdk-sdk-abi and the video will be displayed and I can use QUdpSocket?

yes. otherwise QIODevice support is disabled

He11c0der commented 7 months ago

I changed the path and now the Player class is not available to me.Maybe I originally configured the mdk-sdk the wrong way?

wang-bin commented 7 months ago

show me your build error

He11c0der commented 7 months ago

project-android\project\mdkplayer.h:7: error: 'mdk/Player.h' file not found I am using mdk-sdk-android [Version 0.23.1]

wang-bin commented 7 months ago

what's the build command? maybe include dir is wrong in the command

He11c0der commented 7 months ago

Let me tell you my procedure: I downloaded the archive from sourceforge; unzipped it to the mdk-sdk directory; changed INCLUDEPATH+= $$MDK_SDK/include to INCLUDEPATH += $$MDK_SDK/include/abi/mdk asd after that image

wang-bin commented 7 months ago

it's INCLUDEPATH += $$MDK_SDK/include/abi notINCLUDEPATH += $$MDK_SDK/include/abi/mdk

He11c0der commented 7 months ago

So there is no "Player" file in the mdk-abi-sdk archive image

wang-bin commented 7 months ago

build your QIODevice support code as a static(or shared) library with abi headers. Other code still use public headers