OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2017 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 |
11 #include <jni.h> | 11 #include <jni.h> |
12 | 12 |
13 #include "webrtc/api/videosourceproxy.h" | 13 #include "webrtc/api/videosourceproxy.h" |
14 #include "webrtc/media/engine/webrtcvideodecoderfactory.h" | 14 #include "webrtc/media/engine/webrtcvideodecoderfactory.h" |
15 #include "webrtc/media/engine/webrtcvideoencoderfactory.h" | 15 #include "webrtc/media/engine/webrtcvideoencoderfactory.h" |
16 #include "webrtc/rtc_base/logging.h" | 16 #include "webrtc/rtc_base/logging.h" |
17 #include "webrtc/sdk/android/src/jni/androidmediadecoder_jni.h" | 17 #include "webrtc/sdk/android/src/jni/androidmediadecoder_jni.h" |
18 #include "webrtc/sdk/android/src/jni/androidmediaencoder_jni.h" | 18 #include "webrtc/sdk/android/src/jni/androidmediaencoder_jni.h" |
19 #include "webrtc/sdk/android/src/jni/androidvideotracksource.h" | 19 #include "webrtc/sdk/android/src/jni/androidvideotracksource.h" |
20 #include "webrtc/sdk/android/src/jni/classreferenceholder.h" | 20 #include "webrtc/sdk/android/src/jni/classreferenceholder.h" |
21 #include "webrtc/sdk/android/src/jni/ownedfactoryandthreads.h" | 21 #include "webrtc/sdk/android/src/jni/pc/ownedfactoryandthreads.h" |
22 #include "webrtc/sdk/android/src/jni/surfacetexturehelper_jni.h" | 22 #include "webrtc/sdk/android/src/jni/surfacetexturehelper_jni.h" |
23 #include "webrtc/sdk/android/src/jni/videodecoderfactorywrapper.h" | 23 #include "webrtc/sdk/android/src/jni/videodecoderfactorywrapper.h" |
24 | 24 |
25 namespace webrtc_jni { | 25 namespace webrtc_jni { |
26 | 26 |
27 // TODO(sakal): Remove this once MediaCodecVideoDecoder/Encoder are no longer | 27 // TODO(sakal): Remove this once MediaCodecVideoDecoder/Encoder are no longer |
28 // used and all applications inject their own codecs. | 28 // used and all applications inject their own codecs. |
29 // This is semi broken if someone wants to create multiple peerconnection | 29 // This is semi broken if someone wants to create multiple peerconnection |
30 // factories. | 30 // factories. |
31 static bool use_media_codec_decoder_factory; | 31 static bool use_media_codec_decoder_factory; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 MediaCodecVideoDecoderFactory* decoder_factory = | 112 MediaCodecVideoDecoderFactory* decoder_factory = |
113 static_cast<MediaCodecVideoDecoderFactory*>( | 113 static_cast<MediaCodecVideoDecoderFactory*>( |
114 owned_factory->decoder_factory()); | 114 owned_factory->decoder_factory()); |
115 if (use_media_codec_decoder_factory && decoder_factory) { | 115 if (use_media_codec_decoder_factory && decoder_factory) { |
116 LOG(LS_INFO) << "Set EGL context for HW decoding."; | 116 LOG(LS_INFO) << "Set EGL context for HW decoding."; |
117 decoder_factory->SetEGLContext(jni, remote_egl_context); | 117 decoder_factory->SetEGLContext(jni, remote_egl_context); |
118 } | 118 } |
119 } | 119 } |
120 | 120 |
121 } // namespace webrtc_jni | 121 } // namespace webrtc_jni |
OLD | NEW |