summaryrefslogtreecommitdiffstats
path: root/media/base/android/media_source_player.h
diff options
context:
space:
mode:
authorqinmin@chromium.org <qinmin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-14 01:15:36 +0000
committerqinmin@chromium.org <qinmin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-14 01:15:36 +0000
commit632feb65e15e2eaafe1885cb188e41339e6b9644 (patch)
treeb547b2bc3aa814fb47db5557334b713b8fc16040 /media/base/android/media_source_player.h
parentc99c5e1a66ff0d00408f94c679bc9cfa59dcfd1f (diff)
downloadchromium_src-632feb65e15e2eaafe1885cb188e41339e6b9644.zip
chromium_src-632feb65e15e2eaafe1885cb188e41339e6b9644.tar.gz
chromium_src-632feb65e15e2eaafe1885cb188e41339e6b9644.tar.bz2
This change adds VideoDecoderJob::Create() and AudioDecoderJob::Create() so that the decoder jobs can be NULL if we cannot configure it correctly.
It solves a problem that we may pass an invalid surface to the MediaCodec instance during the shut down phase. In this case, the Configure() will return false and we should not use the codec anymore. BUG=248726 R=acolwell@chromium.org, dwkang@chromium.org, wolenetz@chromium.org Review URL: https://codereview.chromium.org/16093045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206267 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/android/media_source_player.h')
-rw-r--r--media/base/android/media_source_player.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/media/base/android/media_source_player.h b/media/base/android/media_source_player.h
index 836482c..743a9e9 100644
--- a/media/base/android/media_source_player.h
+++ b/media/base/android/media_source_player.h
@@ -69,7 +69,9 @@ class MediaDecoderJob {
void OnDecodeCompleted();
protected:
- MediaDecoderJob(base::Thread* thread, bool is_audio);
+ MediaDecoderJob(base::Thread* thread,
+ MediaCodecBridge* media_codec_bridge,
+ bool is_audio);
// Release the output buffer and render it.
void ReleaseOutputBuffer(
@@ -257,6 +259,7 @@ class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid {
// Weak pointer passed to media decoder jobs for callbacks.
base::WeakPtrFactory<MediaSourcePlayer> weak_this_;
+ friend class MediaSourcePlayerTest;
DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer);
};