Skip to content

Commit

Permalink
Added filter to filter context
Browse files Browse the repository at this point in the history
  • Loading branch information
asticode committed Dec 23, 2024
1 parent 25626ad commit 5b04a31
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions filter_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,8 @@ func (fc *FilterContext) Free() {
func (fc *FilterContext) Class() *Class {
return newClassFromC(unsafe.Pointer(fc.c))
}

// https://ffmpeg.org/doxygen/7.0/structAVFilterContext.html#a6eee53e57dddfa7cca1cade870c8a44e
func (fc *FilterContext) Filter() *Filter {
return newFilterFromC(fc.c.filter)
}
1 change: 1 addition & 0 deletions filter_graph_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ func TestFilterGraph(t *testing.T) {

buffersinkContext, err := fg.NewBuffersinkFilterContext(buffersink, "filter_out")
require.NoError(t, err)
require.Equal(t, buffersink, buffersinkContext.FilterContext().Filter())
cl = buffersinkContext.FilterContext().Class()
require.NotNil(t, cl)
require.Equal(t, "AVFilter", cl.Name())
Expand Down

0 comments on commit 5b04a31

Please sign in to comment.