summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorjiesun@google.com <jiesun@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-09 15:59:44 +0000
committerjiesun@google.com <jiesun@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-09 15:59:44 +0000
commitc9f28a7d16b71b17185b456e3b53e4e638d005d0 (patch)
tree5940cfb4244935b01608e286f84a83413e0329a1 /media
parent6b1b2b6bc21270ef1b90a28293a1cb743e933383 (diff)
downloadchromium_src-c9f28a7d16b71b17185b456e3b53e4e638d005d0.zip
chromium_src-c9f28a7d16b71b17185b456e3b53e4e638d005d0.tar.gz
chromium_src-c9f28a7d16b71b17185b456e3b53e4e638d005d0.tar.bz2
Special thanks for in-ming cheng's MFT hardware decodering code.
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_decoder_mft.cc/h media foundation transform hardware decoder which run on windows 7 only. 5. gpu_video_service_host.cc/h is singleton in renderer process which provide proxy for gpu_video_service. 6. 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. 7. 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@55405 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;