Skip to content

Commit

Permalink
Removed Program.StreamIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
asticode committed Dec 18, 2024
1 parent e9341fd commit b86c411
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
16 changes: 0 additions & 16 deletions program.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,6 @@ func (p *Program) SetDiscard(d Discard) {
p.c.discard = int32(d)
}

// https://ffmpeg.org/doxygen/7.0/structAVProgram.html#a7967d41af4812ed61a28762e988c7a02
func (p *Program) StreamIndex() *uint {
if p.c.stream_index == nil {
return nil
}
u := uint(C.uint(*p.c.stream_index))
return &u
}

// https://ffmpeg.org/doxygen/7.0/structAVProgram.html#a7967d41af4812ed61a28762e988c7a02
func (p *Program) SetStreamIndex(n uint) {
if p.c.stream_index != nil {
*p.c.stream_index = C.uint(n)
}
}

// https://ffmpeg.org/doxygen/7.0/structAVProgram.html#ae9dab38d4694e3da9cba0f882f4e43d3
func (p *Program) Metadata() *Dictionary {
return newDictionaryFromC(p.c.metadata)
Expand Down
6 changes: 0 additions & 6 deletions program_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,8 @@ func TestProgram(t *testing.T) {
s := fc.NewStream(nil)
s.SetID(2)
require.Equal(t, 0, p.NbStreams())
require.Nil(t, p.StreamIndex(), nil)
p.AddStream(s)
require.Equal(t, 1, p.NbStreams())
require.Equal(t, uint(0), *p.StreamIndex())
var streamIndex uint = 1
p.SetStreamIndex(streamIndex)
require.Equal(t, streamIndex, *p.StreamIndex())
s.SetIndex(int(streamIndex))
ss := p.Streams()
require.Equal(t, 1, len(ss))
require.Equal(t, s.ID(), ss[0].ID())
Expand Down

0 comments on commit b86c411

Please sign in to comment.