mirror of
https://github.com/harshabose/transcode.git
synced 2025-10-16 21:40:40 +08:00
general commit 03-03-2025 16:22
This commit is contained in:
@@ -77,6 +77,10 @@ func (encoder *Encoder) Start() {
|
||||
go encoder.loop()
|
||||
}
|
||||
|
||||
func (encoder *Encoder) GetParameterSets() ([]byte, []byte) {
|
||||
return encoder.sps, encoder.pps
|
||||
}
|
||||
|
||||
func (encoder *Encoder) GetDuration() time.Duration {
|
||||
if encoder.encoderContext.MediaType() == astiav.MediaTypeAudio {
|
||||
return time.Second * time.Duration(encoder.encoderContext.FrameSize()) / time.Duration(encoder.encoderContext.SampleRate())
|
||||
|
Reference in New Issue
Block a user