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

Side by Side Diff: media/audio/android/audio_record_input.h

Issue 2689483006: Switch browser side audio capture path to use base time primitives. (Closed)
Patch Set: Bloop Created 3 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 MEDIA_AUDIO_ANDROID_AUDIO_RECORD_INPUT_H_ 5 #ifndef MEDIA_AUDIO_ANDROID_AUDIO_RECORD_INPUT_H_
6 #define MEDIA_AUDIO_ANDROID_AUDIO_RECORD_INPUT_H_ 6 #define MEDIA_AUDIO_ANDROID_AUDIO_RECORD_INPUT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 bool SetAutomaticGainControl(bool enabled) override; 43 bool SetAutomaticGainControl(bool enabled) override;
44 bool GetAutomaticGainControl() override; 44 bool GetAutomaticGainControl() override;
45 bool IsMuted() override; 45 bool IsMuted() override;
46 46
47 static bool RegisterAudioRecordInput(JNIEnv* env); 47 static bool RegisterAudioRecordInput(JNIEnv* env);
48 48
49 // Called from Java when data is available. 49 // Called from Java when data is available.
50 void OnData(JNIEnv* env, 50 void OnData(JNIEnv* env,
51 const base::android::JavaParamRef<jobject>& obj, 51 const base::android::JavaParamRef<jobject>& obj,
52 jint size, 52 jint size,
53 jint hardware_delay_bytes); 53 jint hardware_delay_ms);
54 54
55 // Called from Java so that we can cache the address of the Java-managed 55 // Called from Java so that we can cache the address of the Java-managed
56 // |byte_buffer| in |direct_buffer_address_|. 56 // |byte_buffer| in |direct_buffer_address_|.
57 void CacheDirectBufferAddress( 57 void CacheDirectBufferAddress(
58 JNIEnv* env, 58 JNIEnv* env,
59 const base::android::JavaParamRef<jobject>& obj, 59 const base::android::JavaParamRef<jobject>& obj,
60 const base::android::JavaParamRef<jobject>& byte_buffer); 60 const base::android::JavaParamRef<jobject>& byte_buffer);
61 61
62 private: 62 private:
63 base::ThreadChecker thread_checker_; 63 base::ThreadChecker thread_checker_;
(...skipping 12 matching lines...) Expand all
76 76
77 std::unique_ptr<media::AudioBus> audio_bus_; 77 std::unique_ptr<media::AudioBus> audio_bus_;
78 int bytes_per_sample_; 78 int bytes_per_sample_;
79 79
80 DISALLOW_COPY_AND_ASSIGN(AudioRecordInputStream); 80 DISALLOW_COPY_AND_ASSIGN(AudioRecordInputStream);
81 }; 81 };
82 82
83 } // namespace media 83 } // namespace media
84 84
85 #endif // MEDIA_AUDIO_ANDROID_AUDIO_RECORD_INPUT_H_ 85 #endif // MEDIA_AUDIO_ANDROID_AUDIO_RECORD_INPUT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698