summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2014-01-22 16:18:37 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-22 16:46:52 +0100
commit8a8ae0abc76315d9c4b29379040f24643ad66ebd (patch)
tree87cb837e39cd3b153f67198087882f1f919a0469
parent72dcef7294680226ffde88bb1837bd1e4364b809 (diff)
Fix html5 video
Deploy the built ffmpegsumo library and make chromium find it by overriding the content::DIR_MEDIA_LIBS path with the deploy location. We deploy the plugin to $$[QT_INSTALL_PLUGINS]/qtwebengine. Change-Id: I0aeb37fccd2af62b23f8e6405041655e1f66b7aa Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
-rw-r--r--src/core/content_main_delegate_qt.cpp2
-rw-r--r--src/core/core.pro14
-rw-r--r--src/core/web_engine_library_info.cpp6
-rw-r--r--src/core/web_engine_library_info.h1
4 files changed, 22 insertions, 1 deletions
diff --git a/src/core/content_main_delegate_qt.cpp b/src/core/content_main_delegate_qt.cpp
index a8e5386de..20bedc039 100644
--- a/src/core/content_main_delegate_qt.cpp
+++ b/src/core/content_main_delegate_qt.cpp
@@ -42,6 +42,7 @@
#include "content_main_delegate_qt.h"
#include "base/path_service.h"
+#include "content/public/common/content_paths.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/ui_base_paths.h"
#include "ui/base/resource/resource_bundle.h"
@@ -63,6 +64,7 @@ static base::StringPiece PlatformResourceProvider(int key) {
void ContentMainDelegateQt::PreSandboxStartup()
{
PathService::Override(base::FILE_EXE, WebEngineLibraryInfo::subProcessPath());
+ PathService::Override(content::DIR_MEDIA_LIBS, WebEngineLibraryInfo::pluginsPath());
PathService::Override(ui::DIR_LOCALES, WebEngineLibraryInfo::localesPath());
net::NetModule::SetResourceProvider(PlatformResourceProvider);
diff --git a/src/core/core.pro b/src/core/core.pro
index bd228c20a..c5fe808a6 100644
--- a/src/core/core.pro
+++ b/src/core/core.pro
@@ -28,5 +28,17 @@ resources.files = $$REPACK_DIR/qtwebengine_resources.pak
resources.CONFIG += no_check_exist
resources.path = $$[QT_INSTALL_DATA]
-INSTALLS += locales resources
+PLUGIN_EXTENSION = .so
+PLUGIN_PREFIX = lib
+macx: PLUGIN_PREFIX =
+win32 {
+ PLUGIN_EXTENSION = .dll
+ PLUGIN_PREFIX =
+}
+
+plugins.files = $$getOutDir()/$$getConfigDir()/$${PLUGIN_PREFIX}ffmpegsumo$${PLUGIN_EXTENSION}
+plugins.CONFIG += no_check_exist
+plugins.path = $$[QT_INSTALL_PLUGINS]/qtwebengine
+
+INSTALLS += locales resources plugins
diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp
index b996297ff..a6b7c5d8d 100644
--- a/src/core/web_engine_library_info.cpp
+++ b/src/core/web_engine_library_info.cpp
@@ -86,6 +86,12 @@ static QString location(QLibraryInfo::LibraryLocation path)
return QLibraryInfo::location(path);
}
+base::FilePath WebEngineLibraryInfo::pluginsPath()
+{
+ QString path = location(QLibraryInfo::PluginsPath) % QDir::separator() % QStringLiteral("qtwebengine");
+ return base::FilePath(toFilePathString(path));
+}
+
base::FilePath WebEngineLibraryInfo::subProcessPath()
{
static bool initialized = false;
diff --git a/src/core/web_engine_library_info.h b/src/core/web_engine_library_info.h
index 0ad88b90d..a2b3fab31 100644
--- a/src/core/web_engine_library_info.h
+++ b/src/core/web_engine_library_info.h
@@ -47,6 +47,7 @@
class WebEngineLibraryInfo {
public:
static base::FilePath subProcessPath();
+ static base::FilePath pluginsPath();
static base::FilePath localesPath();
static base::FilePath repackedResourcesPath();
};