summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-29 17:34:32 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-29 17:34:32 +0000
commit622b788650a636236c3842f1287126fc60fb80ed (patch)
treeda3e6045ec78f3c4929a6f11779bb8ac21b5adb1 /media
parent3190f36c2f7ac99d06a07b3df1e12ac36fc11d08 (diff)
downloadchromium_src-622b788650a636236c3842f1287126fc60fb80ed.zip
chromium_src-622b788650a636236c3842f1287126fc60fb80ed.tar.gz
chromium_src-622b788650a636236c3842f1287126fc60fb80ed.tar.bz2
VP8 decoder for chromoting
Added DecoderVp8 and unit test for chromoting. TEST=remoting_unittests BUG=50235 Review URL: http://codereview.chromium.org/3032047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60960 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/base/media.h8
-rw-r--r--media/base/media_posix.cc9
-rw-r--r--media/base/media_win.cc9
3 files changed, 24 insertions, 2 deletions
diff --git a/media/base/media.h b/media/base/media.h
index fd3269e..21dc6c2 100644
--- a/media/base/media.h
+++ b/media/base/media.h
@@ -27,12 +27,16 @@ bool InitializeOpenMaxLibrary(const FilePath& module_dir);
// This is temporary to get the address of vpx_codec_vp8_cx_algo in FFmpeg.
// This method should only be called after media library is loaded.
-
// TODO(hclam): Remove this after we have a getter function for the same
// purpose in libvpx.
-// See bug: http://code.google.com/p/webm/issues/detail?id=169
void* GetVp8CxAlgoAddress();
+// This is temporary to get the address of vpx_codec_vp8_dx_algo in FFmpeg.
+// This method should only be called after media library is loaded.
+// TODO(hclam): Remove this after we have a getter function for the same
+// purpose in libvpx.
+void* GetVp8DxAlgoAddress();
+
} // namespace media
#endif // MEDIA_BASE_MEDIA_H_
diff --git a/media/base/media_posix.cc b/media/base/media_posix.cc
index d5137eb..89f8a17 100644
--- a/media/base/media_posix.cc
+++ b/media/base/media_posix.cc
@@ -73,6 +73,9 @@ std::string GetDSOName(tp_ffmpeg::StubModules stub_key) {
// Address of vpx_codec_vp8_cx_algo.
static void* vp8_cx_algo_address = NULL;
+// Address of vpx_codec_vp8_dx_algo.
+static void* vp8_dx_algo_address = NULL;
+
// Attempts to initialize the media library (loading DSOs, etc.).
// Returns true if everything was successfully initialized, false otherwise.
bool InitializeMediaLibrary(const FilePath& module_dir) {
@@ -99,6 +102,8 @@ bool InitializeMediaLibrary(const FilePath& module_dir) {
if (sumo_lib) {
vp8_cx_algo_address = base::GetFunctionPointerFromNativeLibrary(
sumo_lib, "vpx_codec_vp8_cx_algo");
+ vp8_dx_algo_address = base::GetFunctionPointerFromNativeLibrary(
+ sumo_lib, "vpx_codec_vp8_dx_algo");
}
return ret;
}
@@ -133,4 +138,8 @@ void* GetVp8CxAlgoAddress() {
return vp8_cx_algo_address;
}
+void* GetVp8DxAlgoAddress() {
+ return vp8_dx_algo_address;
+}
+
} // namespace media
diff --git a/media/base/media_win.cc b/media/base/media_win.cc
index f31ab5b..75c8d29 100644
--- a/media/base/media_win.cc
+++ b/media/base/media_win.cc
@@ -51,6 +51,9 @@ FilePath::CharType* GetDLLName(FFmpegDLLKeys dll_key) {
// Address of vpx_codec_vp8_cx_algo.
static void* vp8_cx_algo_address = NULL;
+// Address of vpx_codec_vp8_dx_algo.
+static void* vp8_dx_algo_address = NULL;
+
// Attempts to initialize the media library (loading DLLs, DSOs, etc.).
// Returns true if everything was successfully initialized, false otherwise.
bool InitializeMediaLibrary(const FilePath& base_path) {
@@ -90,6 +93,8 @@ bool InitializeMediaLibrary(const FilePath& base_path) {
if (avcodec_lib) {
vp8_cx_algo_address = base::GetFunctionPointerFromNativeLibrary(
avcodec_lib, "vpx_codec_vp8_cx_algo");
+ vp8_dx_algo_address = base::GetFunctionPointerFromNativeLibrary(
+ avcodec_lib, "vpx_codec_vp8_dx_algo");
}
// Check that we loaded all libraries successfully. We only need to check the
@@ -115,4 +120,8 @@ void* GetVp8CxAlgoAddress() {
return vp8_cx_algo_address;
}
+void* GetVp8DxAlgoAddress() {
+ return vp8_dx_algo_address;
+}
+
} // namespace media