fix gstreamer user agent

This commit is contained in:
me 2024-10-12 21:11:55 +00:00
parent 9a974fabea
commit bd40791db7

View file

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