| Index: talk/app/webrtc/java/jni/native_handle_impl.cc
|
| diff --git a/talk/app/webrtc/java/jni/androidmediadecoder_jni.h b/talk/app/webrtc/java/jni/native_handle_impl.cc
|
| similarity index 61%
|
| copy from talk/app/webrtc/java/jni/androidmediadecoder_jni.h
|
| copy to talk/app/webrtc/java/jni/native_handle_impl.cc
|
| index 673f9983f416973d4a5d7244ed5a6dd97e02d35b..37f5489ac589490bd74319e89e5f636523ee7ee8 100644
|
| --- a/talk/app/webrtc/java/jni/androidmediadecoder_jni.h
|
| +++ b/talk/app/webrtc/java/jni/native_handle_impl.cc
|
| @@ -23,37 +23,40 @@
|
| * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
| * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
| * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| - *
|
| */
|
|
|
| -#ifndef TALK_APP_WEBRTC_JAVA_JNI_ANDROIDMEDIADECODER_JNI_H_
|
| -#define TALK_APP_WEBRTC_JAVA_JNI_ANDROIDMEDIADECODER_JNI_H_
|
| +#include "talk/app/webrtc/java/jni/native_handle_impl.h"
|
|
|
| -#include "talk/app/webrtc/java/jni/jni_helpers.h"
|
| -#include "talk/media/webrtc/webrtcvideodecoderfactory.h"
|
| +#include "webrtc/base/checks.h"
|
|
|
| namespace webrtc_jni {
|
|
|
| -// Implementation of Android MediaCodec based decoder factory.
|
| -class MediaCodecVideoDecoderFactory
|
| - : public cricket::WebRtcVideoDecoderFactory {
|
| - public:
|
| - MediaCodecVideoDecoderFactory();
|
| - virtual ~MediaCodecVideoDecoderFactory();
|
| +NativeHandleImpl::NativeHandleImpl() : texture_object_(NULL), texture_id_(-1) {}
|
|
|
| - void SetEGLContext(JNIEnv* jni, jobject render_egl_context);
|
| +void* NativeHandleImpl::GetHandle() {
|
| + return texture_object_;
|
| +}
|
|
|
| - // WebRtcVideoDecoderFactory implementation.
|
| - webrtc::VideoDecoder* CreateVideoDecoder(webrtc::VideoCodecType type)
|
| - override;
|
| +int NativeHandleImpl::GetTextureId() {
|
| + return texture_id_;
|
| +}
|
|
|
| - void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) override;
|
| +void NativeHandleImpl::SetTextureObject(void* texture_object, int texture_id) {
|
| + texture_object_ = reinterpret_cast<jobject>(texture_object);
|
| + texture_id_ = texture_id;
|
| +}
|
|
|
| - private:
|
| - jobject render_egl_context_; // Render EGL context.
|
| - std::vector<webrtc::VideoCodecType> supported_codec_types_;
|
| -};
|
| +JniNativeHandleBuffer::JniNativeHandleBuffer(void* native_handle,
|
| + int width,
|
| + int height)
|
| + : NativeHandleBuffer(native_handle, width, height) {}
|
|
|
| -} // namespace webrtc_jni
|
| +rtc::scoped_refptr<webrtc::VideoFrameBuffer>
|
| +JniNativeHandleBuffer::NativeToI420Buffer() {
|
| + // TODO(pbos): Implement before using this in the encoder pipeline (or
|
| + // remove the RTC_CHECK() in VideoCapture).
|
| + RTC_NOTREACHED();
|
| + return nullptr;
|
| +}
|
|
|
| -#endif // TALK_APP_WEBRTC_JAVA_JNI_ANDROIDMEDIADECODER_JNI_H_
|
| +} // namespace webrtc_jni
|
|
|