22 lines
595 B
Go
22 lines
595 B
Go
|
//go:build cgo && !disable_library_libx264
|
||
|
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"git.gammaspectra.live/S.O.N.G/Ignite/encoder"
|
||
|
"git.gammaspectra.live/S.O.N.G/Ignite/encoder/libx264"
|
||
|
"git.gammaspectra.live/S.O.N.G/Ignite/frame"
|
||
|
"git.gammaspectra.live/S.O.N.G/Ignite/utilities"
|
||
|
"io"
|
||
|
)
|
||
|
|
||
|
func init() {
|
||
|
Encoders = append(Encoders, EncoderEntry{
|
||
|
Name: EncoderX264,
|
||
|
Version: libx264.Version,
|
||
|
New: func(w io.Writer, properties frame.StreamProperties, settings map[string]any, logger utilities.Logger) (encoder.Encoder, error) {
|
||
|
return libx264.NewEncoder(w, properties, settings, logger)
|
||
|
},
|
||
|
})
|
||
|
}
|