@@ -48,15 +48,21 @@ enum camcorder_quality {
4848};
4949
5050/* *
51- *Set CIF as default maximum import and export resolution of video editor.
52- *The maximum import and export resolutions are platform specific,
53- *which should be defined in media_profiles.xml.
51+ * Set CIF as default maximum import and export resolution of video editor.
52+ * The maximum import and export resolutions are platform specific,
53+ * which should be defined in media_profiles.xml.
54+ * Set default maximum prefetch YUV frames to 6, which means video editor can
55+ * queue up to 6 YUV frames in the video encoder source.
56+ * This value is used to limit the amount of memory used by video editor
57+ * engine when the encoder consumes YUV frames at a lower speed
58+ * than video editor engine produces.
5459 */
5560enum videoeditor_capability {
5661 VIDEOEDITOR_DEFAULT_MAX_INPUT_FRAME_WIDTH = 352 ,
5762 VIDEOEDITOR_DEFUALT_MAX_INPUT_FRAME_HEIGHT = 288 ,
5863 VIDEOEDITOR_DEFAULT_MAX_OUTPUT_FRAME_WIDTH = 352 ,
5964 VIDEOEDITOR_DEFUALT_MAX_OUTPUT_FRAME_HEIGHT = 288 ,
65+ VIDEOEDITOR_DEFAULT_MAX_PREFETCH_YUV_FRAMES = 6
6066};
6167
6268enum video_decoder {
@@ -138,6 +144,8 @@ class MediaProfiles
138144 * videoeditor.input.height.max - max input video frame height
139145 * videoeditor.output.width.max - max output video frame width
140146 * videoeditor.output.height.max - max output video frame height
147+ * maxPrefetchYUVFrames - max prefetch YUV frames in video editor engine. This value is used
148+ * to limit the memory consumption.
141149 */
142150 int getVideoEditorCapParamByName (const char *name) const ;
143151
@@ -357,18 +365,20 @@ class MediaProfiles
357365 };
358366 struct VideoEditorCap {
359367 VideoEditorCap (int inFrameWidth, int inFrameHeight,
360- int outFrameWidth, int outFrameHeight)
368+ int outFrameWidth, int outFrameHeight, int frames )
361369 : mMaxInputFrameWidth (inFrameWidth),
362370 mMaxInputFrameHeight (inFrameHeight),
363371 mMaxOutputFrameWidth(outFrameWidth),
364- mMaxOutputFrameHeight(outFrameHeight) {}
372+ mMaxOutputFrameHeight(outFrameHeight),
373+ mMaxPrefetchYUVFrames(frames) {}
365374
366375 ~VideoEditorCap () {}
367376
368377 int mMaxInputFrameWidth ;
369378 int mMaxInputFrameHeight ;
370379 int mMaxOutputFrameWidth ;
371380 int mMaxOutputFrameHeight ;
381+ int mMaxPrefetchYUVFrames ;
372382 };
373383
374384 int getCamcorderProfileIndex (int cameraId, camcorder_quality quality) const ;
0 commit comments