public const string UPNP_TYPE =
"urn:schemas-upnp-org:service:AVTransport:2";
public const string DESCRIPTION_PATH = "xml/AVTransport2.xml";
+ public const string LAST_CHANGE_NS =
+ "urn:schemas-upnp-org:metadata-1-0/AVT/";
// The setters below update the LastChange message
private uint _n_tracks = 0;
private GstVideoWindow video_window;
public override void constructed () {
- this.changelog = new GstChangeLog (this);
+ this.changelog = new GstChangeLog (this, LAST_CHANGE_NS);
this.video_window = GstVideoWindow.get_default ();
query_variable["LastChange"] += query_last_change_cb;
string variable,
ref Value value) {
// Send current state
- GstChangeLog log = new GstChangeLog (null);
+ GstChangeLog log = new GstChangeLog (null, LAST_CHANGE_NS);
log.log ("TransportState",
this.video_window.playback_state);
public class Rygel.GstChangeLog : Object {
public unowned Service service { get; set; }
+ private string service_ns;
+
private StringBuilder str;
private Gee.HashMap<string, string> hash;
private uint timeout_id = 0;
- public GstChangeLog (Service? service) {
+ public GstChangeLog (Service? service, string service_ns) {
service = service;
+ this.service_ns = service_ns;
str = new StringBuilder ();
hash = new Gee.HashMap<string, string> ();
}
public string finish () {
str.append ("<Event xmlns=\"" +
- "urn:schemas-upnp-org:metadata-1-0/AVT_RCS\">" +
- "<InstanceID val=\"0\">");
+ this.service_ns +
+ "\"><InstanceID val=\"0\">");
foreach (string line in hash.values) {
str.append (line);
}
public const string UPNP_TYPE =
"urn:schemas-upnp-org:service:RenderingControl:2";
public const string DESCRIPTION_PATH = "xml/RenderingControl2.xml";
+ public const string LAST_CHANGE_NS =
+ "urn:schemas-upnp-org:metadata-1-0/RCS/";
private bool _mute = false;
public bool mute {
private GstVideoWindow video_window;
public override void constructed () {
- this.changelog = new GstChangeLog (this);
+ this.changelog = new GstChangeLog (this, LAST_CHANGE_NS);
this.video_window = GstVideoWindow.get_default ();
query_variable["LastChange"] += query_last_change_cb;
string variable,
ref GLib.Value value) {
// Send current state
- var log = new GstChangeLog (null);
+ var log = new GstChangeLog (null, LAST_CHANGE_NS);
log.log_with_channel ("Mute", mute ? "1" : "0", "Master");
log.log_with_channel ("Volume", this.volume.to_string (), "Master");