Loading media/libmediaplayerservice/nuplayer/NuPlayer.cpp +4 −0 Original line number Original line Diff line number Diff line Loading @@ -145,6 +145,7 @@ private: NuPlayer::NuPlayer() NuPlayer::NuPlayer() : mUIDValid(false), : mUIDValid(false), mSourceFlags(0), mSourceFlags(0), mCurrentPositionUs(0), mVideoIsAVC(false), mVideoIsAVC(false), mOffloadAudio(false), mOffloadAudio(false), mCurrentOffloadInfo(AUDIO_INFO_INITIALIZER), mCurrentOffloadInfo(AUDIO_INFO_INITIALIZER), Loading Loading @@ -540,6 +541,8 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { static_cast<NativeWindowWrapper *>(obj.get()))); static_cast<NativeWindowWrapper *>(obj.get()))); if (obj != NULL) { if (obj != NULL) { mDeferredActions.push_back(new SeekAction(mCurrentPositionUs)); // If there is a new surface texture, instantiate decoders // If there is a new surface texture, instantiate decoders // again if possible. // again if possible. mDeferredActions.push_back( mDeferredActions.push_back( Loading Loading @@ -860,6 +863,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { } else if (what == Renderer::kWhatPosition) { } else if (what == Renderer::kWhatPosition) { int64_t positionUs; int64_t positionUs; CHECK(msg->findInt64("positionUs", &positionUs)); CHECK(msg->findInt64("positionUs", &positionUs)); mCurrentPositionUs = positionUs; CHECK(msg->findInt64("videoLateByUs", &mVideoLateByUs)); CHECK(msg->findInt64("videoLateByUs", &mVideoLateByUs)); Loading media/libmediaplayerservice/nuplayer/NuPlayer.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -121,6 +121,7 @@ private: sp<Source> mSource; sp<Source> mSource; uint32_t mSourceFlags; uint32_t mSourceFlags; sp<NativeWindowWrapper> mNativeWindow; sp<NativeWindowWrapper> mNativeWindow; int64_t mCurrentPositionUs; sp<MediaPlayerBase::AudioSink> mAudioSink; sp<MediaPlayerBase::AudioSink> mAudioSink; sp<Decoder> mVideoDecoder; sp<Decoder> mVideoDecoder; bool mVideoIsAVC; bool mVideoIsAVC; Loading Loading
media/libmediaplayerservice/nuplayer/NuPlayer.cpp +4 −0 Original line number Original line Diff line number Diff line Loading @@ -145,6 +145,7 @@ private: NuPlayer::NuPlayer() NuPlayer::NuPlayer() : mUIDValid(false), : mUIDValid(false), mSourceFlags(0), mSourceFlags(0), mCurrentPositionUs(0), mVideoIsAVC(false), mVideoIsAVC(false), mOffloadAudio(false), mOffloadAudio(false), mCurrentOffloadInfo(AUDIO_INFO_INITIALIZER), mCurrentOffloadInfo(AUDIO_INFO_INITIALIZER), Loading Loading @@ -540,6 +541,8 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { static_cast<NativeWindowWrapper *>(obj.get()))); static_cast<NativeWindowWrapper *>(obj.get()))); if (obj != NULL) { if (obj != NULL) { mDeferredActions.push_back(new SeekAction(mCurrentPositionUs)); // If there is a new surface texture, instantiate decoders // If there is a new surface texture, instantiate decoders // again if possible. // again if possible. mDeferredActions.push_back( mDeferredActions.push_back( Loading Loading @@ -860,6 +863,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { } else if (what == Renderer::kWhatPosition) { } else if (what == Renderer::kWhatPosition) { int64_t positionUs; int64_t positionUs; CHECK(msg->findInt64("positionUs", &positionUs)); CHECK(msg->findInt64("positionUs", &positionUs)); mCurrentPositionUs = positionUs; CHECK(msg->findInt64("videoLateByUs", &mVideoLateByUs)); CHECK(msg->findInt64("videoLateByUs", &mVideoLateByUs)); Loading
media/libmediaplayerservice/nuplayer/NuPlayer.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -121,6 +121,7 @@ private: sp<Source> mSource; sp<Source> mSource; uint32_t mSourceFlags; uint32_t mSourceFlags; sp<NativeWindowWrapper> mNativeWindow; sp<NativeWindowWrapper> mNativeWindow; int64_t mCurrentPositionUs; sp<MediaPlayerBase::AudioSink> mAudioSink; sp<MediaPlayerBase::AudioSink> mAudioSink; sp<Decoder> mVideoDecoder; sp<Decoder> mVideoDecoder; bool mVideoIsAVC; bool mVideoIsAVC; Loading