Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2013 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 54 #include "webrtc/base/checks.h" | 54 #include "webrtc/base/checks.h" |
| 55 #include "webrtc/base/event_tracer.h" | 55 #include "webrtc/base/event_tracer.h" |
| 56 #include "webrtc/base/logging.h" | 56 #include "webrtc/base/logging.h" |
| 57 #include "webrtc/base/logsinks.h" | 57 #include "webrtc/base/logsinks.h" |
| 58 #include "webrtc/base/messagequeue.h" | 58 #include "webrtc/base/messagequeue.h" |
| 59 #include "webrtc/base/networkmonitor.h" | 59 #include "webrtc/base/networkmonitor.h" |
| 60 #include "webrtc/base/rtccertificategenerator.h" | 60 #include "webrtc/base/rtccertificategenerator.h" |
| 61 #include "webrtc/base/ssladapter.h" | 61 #include "webrtc/base/ssladapter.h" |
| 62 #include "webrtc/base/stringutils.h" | 62 #include "webrtc/base/stringutils.h" |
| 63 #include "webrtc/media/base/videocapturer.h" | 63 #include "webrtc/media/base/videocapturer.h" |
| 64 #include "webrtc/media/engine/webrtcvideodecoderfactory.h" | 64 |
| 65 #include "webrtc/media/engine/webrtcvideoencoderfactory.h" | 65 // Adding 'nogncheck' to disable the gn include header check. We don't want to |
| 66 // depend on audio and video related targets when build the datachannel only | |
| 67 // targets. | |
| 68 #if defined(HAVE_WEBRTC_VOICE) && defined(HAVE_WEBRTC_VIDEO) | |
|
Taylor Brandstetter
2017/05/11 04:43:11
I won't comment for each one, but the #ifdefs in t
sakal
2017/05/11 11:06:12
Do we really need both voice and video for all of
Zhi Huang
2017/05/12 20:05:33
Not really.
Zhi Huang
2017/05/12 20:05:34
Done.
I was being lazy and just replaced all the
| |
| 69 #include "webrtc/media/engine/webrtcvideodecoderfactory.h" // nogncheck | |
| 70 #include "webrtc/media/engine/webrtcvideoencoderfactory.h" // nogncheck | |
| 71 #endif | |
| 72 | |
| 66 #include "webrtc/modules/utility/include/jvm_android.h" | 73 #include "webrtc/modules/utility/include/jvm_android.h" |
| 67 #include "webrtc/system_wrappers/include/field_trial.h" | 74 #include "webrtc/system_wrappers/include/field_trial.h" |
| 68 #include "webrtc/pc/webrtcsdp.h" | 75 #include "webrtc/pc/webrtcsdp.h" |
| 69 #include "webrtc/sdk/android/src/jni/androidmediadecoder_jni.h" | 76 |
| 70 #include "webrtc/sdk/android/src/jni/androidmediaencoder_jni.h" | 77 #if defined(HAVE_WEBRTC_VOICE) && defined(HAVE_WEBRTC_VIDEO) |
| 78 #include "webrtc/sdk/android/src/jni/androidmediadecoder_jni.h" // nogncheck | |
| 79 #include "webrtc/sdk/android/src/jni/androidmediaencoder_jni.h" // nogncheck | |
| 80 #endif | |
| 81 | |
| 71 #include "webrtc/sdk/android/src/jni/androidnetworkmonitor_jni.h" | 82 #include "webrtc/sdk/android/src/jni/androidnetworkmonitor_jni.h" |
| 72 #include "webrtc/sdk/android/src/jni/androidvideotracksource.h" | 83 |
| 84 #if defined(HAVE_WEBRTC_VOICE) && defined(HAVE_WEBRTC_VIDEO) | |
| 85 #include "webrtc/sdk/android/src/jni/androidvideotracksource.h" // nogncheck | |
| 86 #endif | |
| 87 | |
| 73 #include "webrtc/sdk/android/src/jni/classreferenceholder.h" | 88 #include "webrtc/sdk/android/src/jni/classreferenceholder.h" |
| 74 #include "webrtc/sdk/android/src/jni/jni_helpers.h" | 89 #include "webrtc/sdk/android/src/jni/jni_helpers.h" |
| 75 #include "webrtc/sdk/android/src/jni/native_handle_impl.h" | 90 |
| 91 #if defined(HAVE_WEBRTC_VOICE) && defined(HAVE_WEBRTC_VIDEO) | |
| 92 #include "webrtc/sdk/android/src/jni/native_handle_impl.h" // nogncheck | |
| 93 #endif | |
| 94 | |
| 76 #include "webrtc/sdk/android/src/jni/rtcstatscollectorcallbackwrapper.h" | 95 #include "webrtc/sdk/android/src/jni/rtcstatscollectorcallbackwrapper.h" |
| 77 // Adding 'nogncheck' to disable the gn include headers check. | 96 // Adding 'nogncheck' to disable the gn include headers check. |
| 78 // We don't want to depend on 'system_wrappers:field_trial_default' because | 97 // We don't want to depend on 'system_wrappers:field_trial_default' because |
| 79 // clients should be able to provide their own implementation. | 98 // clients should be able to provide their own implementation. |
| 80 #include "webrtc/system_wrappers/include/field_trial_default.h" // nogncheck | 99 #include "webrtc/system_wrappers/include/field_trial_default.h" // nogncheck |
| 81 #include "webrtc/system_wrappers/include/logcat_trace_context.h" | 100 #include "webrtc/system_wrappers/include/logcat_trace_context.h" |
| 82 #include "webrtc/system_wrappers/include/trace.h" | 101 #include "webrtc/system_wrappers/include/trace.h" |
| 83 #include "webrtc/voice_engine/include/voe_base.h" | 102 #include "webrtc/voice_engine/include/voe_base.h" // nogncheck |
| 84 | 103 |
| 85 using cricket::WebRtcVideoDecoderFactory; | 104 using cricket::WebRtcVideoDecoderFactory; |
| 86 using cricket::WebRtcVideoEncoderFactory; | 105 using cricket::WebRtcVideoEncoderFactory; |
| 87 using rtc::Bind; | 106 using rtc::Bind; |
| 88 using rtc::Thread; | 107 using rtc::Thread; |
| 89 using rtc::ThreadManager; | 108 using rtc::ThreadManager; |
| 90 using webrtc::AudioSourceInterface; | 109 using webrtc::AudioSourceInterface; |
| 91 using webrtc::AudioTrackInterface; | 110 using webrtc::AudioTrackInterface; |
| 92 using webrtc::AudioTrackVector; | 111 using webrtc::AudioTrackVector; |
| 93 using webrtc::CreateSessionDescriptionObserver; | 112 using webrtc::CreateSessionDescriptionObserver; |
| (...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 913 jni()->SetObjectArrayElement(planes, 2, v_buffer); | 932 jni()->SetObjectArrayElement(planes, 2, v_buffer); |
| 914 return jni()->NewObject( | 933 return jni()->NewObject( |
| 915 *j_frame_class_, j_i420_frame_ctor_id_, | 934 *j_frame_class_, j_i420_frame_ctor_id_, |
| 916 frame->width(), frame->height(), | 935 frame->width(), frame->height(), |
| 917 static_cast<int>(frame->rotation()), | 936 static_cast<int>(frame->rotation()), |
| 918 strides, planes, javaShallowCopy(frame)); | 937 strides, planes, javaShallowCopy(frame)); |
| 919 } | 938 } |
| 920 | 939 |
| 921 // Return a VideoRenderer.I420Frame referring texture object in |frame|. | 940 // Return a VideoRenderer.I420Frame referring texture object in |frame|. |
| 922 jobject CricketToJavaTextureFrame(const webrtc::VideoFrame* frame) { | 941 jobject CricketToJavaTextureFrame(const webrtc::VideoFrame* frame) { |
| 942 #if defined(HAVE_WEBRTC_VOICE) && defined(HAVE_WEBRTC_VIDEO) | |
| 923 NativeHandleImpl* handle = reinterpret_cast<NativeHandleImpl*>( | 943 NativeHandleImpl* handle = reinterpret_cast<NativeHandleImpl*>( |
| 924 frame->video_frame_buffer()->native_handle()); | 944 frame->video_frame_buffer()->native_handle()); |
| 925 jfloatArray sampling_matrix = handle->sampling_matrix.ToJava(jni()); | 945 jfloatArray sampling_matrix = handle->sampling_matrix.ToJava(jni()); |
| 926 | |
| 927 return jni()->NewObject( | 946 return jni()->NewObject( |
| 928 *j_frame_class_, j_texture_frame_ctor_id_, | 947 *j_frame_class_, j_texture_frame_ctor_id_, frame->width(), |
| 929 frame->width(), frame->height(), | 948 frame->height(), static_cast<int>(frame->rotation()), |
| 930 static_cast<int>(frame->rotation()), | |
| 931 handle->oes_texture_id, sampling_matrix, javaShallowCopy(frame)); | 949 handle->oes_texture_id, sampling_matrix, javaShallowCopy(frame)); |
| 950 #else | |
| 951 jint texture_id = 0; | |
| 952 return jni()->NewObject(*j_frame_class_, j_texture_frame_ctor_id_, | |
| 953 frame->width(), frame->height(), | |
| 954 static_cast<int>(frame->rotation()), texture_id, | |
| 955 jni()->NewFloatArray(16), javaShallowCopy(frame)); | |
| 956 #endif | |
| 932 } | 957 } |
| 933 | 958 |
| 934 JNIEnv* jni() { | 959 JNIEnv* jni() { |
| 935 return AttachCurrentThreadIfNeeded(); | 960 return AttachCurrentThreadIfNeeded(); |
| 936 } | 961 } |
| 937 | 962 |
| 938 ScopedGlobalRef<jobject> j_callbacks_; | 963 ScopedGlobalRef<jobject> j_callbacks_; |
| 939 jmethodID j_render_frame_id_; | 964 jmethodID j_render_frame_id_; |
| 940 ScopedGlobalRef<jclass> j_frame_class_; | 965 ScopedGlobalRef<jclass> j_frame_class_; |
| 941 jmethodID j_i420_frame_ctor_id_; | 966 jmethodID j_i420_frame_ctor_id_; |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1346 WebRtcVideoEncoderFactory* encoder_factory = nullptr; | 1371 WebRtcVideoEncoderFactory* encoder_factory = nullptr; |
| 1347 WebRtcVideoDecoderFactory* decoder_factory = nullptr; | 1372 WebRtcVideoDecoderFactory* decoder_factory = nullptr; |
| 1348 rtc::NetworkMonitorFactory* network_monitor_factory = nullptr; | 1373 rtc::NetworkMonitorFactory* network_monitor_factory = nullptr; |
| 1349 | 1374 |
| 1350 PeerConnectionFactoryInterface::Options options; | 1375 PeerConnectionFactoryInterface::Options options; |
| 1351 bool has_options = joptions != NULL; | 1376 bool has_options = joptions != NULL; |
| 1352 if (has_options) { | 1377 if (has_options) { |
| 1353 options = ParseOptionsFromJava(jni, joptions); | 1378 options = ParseOptionsFromJava(jni, joptions); |
| 1354 } | 1379 } |
| 1355 | 1380 |
| 1381 #if defined(HAVE_WEBRTC_VOICE) && defined(HAVE_WEBRTC_VIDEO) | |
| 1356 if (video_hw_acceleration_enabled) { | 1382 if (video_hw_acceleration_enabled) { |
| 1357 encoder_factory = new MediaCodecVideoEncoderFactory(); | 1383 encoder_factory = new MediaCodecVideoEncoderFactory(); |
| 1358 decoder_factory = new MediaCodecVideoDecoderFactory(); | 1384 decoder_factory = new MediaCodecVideoDecoderFactory(); |
| 1359 } | 1385 } |
| 1386 #endif | |
| 1360 // Do not create network_monitor_factory only if the options are | 1387 // Do not create network_monitor_factory only if the options are |
| 1361 // provided and disable_network_monitor therein is set to true. | 1388 // provided and disable_network_monitor therein is set to true. |
| 1362 if (!(has_options && options.disable_network_monitor)) { | 1389 if (!(has_options && options.disable_network_monitor)) { |
| 1363 network_monitor_factory = new AndroidNetworkMonitorFactory(); | 1390 network_monitor_factory = new AndroidNetworkMonitorFactory(); |
| 1364 rtc::NetworkMonitorFactory::SetFactory(network_monitor_factory); | 1391 rtc::NetworkMonitorFactory::SetFactory(network_monitor_factory); |
| 1365 } | 1392 } |
| 1366 | 1393 |
| 1367 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory( | 1394 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory( |
| 1368 webrtc::CreatePeerConnectionFactory( | 1395 webrtc::CreatePeerConnectionFactory( |
| 1369 network_thread.get(), worker_thread.get(), signaling_thread.get(), | 1396 network_thread.get(), worker_thread.get(), signaling_thread.get(), |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1409 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory( | 1436 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory( |
| 1410 factoryFromJava(native_factory)); | 1437 factoryFromJava(native_factory)); |
| 1411 rtc::scoped_refptr<MediaStreamInterface> stream( | 1438 rtc::scoped_refptr<MediaStreamInterface> stream( |
| 1412 factory->CreateLocalMediaStream(JavaToStdString(jni, label))); | 1439 factory->CreateLocalMediaStream(JavaToStdString(jni, label))); |
| 1413 return (jlong)stream.release(); | 1440 return (jlong)stream.release(); |
| 1414 } | 1441 } |
| 1415 | 1442 |
| 1416 JOW(jlong, PeerConnectionFactory_nativeCreateVideoSource) | 1443 JOW(jlong, PeerConnectionFactory_nativeCreateVideoSource) |
| 1417 (JNIEnv* jni, jclass, jlong native_factory, jobject j_egl_context, | 1444 (JNIEnv* jni, jclass, jlong native_factory, jobject j_egl_context, |
| 1418 jboolean is_screencast) { | 1445 jboolean is_screencast) { |
| 1446 #if defined(HAVE_WEBRTC_VOICE) && defined(HAVE_WEBRTC_VIDEO) | |
| 1419 OwnedFactoryAndThreads* factory = | 1447 OwnedFactoryAndThreads* factory = |
| 1420 reinterpret_cast<OwnedFactoryAndThreads*>(native_factory); | 1448 reinterpret_cast<OwnedFactoryAndThreads*>(native_factory); |
| 1421 | 1449 |
| 1422 rtc::scoped_refptr<webrtc::AndroidVideoTrackSource> source( | 1450 rtc::scoped_refptr<webrtc::AndroidVideoTrackSource> source( |
| 1423 new rtc::RefCountedObject<webrtc::AndroidVideoTrackSource>( | 1451 new rtc::RefCountedObject<webrtc::AndroidVideoTrackSource>( |
| 1424 factory->signaling_thread(), jni, j_egl_context, is_screencast)); | 1452 factory->signaling_thread(), jni, j_egl_context, is_screencast)); |
| 1425 rtc::scoped_refptr<webrtc::VideoTrackSourceProxy> proxy_source = | 1453 rtc::scoped_refptr<webrtc::VideoTrackSourceProxy> proxy_source = |
| 1426 webrtc::VideoTrackSourceProxy::Create(factory->signaling_thread(), | 1454 webrtc::VideoTrackSourceProxy::Create(factory->signaling_thread(), |
| 1427 factory->worker_thread(), source); | 1455 factory->worker_thread(), source); |
| 1428 | 1456 |
| 1429 return (jlong)proxy_source.release(); | 1457 return (jlong)proxy_source.release(); |
| 1458 #else | |
| 1459 return (jlong)0; | |
| 1460 #endif | |
| 1430 } | 1461 } |
| 1431 | 1462 |
| 1432 JOW(void, PeerConnectionFactory_nativeInitializeVideoCapturer) | 1463 JOW(void, PeerConnectionFactory_nativeInitializeVideoCapturer) |
| 1433 (JNIEnv* jni, | 1464 (JNIEnv* jni, |
| 1434 jclass, | 1465 jclass, |
| 1435 jlong native_factory, | 1466 jlong native_factory, |
| 1436 jobject j_video_capturer, | 1467 jobject j_video_capturer, |
| 1437 jlong native_source, | 1468 jlong native_source, |
| 1438 jobject j_frame_observer) { | 1469 jobject j_frame_observer) { |
| 1470 #if defined(HAVE_WEBRTC_VOICE) && defined(HAVE_WEBRTC_VIDEO) | |
| 1439 LOG(LS_INFO) << "PeerConnectionFactory_nativeInitializeVideoCapturer"; | 1471 LOG(LS_INFO) << "PeerConnectionFactory_nativeInitializeVideoCapturer"; |
| 1440 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory( | 1472 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory( |
| 1441 factoryFromJava(native_factory)); | 1473 factoryFromJava(native_factory)); |
| 1442 auto proxy_source = | 1474 auto proxy_source = |
| 1443 reinterpret_cast<webrtc::VideoTrackSourceProxy*>(native_source); | 1475 reinterpret_cast<webrtc::VideoTrackSourceProxy*>(native_source); |
| 1444 auto source = reinterpret_cast<webrtc::AndroidVideoTrackSource*>( | 1476 auto source = reinterpret_cast<webrtc::AndroidVideoTrackSource*>( |
| 1445 proxy_source->internal()); | 1477 proxy_source->internal()); |
| 1446 rtc::scoped_refptr<SurfaceTextureHelper> surface_texture_helper = | 1478 rtc::scoped_refptr<SurfaceTextureHelper> surface_texture_helper = |
| 1447 source->surface_texture_helper(); | 1479 source->surface_texture_helper(); |
| 1448 jni->CallVoidMethod( | 1480 jni->CallVoidMethod( |
| 1449 j_video_capturer, | 1481 j_video_capturer, |
| 1450 GetMethodID(jni, FindClass(jni, "org/webrtc/VideoCapturer"), "initialize", | 1482 GetMethodID(jni, FindClass(jni, "org/webrtc/VideoCapturer"), "initialize", |
| 1451 "(Lorg/webrtc/SurfaceTextureHelper;Landroid/content/" | 1483 "(Lorg/webrtc/SurfaceTextureHelper;Landroid/content/" |
| 1452 "Context;Lorg/webrtc/VideoCapturer$CapturerObserver;)V"), | 1484 "Context;Lorg/webrtc/VideoCapturer$CapturerObserver;)V"), |
| 1453 surface_texture_helper | 1485 surface_texture_helper |
| 1454 ? surface_texture_helper->GetJavaSurfaceTextureHelper() | 1486 ? surface_texture_helper->GetJavaSurfaceTextureHelper() |
| 1455 : nullptr, | 1487 : nullptr, |
| 1456 j_application_context, j_frame_observer); | 1488 j_application_context, j_frame_observer); |
| 1457 CHECK_EXCEPTION(jni) << "error during VideoCapturer.initialize()"; | 1489 CHECK_EXCEPTION(jni) << "error during VideoCapturer.initialize()"; |
| 1490 #endif | |
| 1458 } | 1491 } |
| 1459 | 1492 |
| 1460 JOW(jlong, PeerConnectionFactory_nativeCreateVideoTrack)( | 1493 JOW(jlong, PeerConnectionFactory_nativeCreateVideoTrack)( |
| 1461 JNIEnv* jni, jclass, jlong native_factory, jstring id, | 1494 JNIEnv* jni, jclass, jlong native_factory, jstring id, |
| 1462 jlong native_source) { | 1495 jlong native_source) { |
| 1463 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory( | 1496 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory( |
| 1464 factoryFromJava(native_factory)); | 1497 factoryFromJava(native_factory)); |
| 1465 rtc::scoped_refptr<VideoTrackInterface> track(factory->CreateVideoTrack( | 1498 rtc::scoped_refptr<VideoTrackInterface> track(factory->CreateVideoTrack( |
| 1466 JavaToStdString(jni, id), | 1499 JavaToStdString(jni, id), |
| 1467 reinterpret_cast<VideoTrackSourceInterface*>(native_source))); | 1500 reinterpret_cast<VideoTrackSourceInterface*>(native_source))); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1522 rtc::NetworkMonitorFactory::ReleaseFactory( | 1555 rtc::NetworkMonitorFactory::ReleaseFactory( |
| 1523 owner->network_monitor_factory()); | 1556 owner->network_monitor_factory()); |
| 1524 owner->clear_network_monitor_factory(); | 1557 owner->clear_network_monitor_factory(); |
| 1525 } | 1558 } |
| 1526 } | 1559 } |
| 1527 } | 1560 } |
| 1528 | 1561 |
| 1529 JOW(void, PeerConnectionFactory_nativeSetVideoHwAccelerationOptions)( | 1562 JOW(void, PeerConnectionFactory_nativeSetVideoHwAccelerationOptions)( |
| 1530 JNIEnv* jni, jclass, jlong native_factory, jobject local_egl_context, | 1563 JNIEnv* jni, jclass, jlong native_factory, jobject local_egl_context, |
| 1531 jobject remote_egl_context) { | 1564 jobject remote_egl_context) { |
| 1565 #if defined(HAVE_WEBRTC_VOICE) && defined(HAVE_WEBRTC_VIDEO) | |
| 1532 OwnedFactoryAndThreads* owned_factory = | 1566 OwnedFactoryAndThreads* owned_factory = |
| 1533 reinterpret_cast<OwnedFactoryAndThreads*>(native_factory); | 1567 reinterpret_cast<OwnedFactoryAndThreads*>(native_factory); |
| 1534 | 1568 |
| 1535 jclass j_eglbase14_context_class = | 1569 jclass j_eglbase14_context_class = |
| 1536 FindClass(jni, "org/webrtc/EglBase14$Context"); | 1570 FindClass(jni, "org/webrtc/EglBase14$Context"); |
| 1537 | 1571 |
| 1538 MediaCodecVideoEncoderFactory* encoder_factory = | 1572 MediaCodecVideoEncoderFactory* encoder_factory = |
| 1539 static_cast<MediaCodecVideoEncoderFactory*> | 1573 static_cast<MediaCodecVideoEncoderFactory*> |
| 1540 (owned_factory->encoder_factory()); | 1574 (owned_factory->encoder_factory()); |
| 1541 if (encoder_factory && | 1575 if (encoder_factory && |
| 1542 jni->IsInstanceOf(local_egl_context, j_eglbase14_context_class)) { | 1576 jni->IsInstanceOf(local_egl_context, j_eglbase14_context_class)) { |
| 1543 LOG(LS_INFO) << "Set EGL context for HW encoding."; | 1577 LOG(LS_INFO) << "Set EGL context for HW encoding."; |
| 1544 encoder_factory->SetEGLContext(jni, local_egl_context); | 1578 encoder_factory->SetEGLContext(jni, local_egl_context); |
| 1545 } | 1579 } |
| 1546 | 1580 |
| 1547 MediaCodecVideoDecoderFactory* decoder_factory = | 1581 MediaCodecVideoDecoderFactory* decoder_factory = |
| 1548 static_cast<MediaCodecVideoDecoderFactory*> | 1582 static_cast<MediaCodecVideoDecoderFactory*> |
| 1549 (owned_factory->decoder_factory()); | 1583 (owned_factory->decoder_factory()); |
| 1550 if (decoder_factory) { | 1584 if (decoder_factory) { |
| 1551 LOG(LS_INFO) << "Set EGL context for HW decoding."; | 1585 LOG(LS_INFO) << "Set EGL context for HW decoding."; |
| 1552 decoder_factory->SetEGLContext(jni, remote_egl_context); | 1586 decoder_factory->SetEGLContext(jni, remote_egl_context); |
| 1553 } | 1587 } |
| 1588 #endif | |
| 1554 } | 1589 } |
| 1555 | 1590 |
| 1556 static PeerConnectionInterface::IceTransportsType | 1591 static PeerConnectionInterface::IceTransportsType |
| 1557 JavaIceTransportsTypeToNativeType(JNIEnv* jni, jobject j_ice_transports_type) { | 1592 JavaIceTransportsTypeToNativeType(JNIEnv* jni, jobject j_ice_transports_type) { |
| 1558 std::string enum_name = GetJavaEnumName( | 1593 std::string enum_name = GetJavaEnumName( |
| 1559 jni, "org/webrtc/PeerConnection$IceTransportsType", | 1594 jni, "org/webrtc/PeerConnection$IceTransportsType", |
| 1560 j_ice_transports_type); | 1595 j_ice_transports_type); |
| 1561 | 1596 |
| 1562 if (enum_name == "ALL") | 1597 if (enum_name == "ALL") |
| 1563 return PeerConnectionInterface::kAll; | 1598 return PeerConnectionInterface::kAll; |
| (...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2741 return reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer) | 2776 return reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer) |
| 2742 ->inter_tone_gap(); | 2777 ->inter_tone_gap(); |
| 2743 } | 2778 } |
| 2744 | 2779 |
| 2745 JOW(void, DtmfSender_free) | 2780 JOW(void, DtmfSender_free) |
| 2746 (JNIEnv* jni, jclass, jlong j_dtmf_sender_pointer) { | 2781 (JNIEnv* jni, jclass, jlong j_dtmf_sender_pointer) { |
| 2747 reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)->Release(); | 2782 reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)->Release(); |
| 2748 } | 2783 } |
| 2749 | 2784 |
| 2750 } // namespace webrtc_jni | 2785 } // namespace webrtc_jni |
| OLD | NEW |