Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: media/base/android/media_codec_bridge.h

Issue 15822006: add error handling if MediaCodec fails to decode data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: don't report error on format change Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_ 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_
6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_ 6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 10 matching lines...) Expand all
21 // http://developer.android.com/reference/android/media/MediaCodec.html 21 // http://developer.android.com/reference/android/media/MediaCodec.html
22 // Note: MediaCodec is only available on JB and greater. 22 // Note: MediaCodec is only available on JB and greater.
23 // Use AudioCodecBridge or VideoCodecBridge to create an instance of this 23 // Use AudioCodecBridge or VideoCodecBridge to create an instance of this
24 // object. 24 // object.
25 class MEDIA_EXPORT MediaCodecBridge { 25 class MEDIA_EXPORT MediaCodecBridge {
26 public: 26 public:
27 enum DequeueBufferInfo { 27 enum DequeueBufferInfo {
28 INFO_OUTPUT_BUFFERS_CHANGED = -3, 28 INFO_OUTPUT_BUFFERS_CHANGED = -3,
29 INFO_OUTPUT_FORMAT_CHANGED = -2, 29 INFO_OUTPUT_FORMAT_CHANGED = -2,
30 INFO_TRY_AGAIN_LATER = -1, 30 INFO_TRY_AGAIN_LATER = -1,
31 INFO_MEDIA_CODEC_ERROR = -1000,
31 }; 32 };
32 33
33 static const base::TimeDelta kTimeOutInfinity; 34 static const base::TimeDelta kTimeOutInfinity;
34 static const base::TimeDelta kTimeOutNoWait; 35 static const base::TimeDelta kTimeOutNoWait;
35 36
36 // Returns true if MediaCodec is available on the device. 37 // Returns true if MediaCodec is available on the device.
37 static bool IsAvailable(); 38 static bool IsAvailable();
38 39
39 virtual ~MediaCodecBridge(); 40 virtual ~MediaCodecBridge();
40 41
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 const VideoCodec codec, const gfx::Size& size, jobject surface); 135 const VideoCodec codec, const gfx::Size& size, jobject surface);
135 136
136 private: 137 private:
137 explicit VideoCodecBridge(const char* mime); 138 explicit VideoCodecBridge(const char* mime);
138 }; 139 };
139 140
140 } // namespace media 141 } // namespace media
141 142
142 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_ 143 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_BRIDGE_H_
143 144
OLDNEW
« no previous file with comments | « media/base/android/java/src/org/chromium/media/MediaCodecBridge.java ('k') | media/base/android/media_source_player.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698