Loading media/libmedia/IMediaPlayer.cpp +15 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ enum { GET_CURRENT_POSITION, GET_DURATION, RESET, NOTIFY_AT, SET_AUDIO_STREAM_TYPE, SET_LOOPING, SET_VOLUME, Loading Loading @@ -328,6 +329,15 @@ public: return reply.readInt32(); } status_t notifyAt(int64_t mediaTimeUs) { Parcel data, reply; data.writeInterfaceToken(IMediaPlayer::getInterfaceDescriptor()); data.writeInt64(mediaTimeUs); remote()->transact(NOTIFY_AT, data, &reply); return reply.readInt32(); } status_t setAudioStreamType(audio_stream_type_t stream) { Parcel data, reply; Loading Loading @@ -746,6 +756,11 @@ status_t BnMediaPlayer::onTransact( reply->writeInt32(reset()); return NO_ERROR; } break; case NOTIFY_AT: { CHECK_INTERFACE(IMediaPlayer, data, reply); reply->writeInt32(notifyAt(data.readInt64())); return NO_ERROR; } break; case SET_AUDIO_STREAM_TYPE: { CHECK_INTERFACE(IMediaPlayer, data, reply); reply->writeInt32(setAudioStreamType((audio_stream_type_t) data.readInt32())); Loading media/libmedia/include/media/IMediaPlayer.h +1 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ public: MediaPlayerSeekMode mode = MediaPlayerSeekMode::SEEK_PREVIOUS_SYNC) = 0; virtual status_t getCurrentPosition(int* msec) = 0; virtual status_t getDuration(int* msec) = 0; virtual status_t notifyAt(int64_t mediaTimeUs) = 0; virtual status_t reset() = 0; virtual status_t setAudioStreamType(audio_stream_type_t type) = 0; virtual status_t setLooping(int loop) = 0; Loading media/libmedia/include/media/mediaplayer.h +2 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ enum media_event_type { MEDIA_PAUSED = 7, MEDIA_STOPPED = 8, MEDIA_SKIPPED = 9, MEDIA_NOTIFY_TIME = 98, MEDIA_TIMED_TEXT = 99, MEDIA_ERROR = 100, MEDIA_INFO = 200, Loading Loading @@ -245,6 +246,7 @@ public: status_t seekTo( int msec, MediaPlayerSeekMode mode = MediaPlayerSeekMode::SEEK_PREVIOUS_SYNC); status_t notifyAt(int64_t mediaTimeUs); status_t getCurrentPosition(int *msec); status_t getDuration(int *msec); status_t reset(); Loading media/libmedia/mediaplayer.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -610,6 +610,15 @@ status_t MediaPlayer::seekTo(int msec, MediaPlayerSeekMode mode) return result; } status_t MediaPlayer::notifyAt(int64_t mediaTimeUs) { Mutex::Autolock _l(mLock); if (mPlayer != 0) { return mPlayer->notifyAt(mediaTimeUs); } return INVALID_OPERATION; } status_t MediaPlayer::reset_l() { mLoop = false; Loading Loading @@ -950,6 +959,9 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) mVideoWidth = ext1; mVideoHeight = ext2; break; case MEDIA_NOTIFY_TIME: ALOGV("Received notify time message"); break; case MEDIA_TIMED_TEXT: ALOGV("Received timed text message"); break; Loading media/libmediaplayerservice/MediaPlayerService.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -1269,6 +1269,14 @@ status_t MediaPlayerService::Client::reset() return p->reset(); } status_t MediaPlayerService::Client::notifyAt(int64_t mediaTimeUs) { ALOGV("[%d] notifyAt(%lld)", mConnId, (long long)mediaTimeUs); sp<MediaPlayerBase> p = getPlayer(); if (p == 0) return UNKNOWN_ERROR; return p->notifyAt(mediaTimeUs); } status_t MediaPlayerService::Client::setAudioStreamType(audio_stream_type_t type) { ALOGV("[%d] setAudioStreamType(%d)", mConnId, type); Loading Loading
media/libmedia/IMediaPlayer.cpp +15 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ enum { GET_CURRENT_POSITION, GET_DURATION, RESET, NOTIFY_AT, SET_AUDIO_STREAM_TYPE, SET_LOOPING, SET_VOLUME, Loading Loading @@ -328,6 +329,15 @@ public: return reply.readInt32(); } status_t notifyAt(int64_t mediaTimeUs) { Parcel data, reply; data.writeInterfaceToken(IMediaPlayer::getInterfaceDescriptor()); data.writeInt64(mediaTimeUs); remote()->transact(NOTIFY_AT, data, &reply); return reply.readInt32(); } status_t setAudioStreamType(audio_stream_type_t stream) { Parcel data, reply; Loading Loading @@ -746,6 +756,11 @@ status_t BnMediaPlayer::onTransact( reply->writeInt32(reset()); return NO_ERROR; } break; case NOTIFY_AT: { CHECK_INTERFACE(IMediaPlayer, data, reply); reply->writeInt32(notifyAt(data.readInt64())); return NO_ERROR; } break; case SET_AUDIO_STREAM_TYPE: { CHECK_INTERFACE(IMediaPlayer, data, reply); reply->writeInt32(setAudioStreamType((audio_stream_type_t) data.readInt32())); Loading
media/libmedia/include/media/IMediaPlayer.h +1 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ public: MediaPlayerSeekMode mode = MediaPlayerSeekMode::SEEK_PREVIOUS_SYNC) = 0; virtual status_t getCurrentPosition(int* msec) = 0; virtual status_t getDuration(int* msec) = 0; virtual status_t notifyAt(int64_t mediaTimeUs) = 0; virtual status_t reset() = 0; virtual status_t setAudioStreamType(audio_stream_type_t type) = 0; virtual status_t setLooping(int loop) = 0; Loading
media/libmedia/include/media/mediaplayer.h +2 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ enum media_event_type { MEDIA_PAUSED = 7, MEDIA_STOPPED = 8, MEDIA_SKIPPED = 9, MEDIA_NOTIFY_TIME = 98, MEDIA_TIMED_TEXT = 99, MEDIA_ERROR = 100, MEDIA_INFO = 200, Loading Loading @@ -245,6 +246,7 @@ public: status_t seekTo( int msec, MediaPlayerSeekMode mode = MediaPlayerSeekMode::SEEK_PREVIOUS_SYNC); status_t notifyAt(int64_t mediaTimeUs); status_t getCurrentPosition(int *msec); status_t getDuration(int *msec); status_t reset(); Loading
media/libmedia/mediaplayer.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -610,6 +610,15 @@ status_t MediaPlayer::seekTo(int msec, MediaPlayerSeekMode mode) return result; } status_t MediaPlayer::notifyAt(int64_t mediaTimeUs) { Mutex::Autolock _l(mLock); if (mPlayer != 0) { return mPlayer->notifyAt(mediaTimeUs); } return INVALID_OPERATION; } status_t MediaPlayer::reset_l() { mLoop = false; Loading Loading @@ -950,6 +959,9 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj) mVideoWidth = ext1; mVideoHeight = ext2; break; case MEDIA_NOTIFY_TIME: ALOGV("Received notify time message"); break; case MEDIA_TIMED_TEXT: ALOGV("Received timed text message"); break; Loading
media/libmediaplayerservice/MediaPlayerService.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -1269,6 +1269,14 @@ status_t MediaPlayerService::Client::reset() return p->reset(); } status_t MediaPlayerService::Client::notifyAt(int64_t mediaTimeUs) { ALOGV("[%d] notifyAt(%lld)", mConnId, (long long)mediaTimeUs); sp<MediaPlayerBase> p = getPlayer(); if (p == 0) return UNKNOWN_ERROR; return p->notifyAt(mediaTimeUs); } status_t MediaPlayerService::Client::setAudioStreamType(audio_stream_type_t type) { ALOGV("[%d] setAudioStreamType(%d)", mConnId, type); Loading