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

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

Issue 1819103004: MediaRecorder: Add Pause()/Resume() to AudioTrackRecorder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 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/audio_track_recorder.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_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 29 matching lines...) Expand all
40 AudioTrackRecorder(const blink::WebMediaStreamTrack& track, 40 AudioTrackRecorder(const blink::WebMediaStreamTrack& track,
41 const OnEncodedAudioCB& on_encoded_audio_cb, 41 const OnEncodedAudioCB& on_encoded_audio_cb,
42 int32_t bits_per_second); 42 int32_t bits_per_second);
43 ~AudioTrackRecorder() override; 43 ~AudioTrackRecorder() override;
44 44
45 // Implement MediaStreamAudioSink. 45 // Implement MediaStreamAudioSink.
46 void OnSetFormat(const media::AudioParameters& params) override; 46 void OnSetFormat(const media::AudioParameters& params) override;
47 void OnData(const media::AudioBus& audio_bus, 47 void OnData(const media::AudioBus& audio_bus,
48 base::TimeTicks capture_time) override; 48 base::TimeTicks capture_time) override;
49 49
50 void Pause();
51 void Resume();
52
50 private: 53 private:
51 // Forward declaration of nested class for handling encoding. 54 // Forward declaration of nested class for handling encoding.
52 // See the implementation file for details. 55 // See the implementation file for details.
53 class AudioEncoder; 56 class AudioEncoder;
54 57
55 // Used to check that we are destroyed on the same thread we were created on. 58 // Used to check that we are destroyed on the same thread we were created on.
56 base::ThreadChecker main_render_thread_checker_; 59 base::ThreadChecker main_render_thread_checker_;
57 60
58 // Used to check that MediaStreamAudioSink's methods are called on the 61 // Used to check that MediaStreamAudioSink's methods are called on the
59 // capture audio thread. 62 // capture audio thread.
(...skipping 11 matching lines...) Expand all
71 const scoped_refptr<AudioEncoder> encoder_; 74 const scoped_refptr<AudioEncoder> encoder_;
72 // The thread on which |encoder_| works. 75 // The thread on which |encoder_| works.
73 base::Thread encoder_thread_; 76 base::Thread encoder_thread_;
74 77
75 DISALLOW_COPY_AND_ASSIGN(AudioTrackRecorder); 78 DISALLOW_COPY_AND_ASSIGN(AudioTrackRecorder);
76 }; 79 };
77 80
78 } // namespace content 81 } // namespace content
79 82
80 #endif // CONTENT_RENDERER_MEDIA_AUDIO_TRACK_RECORDER_H_ 83 #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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698