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

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

Issue 83023005: Add VideoTrackSink interface to content/public (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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_WEBRTC_VIDEOSINK_ADAPTER_H_
no longer working on chromium 2013/11/25 13:55:07 videosink is not one word
perkj_chrome 2013/11/26 09:16:38 Done.
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_VIDEOSINK_ADAPTER_H_
7
8 #include "base/memory/weak_ptr.h"
9 #include "content/common/content_export.h"
10 #include "content/public/renderer/media/video_track_sink.h"
11 #include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h"
12
13 namespace base {
14 class MessageLoopProxy;
15 }
16
17 namespace content {
18
19 class CONTENT_EXPORT WebRtcVideoSinkAdapter
Jói 2013/11/25 15:50:57 Needs documentation of role/responsibilities.
perkj_chrome 2013/11/26 09:16:38 Done.
20 : NON_EXPORTED_BASE(public webrtc::VideoRendererInterface),
21 NON_EXPORTED_BASE(public webrtc::ObserverInterface),
22 public base::SupportsWeakPtr<WebRtcVideoSinkAdapter> {
23 public:
24 WebRtcVideoSinkAdapter(webrtc::VideoTrackInterface* video_track,
25 VideoTrackSink* sink);
26 virtual ~WebRtcVideoSinkAdapter();
27
28 VideoTrackSink* sink() const { return sink_; }
29
30 protected:
31 // webrtc::VideoRendererInterface implementation. May be called on
32 // a different thread.
33 virtual void SetSize(int width, int height) OVERRIDE;
34 virtual void RenderFrame(const cricket::VideoFrame* frame) OVERRIDE;
35
36 // webrtc::ObserverInterface implementation.
37 virtual void OnChanged() OVERRIDE;
38
39 private:
40 void DoRenderFrameOnMainThread(scoped_refptr<media::VideoFrame> video_frame);
41
42 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
43 VideoTrackSink* sink_;
44 // The video track the renderer is connected to.
45 scoped_refptr<webrtc::VideoTrackInterface> video_track_;
no longer working on chromium 2013/11/25 13:55:07 curiously, the video track is owning an array of a
perkj_chrome 2013/11/26 09:16:38 This is the libjingle repressentation of a video t
46 webrtc::MediaStreamTrackInterface::TrackState state_;
47
48 DISALLOW_COPY_AND_ASSIGN(WebRtcVideoSinkAdapter);
49 };
50
51 } // namespace content
52
53 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_VIDEOSINK_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698