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

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

Issue 23321004: capture a top java exception on certain Samsung devices (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 3 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
« no previous file with comments | « media/base/android/media_codec_bridge.h ('k') | media/base/android/media_decoder_job.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "media/base/android/media_codec_bridge.h" 5 #include "media/base/android/media_codec_bridge.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 #include <string> 8 #include <string>
9 9
10 #include "base/android/build_info.h" 10 #include "base/android/build_info.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 if (j_media_codec_.obj()) 104 if (j_media_codec_.obj())
105 Java_MediaCodecBridge_release(env, j_media_codec_.obj()); 105 Java_MediaCodecBridge_release(env, j_media_codec_.obj());
106 } 106 }
107 107
108 void MediaCodecBridge::StartInternal() { 108 void MediaCodecBridge::StartInternal() {
109 JNIEnv* env = AttachCurrentThread(); 109 JNIEnv* env = AttachCurrentThread();
110 Java_MediaCodecBridge_start(env, j_media_codec_.obj()); 110 Java_MediaCodecBridge_start(env, j_media_codec_.obj());
111 GetOutputBuffers(); 111 GetOutputBuffers();
112 } 112 }
113 113
114 void MediaCodecBridge::Reset() { 114 MediaCodecStatus MediaCodecBridge::Reset() {
115 JNIEnv* env = AttachCurrentThread(); 115 JNIEnv* env = AttachCurrentThread();
116 Java_MediaCodecBridge_flush(env, j_media_codec_.obj()); 116 return static_cast<MediaCodecStatus>(
117 Java_MediaCodecBridge_flush(env, j_media_codec_.obj()));
117 } 118 }
118 119
119 void MediaCodecBridge::Stop() { 120 void MediaCodecBridge::Stop() {
120 JNIEnv* env = AttachCurrentThread(); 121 JNIEnv* env = AttachCurrentThread();
121 Java_MediaCodecBridge_stop(env, j_media_codec_.obj()); 122 Java_MediaCodecBridge_stop(env, j_media_codec_.obj());
122 } 123 }
123 124
124 void MediaCodecBridge::GetOutputFormat(int* width, int* height) { 125 void MediaCodecBridge::GetOutputFormat(int* width, int* height) {
125 JNIEnv* env = AttachCurrentThread(); 126 JNIEnv* env = AttachCurrentThread();
126 127
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 VideoCodecBridge* VideoCodecBridge::Create(const VideoCodec codec) { 439 VideoCodecBridge* VideoCodecBridge::Create(const VideoCodec codec) {
439 const std::string mime = VideoCodecToMimeType(codec); 440 const std::string mime = VideoCodecToMimeType(codec);
440 return mime.empty() ? NULL : new VideoCodecBridge(mime); 441 return mime.empty() ? NULL : new VideoCodecBridge(mime);
441 } 442 }
442 443
443 bool MediaCodecBridge::RegisterMediaCodecBridge(JNIEnv* env) { 444 bool MediaCodecBridge::RegisterMediaCodecBridge(JNIEnv* env) {
444 return RegisterNativesImpl(env); 445 return RegisterNativesImpl(env);
445 } 446 }
446 447
447 } // namespace media 448 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/media_codec_bridge.h ('k') | media/base/android/media_decoder_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698