Right now, media::ImageProcessor's Process() has asymmetric interface:
bool Process(scoped_refptr<VideoFrame> frame,
int output_buffer_index,
std::vector<base::ScopedFD> output_dmabuf_fds,
FrameReadyCB cb);
the input frame buffer is allocated by caller; however, the output frame buffer is either allocated by caller (when output_dmabuf_fds is given) or allocated by ImageProcessor (caller just specify which buffer index is used).
The output interface has two disadvantages:
1) it is platform dependent (only POXIS platforms define ScopedFD);
2) it is complicated.
If we can make all ImageProcessor's users to take care of output buffer allocation, then ImageProcessor::Process can be simplified as:
bool Process(scoped_refptr<VideoFrame> input_frame,
scoped_refptr<VideoFrame> output_frame,
FrameReadyCB cb);
Comment 1 by deanliao@chromium.org
, Jan 16Status: Duplicate (was: Started)