Skip to content

Commit 3904adb

Browse files
philnRazvan Caliman
authored andcommitted
[WPE][GTK] New section about Multimedia
1 parent 8a742fa commit 3904adb

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Multimedia
2+
3+
The WPE and GTK ports depend on the
4+
[GStreamer](https://gstreamer.freedesktop.org) multimedia framework for their
5+
multimedia-related features, such as video playback (with or without MediaSource
6+
Extensions and Encrypted Media Extensions), WebRTC, WebAudio, WebCodecs and
7+
MediaRecorder.
8+
9+
## Gathering logs
10+
11+
GStreamer logs are often useful to help diagnose issues. Depending on the
12+
browser used, the procedure might slightly change, but the general idea is to
13+
set a few environment variables (mainly `GST_DEBUG` and `GST_DEBUG_FILE`) as
14+
shown below for a couple runtime scenarios.
15+
16+
GStreamer pipeline graph dumps can also be useful for debugging purposes. They
17+
can be enabled by setting the `GST_DEBUG_DUMP_DOT_DIR` environment variable to
18+
an existing filesystem folder path.
19+
20+
Once gathered, the log file and pipeline graph dumps can be zipped together and
21+
uploaded online. Assuming the commands are executed as shown in the next
22+
sections, the log file will be `$HOME/gst.log` and the pipeline graph dumps will
23+
be present in the `$HOME/dots` folder.
24+
25+
## Flatpak apps
26+
27+
In this section we take the example of the [GNOME
28+
Web](https://flathub.org/apps/org.gnome.Epiphany) app, a.k.a. Epiphany.
29+
30+
Epiphany runs with its Web content process sandboxed, meaning that filesystem
31+
access is restricted, so you need to make sure the GStreamer log file will be
32+
located in a folder accessible in read-write mode by the Web content process,
33+
using the `WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS` environment variable and
34+
the `--filesystem=home` flatpak option.
35+
36+
37+
```shell
38+
mkdir -p $HOME/dots
39+
flatpak run --filesystem=home --env="WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS=1" \
40+
--env="GST_DEBUG=3,webkit*:6" --env="GST_DEBUG_FILE=$HOME/gst.log" \
41+
--env="GST_DEBUG_DUMP_DOT_DIR=$HOME/dots" org.gnome.Epiphany -p "https://..."
42+
```
43+
44+
GNOME Web has [three different
45+
flavours](https://gitlab.gnome.org/GNOME/epiphany#download-and-install). The
46+
command above is for the stable version (`org.gnome.Epiphany`). The Tech Preview
47+
application name is `org.gnome.Epiphany.Devel` and the Canary version is called
48+
`org.gnome.Epiphany.Canary`. So depending on which version you test, the
49+
command line will need to be adapted accordingly.
50+
51+
## MiniBrowser
52+
53+
The WPE and GTK ports ship a sample web browser application called MiniBrowser.
54+
Its availability might depend on your Linux distro. If you built a development
55+
version of the WPE or GTK ports, you can start MiniBrowser as shown below, with
56+
the necessary GStreamer environment variables:
57+
58+
```shell
59+
mkdir -p $HOME/dots
60+
export GST_DEBUG="3,webkit*:6" GST_DEBUG_FILE=$HOME/gst.log GST_DEBUG_DUMP_DOT_DIR=$HOME/dots
61+
Tools/Scripts/run-minibrowser --gtk "https://..."
62+
```
63+
64+
## Layout tests
65+
66+
When debugging multimedia layout tests on a developer build of the WPE or GTK
67+
port, the procedure is similar:
68+
69+
```shell
70+
mkdir -p $HOME/dots
71+
export GST_DEBUG="3,webkit*:6" GST_DEBUG_FILE=$HOME/gst.log GST_DEBUG_DUMP_DOT_DIR=$HOME/dots
72+
Tools/Scripts/run-webkit-tests --gtk --no-retry-failures --no-show-results http/tests/media/video-play-stall.html
73+
```
74+

0 commit comments

Comments
 (0)