Skip to content

Commit

Permalink
Minor codec hardware config changes
Browse files Browse the repository at this point in the history
  • Loading branch information
asticode committed Jan 30, 2024
1 parent 95845be commit 1910f27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (c *Codec) HardwareConfigs() (configs []CodecHardwareConfig) {
if config == nil {
break
}
configs = append(configs, CodecHardwareConfig{c: config})
configs = append(configs, newCodecHardwareConfigFromC(config))
i++
}
return
Expand Down
4 changes: 4 additions & 0 deletions codec_hardware_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ type CodecHardwareConfig struct {
c *C.AVCodecHWConfig
}

func newCodecHardwareConfigFromC(c *C.AVCodecHWConfig) CodecHardwareConfig {
return CodecHardwareConfig{c: c}
}

func (chc CodecHardwareConfig) HardwareDeviceType() HardwareDeviceType {
return HardwareDeviceType(chc.c.device_type)
}
Expand Down

0 comments on commit 1910f27

Please sign in to comment.