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

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

Issue 120893002: Eliminate video capture thread in renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: upload again Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_CAPTURER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_CAPTURER_H_
6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_CAPTURER_H_ 6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_CAPTURER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "content/renderer/media/rtc_video_capture_delegate.h" 11 #include "content/renderer/media/rtc_video_capture_delegate.h"
12 #include "third_party/libjingle/source/talk/media/base/videocapturer.h" 12 #include "third_party/libjingle/source/talk/media/base/videocapturer.h"
13 13
14 namespace content { 14 namespace content {
15 class VideoCaptureImplManager;
16 15
17 // RtcVideoCapturer implements a simple cricket::VideoCapturer that is used for 16 // RtcVideoCapturer implements a simple cricket::VideoCapturer that is used for
18 // VideoCapturing in libJingle and especially in PeerConnections. 17 // VideoCapturing in libJingle and especially in PeerConnections.
19 // The class is created and destroyed on the main render thread. 18 // The class is created and destroyed on the main render thread.
20 // PeerConnection access cricket::VideoCapturer from a libJingle worker thread. 19 // PeerConnection access cricket::VideoCapturer from a libJingle worker thread.
21 // The video frames are delivered in OnFrameCaptured on a thread owned by 20 // The video frames are delivered in OnFrameCaptured on a thread owned by
22 // Chrome's video capture implementation. 21 // Chrome's video capture implementation.
23 class RtcVideoCapturer 22 class RtcVideoCapturer
24 : public cricket::VideoCapturer { 23 : public cricket::VideoCapturer {
25 public: 24 public:
26 RtcVideoCapturer(const media::VideoCaptureSessionId id, 25 RtcVideoCapturer(const media::VideoCaptureSessionId id,
27 VideoCaptureImplManager* vc_manager,
28 bool is_screencast); 26 bool is_screencast);
29 virtual ~RtcVideoCapturer(); 27 virtual ~RtcVideoCapturer();
30 28
31 // cricket::VideoCapturer implementation. 29 // cricket::VideoCapturer implementation.
32 // These methods are accessed from a libJingle worker thread. 30 // These methods are accessed from a libJingle worker thread.
33 virtual cricket::CaptureState Start( 31 virtual cricket::CaptureState Start(
34 const cricket::VideoFormat& capture_format) OVERRIDE; 32 const cricket::VideoFormat& capture_format) OVERRIDE;
35 virtual void Stop() OVERRIDE; 33 virtual void Stop() OVERRIDE;
36 virtual bool IsRunning() OVERRIDE; 34 virtual bool IsRunning() OVERRIDE;
37 virtual bool GetPreferredFourccs(std::vector<uint32>* fourccs) OVERRIDE; 35 virtual bool GetPreferredFourccs(std::vector<uint32>* fourccs) OVERRIDE;
(...skipping 12 matching lines...) Expand all
50 scoped_refptr<RtcVideoCaptureDelegate> delegate_; 48 scoped_refptr<RtcVideoCaptureDelegate> delegate_;
51 VideoCaptureState state_; 49 VideoCaptureState state_;
52 base::TimeDelta first_frame_timestamp_; 50 base::TimeDelta first_frame_timestamp_;
53 51
54 DISALLOW_COPY_AND_ASSIGN(RtcVideoCapturer); 52 DISALLOW_COPY_AND_ASSIGN(RtcVideoCapturer);
55 }; 53 };
56 54
57 } // namespace content 55 } // namespace content
58 56
59 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_CAPTURER_H_ 57 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_CAPTURER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/rtc_video_capture_delegate.cc ('k') | content/renderer/media/rtc_video_capturer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698