-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix(linux): adding Gstreamer plugin for handling asset:// #14402
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
base: dev
Are you sure you want to change the base?
Conversation
| } | ||
|
|
||
| fn uri(&self) -> Option<String> { | ||
| None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it should be like this, but I don't think it is a problem for now
3a20cd2 to
2450945
Compare
2450945 to
d188140
Compare
asset:// is registered as a custom protocol through WebKit, but when an audio or video is got from that protocol, gstreamer is used in the background and can't play the media because there is no handler for asset://
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
96a082f to
6ad67e8
Compare
|
For anyone with special charecters in their file names... use percent_encoding::percent_decode_str;
// directly having full path after asset:// or having localhost
let location = location.strip_prefix("localhost").unwrap_or(location).to_string();
//Fix URI UTF8 encoding tauri does, fix file names with special characters
let location = percent_decode_str(&location)
.decode_utf8().expect("Valid UTF-8")
.to_string();In imp.rs you could also use the percent_encoding crate to handle UTF8 encoding file name related issues. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
@DEVGOD2020 I fixed this case, thank you ! |
asset:// is registered as a custom protocol through WebKit, but when an audio or video is got from that protocol, gstreamer is used in the background and can't play the media because there is no handler for asset://
(related to #3725)
This PR creates a Gstreamer Plugin that will handle asset:// url.
If you want to test it out: build the plugin so that you will have a .so,
export GST_PLUGIN_PATH=../../target/debug(where the build .so lies), and then launch your tauri app or simply try it out withgst-launch-1.0 uridecodebin uri=asset:///your/path/to/video/or/audio.mp3 ! videoconvert ! autovideosinkIf we want to make things work we will need to place the .so into Gstreamer plugins search path. There's some information about it here : https://gstreamer.freedesktop.org/documentation/gstreamer/gstregistry.html?gi-language=c#gst_registry_add_plugin
A solution would be to add the .so where every other gstreamer plugins lies, in my case I have simply put it in
/usr/lib64/gstreamer-1.0and Gstreamer detected it.