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

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

Issue 1990643002: Add VEAEncoder to VideoTrackRecorder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mcasas@ comments. Created 4 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_VIDEO_TRACK_RECORDER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_VIDEO_TRACK_RECORDER_H_
6 #define CONTENT_RENDERER_MEDIA_VIDEO_TRACK_RECORDER_H_ 6 #define CONTENT_RENDERER_MEDIA_VIDEO_TRACK_RECORDER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 14 matching lines...) Expand all
25 // single thread, namely the main Render thread. This mirrors the other 25 // single thread, namely the main Render thread. This mirrors the other
26 // MediaStreamVideo* classes that are constructed/configured on Main Render 26 // MediaStreamVideo* classes that are constructed/configured on Main Render
27 // thread but that pass frames on Render IO thread. It has an internal Encoder 27 // thread but that pass frames on Render IO thread. It has an internal Encoder
28 // with its own threading subtleties, see the implementation file. 28 // with its own threading subtleties, see the implementation file.
29 class CONTENT_EXPORT VideoTrackRecorder 29 class CONTENT_EXPORT VideoTrackRecorder
30 : NON_EXPORTED_BASE(public MediaStreamVideoSink) { 30 : NON_EXPORTED_BASE(public MediaStreamVideoSink) {
31 public: 31 public:
32 enum class CodecId { 32 enum class CodecId {
33 VP8, 33 VP8,
34 VP9, 34 VP9,
35 #if BUILDFLAG(RTC_USE_H264)
36 H264, 35 H264,
37 #endif
38 }; 36 };
39 class Encoder; 37 class Encoder;
40 38
41 using OnEncodedVideoCB = 39 using OnEncodedVideoCB =
42 base::Callback<void(const scoped_refptr<media::VideoFrame>& video_frame, 40 base::Callback<void(const scoped_refptr<media::VideoFrame>& video_frame,
43 std::unique_ptr<std::string> encoded_data, 41 std::unique_ptr<std::string> encoded_data,
44 base::TimeTicks capture_timestamp, 42 base::TimeTicks capture_timestamp,
45 bool is_key_frame)>; 43 bool is_key_frame)>;
46 44
47 VideoTrackRecorder(CodecId codec, 45 VideoTrackRecorder(CodecId codec,
(...skipping 17 matching lines...) Expand all
65 blink::WebMediaStreamTrack track_; 63 blink::WebMediaStreamTrack track_;
66 64
67 // Inner class to encode using whichever codec is configured. 65 // Inner class to encode using whichever codec is configured.
68 scoped_refptr<Encoder> encoder_; 66 scoped_refptr<Encoder> encoder_;
69 67
70 DISALLOW_COPY_AND_ASSIGN(VideoTrackRecorder); 68 DISALLOW_COPY_AND_ASSIGN(VideoTrackRecorder);
71 }; 69 };
72 70
73 } // namespace content 71 } // namespace content
74 #endif // CONTENT_RENDERER_MEDIA_VIDEO_TRACK_RECORDER_H_ 72 #endif // CONTENT_RENDERER_MEDIA_VIDEO_TRACK_RECORDER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_recorder_handler.cc ('k') | content/renderer/media/video_track_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698