mirror of
https://github.com/harshabose/transcode.git
synced 2025-10-17 04:41:42 +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()
|
go encoder.loop()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (encoder *Encoder) GetParameterSets() ([]byte, []byte) {
|
||||||
|
return encoder.sps, encoder.pps
|
||||||
|
}
|
||||||
|
|
||||||
func (encoder *Encoder) GetDuration() time.Duration {
|
func (encoder *Encoder) GetDuration() time.Duration {
|
||||||
if encoder.encoderContext.MediaType() == astiav.MediaTypeAudio {
|
if encoder.encoderContext.MediaType() == astiav.MediaTypeAudio {
|
||||||
return time.Second * time.Duration(encoder.encoderContext.FrameSize()) / time.Duration(encoder.encoderContext.SampleRate())
|
return time.Second * time.Duration(encoder.encoderContext.FrameSize()) / time.Duration(encoder.encoderContext.SampleRate())
|
||||||
|
Reference in New Issue
Block a user