Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Unified Diff: media/base/media_posix.cc

Issue 3005036: Implement VP8 encoder for chromoting (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: just uploading Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/media.h ('k') | media/base/media_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/media_posix.cc
diff --git a/media/base/media_posix.cc b/media/base/media_posix.cc
index eebae5e6b8a375fdbce3fc8e6b80be8f251a6066..d5137eba4bafe629d3ae002567fbc276b0b7731f 100644
--- a/media/base/media_posix.cc
+++ b/media/base/media_posix.cc
@@ -10,6 +10,7 @@
#include "base/file_path.h"
#include "base/logging.h"
+#include "base/native_library.h"
#include "base/path_service.h"
#include "media/ffmpeg/ffmpeg_common.h"
#include "third_party/ffmpeg/ffmpeg_stubs.h"
@@ -69,6 +70,9 @@ std::string GetDSOName(tp_ffmpeg::StubModules stub_key) {
} // namespace
+// Address of vpx_codec_vp8_cx_algo.
+static void* vp8_cx_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) {
@@ -85,7 +89,18 @@ bool InitializeMediaLibrary(const FilePath& module_dir) {
paths[module].push_back(path.value());
}
- return tp_ffmpeg::InitializeStubs(paths);
+ bool ret = tp_ffmpeg::InitializeStubs(paths);
+
+ // TODO(hclam): This is temporary to obtain address of
+ // vpx_codec_vp8_cx_algo. This should be removed once libvpx has a
+ // getter method for it.
+ base::NativeLibrary sumo_lib =
+ base::LoadNativeLibrary(module_dir.Append(sumo_name));
+ if (sumo_lib) {
+ vp8_cx_algo_address = base::GetFunctionPointerFromNativeLibrary(
+ sumo_lib, "vpx_codec_vp8_cx_algo");
+ }
+ return ret;
}
#if defined(OS_LINUX)
@@ -114,4 +129,8 @@ bool InitializeOpenMaxLibrary(const FilePath& module_dir) {
}
#endif
+void* GetVp8CxAlgoAddress() {
+ return vp8_cx_algo_address;
+}
+
} // namespace media
« no previous file with comments | « media/base/media.h ('k') | media/base/media_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698