summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/camera/Camera.h23
-rw-r--r--include/camera/CameraParameters.h3
-rw-r--r--include/camera/ICamera.h12
-rw-r--r--include/media/IMediaPlayerService.h16
-rw-r--r--include/utils/RefBase.h11
5 files changed, 44 insertions, 21 deletions
diff --git a/include/camera/Camera.h b/include/camera/Camera.h
index e5f7e62..f3c8f64 100644
--- a/include/camera/Camera.h
+++ b/include/camera/Camera.h
@@ -66,16 +66,17 @@ namespace android {
// msgType in notifyCallback and dataCallback functions
enum {
- CAMERA_MSG_ERROR = 0x001,
- CAMERA_MSG_SHUTTER = 0x002,
- CAMERA_MSG_FOCUS = 0x004,
- CAMERA_MSG_ZOOM = 0x008,
- CAMERA_MSG_PREVIEW_FRAME = 0x010,
- CAMERA_MSG_VIDEO_FRAME = 0x020,
- CAMERA_MSG_POSTVIEW_FRAME = 0x040,
- CAMERA_MSG_RAW_IMAGE = 0x080,
- CAMERA_MSG_COMPRESSED_IMAGE = 0x100,
- CAMERA_MSG_ALL_MSGS = 0x1FF
+ CAMERA_MSG_ERROR = 0x0001,
+ CAMERA_MSG_SHUTTER = 0x0002,
+ CAMERA_MSG_FOCUS = 0x0004,
+ CAMERA_MSG_ZOOM = 0x0008,
+ CAMERA_MSG_PREVIEW_FRAME = 0x0010,
+ CAMERA_MSG_VIDEO_FRAME = 0x0020,
+ CAMERA_MSG_POSTVIEW_FRAME = 0x0040,
+ CAMERA_MSG_RAW_IMAGE = 0x0080,
+ CAMERA_MSG_COMPRESSED_IMAGE = 0x0100,
+ CAMERA_MSG_RAW_IMAGE_NOTIFY = 0x0200,
+ CAMERA_MSG_ALL_MSGS = 0xFFFF
};
// cmdType in sendCommand functions
@@ -207,7 +208,7 @@ public:
status_t cancelAutoFocus();
// take a picture - picture returned from callback
- status_t takePicture();
+ status_t takePicture(int msgType);
// set preview/capture parameters - key/value pairs
status_t setParameters(const String8& params);
diff --git a/include/camera/CameraParameters.h b/include/camera/CameraParameters.h
index 431aaa47..da2f049 100644
--- a/include/camera/CameraParameters.h
+++ b/include/camera/CameraParameters.h
@@ -417,11 +417,10 @@ public:
// Pixel color formats for KEY_PREVIEW_FORMAT, KEY_PICTURE_FORMAT,
// and KEY_VIDEO_FRAME_FORMAT
- // Planar variant of the YUV420 color format
- static const char PIXEL_FORMAT_YUV420P[];
static const char PIXEL_FORMAT_YUV422SP[];
static const char PIXEL_FORMAT_YUV420SP[]; // NV21
static const char PIXEL_FORMAT_YUV422I[]; // YUY2
+ static const char PIXEL_FORMAT_YUV420P[]; // YV12
static const char PIXEL_FORMAT_RGB565[];
static const char PIXEL_FORMAT_JPEG[];
diff --git a/include/camera/ICamera.h b/include/camera/ICamera.h
index b2310a6..2344b3f 100644
--- a/include/camera/ICamera.h
+++ b/include/camera/ICamera.h
@@ -70,7 +70,7 @@ public:
virtual status_t startRecording() = 0;
// stop recording mode
- virtual void stopRecording() = 0;
+ virtual void stopRecording() = 0;
// get recording state
virtual bool recordingEnabled() = 0;
@@ -84,8 +84,14 @@ public:
// cancel auto focus
virtual status_t cancelAutoFocus() = 0;
- // take a picture
- virtual status_t takePicture() = 0;
+ /*
+ * take a picture.
+ * @param msgType the message type an application selectively turn on/off
+ * on a photo-by-photo basis. The supported message types are:
+ * CAMERA_MSG_SHUTTER, CAMERA_MSG_RAW_IMAGE, CAMERA_MSG_COMPRESSED_IMAGE,
+ * and CAMERA_MSG_POSTVIEW_FRAME. Any other message types will be ignored.
+ */
+ virtual status_t takePicture(int msgType) = 0;
// set preview/capture parameters - key/value pairs
virtual status_t setParameters(const String8& params) = 0;
diff --git a/include/media/IMediaPlayerService.h b/include/media/IMediaPlayerService.h
index 0bfb166..cce9129 100644
--- a/include/media/IMediaPlayerService.h
+++ b/include/media/IMediaPlayerService.h
@@ -54,6 +54,22 @@ public:
virtual sp<IMemory> decode(const char* url, uint32_t *pSampleRate, int* pNumChannels, int* pFormat) = 0;
virtual sp<IMemory> decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, int* pFormat) = 0;
virtual sp<IOMX> getOMX() = 0;
+
+ // codecs usage tracking for the battery app
+ enum BatteryDataBits {
+ // tracking audio codec
+ kBatteryDataTrackAudio = 1,
+ // tracking video codec
+ kBatteryDataTrackVideo = 2,
+ // codec is started, otherwise codec is paused
+ kBatteryDataCodecStarted = 4,
+ // tracking decoder (for media player),
+ // otherwise tracking encoder (for media recorder)
+ kBatteryDataTrackDecoder = 8,
+ };
+
+ virtual void addBatteryData(uint32_t params) = 0;
+ virtual status_t pullBatteryData(Parcel* reply) = 0;
};
// ----------------------------------------------------------------------------
diff --git a/include/utils/RefBase.h b/include/utils/RefBase.h
index c24c0db..f8d96cf 100644
--- a/include/utils/RefBase.h
+++ b/include/utils/RefBase.h
@@ -18,7 +18,6 @@
#define ANDROID_REF_BASE_H
#include <cutils/atomic.h>
-#include <utils/TextOutput.h>
#include <stdint.h>
#include <sys/types.h>
@@ -27,6 +26,10 @@
// ---------------------------------------------------------------------------
namespace android {
+class TextOutput;
+TextOutput& printStrongPointer(TextOutput& to, const void* val);
+TextOutput& printWeakPointer(TextOutput& to, const void* val);
+
template<typename T> class wp;
// ---------------------------------------------------------------------------
@@ -427,8 +430,7 @@ sp<T>::sp(T* p, weakref_type* refs)
template <typename T>
inline TextOutput& operator<<(TextOutput& to, const sp<T>& val)
{
- to << "sp<>(" << val.get() << ")";
- return to;
+ return printStrongPointer(to, val.get());
}
// ---------------------------------------------------------------------------
@@ -585,8 +587,7 @@ void wp<T>::clear()
template <typename T>
inline TextOutput& operator<<(TextOutput& to, const wp<T>& val)
{
- to << "wp<>(" << val.unsafe_get() << ")";
- return to;
+ return printWeakPointer(to, val.unsafe_get());
}
}; // namespace android