mirror of https://bitbucket.org/ausocean/av.git
revid: using config to define default packetsPerClipValue
This commit is contained in:
parent
cfff3316b4
commit
f5a571547d
|
@ -108,7 +108,7 @@ const (
|
|||
defaultFramesPerClip = 1
|
||||
defaultVerticalFlip = No
|
||||
defaultHorizontalFlip = No
|
||||
httpFramesPerClip = 7
|
||||
httpFramesPerClip = 560
|
||||
defaultInputCodec = H264
|
||||
defaultVerbosity = No
|
||||
defaultRtpAddr = "localhost:6970"
|
||||
|
|
|
@ -58,7 +58,6 @@ const (
|
|||
writeTimeout = 10 * time.Millisecond
|
||||
readTimeout = 10 * time.Millisecond
|
||||
httpTimeout = 5 * time.Second
|
||||
packetsPerClip = 560
|
||||
bitrateTime = 1 * time.Minute
|
||||
mjpegParserInChanLen = 100000
|
||||
ffmpegPath = "/usr/local/bin/ffmpeg"
|
||||
|
@ -154,7 +153,7 @@ func (p *packer) Write(frame []byte) (int, error) {
|
|||
return n, err
|
||||
}
|
||||
p.packetCount++
|
||||
if p.packetCount >= packetsPerClip {
|
||||
if p.packetCount >= p.owner.config.FramesPerClip {
|
||||
p.owner.buffer.Flush()
|
||||
p.packetCount = 0
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue