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

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: Timestamp adjustment in RTCVideoDecoderBridgeTv 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 RTCDemuxerProxy;
22
23 class RTCDemuxer : public media::Demuxer {
24 public:
25 RTCDemuxer(const scoped_refptr<base::MessageLoopProxy>& message_loop);
26 virtual ~RTCDemuxer();
27
28 // media::Demuxer implementation.
29 virtual void Initialize(media::DemuxerHost* host,
30 const media::PipelineStatusCB& cb) OVERRIDE;
31 virtual media::DemuxerStream* GetStream(
32 media::DemuxerStream::Type type) OVERRIDE;
33 virtual base::TimeDelta GetStartTime() const OVERRIDE;
34
35 void UpdateSize(const gfx::Size& size);
36 void QueueBuffer(scoped_refptr<media::DecoderBuffer> buffer,
37 const base::Closure& done_cb);
38
39 private:
40 friend class RTCVideoDecoderBridgeTv;
41
42 scoped_refptr<RTCDemuxerProxy> proxy_;
43 };
44
45 // A singleton object that shared between WebMediaPlayerAndroid and WebRTC
palmer 2013/04/29 18:58:44 NIT: Either "...object that is shared..." or "...o
Ami GONE FROM CHROMIUM 2013/04/29 22:11:09 It's a singleton but there are no locks I can see.
wonsik 2013/05/01 14:15:38 Done.
wonsik 2013/05/01 14:15:38 Added locking.
46 // Video Engine. Note that this class provides the first remote stream.
47 //
48 // Example use case:
49 // scoped_refptr<RTCDemuxer> remote_stream =
50 // new RTCDemuxer(base::MessageLoopProxy::current());
51 // if (RTCVideoDecoderBridgeTv::Get()->RegisterDemuxer(
52 // remote_stream)) {
53 // // use |remote_stream|.
54 // }
55 class CONTENT_EXPORT RTCVideoDecoderBridgeTv
56 : NON_EXPORTED_BASE(public webrtc::VideoDecoder) {
57 public:
58 // Get RTCVideoDecoderBridgeTv singleton object. If it was not set
59 // before, new default instance will be created.
60 static RTCVideoDecoderBridgeTv* Get();
61
62 virtual bool RegisterDemuxer(RTCDemuxer* demuxer) = 0;
Ami GONE FROM CHROMIUM 2013/04/29 22:11:09 Please doco the usage of this and the *Ownership()
wonsik 2013/05/01 14:15:38 Done.
63
64 virtual bool AcquireOwnership() = 0;
65 virtual void ReleaseOwnership() = 0;
66 };
67
68 } // namespace content
69
70 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_DECODER_BRIDGE_TV_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698