Generate dcps for AV1 audio/video devices
Tested against Sonos PLAY:5. Added URI type to the SOAP library. The latest upnpresources.zip does not contain older versions of the specifications, so to be able to generate the bindings I had to create a fake one: wget http://upnp.org/specs/av/UPnP-av-TestFiles-20070927.zip install -d 'standardizeddcps/MediaServer_1 and MediaRenderer_1' mv UPnP-av-TestFiles-20070927.zip 'standardizeddcps/MediaServer_1 and MediaRenderer_1/' zip -r fake.zip 'standardizeddcps/MediaServer_1 and MediaRenderer_1' gotask specgen -s fake.zip -o ../dcps
This commit is contained in:
@ -5,6 +5,7 @@ import (
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/url"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -506,3 +507,13 @@ func MarshalBinHex(v []byte) (string, error) {
|
||||
func UnmarshalBinHex(s string) ([]byte, error) {
|
||||
return hex.DecodeString(s)
|
||||
}
|
||||
|
||||
// MarshalURI marshals *url.URL to SOAP "uri" type.
|
||||
func MarshalURI(v *url.URL) (string, error) {
|
||||
return v.String(), nil
|
||||
}
|
||||
|
||||
// UnmarshalURI unmarshals *url.URL from the SOAP "uri" type.
|
||||
func UnmarshalURI(s string) (*url.URL, error) {
|
||||
return url.Parse(s)
|
||||
}
|
||||
|
Reference in New Issue
Block a user