How to enable the tunneled mode for ACodec in IMX.6 platform

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to enable the tunneled mode for ACodec in IMX.6 platform

1,432 Views
mumintsao
Contributor I

I found that the Android ACodec has two different configurations to decode video data from HW decoder(VPU):

1. Configuring TUNNELED video playback.

2. Configuring CPU controlled video playback.

We try to configure the HW decoder to operate under tunneled mode via ACodec.

The Android code base in our platform is  L5.0.0_1.0.0, and ACodec will pass the name "OMX.google.android.index.configureVideoTunnelMode" to get the extension index by "OMX_GetExtensionIndex" API.

But,  we got an error when we try to get extension index from VPU library:

01-01 19:38:15.442 E/OMXNodeInstance( 159): configureVideoTunnelMode extension is missing!
01-01 19:38:15.442 E/ACodec ( 159): configureVideoTunnelMode failed! (err -2147483648).
01-01 19:38:15.442 E/ACodec ( 159): configureTunneledVideoPlayback(0,0xb283cb08) failed!

1. Do we pass the wrong parameter to the VPU in IMX.6 platform?

2. How could we run the tunneled mode in IMX.6 VPU?

Labels (4)
Tags (3)
0 Kudos
2 Replies

790 Views
mumintsao
Contributor I

I forced to enable tunneled mode in Acodec, but the I.MX6 VPU library "FSLOMXWrapper::GetExtensionIndex

" function will return an error.

The modification of ACodec.cpp to force ACodec run under tunneled mode is as following below:

 

diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index deefda1..9d181e3 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -1324,6 +1324,23 @@ status_t ACodec::configureCodec(
sp<ANativeWindow> nativeWindow = windowWrapper->getNativeWindow();

int32_t tunneled;
+ ALOGI("Configuring TUNNELED video playback.");
+ mTunneled = true;
+
+ int32_t audioHwSync = 0;
+ if (!msg->findInt32("audio-hw-sync", &audioHwSync)) {
+ ALOGW("No Audio HW Sync provided for video tunnel");
+ }
+ err = configureTunneledVideoPlayback(audioHwSync, nativeWindow);
+ if (err != OK) {
+ ALOGE("configureTunneledVideoPlayback(%d,%p) failed!",
+ audioHwSync, nativeWindow.get());
+ return err;
+ }
+
+ inputFormat->setInt32("adaptive-playback", true);
+/*
+ int32_t tunneled;
if (msg->findInt32("feature-tunneled-playback", &tunneled) &&
tunneled != 0) {
ALOGI("Configuring TUNNELED video playback.");
@@ -1409,7 +1426,7 @@ status_t ACodec::configureCodec(
mFlags |= kFlagPushBlankBuffersToNativeWindowOnShutdown;
}
}
-
+*/
int32_t rotationDegrees;
if (msg->findInt32("rotation-degrees", &rotationDegrees)) {
mRotationDegrees = rotationDegrees;

Does anyone can help me to know how to run Android ACodec decoding under tunneled mode in I.MX6 platform? 

0 Kudos

790 Views
b36401
NXP Employee
NXP Employee

We have no examples for tunnelled video.
Sorry for the inconvenience.

Have a great day,
Victor

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos