summaryrefslogtreecommitdiffstats
path: root/media/tools
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-05 19:57:22 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-05 19:57:22 +0000
commit88185ad05fa219c194418e6e7eb9555fb07c2b67 (patch)
treea9e9464358e5f13066d9d7b71817d2c5d5386e64 /media/tools
parent0701ad5e7a6f5607ae6315f355eac2bdfd4c7080 (diff)
downloadchromium_src-88185ad05fa219c194418e6e7eb9555fb07c2b67.zip
chromium_src-88185ad05fa219c194418e6e7eb9555fb07c2b67.tar.gz
chromium_src-88185ad05fa219c194418e6e7eb9555fb07c2b67.tar.bz2
Add EGLImage as one media type different than regular uncompressed video buffer.
Video renderer could get this info via decoder->media_format(). This is needed in case video renderer is the buffer allocator. Patch by wjia@chromium.org: http://codereview.chromium.org/1725021/show BUG=NONE TEST=compiles Review URL: http://codereview.chromium.org/1952003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46479 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/tools')
-rw-r--r--media/tools/player_wtl/wtl_renderer.cc7
-rw-r--r--media/tools/player_x11/gl_video_renderer.cc6
-rw-r--r--media/tools/player_x11/gl_video_renderer.h1
-rw-r--r--media/tools/player_x11/gles_video_renderer.cc6
-rw-r--r--media/tools/player_x11/gles_video_renderer.h1
-rw-r--r--media/tools/player_x11/x11_video_renderer.cc6
-rw-r--r--media/tools/player_x11/x11_video_renderer.h1
7 files changed, 20 insertions, 8 deletions
diff --git a/media/tools/player_wtl/wtl_renderer.cc b/media/tools/player_wtl/wtl_renderer.cc
index 8a850f7..112037c 100644
--- a/media/tools/player_wtl/wtl_renderer.cc
+++ b/media/tools/player_wtl/wtl_renderer.cc
@@ -18,7 +18,8 @@ bool WtlVideoRenderer::IsMediaFormatSupported(
const media::MediaFormat& media_format) {
int width = 0;
int height = 0;
- return ParseMediaFormat(media_format, &width, &height);
+ bool uses_egl_image = false;
+ return ParseMediaFormat(media_format, &width, &height, &uses_egl_image);
}
void WtlVideoRenderer::OnStop() {
@@ -27,7 +28,9 @@ void WtlVideoRenderer::OnStop() {
bool WtlVideoRenderer::OnInitialize(media::VideoDecoder* decoder) {
int width = 0;
int height = 0;
- if (!ParseMediaFormat(decoder->media_format(), &width, &height))
+ bool uses_egl_image = false;
+ if (!ParseMediaFormat(decoder->media_format(), &width, &height,
+ &uses_egl_image))
return false;
window_->SetSize(width, height);
return true;
diff --git a/media/tools/player_x11/gl_video_renderer.cc b/media/tools/player_x11/gl_video_renderer.cc
index 87ad6ed..035db82 100644
--- a/media/tools/player_x11/gl_video_renderer.cc
+++ b/media/tools/player_x11/gl_video_renderer.cc
@@ -30,7 +30,8 @@ bool GlVideoRenderer::IsMediaFormatSupported(
const media::MediaFormat& media_format) {
int width = 0;
int height = 0;
- return ParseMediaFormat(media_format, &width, &height);
+ bool uses_egl_image = false;
+ return ParseMediaFormat(media_format, &width, &height, &uses_egl_image);
}
void GlVideoRenderer::OnStop() {
@@ -149,7 +150,8 @@ static const char kFragmentShader[] =
static const unsigned int kErrorSize = 4096;
bool GlVideoRenderer::OnInitialize(media::VideoDecoder* decoder) {
- if (!ParseMediaFormat(decoder->media_format(), &width_, &height_))
+ if (!ParseMediaFormat(decoder->media_format(), &width_, &height_,
+ &uses_egl_image_))
return false;
LOG(INFO) << "Initializing GL Renderer...";
diff --git a/media/tools/player_x11/gl_video_renderer.h b/media/tools/player_x11/gl_video_renderer.h
index 6595508..dec35f2 100644
--- a/media/tools/player_x11/gl_video_renderer.h
+++ b/media/tools/player_x11/gl_video_renderer.h
@@ -45,6 +45,7 @@ class GlVideoRenderer : public media::VideoRendererBase {
int width_;
int height_;
+ bool uses_egl_image_;
Display* display_;
Window window_;
diff --git a/media/tools/player_x11/gles_video_renderer.cc b/media/tools/player_x11/gles_video_renderer.cc
index 347a3dc..31847820 100644
--- a/media/tools/player_x11/gles_video_renderer.cc
+++ b/media/tools/player_x11/gles_video_renderer.cc
@@ -34,7 +34,8 @@ bool GlesVideoRenderer::IsMediaFormatSupported(
const media::MediaFormat& media_format) {
int width = 0;
int height = 0;
- return ParseMediaFormat(media_format, &width, &height);
+ bool uses_egl_image_ = false;
+ return ParseMediaFormat(media_format, &width, &height, &uses_egl_image_);
}
void GlesVideoRenderer::OnStop() {
@@ -105,7 +106,8 @@ static const char kFragmentShader[] =
static const unsigned int kErrorSize = 4096;
bool GlesVideoRenderer::OnInitialize(media::VideoDecoder* decoder) {
- if (!ParseMediaFormat(decoder->media_format(), &width_, &height_))
+ if (!ParseMediaFormat(decoder->media_format(), &width_, &height_,
+ &uses_egl_image_))
return false;
LOG(INFO) << "Initializing GLES Renderer...";
diff --git a/media/tools/player_x11/gles_video_renderer.h b/media/tools/player_x11/gles_video_renderer.h
index 0c53026..39478ac 100644
--- a/media/tools/player_x11/gles_video_renderer.h
+++ b/media/tools/player_x11/gles_video_renderer.h
@@ -48,6 +48,7 @@ class GlesVideoRenderer : public media::VideoRendererBase {
int width_;
int height_;
+ bool uses_egl_image_;
Display* display_;
Window window_;
diff --git a/media/tools/player_x11/x11_video_renderer.cc b/media/tools/player_x11/x11_video_renderer.cc
index 87d1c2f..50f8b5f 100644
--- a/media/tools/player_x11/x11_video_renderer.cc
+++ b/media/tools/player_x11/x11_video_renderer.cc
@@ -70,7 +70,8 @@ bool X11VideoRenderer::IsMediaFormatSupported(
const media::MediaFormat& media_format) {
int width = 0;
int height = 0;
- return ParseMediaFormat(media_format, &width, &height);
+ bool uses_egl_image = false;
+ return ParseMediaFormat(media_format, &width, &height, &uses_egl_image);
}
void X11VideoRenderer::OnStop() {
@@ -81,7 +82,8 @@ void X11VideoRenderer::OnStop() {
}
bool X11VideoRenderer::OnInitialize(media::VideoDecoder* decoder) {
- if (!ParseMediaFormat(decoder->media_format(), &width_, &height_))
+ if (!ParseMediaFormat(decoder->media_format(), &width_, &height_,
+ &uses_egl_image_))
return false;
LOG(INFO) << "Initializing X11 Renderer...";
diff --git a/media/tools/player_x11/x11_video_renderer.h b/media/tools/player_x11/x11_video_renderer.h
index d122675..2ffb17f 100644
--- a/media/tools/player_x11/x11_video_renderer.h
+++ b/media/tools/player_x11/x11_video_renderer.h
@@ -44,6 +44,7 @@ class X11VideoRenderer : public media::VideoRendererBase {
int width_;
int height_;
+ bool uses_egl_image_;
Display* display_;
Window window_;