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",
|
Bitrate: "500000",
|
||||||
Packetization: revid.Flv,
|
Packetization: revid.Flv,
|
||||||
}
|
}
|
||||||
revidInst, err := revid.NewRevidInstance(config)
|
revidInst, err := revid.NewRevid(config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Should not have got error!")
|
fmt.Println("Should not have got error!")
|
||||||
return
|
return
|
||||||
|
|
|
@ -115,10 +115,10 @@ type revid struct {
|
||||||
mutex sync.Mutex
|
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
|
// configuration, and/or an error if construction of the new instant was not
|
||||||
// successful.
|
// successful.
|
||||||
func NewRevidInstance(config Config) (r *revid, err error) {
|
func NewRevid(config Config) (r *revid, err error) {
|
||||||
r = new(revid)
|
r = new(revid)
|
||||||
r.mutex = sync.Mutex{}
|
r.mutex = sync.Mutex{}
|
||||||
r.ringBuffer = ringbuffer.NewRingBuffer(ringBufferSize, ringBufferElementSize)
|
r.ringBuffer = ringbuffer.NewRingBuffer(ringBufferSize, ringBufferElementSize)
|
||||||
|
@ -211,7 +211,7 @@ noPacketizationSetup:
|
||||||
// ChangeConfig changes the current configuration of the revid instance.
|
// ChangeConfig changes the current configuration of the revid instance.
|
||||||
func (r *revid) ChangeConfig(config Config) (err error) {
|
func (r *revid) ChangeConfig(config Config) (err error) {
|
||||||
r.Stop()
|
r.Stop()
|
||||||
r, err = NewRevidInstance(config)
|
r, err = NewRevid(config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -182,7 +182,7 @@ func TestRaspividToRtmp(t *testing.T) {
|
||||||
Packetization: Flv,
|
Packetization: Flv,
|
||||||
FrameRate: "25",
|
FrameRate: "25",
|
||||||
}
|
}
|
||||||
revidInst, err := NewRevidInstance(config)
|
revidInst, err := NewRevid(config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("Should not have got an error!")
|
t.Errorf("Should not have got an error!")
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue