blob: 28be7c100c368636406d8ca2b25a0eb9bfd61588 [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001/*
2 **
Jean-Baptiste Queru4506c622010-07-29 17:35:37 -07003 ** Copyright 2008, The Android Open Source Project
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08004 **
5 ** Licensed under the Apache License, Version 2.0 (the "License");
6 ** you may not use this file except in compliance with the License.
7 ** You may obtain a copy of the License at
8 **
9 ** http://www.apache.org/licenses/LICENSE-2.0
10 **
11 ** Unless required by applicable law or agreed to in writing, software
12 ** distributed under the License is distributed on an "AS IS" BASIS,
13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ** See the License for the specific language governing permissions and
15 ** limitations under the License.
16 */
17
18#ifndef ANDROID_IMEDIARECORDER_H
19#define ANDROID_IMEDIARECORDER_H
20
Mathias Agopian07952722009-05-19 19:08:10 -070021#include <binder/IInterface.h>
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080022
23namespace android {
24
Jamie Gennis85cfdd02010-08-10 16:37:53 -070025class Surface;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080026class ICamera;
James Dongfe1bafe2010-06-25 17:06:47 -070027class IMediaRecorderClient;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080028
29class IMediaRecorder: public IInterface
30{
31public:
32 DECLARE_META_INTERFACE(MediaRecorder);
33
34 virtual status_t setCamera(const sp<ICamera>& camera) = 0;
Jamie Gennis85cfdd02010-08-10 16:37:53 -070035 virtual status_t setPreviewSurface(const sp<Surface>& surface) = 0;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080036 virtual status_t setVideoSource(int vs) = 0;
37 virtual status_t setAudioSource(int as) = 0;
38 virtual status_t setOutputFormat(int of) = 0;
39 virtual status_t setVideoEncoder(int ve) = 0;
40 virtual status_t setAudioEncoder(int ae) = 0;
41 virtual status_t setOutputFile(const char* path) = 0;
42 virtual status_t setOutputFile(int fd, int64_t offset, int64_t length) = 0;
Nipun Kwatrab33a5ae2010-08-26 17:20:53 -070043 virtual status_t setOutputFileAuxiliary(int fd) = 0;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080044 virtual status_t setVideoSize(int width, int height) = 0;
45 virtual status_t setVideoFrameRate(int frames_per_second) = 0;
The Android Open Source Projectba87e3e2009-03-13 13:04:22 -070046 virtual status_t setParameters(const String8& params) = 0;
James Dongfe1bafe2010-06-25 17:06:47 -070047 virtual status_t setListener(const sp<IMediaRecorderClient>& listener) = 0;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080048 virtual status_t prepare() = 0;
49 virtual status_t getMaxAmplitude(int* max) = 0;
50 virtual status_t start() = 0;
51 virtual status_t stop() = 0;
52 virtual status_t reset() = 0;
53 virtual status_t init() = 0;
54 virtual status_t close() = 0;
55 virtual status_t release() = 0;
56};
57
58// ----------------------------------------------------------------------------
59
60class BnMediaRecorder: public BnInterface<IMediaRecorder>
61{
62public:
63 virtual status_t onTransact( uint32_t code,
64 const Parcel& data,
65 Parcel* reply,
66 uint32_t flags = 0);
67};
68
69}; // namespace android
70
71#endif // ANDROID_IMEDIARECORDER_H