Merge "Add bucket that unknown state playback falls into" into mnc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d15e2c62e8
@@ -60,6 +60,7 @@ public class CodecTest {
|
|||||||
private static boolean onPrepareSuccess = false;
|
private static boolean onPrepareSuccess = false;
|
||||||
public static boolean onCompleteSuccess = false;
|
public static boolean onCompleteSuccess = false;
|
||||||
public static boolean mPlaybackError = false;
|
public static boolean mPlaybackError = false;
|
||||||
|
public static boolean mFailedToCompleteWithNoError = true;
|
||||||
public static int mMediaInfoUnknownCount = 0;
|
public static int mMediaInfoUnknownCount = 0;
|
||||||
public static int mMediaInfoVideoTrackLaggingCount = 0;
|
public static int mMediaInfoVideoTrackLaggingCount = 0;
|
||||||
public static int mMediaInfoBadInterleavingCount = 0;
|
public static int mMediaInfoBadInterleavingCount = 0;
|
||||||
@@ -801,6 +802,7 @@ public class CodecTest {
|
|||||||
mMediaInfoNotSeekableCount = 0;
|
mMediaInfoNotSeekableCount = 0;
|
||||||
mMediaInfoMetdataUpdateCount = 0;
|
mMediaInfoMetdataUpdateCount = 0;
|
||||||
mPlaybackError = false;
|
mPlaybackError = false;
|
||||||
|
mFailedToCompleteWithNoError = true;
|
||||||
String testResult;
|
String testResult;
|
||||||
|
|
||||||
initializeMessageLooper();
|
initializeMessageLooper();
|
||||||
@@ -843,6 +845,9 @@ public class CodecTest {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.v(TAG, "playMediaSamples:" + e.getMessage());
|
Log.v(TAG, "playMediaSamples:" + e.getMessage());
|
||||||
}
|
}
|
||||||
|
// Check if playback state is unknown (neither completed nor erroneous) unless
|
||||||
|
// it's not interrupted in the middle. If true, that is an exceptional case to investigate.
|
||||||
|
mFailedToCompleteWithNoError = !(onCompleteSuccess || mPlaybackError);
|
||||||
return onCompleteSuccess;
|
return onCompleteSuccess;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ public class MediaPlayerStressTest extends ActivityInstrumentationTestCase2<Medi
|
|||||||
private int mTotalBadInterleaving = 0;
|
private int mTotalBadInterleaving = 0;
|
||||||
private int mTotalNotSeekable = 0;
|
private int mTotalNotSeekable = 0;
|
||||||
private int mTotalMetaDataUpdate = 0;
|
private int mTotalMetaDataUpdate = 0;
|
||||||
|
private int mTotalFailedToCompleteWithNoError = 0;
|
||||||
|
|
||||||
//Test result output file
|
//Test result output file
|
||||||
private static final String PLAYBACK_RESULT = "PlaybackTestResult.txt";
|
private static final String PLAYBACK_RESULT = "PlaybackTestResult.txt";
|
||||||
@@ -78,6 +79,8 @@ public class MediaPlayerStressTest extends ActivityInstrumentationTestCase2<Medi
|
|||||||
output.write(" Bad Interleaving: " + CodecTest.mMediaInfoBadInterleavingCount);
|
output.write(" Bad Interleaving: " + CodecTest.mMediaInfoBadInterleavingCount);
|
||||||
output.write(" Not Seekable: " + CodecTest.mMediaInfoNotSeekableCount);
|
output.write(" Not Seekable: " + CodecTest.mMediaInfoNotSeekableCount);
|
||||||
output.write(" Info Meta data update: " + CodecTest.mMediaInfoMetdataUpdateCount);
|
output.write(" Info Meta data update: " + CodecTest.mMediaInfoMetdataUpdateCount);
|
||||||
|
output.write(" Failed To Complete With No Error: " +
|
||||||
|
CodecTest.mFailedToCompleteWithNoError);
|
||||||
output.write("\n");
|
output.write("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,16 +93,21 @@ public class MediaPlayerStressTest extends ActivityInstrumentationTestCase2<Medi
|
|||||||
output.write("Total Bad Interleaving: " + mTotalBadInterleaving + "\n");
|
output.write("Total Bad Interleaving: " + mTotalBadInterleaving + "\n");
|
||||||
output.write("Total Not Seekable: " + mTotalNotSeekable + "\n");
|
output.write("Total Not Seekable: " + mTotalNotSeekable + "\n");
|
||||||
output.write("Total Info Meta data update: " + mTotalMetaDataUpdate + "\n");
|
output.write("Total Info Meta data update: " + mTotalMetaDataUpdate + "\n");
|
||||||
|
output.write("Total Failed To Complete With No Error: " +
|
||||||
|
mTotalFailedToCompleteWithNoError);
|
||||||
output.write("\n");
|
output.write("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateTestResult(){
|
private void updateTestResult(){
|
||||||
if (CodecTest.onCompleteSuccess){
|
if (CodecTest.onCompleteSuccess) {
|
||||||
mTotalComplete++;
|
mTotalComplete++;
|
||||||
}
|
}
|
||||||
else if (CodecTest.mPlaybackError){
|
else if (CodecTest.mPlaybackError) {
|
||||||
mTotalPlaybackError++;
|
mTotalPlaybackError++;
|
||||||
}
|
}
|
||||||
|
else if (CodecTest.mFailedToCompleteWithNoError) {
|
||||||
|
mTotalFailedToCompleteWithNoError++;
|
||||||
|
}
|
||||||
mTotalInfoUnknown += CodecTest.mMediaInfoUnknownCount;
|
mTotalInfoUnknown += CodecTest.mMediaInfoUnknownCount;
|
||||||
mTotalVideoTrackLagging += CodecTest.mMediaInfoVideoTrackLaggingCount;
|
mTotalVideoTrackLagging += CodecTest.mMediaInfoVideoTrackLaggingCount;
|
||||||
mTotalBadInterleaving += CodecTest.mMediaInfoBadInterleavingCount;
|
mTotalBadInterleaving += CodecTest.mMediaInfoBadInterleavingCount;
|
||||||
|
|||||||
Reference in New Issue
Block a user