Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(launcher): check libs required for playing h.264 #3715

Merged
merged 1 commit into from
Sep 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/server/validateDependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export async function validateHostRequirements(browserPath: string, browser: Bro

const DL_OPEN_LIBRARIES = {
chromium: [],
webkit: ['libGLESv2.so.2'],
webkit: ['libGLESv2.so.2', 'libx264.so'],
firefox: [],
};

Expand Down Expand Up @@ -123,6 +123,7 @@ async function validateDependenciesLinux(browserPath: string, browser: BrowserDe
libraryToPackageNameMapping = LIBRARY_TO_PACKAGE_NAME_UBUNTU_18_04;
else if (ubuntuVersion === '20.04')
libraryToPackageNameMapping = LIBRARY_TO_PACKAGE_NAME_UBUNTU_20_04;
libraryToPackageNameMapping = Object.assign({}, libraryToPackageNameMapping, MANUAL_LIBRARY_TO_PACKAGE_NAME_UBUNTU);
if (libraryToPackageNameMapping) {
// Translate missing dependencies to package names to install with apt.
for (const missingDep of missingDeps) {
Expand Down Expand Up @@ -416,3 +417,11 @@ const LIBRARY_TO_PACKAGE_NAME_UBUNTU_20_04: { [s: string]: string} = {
'libXt.so.6': 'libxt6',
'libXtst.so.6': 'libxtst6',
};

const MANUAL_LIBRARY_TO_PACKAGE_NAME_UBUNTU: { [s: string]: string} = {
// libgstlibav.so (the only actual library provided by gstreamer1.0-libav) is not
// in the ldconfig cache, so we detect the actual library required for playing h.264
// and if it's missing recommend installing missing gstreamer lib.
// gstreamer1.0-libav -> libavcodec57 -> libx264-152
'libx264.so': 'gstreamer1.0-libav'
};