summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/camera/camera2/CaptureRequest.h1
-rw-r--r--include/camera/camera2/ICameraDeviceUser.h13
-rw-r--r--include/media/AudioRecord.h15
-rw-r--r--include/media/IMediaCodecList.h4
-rw-r--r--include/media/MediaCodecInfo.h4
-rw-r--r--include/media/mediametadataretriever.h1
-rw-r--r--include/media/stagefright/MediaCodecList.h15
-rw-r--r--include/media/stagefright/MetaData.h1
8 files changed, 51 insertions, 3 deletions
diff --git a/include/camera/camera2/CaptureRequest.h b/include/camera/camera2/CaptureRequest.h
index e56d61f..eeab217 100644
--- a/include/camera/camera2/CaptureRequest.h
+++ b/include/camera/camera2/CaptureRequest.h
@@ -30,6 +30,7 @@ public:
CameraMetadata mMetadata;
Vector<sp<Surface> > mSurfaceList;
+ bool mIsReprocess;
/**
* Keep impl up-to-date with CaptureRequest.java in frameworks/base
diff --git a/include/camera/camera2/ICameraDeviceUser.h b/include/camera/camera2/ICameraDeviceUser.h
index e9f1f5a..c850924 100644
--- a/include/camera/camera2/ICameraDeviceUser.h
+++ b/include/camera/camera2/ICameraDeviceUser.h
@@ -103,6 +103,19 @@ public:
virtual status_t createStream(const OutputConfiguration& outputConfiguration) = 0;
+ /**
+ * Create an input stream of width, height, and format (one of
+ * HAL_PIXEL_FORMAT_*)
+ *
+ * Return stream ID if it's a non-negative value. status_t if it's a
+ * negative value.
+ */
+ virtual status_t createInputStream(int width, int height, int format) = 0;
+
+ // get the buffer producer of the input stream
+ virtual status_t getInputBufferProducer(
+ sp<IGraphicBufferProducer> *producer) = 0;
+
// Create a request object from a template.
virtual status_t createDefaultRequest(int templateId,
/*out*/
diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h
index 7be2c3e..dbe2788 100644
--- a/include/media/AudioRecord.h
+++ b/include/media/AudioRecord.h
@@ -335,6 +335,13 @@ public:
* After draining these frames of data, the caller should release them with releaseBuffer().
* If the track buffer is not empty, obtainBuffer() returns as many contiguous
* full frames as are available immediately.
+ *
+ * If nonContig is non-NULL, it is an output parameter that will be set to the number of
+ * additional non-contiguous frames that are predicted to be available immediately,
+ * if the client were to release the first frames and then call obtainBuffer() again.
+ * This value is only a prediction, and needs to be confirmed.
+ * It will be set to zero for an error return.
+ *
* If the track buffer is empty and track is stopped, obtainBuffer() returns WOULD_BLOCK
* regardless of the value of waitCount.
* If the track buffer is empty and track is not stopped, obtainBuffer() blocks with a
@@ -364,11 +371,15 @@ public:
* raw pointer to the buffer
*/
- status_t obtainBuffer(Buffer* audioBuffer, int32_t waitCount);
+ status_t obtainBuffer(Buffer* audioBuffer, int32_t waitCount,
+ size_t *nonContig = NULL);
private:
/* If nonContig is non-NULL, it is an output parameter that will be set to the number of
- * additional non-contiguous frames that are available immediately.
+ * additional non-contiguous frames that are predicted to be available immediately,
+ * if the client were to release the first frames and then call obtainBuffer() again.
+ * This value is only a prediction, and needs to be confirmed.
+ * It will be set to zero for an error return.
* FIXME We could pass an array of Buffers instead of only one Buffer to obtainBuffer(),
* in case the requested amount of frames is in two or more non-contiguous regions.
* FIXME requested and elapsed are both relative times. Consider changing to absolute time.
diff --git a/include/media/IMediaCodecList.h b/include/media/IMediaCodecList.h
index e93ea8b..12b52d7 100644
--- a/include/media/IMediaCodecList.h
+++ b/include/media/IMediaCodecList.h
@@ -21,6 +21,8 @@
#include <binder/IInterface.h>
#include <binder/Parcel.h>
+#include <media/stagefright/foundation/AMessage.h>
+
namespace android {
struct MediaCodecInfo;
@@ -33,6 +35,8 @@ public:
virtual size_t countCodecs() const = 0;
virtual sp<MediaCodecInfo> getCodecInfo(size_t index) const = 0;
+ virtual const sp<AMessage> getGlobalSettings() const = 0;
+
virtual ssize_t findCodecByType(
const char *type, bool encoder, size_t startIndex = 0) const = 0;
diff --git a/include/media/MediaCodecInfo.h b/include/media/MediaCodecInfo.h
index cd56adb..895a13a 100644
--- a/include/media/MediaCodecInfo.h
+++ b/include/media/MediaCodecInfo.h
@@ -35,6 +35,8 @@ struct AMessage;
struct Parcel;
struct CodecCapabilities;
+typedef KeyedVector<AString, AString> CodecSettings;
+
struct MediaCodecInfo : public RefBase {
struct ProfileLevel {
uint32_t mProfile;
@@ -104,6 +106,7 @@ private:
MediaCodecInfo(AString name, bool encoder, const char *mime);
void addQuirk(const char *name);
status_t addMime(const char *mime);
+ status_t updateMime(const char *mime);
status_t initializeCapabilities(const CodecCapabilities &caps);
void addDetail(const AString &key, const AString &value);
void addFeature(const AString &key, int32_t value);
@@ -114,6 +117,7 @@ private:
DISALLOW_EVIL_CONSTRUCTORS(MediaCodecInfo);
friend class MediaCodecList;
+ friend class MediaCodecListOverridesTest;
};
} // namespace android
diff --git a/include/media/mediametadataretriever.h b/include/media/mediametadataretriever.h
index b35cf32..7191965 100644
--- a/include/media/mediametadataretriever.h
+++ b/include/media/mediametadataretriever.h
@@ -57,6 +57,7 @@ enum {
METADATA_KEY_IS_DRM = 22,
METADATA_KEY_LOCATION = 23,
METADATA_KEY_VIDEO_ROTATION = 24,
+ METADATA_KEY_CAPTURE_FRAMERATE = 25,
// Add more here...
};
diff --git a/include/media/stagefright/MediaCodecList.h b/include/media/stagefright/MediaCodecList.h
index c2bbe4d..9d1d675 100644
--- a/include/media/stagefright/MediaCodecList.h
+++ b/include/media/stagefright/MediaCodecList.h
@@ -48,9 +48,14 @@ struct MediaCodecList : public BnMediaCodecList {
return mCodecInfos.itemAt(index);
}
+ virtual const sp<AMessage> getGlobalSettings() const;
+
// to be used by MediaPlayerService alone
static sp<IMediaCodecList> getLocalInstance();
+ // only to be used in getLocalInstance
+ void updateDetailsForMultipleCodecs(const KeyedVector<AString, CodecSettings>& updates);
+
private:
class BinderDeathObserver : public IBinder::DeathRecipient {
void binderDied(const wp<IBinder> &the_late_who __unused);
@@ -60,6 +65,7 @@ private:
enum Section {
SECTION_TOPLEVEL,
+ SECTION_SETTINGS,
SECTION_DECODERS,
SECTION_DECODER,
SECTION_DECODER_TYPE,
@@ -74,10 +80,14 @@ private:
status_t mInitCheck;
Section mCurrentSection;
+ bool mUpdate;
Vector<Section> mPastSections;
int32_t mDepth;
AString mHrefBase;
+ sp<AMessage> mGlobalSettings;
+ KeyedVector<AString, CodecSettings> mOverrides;
+
Vector<sp<MediaCodecInfo> > mCodecInfos;
sp<MediaCodecInfo> mCurrentInfo;
sp<IOMX> mOMX;
@@ -87,7 +97,7 @@ private:
status_t initCheck() const;
void parseXMLFile(const char *path);
- void parseTopLevelXMLFile(const char *path);
+ void parseTopLevelXMLFile(const char *path, bool ignore_errors = false);
static void StartElementHandlerWrapper(
void *me, const char *name, const char **attrs);
@@ -98,9 +108,12 @@ private:
void endElementHandler(const char *name);
status_t includeXMLFile(const char **attrs);
+ status_t addSettingFromAttributes(const char **attrs);
status_t addMediaCodecFromAttributes(bool encoder, const char **attrs);
void addMediaCodec(bool encoder, const char *name, const char *type = NULL);
+ void setCurrentCodecInfo(bool encoder, const char *name, const char *type);
+
status_t addQuirk(const char **attrs);
status_t addTypeFromAttributes(const char **attrs);
status_t addLimit(const char **attrs);
diff --git a/include/media/stagefright/MetaData.h b/include/media/stagefright/MetaData.h
index c3c26af..8bdebf6 100644
--- a/include/media/stagefright/MetaData.h
+++ b/include/media/stagefright/MetaData.h
@@ -100,6 +100,7 @@ enum {
kKeyCompilation = 'cpil', // cstring
kKeyLocation = 'loc ', // cstring
kKeyTimeScale = 'tmsl', // int32_t
+ kKeyCaptureFramerate = 'capF', // float (capture fps)
// video profile and level
kKeyVideoProfile = 'vprf', // int32_t