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

Side by Side Diff: content/renderer/media/webrtc/webrtc_video_capturer_adapter.h

Issue 604743005: VideoCapture: Remove deep frame copy in the border to libJingle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scherkus@s comments Created 6 years, 1 month 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_WEBRTC_WEBRTC_VIDEO_CAPTURER_ADAPTER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_VIDEO_CAPTURER_ADAPTER_H_
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_VIDEO_CAPTURER_ADAPTER_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_VIDEO_CAPTURER_ADAPTER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 30 matching lines...) Expand all
41 // These methods are accessed from a libJingle worker thread. 41 // These methods are accessed from a libJingle worker thread.
42 cricket::CaptureState Start( 42 cricket::CaptureState Start(
43 const cricket::VideoFormat& capture_format) override; 43 const cricket::VideoFormat& capture_format) override;
44 void Stop() override; 44 void Stop() override;
45 bool IsRunning() override; 45 bool IsRunning() override;
46 bool GetPreferredFourccs(std::vector<uint32>* fourccs) override; 46 bool GetPreferredFourccs(std::vector<uint32>* fourccs) override;
47 bool GetBestCaptureFormat(const cricket::VideoFormat& desired, 47 bool GetBestCaptureFormat(const cricket::VideoFormat& desired,
48 cricket::VideoFormat* best_format) override; 48 cricket::VideoFormat* best_format) override;
49 bool IsScreencast() const override; 49 bool IsScreencast() const override;
50 50
51 void UpdateI420Buffer(const scoped_refptr<media::VideoFrame>& src);
52
53 // |thread_checker_| is bound to the libjingle worker thread. 51 // |thread_checker_| is bound to the libjingle worker thread.
54 base::ThreadChecker thread_checker_; 52 base::ThreadChecker thread_checker_;
55 53
56 const bool is_screencast_; 54 const bool is_screencast_;
57 bool running_; 55 bool running_;
58 base::TimeDelta first_frame_timestamp_; 56 base::TimeDelta first_frame_timestamp_;
59 // |buffer_| used if cropping is needed. It is created only if needed and 57
60 // owned by WebRtcVideoCapturerAdapter. If its created, it exists until 58 // This is an alias to the frame_factory_ in the base class
61 // WebRtcVideoCapturerAdapter is destroyed. 59 // cricket::VideoCapturer.
62 uint8* buffer_; 60 class MediaVideoFrameFactory;
63 size_t buffer_size_; 61 MediaVideoFrameFactory* frame_factory_;
64 62
65 DISALLOW_COPY_AND_ASSIGN(WebRtcVideoCapturerAdapter); 63 DISALLOW_COPY_AND_ASSIGN(WebRtcVideoCapturerAdapter);
66 }; 64 };
67 65
68 } // namespace content 66 } // namespace content
69 67
70 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_VIDEO_CAPTURER_ADAPTER_H_ 68 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_VIDEO_CAPTURER_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698