summaryrefslogtreecommitdiffstats
path: root/media/video
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-09 00:06:33 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-09 00:06:33 +0000
commite82c747e5c09beeba226f4d319c687f10f3c123d (patch)
tree45c703437e8e86d5e97ddb9f1623c3aa59fd241c /media/video
parent3955344f69f3dae30b674a030e48d7c749fbdcce (diff)
downloadchromium_src-e82c747e5c09beeba226f4d319c687f10f3c123d.zip
chromium_src-e82c747e5c09beeba226f4d319c687f10f3c123d.tar.gz
chromium_src-e82c747e5c09beeba226f4d319c687f10f3c123d.tar.bz2
Clean up texture types in VideoFrame
A VideoFrame should only reveal it self as system memory or textures (GL or D3D). All the implementation details should be hidden. This removed EGL image, OMXBUFFERHEADERTYPE, D3D surface and MF buffer from video frame. We should only have 3 different types of video frames: 1. System memory Whether it is allocated by VideoFrame or is just memory mapped should fall into this category. Memory can either be allocated internally or provided externally. 2. GL texture EGL image or just plain GL texture should fall into this area. Decode engines should do all the necessary operations to convert texture to GL textures. 3. D3D texture Whether we are using Media Foundation or DxVA2, if we are on windows we should convert everything to D3D texture and again all the operations involved are done inside the decode engine. BUG=53714 TEST=Tree is green. This is just API change. Review URL: http://codereview.chromium.org/3303014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58899 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/video')
-rw-r--r--media/video/omx_video_decode_engine.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/media/video/omx_video_decode_engine.cc b/media/video/omx_video_decode_engine.cc
index 3aa8101..b953cfa 100644
--- a/media/video/omx_video_decode_engine.cc
+++ b/media/video/omx_video_decode_engine.cc
@@ -110,7 +110,7 @@ void OmxVideoDecodeEngine::Initialize(
info.success_ = true;
info.provides_buffers_ = !uses_egl_image_;
info.stream_info_.surface_type_ =
- uses_egl_image_ ? VideoFrame::TYPE_EGL_IMAGE
+ uses_egl_image_ ? VideoFrame::TYPE_GL_TEXTURE
: VideoFrame::TYPE_SYSTEM_MEMORY;
info.stream_info_.surface_format_ = GetSurfaceFormat();
info.stream_info_.surface_width_ = config.width_;
@@ -919,7 +919,7 @@ scoped_refptr<VideoFrame> OmxVideoDecodeEngine::CreateOmxBufferVideoFrame(
strides[1] = strides[2] = width_ >> 1;
VideoFrame::CreateFrameExternal(
- VideoFrame::TYPE_OMXBUFFERHEAD,
+ VideoFrame::TYPE_SYSTEM_MEMORY,
VideoFrame::YV12,
width_, height_, 3,
data, strides,
@@ -1121,8 +1121,7 @@ void OmxVideoDecodeEngine::ChangePort(OMX_COMMANDTYPE cmd, int port_index) {
OMX_BUFFERHEADERTYPE* OmxVideoDecodeEngine::FindOmxBuffer(
scoped_refptr<VideoFrame> video_frame) {
for (size_t i = 0; i < output_frames_.size(); ++i) {
- scoped_refptr<VideoFrame> frame = output_frames_[i].first;
- if (video_frame->private_buffer() == frame->private_buffer())
+ if (video_frame == output_frames_[i].first)
return output_frames_[i].second;
}
return NULL;