Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
galene
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
galene
Commits
d3f53e6a
Commit
d3f53e6a
authored
May 11, 2021
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move rate estimation into rtpDownTrack.WriteRTP.
parent
c52e1f4c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
13 deletions
+8
-13
conn/conn.go
conn/conn.go
+0
-1
diskwriter/diskwriter.go
diskwriter/diskwriter.go
+0
-4
rtpconn/rtpconn.go
rtpconn/rtpconn.go
+8
-6
rtpconn/rtpwriter.go
rtpconn/rtpwriter.go
+0
-2
No files found.
conn/conn.go
View file @
d3f53e6a
...
...
@@ -39,7 +39,6 @@ type Down interface {
// Type DownTrack represents a track in the server to client direction.
type
DownTrack
interface
{
WriteRTP
(
packat
*
rtp
.
Packet
)
error
Accumulate
(
bytes
uint32
)
SetTimeOffset
(
ntp
uint64
,
rtp
uint32
)
SetCname
(
string
)
GetMaxBitrate
()
uint64
...
...
diskwriter/diskwriter.go
View file @
d3f53e6a
...
...
@@ -603,7 +603,3 @@ func (conn *diskConn) initWriter(width, height uint32) error {
func
(
t
*
diskTrack
)
GetMaxBitrate
()
uint64
{
return
^
uint64
(
0
)
}
func
(
t
*
diskTrack
)
Accumulate
(
bytes
uint32
)
{
return
}
rtpconn/rtpconn.go
View file @
d3f53e6a
...
...
@@ -90,11 +90,14 @@ type rtpDownTrack struct {
}
func
(
down
*
rtpDownTrack
)
WriteRTP
(
packet
*
rtp
.
Packet
)
error
{
return
down
.
track
.
WriteRTP
(
packet
)
}
func
(
down
*
rtpDownTrack
)
Accumulate
(
bytes
uint32
)
{
down
.
rate
.
Accumulate
(
bytes
)
err
:=
down
.
track
.
WriteRTP
(
packet
)
if
err
==
nil
{
// we should account for extensions
down
.
rate
.
Accumulate
(
uint32
(
12
+
4
*
len
(
packet
.
CSRC
)
+
len
(
packet
.
Payload
)),
)
}
return
err
}
func
(
down
*
rtpDownTrack
)
SetTimeOffset
(
ntp
uint64
,
rtp
uint32
)
{
...
...
@@ -650,7 +653,6 @@ func gotNACK(conn *rtpDownConnection, track *rtpDownTrack, p *rtcp.TransportLaye
log
.
Printf
(
"WriteRTP: %v"
,
err
)
return
false
}
track
.
rate
.
Accumulate
(
uint32
(
l
))
return
true
})
}
...
...
rtpconn/rtpwriter.go
View file @
d3f53e6a
...
...
@@ -225,7 +225,6 @@ func sendKeyframe(kf []uint16, track conn.DownTrack, cache *packetcache.Cache) {
if
err
!=
nil
{
return
}
track
.
Accumulate
(
uint32
(
bytes
))
}
}
...
...
@@ -321,7 +320,6 @@ func rtpWriterLoop(writer *rtpWriter, up *rtpUpConnection, track *rtpUpTrack) {
if
err
!=
nil
{
continue
}
l
.
Accumulate
(
uint32
(
bytes
))
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment