Not able to send Raw Video Data

Description
I am trying to send the raw video data and following the reference guide:
[https://marketplace.zoom.us/docs/sdk/video/android/advanced/raw-data#send-raw-video](https://Send Raw Data). I have implemented the ZoomVideoSDKVideoSource inferface and also passed the video source instance to the ZoomVideoSDKSessionContext by setting the externalVideoSource property of parameters. But onInitialize callback function is never get called as written in the reference guide.

Which Android Video SDK version?
zoom-video-sdk-android-1.1.2

To Reproduce(If applicable)
Please refer the description

Smartphone (please complete the following information):

  • Xiaomi Pocophone F1
  • OS: Android 10

Hi @atamrakar, thanks for the post.

Can you please provide code snippets from your project showing how you are setting up the session and video source so that we can investigate why you are not receiving this callback?

Thanks!

Hi Jon,

I am not using Zoom video SDK in my project. I am still evaluating it for my use case.
I am using this sample project bundled with the downloaded video SDK “zoom-video-sdk-android-1.1.2/Sample&Libs/mobilertc-android”.

You can easily reproduce the issue by following the below steps:

  1. Paste below code in BaseSessionActivity class
ZoomVideoSDKVideoSource source = new ZoomVideoSDKVideoSource() {
    @Override
    public void onInitialize(ZoomVideoSDKVideoSender sender, List<ZoomVideoSDKVideoCapability> list, ZoomVideoSDKVideoCapability ZoomVideoSDKVideoCapability) {
            System.out.println("sender:" + sender); // This line is not called during initialization
    }

    @Override
    public void onPropertyChange(List<ZoomVideoSDKVideoCapability> list, ZoomVideoSDKVideoCapability ZoomVideoSDKVideoCapability) {

    }

    @Override
    public void onStartSend() {

    }

    @Override
    public void onStopSend() {

    }

    @Override
    public void onUninitialized() {

    }
};
  1. Set external video source
params.externalVideoSource = source;

Please let me know if you need more details.

Hi @atamrakar,

Thanks for the additional information. I am seeing the onInitialize callback invoked 100% of the time. Are you sure that the instance of ZoomVideoSDKSessionContext is the same one that is being used to create the session?

Thanks!

Hi Jon,

Thanks for the response. I have checked again ZoomVideoSDKSessionContext instance is same. In sample project BaseSessionActivity class creating the instance of ZoomVideoSDKSessionContext and I am using the Zoom sample project only.

Thanks.

Hi Jon,

Still issue is not resolved.
What changes do I need to do in Android sample project to send the raw video data?

Thanks!

Hi @atamrakar,

What steps are you taking in the sample app to try testing this? Are you certain that you are successfully joining a session when you aren’t seeing the callback?

Thanks!

Hi Jon,

I have taken the folliowng steps:

  • In sample app code I set external video source to sessionContext.externalVideoSource = new DummyVideoSource(); in BaseSessionActivity class. Mentioned same above.
  • Using 2 mobiles for testing. Create the session on first mobile and join the same session on other mobile.
  • Session is joined successfully and I can see 2 participants on both mobile.
  • But onInitialize callback is not called for any of the sample app.

Can you please let me know the changes that you have done in sample app to invoke the onInitialize callback of ZoomVideoSDKVideoSource.

Thanks

Hi @atamrakar,

What is the DummyVideoSource you are referencing? Is that any different from the anonymous inner class mentioned in your earlier replies? I have implemented the same code as your reply here and am able to see the callback. Can you provide a diff of your changes in the sample app so that I can check why we are seeing different behavior? (Note: please ensure that your developer credentials are not included in this diff)

Thanks!

Hi Jon,

I just moved the above anonymous inner class mentioned code to DummyVideoSource.
I have uncommented the below block in BaseSessionActivity and this was causing the problem.

Issue is fixed by commenting the below block and now I am getting the onInitialize callback.

        sessionContext.preProcessor= new ZoomVideoSDKVideoSourcePreProcessor() {
            @Override
            public void onPreProcessRawData(ZoomVideoSDKPreProcessRawData rawData) {
                Bitmap bitmap=BitmapFactory.decodeResource(getResources(),R.drawable.zm_watermark_sdk);
                WaterMarkData data=new WaterMarkData(bitmap.getWidth(),bitmap.getHeight(),YUVConvert.convertBitmapToYuv(bitmap));
                YUVConvert.addWaterMark(rawData,data,20,20,true);
            }
        };

I think you know the reason of this behaviour.

Thanks for your support.

That’s great to hear!

Please don’t hesitate to reach back out in a new topic if you run into any additional issues. :slightly_smiling_face:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.