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

Side by Side Diff: talk/app/webrtc/java/jni/peerconnection_jni.cc

Issue 1535943004: Multi-networking with Android L. Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years 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 | « talk/app/webrtc/java/jni/jni_helpers.cc ('k') | webrtc/base/asyncpacketsocket.h » ('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 2013 Google Inc. 3 * Copyright 2013 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 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 MediaCodecVideoDecoderFactory* decoder_factory = 1404 MediaCodecVideoDecoderFactory* decoder_factory =
1405 static_cast<MediaCodecVideoDecoderFactory*> 1405 static_cast<MediaCodecVideoDecoderFactory*>
1406 (owned_factory->decoder_factory()); 1406 (owned_factory->decoder_factory());
1407 if (decoder_factory) { 1407 if (decoder_factory) {
1408 LOG(LS_INFO) << "Set EGL context for HW decoding."; 1408 LOG(LS_INFO) << "Set EGL context for HW decoding.";
1409 decoder_factory->SetEGLContext(jni, remote_eglbase_context); 1409 decoder_factory->SetEGLContext(jni, remote_eglbase_context);
1410 } 1410 }
1411 #endif 1411 #endif
1412 } 1412 }
1413 1413
1414 static std::string
1415 GetJavaEnumName(JNIEnv* jni, const std::string& className, jobject j_enum) {
1416 jclass enumClass = FindClass(jni, className.c_str());
1417 jmethodID nameMethod =
1418 GetMethodID(jni, enumClass, "name", "()Ljava/lang/String;");
1419 jstring name =
1420 reinterpret_cast<jstring>(jni->CallObjectMethod(j_enum, nameMethod));
1421 CHECK_EXCEPTION(jni) << "error during CallObjectMethod for "
1422 << className << ".name";
1423 return JavaToStdString(jni, name);
1424 }
1425
1426 static PeerConnectionInterface::IceTransportsType 1414 static PeerConnectionInterface::IceTransportsType
1427 JavaIceTransportsTypeToNativeType(JNIEnv* jni, jobject j_ice_transports_type) { 1415 JavaIceTransportsTypeToNativeType(JNIEnv* jni, jobject j_ice_transports_type) {
1428 std::string enum_name = GetJavaEnumName( 1416 std::string enum_name = GetJavaEnumName(
1429 jni, "org/webrtc/PeerConnection$IceTransportsType", 1417 jni, "org/webrtc/PeerConnection$IceTransportsType",
1430 j_ice_transports_type); 1418 j_ice_transports_type);
1431 1419
1432 if (enum_name == "ALL") 1420 if (enum_name == "ALL")
1433 return PeerConnectionInterface::kAll; 1421 return PeerConnectionInterface::kAll;
1434 1422
1435 if (enum_name == "RELAY") 1423 if (enum_name == "RELAY")
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
2184 return JavaStringFromStdString( 2172 return JavaStringFromStdString(
2185 jni, 2173 jni,
2186 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id()); 2174 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id());
2187 } 2175 }
2188 2176
2189 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) { 2177 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) {
2190 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release(); 2178 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release();
2191 } 2179 }
2192 2180
2193 } // namespace webrtc_jni 2181 } // namespace webrtc_jni
OLDNEW
« no previous file with comments | « talk/app/webrtc/java/jni/jni_helpers.cc ('k') | webrtc/base/asyncpacketsocket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698