fix gstreamer user agent

This commit is contained in:
Erica Z 2024-10-12 21:11:55 +00:00
parent 59e9c6d7b4
commit 5345ebd2b4

View file

@ -26,13 +26,15 @@ class Playbin : Object {
public signal void stream_started ();
public signal void stream_over ();
private void on_source_setup (Gst.Element playbin, dynamic Gst.Element source) {
source.user_agent = "audrey/0.1.0 (Linux)"; // AUDREY_VERSION
}
construct {
this.playbin = Gst.ElementFactory.make ("playbin3", null);
assert (this.playbin != null);
//dynamic Gst.Element souphttpsrc = ((Gst.Bin) this.playbin).get_by_name ("souphttpsrc0");
//assert (souphttpsrc != null);
//souphttpsrc.user_agent = "audrey/0.1.0 (Linux)"; // AUDREY_VERSION
this.playbin.source_setup.connect (this.on_source_setup);
// regularly update position
Timeout.add (500, () => {