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

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

Issue 2691373005: Support alpha channel recording for VPX in MediaRecorder (Closed)
Patch Set: Created 3 years, 9 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_RECORDER_MEDIA_RECORDER_HANDLER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_RECORDER_MEDIA_RECORDER_HANDLER_H_
6 #define CONTENT_RENDERER_MEDIA_RECORDER_MEDIA_RECORDER_HANDLER_H_ 6 #define CONTENT_RENDERER_MEDIA_RECORDER_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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 bool start(int timeslice) override; 60 bool start(int timeslice) override;
61 void stop() override; 61 void stop() override;
62 void pause() override; 62 void pause() override;
63 void resume() override; 63 void resume() override;
64 64
65 private: 65 private:
66 friend class MediaRecorderHandlerTest; 66 friend class MediaRecorderHandlerTest;
67 67
68 void OnEncodedVideo(const media::WebmMuxer::VideoParameters& params, 68 void OnEncodedVideo(const media::WebmMuxer::VideoParameters& params,
69 std::unique_ptr<std::string> encoded_data, 69 std::unique_ptr<std::string> encoded_data,
70 std::unique_ptr<std::string> encoded_alpha_data,
mcasas 2017/03/08 22:38:48 It's unfortunate that the frame and its alpha must
emircan 2017/03/09 01:45:40 They are used together in the same function call i
70 base::TimeTicks timestamp, 71 base::TimeTicks timestamp,
71 bool is_key_frame); 72 bool is_key_frame);
72 void OnEncodedAudio(const media::AudioParameters& params, 73 void OnEncodedAudio(const media::AudioParameters& params,
73 std::unique_ptr<std::string> encoded_data, 74 std::unique_ptr<std::string> encoded_data,
74 base::TimeTicks timestamp); 75 base::TimeTicks timestamp);
75 void WriteData(base::StringPiece data); 76 void WriteData(base::StringPiece data);
76 77
77 // Updates |video_tracks_|,|audio_tracks_| and returns true if any changed. 78 // Updates |video_tracks_|,|audio_tracks_| and returns true if any changed.
78 bool UpdateTracksAndCheckIfChanged(); 79 bool UpdateTracksAndCheckIfChanged();
79 80
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // Worker class doing the actual Webm Muxing work. 114 // Worker class doing the actual Webm Muxing work.
114 std::unique_ptr<media::WebmMuxer> webm_muxer_; 115 std::unique_ptr<media::WebmMuxer> webm_muxer_;
115 116
116 base::WeakPtrFactory<MediaRecorderHandler> weak_factory_; 117 base::WeakPtrFactory<MediaRecorderHandler> weak_factory_;
117 118
118 DISALLOW_COPY_AND_ASSIGN(MediaRecorderHandler); 119 DISALLOW_COPY_AND_ASSIGN(MediaRecorderHandler);
119 }; 120 };
120 121
121 } // namespace content 122 } // namespace content
122 #endif // CONTENT_RENDERER_MEDIA_RECORDER_MEDIA_RECORDER_HANDLER_H_ 123 #endif // CONTENT_RENDERER_MEDIA_RECORDER_MEDIA_RECORDER_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698