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

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

Issue 1352243002: Implemented Multiple video track recoding. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment addressed Created 5 years, 2 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_MEDIA_RECORDER_HANDLER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_RECORDER_HANDLER_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_RECORDER_HANDLER_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_RECORDER_HANDLER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 const blink::WebString& mimeType) override; 51 const blink::WebString& mimeType) override;
52 bool start() override; 52 bool start() override;
53 bool start(int timeslice) override; 53 bool start(int timeslice) override;
54 void stop() override; 54 void stop() override;
55 void pause() override; 55 void pause() override;
56 void resume() override; 56 void resume() override;
57 57
58 private: 58 private:
59 friend class MediaRecorderHandlerTest; 59 friend class MediaRecorderHandlerTest;
60 60
61 void OnEncodedVideo(const scoped_refptr<media::VideoFrame>& video_frame, 61 // void OnEncodedVideo(int track_index,
62 scoped_ptr<std::string> encoded_data, 62 // const scoped_refptr<media::VideoFrame>& video_frame,
63 base::TimeTicks timestamp, 63 // scoped_ptr<std::string> encoded_data,
64 bool is_key_frame); 64 // base::TimeTicks timestamp,
65 // bool is_key_frame);
mcasas 2015/10/16 01:11:03 ?
msu.koo 2015/10/21 05:35:51 Oops. Removed.
65 void WriteData(base::StringPiece data); 66 void WriteData(base::StringPiece data);
66 67
67 void OnVideoFrameForTesting(const scoped_refptr<media::VideoFrame>& frame, 68 void OnVideoFrameForTesting(const scoped_refptr<media::VideoFrame>& frame,
68 const base::TimeTicks& timestamp); 69 const base::TimeTicks& timestamp);
69 70
70 // Bound to the main render thread. 71 // Bound to the main render thread.
71 base::ThreadChecker main_render_thread_checker_; 72 base::ThreadChecker main_render_thread_checker_;
72 73
73 bool recording_; 74 bool recording_;
74 blink::WebMediaStream media_stream_; // The MediaStream being recorded. 75 blink::WebMediaStream media_stream_; // The MediaStream being recorded.
75 76
76 // |client_| is a weak pointer, and is valid for the lifetime of this object. 77 // |client_| is a weak pointer, and is valid for the lifetime of this object.
77 blink::WebMediaRecorderHandlerClient* client_; 78 blink::WebMediaRecorderHandlerClient* client_;
78 79
79 ScopedVector<VideoTrackRecorder> video_recorders_; 80 ScopedVector<VideoTrackRecorder> video_recorders_;
80 81
81 // Worker class doing the actual Webm Muxing work. 82 // Worker class doing the actual Webm Muxing work.
82 scoped_ptr<media::WebmMuxer> webm_muxer_; 83 scoped_ptr<media::WebmMuxer> webm_muxer_;
83 84
84 base::WeakPtrFactory<MediaRecorderHandler> weak_factory_; 85 base::WeakPtrFactory<MediaRecorderHandler> weak_factory_;
85 86
86 DISALLOW_COPY_AND_ASSIGN(MediaRecorderHandler); 87 DISALLOW_COPY_AND_ASSIGN(MediaRecorderHandler);
87 }; 88 };
88 89
89 } // namespace content 90 } // namespace content
90 #endif // CONTENT_RENDERER_MEDIA_MEDIA_RECORDER_HANDLER_H_ 91 #endif // CONTENT_RENDERER_MEDIA_MEDIA_RECORDER_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/media_recorder_handler.cc » ('j') | media/capture/webm_muxer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698