summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHong Teng <hongteng@google.com>2011-11-10 14:54:26 -0800
committerHong Teng <hongteng@google.com>2011-11-14 13:02:59 -0800
commit3a9cefebd2c5d2157aefaed01c54f151dc64a5b3 (patch)
tree33d2825031600b28086498c72925c94d6d6ed556 /include
parent1dc0ab1d2e2c5f40193556ad1239e304563f3083 (diff)
downloadframeworks_av-3a9cefebd2c5d2157aefaed01c54f151dc64a5b3.zip
frameworks_av-3a9cefebd2c5d2157aefaed01c54f151dc64a5b3.tar.gz
frameworks_av-3a9cefebd2c5d2157aefaed01c54f151dc64a5b3.tar.bz2
Fix for issue 5309336
-add videoeditor maximum prefetch YUV frames in media_profiles.xml to limit the total memory usage. Change-Id: I41ffbc192fcce4c7635e5b0a1f2835852e5ee509
Diffstat (limited to 'include')
-rw-r--r--include/media/MediaProfiles.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/include/media/MediaProfiles.h b/include/media/MediaProfiles.h
index eab7648..250f267 100644
--- a/include/media/MediaProfiles.h
+++ b/include/media/MediaProfiles.h
@@ -48,15 +48,21 @@ enum camcorder_quality {
};
/**
- *Set CIF as default maximum import and export resolution of video editor.
- *The maximum import and export resolutions are platform specific,
- *which should be defined in media_profiles.xml.
+ * Set CIF as default maximum import and export resolution of video editor.
+ * The maximum import and export resolutions are platform specific,
+ * which should be defined in media_profiles.xml.
+ * Set default maximum prefetch YUV frames to 6, which means video editor can
+ * queue up to 6 YUV frames in the video encoder source.
+ * This value is used to limit the amount of memory used by video editor
+ * engine when the encoder consumes YUV frames at a lower speed
+ * than video editor engine produces.
*/
enum videoeditor_capability {
VIDEOEDITOR_DEFAULT_MAX_INPUT_FRAME_WIDTH = 352,
VIDEOEDITOR_DEFUALT_MAX_INPUT_FRAME_HEIGHT = 288,
VIDEOEDITOR_DEFAULT_MAX_OUTPUT_FRAME_WIDTH = 352,
VIDEOEDITOR_DEFUALT_MAX_OUTPUT_FRAME_HEIGHT = 288,
+ VIDEOEDITOR_DEFAULT_MAX_PREFETCH_YUV_FRAMES = 6
};
enum video_decoder {
@@ -138,6 +144,8 @@ public:
* videoeditor.input.height.max - max input video frame height
* videoeditor.output.width.max - max output video frame width
* videoeditor.output.height.max - max output video frame height
+ * maxPrefetchYUVFrames - max prefetch YUV frames in video editor engine. This value is used
+ * to limit the memory consumption.
*/
int getVideoEditorCapParamByName(const char *name) const;
@@ -357,11 +365,12 @@ private:
};
struct VideoEditorCap {
VideoEditorCap(int inFrameWidth, int inFrameHeight,
- int outFrameWidth, int outFrameHeight)
+ int outFrameWidth, int outFrameHeight, int frames)
: mMaxInputFrameWidth(inFrameWidth),
mMaxInputFrameHeight(inFrameHeight),
mMaxOutputFrameWidth(outFrameWidth),
- mMaxOutputFrameHeight(outFrameHeight) {}
+ mMaxOutputFrameHeight(outFrameHeight),
+ mMaxPrefetchYUVFrames(frames) {}
~VideoEditorCap() {}
@@ -369,6 +378,7 @@ private:
int mMaxInputFrameHeight;
int mMaxOutputFrameWidth;
int mMaxOutputFrameHeight;
+ int mMaxPrefetchYUVFrames;
};
int getCamcorderProfileIndex(int cameraId, camcorder_quality quality) const;