summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/camera/ICameraService.h7
-rw-r--r--include/camera/ICameraServiceListener.h24
-rw-r--r--include/media/stagefright/MPEG4Writer.h12
3 files changed, 43 insertions, 0 deletions
diff --git a/include/camera/ICameraService.h b/include/camera/ICameraService.h
index f7f06bb..cc41efe 100644
--- a/include/camera/ICameraService.h
+++ b/include/camera/ICameraService.h
@@ -53,6 +53,7 @@ public:
GET_LEGACY_PARAMETERS,
SUPPORTS_CAMERA_API,
CONNECT_LEGACY,
+ SET_TORCH_MODE,
};
enum {
@@ -142,6 +143,12 @@ public:
int clientUid,
/*out*/
sp<ICamera>& device) = 0;
+
+ /**
+ * Turn on or off a camera's torch mode.
+ */
+ virtual status_t setTorchMode(const String16& cameraId, bool enabled,
+ const sp<IBinder>& clientBinder) = 0;
};
// ----------------------------------------------------------------------------
diff --git a/include/camera/ICameraServiceListener.h b/include/camera/ICameraServiceListener.h
index 0a0e43a..9e8b912 100644
--- a/include/camera/ICameraServiceListener.h
+++ b/include/camera/ICameraServiceListener.h
@@ -66,9 +66,33 @@ public:
STATUS_UNKNOWN = 0xFFFFFFFF,
};
+ /**
+ * The torch mode status of a camera.
+ *
+ * Initial status will be transmitted with onTorchStatusChanged immediately
+ * after this listener is added to the service listener list.
+ */
+ enum TorchStatus {
+ // The camera's torch mode has become available to use via
+ // setTorchMode().
+ TORCH_STATUS_AVAILABLE = TORCH_MODE_STATUS_AVAILABLE,
+ // The camera's torch mode has become not available to use via
+ // setTorchMode().
+ TORCH_STATUS_NOT_AVAILABLE = TORCH_MODE_STATUS_RESOURCE_BUSY,
+ // The camera's torch mode has been turned off by setTorchMode().
+ TORCH_STATUS_OFF = TORCH_MODE_STATUS_OFF,
+ // The camera's torch mode has been turned on by setTorchMode().
+ TORCH_STATUS_ON = 0x80000000,
+
+ // Use to initialize variables only
+ TORCH_STATUS_UNKNOWN = 0xFFFFFFFF,
+ };
+
DECLARE_META_INTERFACE(CameraServiceListener);
virtual void onStatusChanged(Status status, int32_t cameraId) = 0;
+
+ virtual void onTorchStatusChanged(TorchStatus status, const String16& cameraId) = 0;
};
// ----------------------------------------------------------------------------
diff --git a/include/media/stagefright/MPEG4Writer.h b/include/media/stagefright/MPEG4Writer.h
index 899b324..a195fe8 100644
--- a/include/media/stagefright/MPEG4Writer.h
+++ b/include/media/stagefright/MPEG4Writer.h
@@ -26,6 +26,7 @@
namespace android {
+class AMessage;
class MediaBuffer;
class MediaSource;
class MetaData;
@@ -48,6 +49,7 @@ public:
virtual status_t dump(int fd, const Vector<String16>& args);
void beginBox(const char *fourcc);
+ void beginBox(uint32_t id);
void writeInt8(int8_t x);
void writeInt16(int16_t x);
void writeInt32(int32_t x);
@@ -62,6 +64,7 @@ public:
int32_t getTimeScale() const { return mTimeScale; }
status_t setGeoData(int latitudex10000, int longitudex10000);
+ status_t setCaptureRate(float captureFps);
virtual void setStartTimeOffsetMs(int ms) { mStartTimeOffsetMs = ms; }
virtual int32_t getStartTimeOffsetMs() const { return mStartTimeOffsetMs; }
@@ -88,6 +91,7 @@ private:
off64_t mFreeBoxOffset;
bool mStreamableFile;
off64_t mEstimatedMoovBoxSize;
+ off64_t mMoovExtraSize;
uint32_t mInterleaveDurationUs;
int32_t mTimeScale;
int64_t mStartTimestampUs;
@@ -102,6 +106,8 @@ private:
List<off64_t> mBoxes;
+ sp<AMessage> mMetaKeys;
+
void setStartTimestampUs(int64_t timeUs);
int64_t getStartTimestampUs(); // Not const
status_t startTracks(MetaData *params);
@@ -195,6 +201,12 @@ private:
void writeGeoDataBox();
void writeLatitude(int degreex10000);
void writeLongitude(int degreex10000);
+
+ void addDeviceMeta();
+ void writeHdlr();
+ void writeKeys();
+ void writeIlst();
+ void writeMetaBox();
void sendSessionSummary();
void release();
status_t reset();