mirror of https://bitbucket.org/ausocean/av.git
Changed NewRevidInstance to NewRevid
This commit is contained in:
parent
597b0840a4
commit
093df161f1
|
@ -18,7 +18,7 @@ func main() {
|
|||
Bitrate: "500000",
|
||||
Packetization: revid.Flv,
|
||||
}
|
||||
revidInst, err := revid.NewRevidInstance(config)
|
||||
revidInst, err := revid.NewRevid(config)
|
||||
if err != nil {
|
||||
fmt.Println("Should not have got error!")
|
||||
return
|
||||
|
|
|
@ -115,10 +115,10 @@ type revid struct {
|
|||
mutex sync.Mutex
|
||||
}
|
||||
|
||||
// NewRevidInstance returns a pointer to a new revid with the desired
|
||||
// NewRevid returns a pointer to a new revid with the desired
|
||||
// configuration, and/or an error if construction of the new instant was not
|
||||
// successful.
|
||||
func NewRevidInstance(config Config) (r *revid, err error) {
|
||||
func NewRevid(config Config) (r *revid, err error) {
|
||||
r = new(revid)
|
||||
r.mutex = sync.Mutex{}
|
||||
r.ringBuffer = ringbuffer.NewRingBuffer(ringBufferSize, ringBufferElementSize)
|
||||
|
@ -211,7 +211,7 @@ noPacketizationSetup:
|
|||
// ChangeConfig changes the current configuration of the revid instance.
|
||||
func (r *revid) ChangeConfig(config Config) (err error) {
|
||||
r.Stop()
|
||||
r, err = NewRevidInstance(config)
|
||||
r, err = NewRevid(config)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
|
@ -182,7 +182,7 @@ func TestRaspividToRtmp(t *testing.T) {
|
|||
Packetization: Flv,
|
||||
FrameRate: "25",
|
||||
}
|
||||
revidInst, err := NewRevidInstance(config)
|
||||
revidInst, err := NewRevid(config)
|
||||
if err != nil {
|
||||
t.Errorf("Should not have got an error!")
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue