1
0
Fork 0
forked from External/mediamtx

rename Data into Unit (#1556)

This commit is contained in:
Alessandro Ros 2023-03-10 12:44:59 +01:00 committed by GitHub
parent 25dc252342
commit e8bdad8a1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 240 additions and 237 deletions

View file

@ -13,7 +13,7 @@ import (
type streamFormat struct {
proc formatprocessor.Processor
mutex sync.RWMutex
nonRTSPReaders map[reader]func(formatprocessor.Data)
nonRTSPReaders map[reader]func(formatprocessor.Unit)
}
func newStreamFormat(forma format.Format, generateRTPPackets bool) (*streamFormat, error) {
@ -24,13 +24,13 @@ func newStreamFormat(forma format.Format, generateRTPPackets bool) (*streamForma
sf := &streamFormat{
proc: proc,
nonRTSPReaders: make(map[reader]func(formatprocessor.Data)),
nonRTSPReaders: make(map[reader]func(formatprocessor.Unit)),
}
return sf, nil
}
func (sf *streamFormat) readerAdd(r reader, cb func(formatprocessor.Data)) {
func (sf *streamFormat) readerAdd(r reader, cb func(formatprocessor.Unit)) {
sf.mutex.Lock()
defer sf.mutex.Unlock()
sf.nonRTSPReaders[r] = cb
@ -42,7 +42,7 @@ func (sf *streamFormat) readerRemove(r reader) {
delete(sf.nonRTSPReaders, r)
}
func (sf *streamFormat) writeData(s *stream, medi *media.Media, data formatprocessor.Data) error {
func (sf *streamFormat) writeData(s *stream, medi *media.Media, data formatprocessor.Unit) error {
sf.mutex.RLock()
defer sf.mutex.RUnlock()