minor fixes
This commit is contained in:
@@ -160,8 +160,7 @@ func checkArgs(args appArgs) {
|
||||
|
||||
if !audioFlowDefProvided {
|
||||
if args.audioChannels == 0 {
|
||||
fmt.Fprintln(os.Stderr, "Audio channels amount must be > 0")
|
||||
printUsageAndExit()
|
||||
// TODO: ignore audio
|
||||
}
|
||||
if _, exists := samplingRates[args.audioSamplingFreq]; !exists {
|
||||
fmt.Fprintf(os.Stderr, "Sample rate %s is not in available list.\n", args.audioSamplingFreq)
|
||||
@@ -201,7 +200,7 @@ var patterns = map[string]pattern{
|
||||
name: "ebu75-move",
|
||||
description: "EBU 75% Color Bar Signal with moving square",
|
||||
kernelPath: "kernels/dynamic/ebu75.wgsl",
|
||||
motion: false,
|
||||
motion: true,
|
||||
},
|
||||
"ebu100": {
|
||||
name: "ebu100",
|
||||
@@ -213,7 +212,7 @@ var patterns = map[string]pattern{
|
||||
name: "ebu100-move",
|
||||
description: "EBU 100% Color Bar Signal with moving square",
|
||||
kernelPath: "kernels/dynamic/ebu100.wgsl",
|
||||
motion: false,
|
||||
motion: true,
|
||||
},
|
||||
"smpte": {
|
||||
name: "smpte",
|
||||
@@ -225,7 +224,7 @@ var patterns = map[string]pattern{
|
||||
name: "smpte-move",
|
||||
description: "SMPTE RP-219 Color Bar Signal with moving square",
|
||||
kernelPath: "kernels/dynamic/smpteBars.wgsl",
|
||||
motion: false,
|
||||
motion: true,
|
||||
},
|
||||
"gray-bars": {
|
||||
name: "gray-bars",
|
||||
@@ -237,7 +236,7 @@ var patterns = map[string]pattern{
|
||||
name: "gray-bars-move",
|
||||
description: "13-step grayscale bars (Y 64..940) with moving square",
|
||||
kernelPath: "kernels/dynamic/yBars.wgsl",
|
||||
motion: false,
|
||||
motion: true,
|
||||
},
|
||||
"gray-ramp": {
|
||||
name: "gray-ramp",
|
||||
@@ -249,7 +248,7 @@ var patterns = map[string]pattern{
|
||||
name: "gray-ramp-move",
|
||||
description: "Y gradient with moving square",
|
||||
kernelPath: "kernels/dynamic/yRamp.wgsl",
|
||||
motion: false,
|
||||
motion: true,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -299,12 +298,12 @@ func flagSetAddFlags(fs *pflag.FlagSet, args *appArgs) {
|
||||
"br - bottom-right corner",
|
||||
)
|
||||
|
||||
fs.UintVar(&args.videoWidth, "width", 1920, "Video pattern width")
|
||||
fs.UintVar(&args.videoWidth, "width", 1920, "Video pattern width. Zero = no video [TODO]")
|
||||
fs.UintVar(&args.videoHeight, "height", 1080, "Video pattern height")
|
||||
fs.StringVar(&args.videoFPS, "fps", "25", "Video pattern FPS")
|
||||
fs.StringVar(&args.videoUUID, "video-id", "", "Video UUID. Will be created, if not provided")
|
||||
// Audio pattern flags
|
||||
fs.Uint8VarP(&args.audioChannels, "channel", "c", 2, "Amount of audio channels. Each channel: num * 1kHz [TODO]")
|
||||
fs.Uint8VarP(&args.audioChannels, "channel", "c", 0, "Amount of audio channels. Each channel: num * 1kHz. Zero = no sound")
|
||||
fs.StringVarP(&args.audioSamplingFreq, "freq", "f", "48", "Sampling frequency of test audio feed in kHz [TODO]")
|
||||
fs.StringVar(&args.audioUUID, "audio-id", "", "Audio UUID. Will be created, if not provided [TODO]")
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ func testFace(t *testing.T, size float64) font.Face {
|
||||
func TestNewTextOverlay(t *testing.T) {
|
||||
const frameW, frameH = 1920, 1080
|
||||
|
||||
o, err := NewTextOverlay("AB", frameW, frameH, testFace(t, 48))
|
||||
o, err := NewTextOverlay("AB", frameW, frameH, 0, 0, "", testFace(t, 48))
|
||||
if err != nil {
|
||||
t.Fatalf("NewTextOverlay: %v", err)
|
||||
}
|
||||
@@ -69,7 +69,7 @@ func TestNewTextOverlay(t *testing.T) {
|
||||
{"AB", false},
|
||||
{"Ag", true},
|
||||
} {
|
||||
o, err := NewTextOverlay(tc.text, frameW, frameH, testFace(t, 48))
|
||||
o, err := NewTextOverlay(tc.text, frameW, frameH, 0, 0, "", testFace(t, 48))
|
||||
if err != nil {
|
||||
t.Fatalf("NewTextOverlay(%q): %v", tc.text, err)
|
||||
}
|
||||
@@ -89,7 +89,7 @@ func TestNewTextOverlay(t *testing.T) {
|
||||
|
||||
func TestTextOverlayApplyV210(t *testing.T) {
|
||||
const frameW, frameH = 1920, 1080
|
||||
o, err := NewTextOverlay("MXL", frameW, frameH, testFace(t, 48))
|
||||
o, err := NewTextOverlay("MXL", frameW, frameH, 0, 0, "", testFace(t, 48))
|
||||
if err != nil {
|
||||
t.Fatalf("NewTextOverlay: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user