Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 /*
2 * Copyright (C) 2007 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
17 #ifndef IAUDIORECORD_H_
18 #define IAUDIORECORD_H_
20 #include <stdint.h>
21 #include <sys/types.h>
23 #include <utils/RefBase.h>
24 #include <utils/Errors.h>
25 #include <binder/IInterface.h>
26 #include <binder/IMemory.h>
29 namespace android {
31 // ----------------------------------------------------------------------------
33 class IAudioRecord : public IInterface
34 {
35 public:
36 DECLARE_META_INTERFACE(AudioRecord);
38 /* After it's created the track is not active. Call start() to
39 * make it active. If set, the callback will start being called.
40 */
41 virtual status_t start() = 0;
43 /* Stop a track. If set, the callback will cease being called and
44 * obtainBuffer will return an error. Buffers that are already released
45 * will be processed, unless flush() is called.
46 */
47 virtual void stop() = 0;
49 /* get this tracks control block */
50 virtual sp<IMemory> getCblk() const = 0;
51 };
53 // ----------------------------------------------------------------------------
55 class BnAudioRecord : public BnInterface<IAudioRecord>
56 {
57 public:
58 virtual status_t onTransact( uint32_t code,
59 const Parcel& data,
60 Parcel* reply,
61 uint32_t flags = 0);
62 };
64 // ----------------------------------------------------------------------------
66 }; // namespace android
68 #endif /*IAUDIORECORD_H_*/