运行ExtractDe codeEditEn codeMuxTest测试用例之外在Android [英] Running ExtractDecodeEditEncodeMuxTest outside of testcase on Android

查看:1146
本文介绍了运行ExtractDe codeEditEn codeMuxTest测试用例之外在Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将功能添加到提取,德code,编辑,连接code和MUX在Android上的视频。所以,我发现了一些非常有用的实现,这就是Android CTS <一个组成部分href=\"https://android.googlesource.com/platform/cts/+/jb-mr2-release/tests/tests/media/src/android/media/cts/ExtractDe$c$cEditEn$c$cMuxTest.java\"相对=nofollow称号=ExtractDe codeEditEn codeMuxTest> ExtractDe codeEditEn codeMuxTest 。不幸的是,如果它是作为测试用例的一部分执行的code才有效。我试图从一个正常的活动执行,并得到:

I am trying to add functionality to extract, decode, edit, encode and mux a video on Android. Therefore, I found some very useful implementation, which is part of the Android CTS ExtractDecodeEditEncodeMuxTest. Unfortunately, the code only works if it is executed as part of the testcase. I tried to execute it from a normal activity and get:

E / ExtractDe codeEditEn codeMuxTest(18781):java.lang.IllegalStateException:
  无法停止复用器

E/ExtractDecodeEditEncodeMuxTest (18781): java.lang.IllegalStateException: Failed to stop the muxer

W / System.err的(18781):了java.lang.RuntimeException:
  面框等待超时
  W / System.err的(18781):在... OutputSurface.awaitNewImage(OutputSurface.java:216)

W/System.err(18781): java.lang.RuntimeException: Surface frame wait timed out W/System.err(18781): at ...OutputSurface.awaitNewImage(OutputSurface.java:216)

任何想法,为什么输出表面没有收到帧?

Any ideas, why the output surface does not receive the frames?

更新:
下面是用于工作测试用例和非工作执行的日志文件。在code这两个是完全一样的。唯一的区别是,工作的是一个AndroidTestCase,另一个是在IntentService内运行的应用程序

UPDATE: Here are the log files for the working test case and the non-working implementation. The code for both is exactly the same. The only difference is that the working one is an AndroidTestCase and the other one is running in the application within an IntentService.

看来,整个事情停止后约6帧提取和解码。任何想法?

It seems that the whole thing stops extracting and decoding after about 6 frames. Any ideas?

工作测试用例Logoutput

非工作日志输出

推荐答案

感谢对法登,我是能够解决这个问题。我使用意向的服务现在开始不弯有一个线程,工作正常。

Thank's to fadden, I was able to resolve this issue. I am using an intent service now and start a thread without looper there, which works fine.

有关在Android服务运行code,这意味着该包装线必须从自定义线程启动。启动一个线程中的一个线程可能不是最好的解决办法,但它实际上解决了这个问题。

For running the code in an Android service, this means that the wrapping thread has to be started from a custom thread. Starting a thread within a thread is probably not the very best solution, but it actually solves the problem.

这篇关于运行ExtractDe codeEditEn codeMuxTest测试用例之外在Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆