Merge branch 'tv42-av1'

This commit is contained in:
John Beisley 2015-06-07 07:15:59 +01:00
commit 4d40860a5b
3 changed files with 9798 additions and 0 deletions

9781
dcps/av1/av1.go Normal file

File diff suppressed because it is too large Load Diff

View File

@ -111,6 +111,11 @@ var dcpMetadataByDir = map[string]DCPMetadata{
OfficialName: "Internet Gateway Device v2", OfficialName: "Internet Gateway Device v2",
DocURL: "http://upnp.org/specs/gw/UPnP-gw-InternetGatewayDevice-v2-Device.pdf", DocURL: "http://upnp.org/specs/gw/UPnP-gw-InternetGatewayDevice-v2-Device.pdf",
}, },
"MediaServer_1 and MediaRenderer_1": {
Name: "av1",
OfficialName: "MediaServer v1 and MediaRenderer v1",
DocURL: "http://upnp.org/specs/av/av1/",
},
} }
type dcpCollection struct { type dcpCollection struct {
@ -325,6 +330,7 @@ var typeConvs = map[string]conv{
"boolean": conv{"Boolean", "bool"}, "boolean": conv{"Boolean", "bool"},
"bin.base64": conv{"BinBase64", "[]byte"}, "bin.base64": conv{"BinBase64", "[]byte"},
"bin.hex": conv{"BinHex", "[]byte"}, "bin.hex": conv{"BinHex", "[]byte"},
"uri": conv{"URI", "*url.URL"},
} }
type closeableZipReader struct { type closeableZipReader struct {

View File

@ -5,6 +5,7 @@ import (
"encoding/hex" "encoding/hex"
"errors" "errors"
"fmt" "fmt"
"net/url"
"regexp" "regexp"
"strconv" "strconv"
"strings" "strings"
@ -506,3 +507,13 @@ func MarshalBinHex(v []byte) (string, error) {
func UnmarshalBinHex(s string) ([]byte, error) { func UnmarshalBinHex(s string) ([]byte, error) {
return hex.DecodeString(s) 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)
}