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

Side by Side Diff: talk/app/webrtc/java/jni/androidmediacodeccommon.h

Issue 1178943007: Improve Android HW decoder error handling. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Alway clear message Q in Release() Created 5 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
« no previous file with comments | « no previous file | talk/app/webrtc/java/jni/androidmediadecoder_jni.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 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 // Return the (singleton) Java Enum object corresponding to |index|; 86 // Return the (singleton) Java Enum object corresponding to |index|;
87 // |state_class_fragment| is something like "MediaSource$State". 87 // |state_class_fragment| is something like "MediaSource$State".
88 static inline jobject JavaEnumFromIndex( 88 static inline jobject JavaEnumFromIndex(
89 JNIEnv* jni, const std::string& state_class_fragment, int index) { 89 JNIEnv* jni, const std::string& state_class_fragment, int index) {
90 const std::string state_class = "org/webrtc/" + state_class_fragment; 90 const std::string state_class = "org/webrtc/" + state_class_fragment;
91 return JavaEnumFromIndex(jni, FindClass(jni, state_class.c_str()), 91 return JavaEnumFromIndex(jni, FindClass(jni, state_class.c_str()),
92 state_class, index); 92 state_class, index);
93 } 93 }
94 94
95 // Checks for any Java exception, prints stack backtrace and clears
96 // currently thrown exception.
97 static inline bool CheckException(JNIEnv* jni) {
98 if (jni->ExceptionCheck()) {
99 ALOGE("Java JNI exception.");
100 jni->ExceptionDescribe();
101 jni->ExceptionClear();
102 return true;
103 }
104 return false;
105 }
106
95 } // namespace webrtc_jni 107 } // namespace webrtc_jni
96 108
97 #endif // TALK_APP_WEBRTC_JAVA_JNI_ANDROIDMEDIACODECCOMMON_H_ 109 #endif // TALK_APP_WEBRTC_JAVA_JNI_ANDROIDMEDIACODECCOMMON_H_
OLDNEW
« no previous file with comments | « no previous file | talk/app/webrtc/java/jni/androidmediadecoder_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698