diff --git a/basicDriver.go b/basicDriver.go index 5e6b9267..2395efeb 100644 --- a/basicDriver.go +++ b/basicDriver.go @@ -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 diff --git a/revid/Revid.go b/revid/Revid.go index 2ce46f23..506ff995 100644 --- a/revid/Revid.go +++ b/revid/Revid.go @@ -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 } diff --git a/revid/revid_test.go b/revid/revid_test.go index cd8a5f09..7c2e9637 100644 --- a/revid/revid_test.go +++ b/revid/revid_test.go @@ -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