mediaplayer.h msg=100的定義如下
enum media_event_type {
MEDIA_NOP = 0, // interface test message
MEDIA_PREPARED = 1,
MEDIA_PLAYBACK_COMPLETE = 2,
MEDIA_BUFFERING_UPDATE = 3,
MEDIA_SEEK_COMPLETE = 4,
MEDIA_SET_VIDEO_SIZE = 5,
MEDIA_STARTED = 6,
MEDIA_PAUSED = 7,
MEDIA_STOPPED = 8,
MEDIA_SKIPPED = 9,
MEDIA_TIMED_TEXT = 99,
MEDIA_ERROR = 100,
MEDIA_INFO = 200,
MEDIA_SUBTITLE_DATA = 201,
MEDIA_META_DATA = 202,
//RTK proprietary event types
MEDIA_SPEED_CHANGE = 20151010,
MEDIA_SEEK_RESULT = 20151011,
};
mediaplayer.cpp可以看到
case MEDIA_ERROR:
// Always log errors.
// ext1: Media framework error code.
// ext2: Implementation dependant error code.
ALOGE("error (%d, %d)", ext1, ext2);
mCurrentState = MEDIA_PLAYER_STATE_ERROR;
if (mPrepareSync)
{
ALOGV("signal application thread");
mPrepareSync = false;
mPrepareStatus = ext1;
mSignal.signal();
send = false;
}
break;
ext1=1則在mediaplayer.h
enum media_error_type {
// 0xx
MEDIA_ERROR_UNKNOWN = 1,
// 1xx
MEDIA_ERROR_SERVER_DIED = 100,
// 2xx
MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK = 200,
// 3xx
// <--- RTK ---
// -1xxx
/* File or network related operation errors. */
MEDIA_ERROR_IO = -1004,
/* Bitstream is not conforming to the related coding standard or file spec. */
MEDIA_ERROR_MALFORMED = -1007,
/* Bitstream is conforming to the related coding standard or file spec, but the media framework does not support the feature. */
MEDIA_ERROR_UNSUPPORTED = -1010,
/** Some operation takes too long to complete, usually more than 3-5 seconds. */
MEDIA_ERROR_TIMED_OUT = -110,
/* Video size exceed limitation */
MEDIA_ERROR_VIDEO_SIZE_EXCEED_LIMITATION = -1000,
/* Bitstream is not conforming to the related coding standard or file spec. */
MEDIA_ERROR_BITSTREAM_ERROR = -1001,
/* Fatal error with eror code */
MEDIA_ERROR_FATAL = -1002,
// --- RTK --- >
};
沒有留言:
張貼留言