API-Examples icon indicating copy to clipboard operation
API-Examples copied to clipboard

While integrating lib-raw-data in android the callback method of MediaPreprocessing class i.e. onCaptureVideoFrame, onPreEncodeVideoFrame or onRenderVideoFrame are not executed for getting video frame of LocalVideoStreaming

Open TriveniRajput opened this issue 3 years ago • 9 comments

TriveniRajput avatar Mar 16 '21 05:03 TriveniRajput

do you reproduce this issue by run the demo directly?

yoreland avatar Mar 19 '21 11:03 yoreland

@yoreland I have the same issue, raw-data doesn't work in demo app. It is working with agora 2.9.4 and old raw-data-api-java project in my own app.

Upon further investigation we saw that mediaEngine is null and part below isn't called consequently in .cpp We only changed joinChannel with the code below (we were getting APP ID invalid error with the original code) engine.joinChannel(null, channelId, null, 0);


    agora::util::AutoPtr<:media::imediaengine> mediaEngine;
    mediaEngine.queryInterface(rtcEngine, agora::INTERFACE_ID_TYPE::AGORA_IID_MEDIA_ENGINE);
    if (mediaEngine)
    {
         ////
    }

Jack29913 avatar Mar 24 '21 10:03 Jack29913

@Jack29913 it might be you failed to join the channel. has your project turned on token feature?

plutoless avatar Mar 24 '21 15:03 plutoless

@Jack29913 @TriveniRajput can you please check branch dev/android should be just fixed. c++ headers are updated to 3.3.1 version

yoreland avatar Mar 25 '21 05:03 yoreland

@yoreland yes i have directly run it from demo.. for this c++ headers are updated to 3.3.1 version I will check it.

TriveniRajput avatar Mar 25 '21 05:03 TriveniRajput

@plutoless no, after the modification both of the clients successfully joined the channel. we don't and won't use token feature. I will check the dev/android branch.

Jack29913 avatar Mar 25 '21 08:03 Jack29913

dev/android branch didn't fixed it either. I fixed it by specifying ndk version in my app, it looks like raw-data doesn't work with recent ndks. You should add ndk version in you app's gradle, like this:


android {
       compileSdkVersion 30
       ndkVersion '20.1.5948944'
       ///
    }

Jack29913 avatar Mar 25 '21 11:03 Jack29913

The fix just merged to master branch. My local ndk version is 21, we will do some ndk compatible test and add them to readme doc. Thanks for the information!

yoreland avatar Mar 27 '21 15:03 yoreland

@Jack29913 @yoreland Running into the same issue with version 3.3.1. How do I get the 2.9.4 version? Could you provide the commit id?

ashimneupane avatar May 12 '21 14:05 ashimneupane