When a new window is created, apply all current values to it (volume, speed,
set GStreamer elements, etc.). It would not be the best experience when user
opens a new window, plays something and 100% volume is used in it.
Since now we do multiple windows, an instance number is added
to owned connection name (as specified in MPRIS spec).
Update Flatpak MPRIS permission to handle that.
Instead of running into warnings or other problems when user
specifies an out of range value for command line option, just
clamp them to nearest allowed one.
Now that we are using both local and global command line vfuncs, we
can just get and apply options in them and free values later.
This avoids having options global and static.
The aim here is to stream an online video/audio while also at the
same time download/cache it to disk (excluding adaptive content).
After download is complete, further playback and seeking are done using the
locally cached file. This functionality uses GStreamer "downloadbuffer" element.
Player will emit a signal with a local download location after it completes,
so application will know where downloaded file for media item is stored in
case it wants to reuse it in the future.
It is up to application to set download dir and later manage downloaded
content in it, removing files its not going to use on next application
run and any incomplete downloads.
Billboard does not post automatic volume/speed announcements. It did at
some point during development, but it was scrapped in favour of letting
app use callbacks of "notify" signals to call announce speed/volume.
It seems GTK continues using created contexts, so we cannot unref it here.
Looking at GTK sink implementation for GtkVideo, I see that they do not
unref it either, but since we use surfaceless context it would be probably
better to have a static GstDisplay and reuse the same context in future.
Some media files have custom/proprietary metadata.
It should be safe to simply ignore these, since we do
not map metadata to any sort of Clapper stream anyway.
Fixes#441
Since during development we do not put new release tag into metainfo
which about window uses to know app version, set it manually to the
library version since they are the same.