Skip to content

Commit

Permalink
Added bit stream filter context output codec parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
asticode committed Dec 20, 2024
1 parent 4b35c9a commit 1afa99e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bit_stream_filter_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,8 @@ func (bsfc *BitStreamFilterContext) SetInputTimeBase(r Rational) {
func (bsfc *BitStreamFilterContext) InputCodecParameters() *CodecParameters {
return newCodecParametersFromC(bsfc.c.par_in)
}

// https://ffmpeg.org/doxygen/7.0/structAVBSFContext.html#ab58f8c37eec197e0f30d17d60959a60d
func (bsfc *BitStreamFilterContext) OutputCodecParameters() *CodecParameters {
return newCodecParametersFromC(bsfc.c.par_out)
}
2 changes: 2 additions & 0 deletions bit_stream_filter_context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ func TestBitStreamFilterContext(t *testing.T) {
require.NoError(t, cp1.Copy(bsfc.InputCodecParameters()))
require.Equal(t, CodecIDH264, bsfc.InputCodecParameters().CodecID())

require.Equal(t, CodecIDNone, bsfc.OutputCodecParameters().CodecID())
require.NoError(t, bsfc.Initialize())
require.Equal(t, CodecIDH264, bsfc.OutputCodecParameters().CodecID())

// TODO Test SendPacket
// TODO Test ReceivePacket
Expand Down

0 comments on commit 1afa99e

Please sign in to comment.