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

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
« no previous file with comments | « no previous file | content/renderer/media_recorder/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_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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 int32_t audio_bits_per_second, 58 int32_t audio_bits_per_second,
59 int32_t video_bits_per_second) override; 59 int32_t video_bits_per_second) override;
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 // Called to indicate there is encoded video data available. |encoded_alpha|
69 // represents the encode output of alpha channel when available, can be
70 // nullptr otherwise.
68 void OnEncodedVideo(const media::WebmMuxer::VideoParameters& params, 71 void OnEncodedVideo(const media::WebmMuxer::VideoParameters& params,
69 std::unique_ptr<std::string> encoded_data, 72 std::unique_ptr<std::string> encoded_data,
73 std::unique_ptr<std::string> encoded_alpha,
70 base::TimeTicks timestamp, 74 base::TimeTicks timestamp,
71 bool is_key_frame); 75 bool is_key_frame);
72 void OnEncodedAudio(const media::AudioParameters& params, 76 void OnEncodedAudio(const media::AudioParameters& params,
73 std::unique_ptr<std::string> encoded_data, 77 std::unique_ptr<std::string> encoded_data,
74 base::TimeTicks timestamp); 78 base::TimeTicks timestamp);
75 void WriteData(base::StringPiece data); 79 void WriteData(base::StringPiece data);
76 80
77 // Updates |video_tracks_|,|audio_tracks_| and returns true if any changed. 81 // Updates |video_tracks_|,|audio_tracks_| and returns true if any changed.
78 bool UpdateTracksAndCheckIfChanged(); 82 bool UpdateTracksAndCheckIfChanged();
79 83
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // Worker class doing the actual Webm Muxing work. 117 // Worker class doing the actual Webm Muxing work.
114 std::unique_ptr<media::WebmMuxer> webm_muxer_; 118 std::unique_ptr<media::WebmMuxer> webm_muxer_;
115 119
116 base::WeakPtrFactory<MediaRecorderHandler> weak_factory_; 120 base::WeakPtrFactory<MediaRecorderHandler> weak_factory_;
117 121
118 DISALLOW_COPY_AND_ASSIGN(MediaRecorderHandler); 122 DISALLOW_COPY_AND_ASSIGN(MediaRecorderHandler);
119 }; 123 };
120 124
121 } // namespace content 125 } // namespace content
122 #endif // CONTENT_RENDERER_MEDIA_RECORDER_MEDIA_RECORDER_HANDLER_H_ 126 #endif // CONTENT_RENDERER_MEDIA_RECORDER_MEDIA_RECORDER_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media_recorder/media_recorder_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698