mirror of https://bitbucket.org/ausocean/av.git
stream: added GetDst func to Encoder interface
It has become apparent that it would be useful to be able to get the destination from the encoder, so this it at least a temporary fix.
This commit is contained in:
parent
e593a04faf
commit
7c54775291
|
@ -31,6 +31,7 @@ import "io"
|
|||
|
||||
type Encoder interface {
|
||||
Write([]byte) (int, error)
|
||||
GetDst() io.Writer
|
||||
}
|
||||
|
||||
// NopEncoder returns an
|
||||
|
@ -47,3 +48,5 @@ func (e noop) Write(p []byte) (int, error) {
|
|||
n, err := e.dst.Write(p)
|
||||
return n, err
|
||||
}
|
||||
|
||||
func (e noop) GetDst() io.Writer { return e.dst }
|
||||
|
|
|
@ -261,3 +261,5 @@ func (e *Encoder) Write(frame []byte) (int, error) {
|
|||
|
||||
return len(frame), nil
|
||||
}
|
||||
|
||||
func (e *Encoder) GetDst() io.Writer { return e.dst }
|
||||
|
|
|
@ -232,6 +232,8 @@ func (e *Encoder) Write(nalu []byte) (int, error) {
|
|||
return len(nalu), nil
|
||||
}
|
||||
|
||||
func (e *Encoder) GetDst() io.Writer { return e.dst }
|
||||
|
||||
// writePSI creates mpegts with pat and pmt tables - with pmt table having updated
|
||||
// location and time data.
|
||||
func (e *Encoder) writePSI() error {
|
||||
|
|
Loading…
Reference in New Issue