mirror of
https://github.com/asticode/go-astiav.git
synced 2025-10-05 16:16:50 +08:00
Enhance Codec Iteration and Checking of HardwareConfigMethodFlags (#40)
* Add IterateCodecs, Add codec.HasHardwareConfigMethodFlag * Remove HasHardwareConfigMethodFlag test because git worklow does not support hw HasHardwareConfigMethodFlag is tested on my local device but does not work in git * Review Changes Remove unused arg in HardwareConfigs Add mehtod to get all codecs Update test * Remove codecporcessor type
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
func TestCodec(t *testing.T) {
|
||||
c := astiav.FindDecoder(astiav.CodecIDMp3)
|
||||
require.NotNil(t, c)
|
||||
require.Equal(t, c.ID(), astiav.CodecIDMp3)
|
||||
require.Nil(t, c.ChannelLayouts())
|
||||
require.True(t, c.IsDecoder())
|
||||
require.False(t, c.IsEncoder())
|
||||
@@ -66,4 +67,12 @@ func TestCodec(t *testing.T) {
|
||||
|
||||
c = astiav.FindDecoderByName("invalid")
|
||||
require.Nil(t, c)
|
||||
|
||||
var found bool
|
||||
for _, c := range astiav.Codecs() {
|
||||
if c.ID() == astiav.CodecIDMjpeg {
|
||||
found = true
|
||||
}
|
||||
}
|
||||
require.True(t, found)
|
||||
}
|
||||
|
Reference in New Issue
Block a user