Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: content/renderer/media/rtc_video_decoder_bridge_tv.h

Issue 14247018: Implement WebRTC in Chrome for TV (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: refactored according to Ami's suggestion Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_BRIDGE_TV_H_
6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_BRIDGE_TV_H_
7
8 #include "base/basictypes.h"
9 #include "base/message_loop_proxy.h"
10 #include "content/common/content_export.h"
11 #include "media/base/audio_decoder_config.h"
12 #include "media/base/decoder_buffer_queue.h"
13 #include "media/base/demuxer.h"
14 #include "media/base/demuxer_stream.h"
15 #include "media/base/pipeline_status.h"
16 #include "media/base/video_decoder_config.h"
17 #include "third_party/webrtc/modules/video_coding/codecs/interface/video_codec_i nterface.h"
18
19 namespace content {
20
21 class MediaStreamDependencyFactory;
22 class RTCVideoDecoderFactoryTv;
23
24 // An object shared between WebMediaPlayerAndroid and WebRTC Video Engine.
25 // Note that this class provides the first remote stream.
26 class CONTENT_EXPORT RTCVideoDecoderBridgeTv
27 : NON_EXPORTED_BASE(public webrtc::VideoDecoder) {
28 public:
29 RTCVideoDecoderBridgeTv(RTCVideoDecoderFactoryTv* factory);
30 virtual ~RTCVideoDecoderBridgeTv();
31
32 // webrtc::VideoDecoder implementation.
33 virtual WebRtc_Word32 InitDecode(
34 const webrtc::VideoCodec* codecSettings,
35 WebRtc_Word32 numberOfCores) OVERRIDE;
36 virtual WebRtc_Word32 Decode(
37 const webrtc::EncodedImage& inputImage,
38 bool missingFrames,
39 const webrtc::RTPFragmentationHeader* fragmentation,
40 const webrtc::CodecSpecificInfo* codecSpecificInfo = NULL,
41 WebRtc_Word64 renderTimeMs = -1) OVERRIDE;
42 virtual WebRtc_Word32 RegisterDecodeCompleteCallback(
43 webrtc::DecodedImageCallback* callback) OVERRIDE;
44 virtual WebRtc_Word32 Release() OVERRIDE;
45 virtual WebRtc_Word32 Reset() OVERRIDE;
46
47 private:
48 static void RunDecodeCompleteCallback(webrtc::DecodedImageCallback* callback,
49 WebRtc_Word64 timestamp);
50
51 // The factory outlives this object, so weak pointer is fine.
52 RTCVideoDecoderFactoryTv* factory_;
53
54 gfx::Size size_;
55 bool is_initialized_;
56 bool first_frame_;
57 webrtc::DecodedImageCallback* decode_complete_callback_;
58 WebRtc_Word64 timestamp_offset_millis_;
59
60 DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoderBridgeTv);
61 };
62
63 } // namespace content
64
65 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_BRIDGE_TV_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698