mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 07:06:58 +08:00
handle hex session id
This commit is contained in:
@@ -1382,6 +1382,68 @@ var cases = []struct {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"hex session id for 0XAC4EC96E",
|
||||
[]byte("v=0\r\n" +
|
||||
"o=jdoe 0XAC4EC96E 2890842807 IN IP4 10.47.16.5\r\n" +
|
||||
"s=SDP Seminar\r\n" +
|
||||
"i=A Seminar on the session description protocol\r\n" +
|
||||
"t=3034423619 3042462419\r\n"),
|
||||
[]byte("v=0\r\n" +
|
||||
"o=jdoe 2890844526 2890842807 IN IP4 10.47.16.5\r\n" +
|
||||
"s=SDP Seminar\r\n" +
|
||||
"i=A Seminar on the session description protocol\r\n" +
|
||||
"t=3034423619 3042462419\r\n"),
|
||||
SessionDescription{
|
||||
Origin: psdp.Origin{
|
||||
Username: "jdoe",
|
||||
SessionID: 2890844526,
|
||||
SessionVersion: 2890842807,
|
||||
NetworkType: "IN",
|
||||
AddressType: "IP4",
|
||||
UnicastAddress: "10.47.16.5",
|
||||
},
|
||||
SessionName: "SDP Seminar",
|
||||
SessionInformation: func() *psdp.Information {
|
||||
v := psdp.Information("A Seminar on the session description protocol")
|
||||
return &v
|
||||
}(),
|
||||
TimeDescriptions: []psdp.TimeDescription{
|
||||
{psdp.Timing{3034423619, 3042462419}, nil},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"hex session id for 103bdb6f",
|
||||
[]byte("v=0\r\n" +
|
||||
"o=jdoe 103bdb6f 2890842807 IN IP4 10.47.16.5\r\n" +
|
||||
"s=SDP Seminar\r\n" +
|
||||
"i=A Seminar on the session description protocol\r\n" +
|
||||
"t=3034423619 3042462419\r\n"),
|
||||
[]byte("v=0\r\n" +
|
||||
"o=jdoe 272358255 2890842807 IN IP4 10.47.16.5\r\n" +
|
||||
"s=SDP Seminar\r\n" +
|
||||
"i=A Seminar on the session description protocol\r\n" +
|
||||
"t=3034423619 3042462419\r\n"),
|
||||
SessionDescription{
|
||||
Origin: psdp.Origin{
|
||||
Username: "jdoe",
|
||||
SessionID: 272358255,
|
||||
SessionVersion: 2890842807,
|
||||
NetworkType: "IN",
|
||||
AddressType: "IP4",
|
||||
UnicastAddress: "10.47.16.5",
|
||||
},
|
||||
SessionName: "SDP Seminar",
|
||||
SessionInformation: func() *psdp.Information {
|
||||
v := psdp.Information("A Seminar on the session description protocol")
|
||||
return &v
|
||||
}(),
|
||||
TimeDescriptions: []psdp.TimeDescription{
|
||||
{psdp.Timing{3034423619, 3042462419}, nil},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
func TestUnmarshal(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user