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

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

Issue 2234563002: MediaRecorder: support recording with no multiplexing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: consider empty mimeTypes Created 4 years, 4 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
« no previous file with comments | « no previous file | content/renderer/media/media_recorder_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <memory> 8 #include <memory>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 const base::TimeTicks& timestamp); 82 const base::TimeTicks& timestamp);
83 void SetAudioFormatForTesting(const media::AudioParameters& params); 83 void SetAudioFormatForTesting(const media::AudioParameters& params);
84 84
85 // Bound to the main render thread. 85 // Bound to the main render thread.
86 base::ThreadChecker main_render_thread_checker_; 86 base::ThreadChecker main_render_thread_checker_;
87 87
88 // Sanitized video and audio bitrate settings passed on initialize(). 88 // Sanitized video and audio bitrate settings passed on initialize().
89 int32_t video_bits_per_second_; 89 int32_t video_bits_per_second_;
90 int32_t audio_bits_per_second_; 90 int32_t audio_bits_per_second_;
91 91
92 // Indicates if we are using a container (e.g. webm) for the encoded data.
93 bool use_container_;
94
92 // Video Codec, VP8 is used by default. 95 // Video Codec, VP8 is used by default.
93 VideoTrackRecorder::CodecId codec_id_; 96 VideoTrackRecorder::CodecId codec_id_;
94 97
95 // |client_| has no notion of time, thus may configure us via start(timeslice) 98 // |client_| has no notion of time, thus may configure us via start(timeslice)
96 // to notify it after a certain |timeslice_| has passed. We use a moving 99 // to notify it after a certain |timeslice_| has passed. We use a moving
97 // |slice_origin_timestamp_| to track those time chunks. 100 // |slice_origin_timestamp_| to track those time chunks.
98 base::TimeDelta timeslice_; 101 base::TimeDelta timeslice_;
99 base::TimeTicks slice_origin_timestamp_; 102 base::TimeTicks slice_origin_timestamp_;
100 103
101 bool recording_; 104 bool recording_;
102 blink::WebMediaStream media_stream_; // The MediaStream being recorded. 105 blink::WebMediaStream media_stream_; // The MediaStream being recorded.
103 106
104 // |client_| is a weak pointer, and is valid for the lifetime of this object. 107 // |client_| is a weak pointer, and is valid for the lifetime of this object.
105 blink::WebMediaRecorderHandlerClient* client_; 108 blink::WebMediaRecorderHandlerClient* client_;
106 109
107 ScopedVector<VideoTrackRecorder> video_recorders_; 110 ScopedVector<VideoTrackRecorder> video_recorders_;
108 ScopedVector<AudioTrackRecorder> audio_recorders_; 111 ScopedVector<AudioTrackRecorder> audio_recorders_;
109 112
110 // Worker class doing the actual Webm Muxing work. 113 // Worker class doing the actual Webm Muxing work.
111 std::unique_ptr<media::WebmMuxer> webm_muxer_; 114 std::unique_ptr<media::WebmMuxer> webm_muxer_;
112 115
113 base::WeakPtrFactory<MediaRecorderHandler> weak_factory_; 116 base::WeakPtrFactory<MediaRecorderHandler> weak_factory_;
114 117
115 DISALLOW_COPY_AND_ASSIGN(MediaRecorderHandler); 118 DISALLOW_COPY_AND_ASSIGN(MediaRecorderHandler);
116 }; 119 };
117 120
118 } // namespace content 121 } // namespace content
119 #endif // CONTENT_RENDERER_MEDIA_MEDIA_RECORDER_HANDLER_H_ 122 #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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698