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

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

Issue 1357923002: wip Move SurfaceTexture.updateTexImage() from video renderers into MediaCodecVideoDecoder (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 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
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 JNIEnv* GetEnv(); 58 JNIEnv* GetEnv();
59 59
60 JavaVM *GetJVM(); 60 JavaVM *GetJVM();
61 61
62 // Return a |JNIEnv*| usable on this thread. Attaches to |g_jvm| if necessary. 62 // Return a |JNIEnv*| usable on this thread. Attaches to |g_jvm| if necessary.
63 JNIEnv* AttachCurrentThreadIfNeeded(); 63 JNIEnv* AttachCurrentThreadIfNeeded();
64 64
65 // Return a |jlong| that will correctly convert back to |ptr|. This is needed 65 // Return a |jlong| that will correctly convert back to |ptr|. This is needed
66 // because the alternative (of silently passing a 32-bit pointer to a vararg 66 // because the alternative (of silently passing a 32-bit pointer to a vararg
67 // function expecting a 64-bit param) picks up garbage in the high 32 bits. 67 // function expecting a 64-bit param) picks up garbage in the high 32 bits.
68 jlong jlongFromPointer(void* ptr); 68 jlong jlongFromPointer(const void* ptr);
69 69
70 // JNIEnv-helper methods that RTC_CHECK success: no Java exception thrown and 70 // JNIEnv-helper methods that RTC_CHECK success: no Java exception thrown and
71 // found object/class/method/field is non-null. 71 // found object/class/method/field is non-null.
72 jmethodID GetMethodID( 72 jmethodID GetMethodID(
73 JNIEnv* jni, jclass c, const std::string& name, const char* signature); 73 JNIEnv* jni, jclass c, const std::string& name, const char* signature);
74 74
75 jmethodID GetStaticMethodID( 75 jmethodID GetStaticMethodID(
76 JNIEnv* jni, jclass c, const char* name, const char* signature); 76 JNIEnv* jni, jclass c, const char* name, const char* signature);
77 77
78 jfieldID GetFieldID(JNIEnv* jni, jclass c, const char* name, 78 jfieldID GetFieldID(JNIEnv* jni, jclass c, const char* name,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 T operator*() const { 132 T operator*() const {
133 return obj_; 133 return obj_;
134 } 134 }
135 private: 135 private:
136 T obj_; 136 T obj_;
137 }; 137 };
138 138
139 } // namespace webrtc_jni 139 } // namespace webrtc_jni
140 140
141 #endif // TALK_APP_WEBRTC_JAVA_JNI_JNI_HELPERS_H_ 141 #endif // TALK_APP_WEBRTC_JAVA_JNI_JNI_HELPERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698