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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

2,503 次查看
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?

标签 (4)
标记 (3)
0 项奖励
回复
2 回复数

1,861 次查看
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 项奖励
回复

1,861 次查看
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 项奖励
回复