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

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

Issue 1610473002: MediaRecorder: wire the bitRate settings in Blink and content (2nd go) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed. Added TODO for unsigned->signed change Created 4 years, 11 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_AUDIO_TRACK_RECORDER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_AUDIO_TRACK_RECORDER_H_
6 #define CONTENT_RENDERER_MEDIA_AUDIO_TRACK_RECORDER_H_ 6 #define CONTENT_RENDERER_MEDIA_AUDIO_TRACK_RECORDER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 19 matching lines...) Expand all
30 // threading subtleties, see the implementation file. 30 // threading subtleties, see the implementation file.
31 class CONTENT_EXPORT AudioTrackRecorder 31 class CONTENT_EXPORT AudioTrackRecorder
32 : NON_EXPORTED_BASE(public MediaStreamAudioSink) { 32 : NON_EXPORTED_BASE(public MediaStreamAudioSink) {
33 public: 33 public:
34 using OnEncodedAudioCB = 34 using OnEncodedAudioCB =
35 base::Callback<void(const media::AudioParameters& params, 35 base::Callback<void(const media::AudioParameters& params,
36 scoped_ptr<std::string> encoded_data, 36 scoped_ptr<std::string> encoded_data,
37 base::TimeTicks capture_time)>; 37 base::TimeTicks capture_time)>;
38 38
39 AudioTrackRecorder(const blink::WebMediaStreamTrack& track, 39 AudioTrackRecorder(const blink::WebMediaStreamTrack& track,
40 const OnEncodedAudioCB& on_encoded_audio_cb); 40 const OnEncodedAudioCB& on_encoded_audio_cb,
41 int32_t bits_per_second);
41 ~AudioTrackRecorder() override; 42 ~AudioTrackRecorder() override;
42 43
43 // Implement MediaStreamAudioSink. 44 // Implement MediaStreamAudioSink.
44 void OnSetFormat(const media::AudioParameters& params) override; 45 void OnSetFormat(const media::AudioParameters& params) override;
45 void OnData(const media::AudioBus& audio_bus, 46 void OnData(const media::AudioBus& audio_bus,
46 base::TimeTicks capture_time) override; 47 base::TimeTicks capture_time) override;
47 48
48 private: 49 private:
49 friend class AudioTrackRecorderTest; 50 friend class AudioTrackRecorderTest;
50 class AudioParameters; 51 class AudioParameters;
(...skipping 25 matching lines...) Expand all
76 const scoped_refptr<AudioEncoder> encoder_; 77 const scoped_refptr<AudioEncoder> encoder_;
77 // The thread on which |encoder_| works. 78 // The thread on which |encoder_| works.
78 base::Thread encoder_thread_; 79 base::Thread encoder_thread_;
79 80
80 DISALLOW_COPY_AND_ASSIGN(AudioTrackRecorder); 81 DISALLOW_COPY_AND_ASSIGN(AudioTrackRecorder);
81 }; 82 };
82 83
83 } // namespace content 84 } // namespace content
84 85
85 #endif // CONTENT_RENDERER_MEDIA_AUDIO_TRACK_RECORDER_H_ 86 #endif // CONTENT_RENDERER_MEDIA_AUDIO_TRACK_RECORDER_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/audio_track_recorder.cc » ('j') | content/renderer/media/audio_track_recorder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698