mirror of https://bitbucket.org/ausocean/av.git
Removed unused Session.encoding and sendEncoding.
This commit is contained in:
parent
40806d4de7
commit
2219a26890
19
rtmp/rtmp.go
19
rtmp/rtmp.go
|
@ -312,8 +312,7 @@ func sendConnectPacket(s *Session) error {
|
||||||
}
|
}
|
||||||
enc := pkt.body
|
enc := pkt.body
|
||||||
|
|
||||||
var err error
|
enc, err := amf.EncodeString(enc, avConnect)
|
||||||
enc, err = amf.EncodeString(enc, avConnect)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -348,7 +347,6 @@ func sendConnectPacket(s *Session) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if s.link.tcUrl != "" {
|
if s.link.tcUrl != "" {
|
||||||
enc, err = amf.EncodeNamedString(enc, avTcUrl, s.link.tcUrl)
|
enc, err = amf.EncodeNamedString(enc, avTcUrl, s.link.tcUrl)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -378,7 +376,6 @@ func sendConnectPacket(s *Session) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if s.link.pageUrl != "" {
|
if s.link.pageUrl != "" {
|
||||||
var err error
|
|
||||||
enc, err = amf.EncodeNamedString(enc, avPageUrl, s.link.pageUrl)
|
enc, err = amf.EncodeNamedString(enc, avPageUrl, s.link.pageUrl)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -386,17 +383,13 @@ func sendConnectPacket(s *Session) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if s.encoding != 0.0 || s.sendEncoding {
|
// terminate the AMF object
|
||||||
enc, err = amf.EncodeNamedNumber(enc, avObjectEncoding, s.encoding)
|
enc, err = amf.EncodeInt24(enc, amf.TypeObjectEnd)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
copy(enc, []byte{0, 0, amf.TypeObjectEnd})
|
// add auth string, if any
|
||||||
enc = enc[3:]
|
|
||||||
|
|
||||||
// add auth string
|
|
||||||
if s.link.auth != "" {
|
if s.link.auth != "" {
|
||||||
enc, err = amf.EncodeBoolean(enc, s.link.flags&linkAuth != 0)
|
enc, err = amf.EncodeBoolean(enc, s.link.flags&linkAuth != 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -54,7 +54,6 @@ type Session struct {
|
||||||
clientBW int32
|
clientBW int32
|
||||||
clientBW2 uint8
|
clientBW2 uint8
|
||||||
isPlaying bool
|
isPlaying bool
|
||||||
sendEncoding bool
|
|
||||||
numInvokes int32
|
numInvokes int32
|
||||||
methodCalls []method
|
methodCalls []method
|
||||||
channelsAllocatedIn int32
|
channelsAllocatedIn int32
|
||||||
|
@ -64,7 +63,6 @@ type Session struct {
|
||||||
channelTimestamp []int32
|
channelTimestamp []int32
|
||||||
audioCodecs float64
|
audioCodecs float64
|
||||||
videoCodecs float64
|
videoCodecs float64
|
||||||
encoding float64
|
|
||||||
deferred []byte
|
deferred []byte
|
||||||
link link
|
link link
|
||||||
log Log
|
log Log
|
||||||
|
|
Loading…
Reference in New Issue