- Make shared EGL context used for HW video decoding member
of decoder factory class. - Add new Peer connection factory method to initialize shared EGL context. This provides an option to use single peer connection factory in the application and create peer connections from the same factory and reinitialize shared EGL context for video decoding HW acceleration. R=wzh@webrtc.org Review URL: https://codereview.webrtc.org/1304063011 . Cr-Commit-Position: refs/heads/master@{#9838}
This commit is contained in:
@ -40,17 +40,17 @@ class MediaCodecVideoDecoderFactory
|
||||
public:
|
||||
MediaCodecVideoDecoderFactory();
|
||||
virtual ~MediaCodecVideoDecoderFactory();
|
||||
static int SetAndroidObjects(JNIEnv* jni, jobject render_egl_context);
|
||||
|
||||
void SetEGLContext(JNIEnv* jni, jobject render_egl_context);
|
||||
|
||||
// WebRtcVideoDecoderFactory implementation.
|
||||
webrtc::VideoDecoder* CreateVideoDecoder(webrtc::VideoCodecType type)
|
||||
override;
|
||||
|
||||
void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) override;
|
||||
// Render EGL context.
|
||||
static jobject render_egl_context_;
|
||||
|
||||
private:
|
||||
jobject render_egl_context_; // Render EGL context.
|
||||
std::vector<webrtc::VideoCodecType> supported_codec_types_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user