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

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

Issue 1211973012: [Experimental] MediaStreamRecorder playground (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed FFmpegMuxer, using instead libwebm::IMkvMuxer, which is partially added Created 5 years, 5 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 2015 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_VIDEO_TRACK_RECORDER_H_
6 #define CONTENT_RENDERER_MEDIA_VIDEO_TRACK_RECORDER_H_
7
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/threading/thread_checker.h"
11 #include "content/public/renderer/media_stream_video_sink.h"
12 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
13 #include "ui/gfx/geometry/size.h"
14
15 namespace content {
16
17 class VideoTrackRecorder final : public MediaStreamVideoSink {
18 public:
19 typedef base::Callback<void(const std::string& data,
20 const base::TimeTicks& timestamp,
21 bool keyframe,
22 const gfx::Size& frame_size,
23 double frame_rate)>
24 VideoEncoderCB;
25
26 VideoTrackRecorder(const blink::WebMediaStreamTrack& track,
27 const VideoEncoderCB& callback);
28 ~VideoTrackRecorder() override;
29
30 private:
31 // Used to DCHECK that we are called on the correct thread.
32 base::ThreadChecker thread_checker_;
33
34 // Reference to the Track the Recorder is hanging from, to remove on dtor.
35 blink::WebMediaStreamTrack web_track_;
36
37 class Encoder;
38 scoped_refptr<Encoder> encoder_;
39 DISALLOW_COPY_AND_ASSIGN(VideoTrackRecorder);
40 };
41
42 } // namespace content
43 #endif // CONTENT_RENDERER_MEDIA_VIDEO_TRACK_RECORDER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_renderer_factory_impl.cc ('k') | content/renderer/media/video_track_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698