Skip to content

Commit

Permalink
delete PmtVersion()
Browse files Browse the repository at this point in the history
  • Loading branch information
oldma3095 committed Dec 17, 2024
1 parent c0e22af commit 4fb268f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
20 changes: 20 additions & 0 deletions program.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,26 @@ func (p *Program) SetProgramNumber(n int) {
p.c.program_num = C.int(n)
}

// https://ffmpeg.org/doxygen/7.0/structAVProgram.html#a02011963a63c291c6dc6d4eefa56cd69
func (p *Program) PmtPid() int {
return int(p.c.pmt_pid)
}

// https://ffmpeg.org/doxygen/7.0/structAVProgram.html#a02011963a63c291c6dc6d4eefa56cd69
func (p *Program) SetPmtPid(n int) {
p.c.pmt_pid = C.int(n)
}

// https://ffmpeg.org/doxygen/7.0/structAVProgram.html#a7e026323df87e84a72ec5e5c8ce341a5
func (p *Program) PcrPid() int {
return int(p.c.pcr_pid)
}

// https://ffmpeg.org/doxygen/7.0/structAVProgram.html#a7e026323df87e84a72ec5e5c8ce341a5
func (p *Program) SetPcrPid(n int) {
p.c.pcr_pid = C.int(n)
}

// https://ffmpeg.org/doxygen/7.0/structAVProgram.html#a2276db4d51695120664d527f20b7c532
func (p *Program) StartTime() int64 {
return int64(p.c.start_time)
Expand Down
4 changes: 4 additions & 0 deletions program_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ func TestProgram(t *testing.T) {
require.Equal(t, p.Metadata().Get("service_name", nil, 0).Value(), "test_service_name")
p.SetProgramNumber(101)
require.Equal(t, 101, p.ProgramNumber())
p.SetPmtPid(201)
require.Equal(t, 201, p.PmtPid())
p.SetPcrPid(301)
require.Equal(t, 301, p.PcrPid())
require.Equal(t, p.StartTime(), int64(-9223372036854775808))
require.Equal(t, p.EndTime(), int64(-9223372036854775808))
require.Equal(t, p.PtsWrapReference(), int64(-9223372036854775808))
Expand Down

0 comments on commit 4fb268f

Please sign in to comment.