Running Extractdecodeeditencodemuxtest Outside Of Testcase On Android
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 E
Solution 1:
morelikely you need to run it in separate thread
publicstaticvoidrunTest(ExtractDecodeEditEncodeMuxTest test)throws Throwable {
test.setOutputFile();
TestWrapperwrapper=newTestWrapper(test);
Threadth=newThread(wrapper, "codec test");
th.start();
th.join();
if (wrapper.mThrowable != null) {
throw wrapper.mThrowable;
}
}
Solution 2:
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.
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.
Post a Comment for "Running Extractdecodeeditencodemuxtest Outside Of Testcase On Android"