summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorjiesun@google.com <jiesun@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-10 01:05:41 +0000
committerjiesun@google.com <jiesun@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-10 01:05:41 +0000
commitee68378a4c92a66b80288a42e584dbd9b4e89619 (patch)
tree866beac2a4023529ade2e91c39d2d7f6312e7db3 /media
parentb2df464d2783521f8fabbbe76f74a4129dd8417e (diff)
downloadchromium_src-ee68378a4c92a66b80288a42e584dbd9b4e89619.zip
chromium_src-ee68378a4c92a66b80288a42e584dbd9b4e89619.tar.gz
chromium_src-ee68378a4c92a66b80288a42e584dbd9b4e89619.tar.bz2
1. ipc_video_decoder.cc/h is media pipeline filter which use the gpu decoder facilities in video stack. it is only enabled when (a) hardware composition is on (b) hardware decoding command line is on (c) h264 codec is specified.
2. gpu_video_service.cc/h is a singleton in gpu process which provide video services for renderer process, through it we could create decoder. ( in my imagination, in the future, we could create encoder or capturer too) 3. gpu_video_decoder.cc/h. abstract interface for hardware decoder. 4. gpu_video_service_host.cc/h is singleton in renderer process which provide proxy for gpu_video_service. 5. gpu_video_decoder_host.cc/h is proxy for gpu_video_decoder. (1 to 1 map).basically there is one global GpuVideoService in GPU process, one GpuVideoServiceHost in Renderer process. for each renderer process, there are could be multiple renderer view, each could had multiple GpuVideoDecoderHost the connect to GpuVideoDeocder through GPUCHannelHOst/GpuChannel. 6. gpu_video_common.cc/h: IPC message definition and pickle/marshaling support. ISSUES: 1. in media pipeline, we need let decoder to determine if bit stream filter should be used instead of let command line to determine it. 2. stop readback from D3D surface use ANGLE. 3. Flush logic still need fine tuning. 4. CreateThread in GpuVideoDecoder, and post message in message handler, and derived classs handle message loop. ? 5. Error handling. 6. Input ring buffer implementation. Current impl is naive. 7.Add output queue for MFT decoder. 8. Query Capabilities at GetVideoServices()... BUG=None TEST=Windows7 Review URL: http://codereview.chromium.org/2873089 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55516 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/base/media_switches.cc3
-rw-r--r--media/base/media_switches.h1
-rw-r--r--media/filters/ffmpeg_demuxer.cc4
3 files changed, 6 insertions, 2 deletions
diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
index 3b684ce..e2612c25 100644
--- a/media/base/media_switches.cc
+++ b/media/base/media_switches.cc
@@ -11,6 +11,9 @@ namespace switches {
const char kAlsaDevice[] = "alsa-device";
#endif
+// Enable hardware decoding through gpu process.
+const char kEnableAcceleratedDecoding[] = "enable-accelerated-decoding";
+
// Enable hardware decoding using OpenMax API.
// In practice this is for ChromeOS ARM.
const char kEnableOpenMax[] = "enable-openmax";
diff --git a/media/base/media_switches.h b/media/base/media_switches.h
index 6e0e0d3..6dd553a 100644
--- a/media/base/media_switches.h
+++ b/media/base/media_switches.h
@@ -15,6 +15,7 @@ namespace switches {
extern const char kAlsaDevice[];
#endif
+extern const char kEnableAcceleratedDecoding[];
extern const char kEnableOpenMax[];
extern const char kVideoThreads[];
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index 5c2a913..7a74d13 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -426,8 +426,8 @@ void FFmpegDemuxer::InitializeTask(DataSource* data_source,
// Initialize the bitstream if OpenMAX is enabled.
// TODO(hclam): Should be enabled by the decoder.
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableOpenMax)) {
+ CommandLine* cmd = CommandLine::ForCurrentProcess();
+ if (cmd->HasSwitch(switches::kEnableAcceleratedDecoding)) {
// TODO(ajwong): Unittest this branch of the if statement.
// TODO(hclam): In addition to codec we should also check the container.
const char* filter_name = NULL;