glaznev@webrtc.org | 18c9247 | 2015-02-18 18:42:55 +0000 | [diff] [blame] | 1 | /* |
kjellander | b24317b | 2016-02-10 07:54:43 -0800 | [diff] [blame] | 2 | * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
glaznev@webrtc.org | 18c9247 | 2015-02-18 18:42:55 +0000 | [diff] [blame] | 3 | * |
kjellander | b24317b | 2016-02-10 07:54:43 -0800 | [diff] [blame] | 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
glaznev@webrtc.org | 18c9247 | 2015-02-18 18:42:55 +0000 | [diff] [blame] | 9 | */ |
| 10 | |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 11 | #ifndef WEBRTC_API_JAVA_JNI_ANDROIDMEDIADECODER_JNI_H_ |
| 12 | #define WEBRTC_API_JAVA_JNI_ANDROIDMEDIADECODER_JNI_H_ |
glaznev@webrtc.org | 18c9247 | 2015-02-18 18:42:55 +0000 | [diff] [blame] | 13 | |
Sami Kalliomaki | 9b0dc62 | 2016-07-01 09:37:42 +0200 | [diff] [blame] | 14 | #include "webrtc/api/java/jni/jni_helpers.h" |
kjellander@webrtc.org | 5ad1297 | 2016-02-12 06:39:40 +0100 | [diff] [blame] | 15 | #include "webrtc/media/engine/webrtcvideodecoderfactory.h" |
glaznev@webrtc.org | 18c9247 | 2015-02-18 18:42:55 +0000 | [diff] [blame] | 16 | |
| 17 | namespace webrtc_jni { |
| 18 | |
| 19 | // Implementation of Android MediaCodec based decoder factory. |
| 20 | class MediaCodecVideoDecoderFactory |
| 21 | : public cricket::WebRtcVideoDecoderFactory { |
| 22 | public: |
| 23 | MediaCodecVideoDecoderFactory(); |
| 24 | virtual ~MediaCodecVideoDecoderFactory(); |
Alex Glaznev | 4d2f4d1 | 2015-09-01 15:04:13 -0700 | [diff] [blame] | 25 | |
| 26 | void SetEGLContext(JNIEnv* jni, jobject render_egl_context); |
glaznev@webrtc.org | 18c9247 | 2015-02-18 18:42:55 +0000 | [diff] [blame] | 27 | |
| 28 | // WebRtcVideoDecoderFactory implementation. |
| 29 | webrtc::VideoDecoder* CreateVideoDecoder(webrtc::VideoCodecType type) |
| 30 | override; |
| 31 | |
| 32 | void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) override; |
glaznev@webrtc.org | 18c9247 | 2015-02-18 18:42:55 +0000 | [diff] [blame] | 33 | |
| 34 | private: |
perkj | 461121c | 2016-02-15 06:28:36 -0800 | [diff] [blame] | 35 | jobject egl_context_; |
glaznev@webrtc.org | b28474c | 2015-02-23 17:44:27 +0000 | [diff] [blame] | 36 | std::vector<webrtc::VideoCodecType> supported_codec_types_; |
glaznev@webrtc.org | 18c9247 | 2015-02-18 18:42:55 +0000 | [diff] [blame] | 37 | }; |
| 38 | |
| 39 | } // namespace webrtc_jni |
| 40 | |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 41 | #endif // WEBRTC_API_JAVA_JNI_ANDROIDMEDIADECODER_JNI_H_ |