diff --git a/http/api/progress.go b/http/api/progress.go index 93671b57..dc1bdd5b 100644 --- a/http/api/progress.go +++ b/http/api/progress.go @@ -40,9 +40,10 @@ type ProgressIO struct { Height uint64 `json:"height,omitempty" format:"uint64"` // Audio - Sampling uint64 `json:"sampling_hz,omitempty" format:"uint64"` - Layout string `json:"layout,omitempty"` - Channels uint64 `json:"channels,omitempty" format:"uint64"` + Samplefmt string `json:"sample_fmt,omitempty"` + Sampling uint64 `json:"sampling_hz,omitempty" format:"uint64"` + Layout string `json:"layout,omitempty"` + Channels uint64 `json:"channels,omitempty" format:"uint64"` // avstream AVstream *AVstream `json:"avstream" jsonschema:"anyof_type=null;object"` @@ -77,6 +78,7 @@ func (i *ProgressIO) Unmarshal(io *app.ProgressIO) { i.Quantizer = json.ToNumber(io.Quantizer) i.Width = io.Width i.Height = io.Height + i.Samplefmt = io.Samplefmt i.Sampling = io.Sampling i.Layout = io.Layout i.Channels = io.Channels @@ -105,6 +107,7 @@ func (i *ProgressIO) Marshal() app.ProgressIO { Pixfmt: i.Pixfmt, Width: i.Width, Height: i.Height, + Samplefmt: i.Samplefmt, Sampling: i.Sampling, Layout: i.Layout, Channels: i.Channels, diff --git a/http/api/progress_test.go b/http/api/progress_test.go index 812e434c..06837e10 100644 --- a/http/api/progress_test.go +++ b/http/api/progress_test.go @@ -114,6 +114,7 @@ func TestProgressIO(t *testing.T) { Quantizer: 494.2, Width: 10393, Height: 4933, + Samplefmt: "fltp", Sampling: 58483, Layout: "atmos", Channels: 4944, @@ -154,6 +155,7 @@ func TestProgressIOAVstream(t *testing.T) { Quantizer: 494.2, Width: 10393, Height: 4933, + Samplefmt: "fltp", Sampling: 58483, Layout: "atmos", Channels: 4944, @@ -220,6 +222,7 @@ func TestProgress(t *testing.T) { Quantizer: 494.2, Width: 10393, Height: 4933, + Samplefmt: "fltp", Sampling: 58483, Layout: "atmos", Channels: 4944, @@ -276,6 +279,7 @@ func TestProgress(t *testing.T) { Quantizer: 494.2, Width: 10393, Height: 4933, + Samplefmt: "fltp", Sampling: 58483, Layout: "atmos", Channels: 4944, diff --git a/restream/app/progress.go b/restream/app/progress.go index d747ba67..c98ad0fd 100644 --- a/restream/app/progress.go +++ b/restream/app/progress.go @@ -36,9 +36,10 @@ type ProgressIO struct { Height uint64 // Audio - Sampling uint64 - Layout string - Channels uint64 + Samplefmt string + Sampling uint64 + Layout string + Channels uint64 // avstream AVstream *AVstream @@ -65,6 +66,7 @@ func (p *ProgressIO) UnmarshalParser(pp *parse.ProgressIO) { p.Quantizer = pp.Quantizer p.Width = pp.Width p.Height = pp.Height + p.Samplefmt = pp.Samplefmt p.Sampling = pp.Sampling p.Layout = pp.Layout p.Channels = pp.Channels @@ -99,6 +101,7 @@ func (p *ProgressIO) MarshalParser() parse.ProgressIO { Quantizer: p.Quantizer, Width: p.Width, Height: p.Height, + Samplefmt: p.Samplefmt, Sampling: p.Sampling, Layout: p.Layout, Channels: p.Channels, diff --git a/restream/app/progress_test.go b/restream/app/progress_test.go index bfffa293..2cee5173 100644 --- a/restream/app/progress_test.go +++ b/restream/app/progress_test.go @@ -37,6 +37,7 @@ func TestProgressIO(t *testing.T) { Quantizer: 2.3, Width: 4848, Height: 9373, + Samplefmt: "fltp", Sampling: 4733, Layout: "atmos", Channels: 83, @@ -81,6 +82,7 @@ func TestProgressIOWithAVstream(t *testing.T) { Quantizer: 2.3, Width: 4848, Height: 9373, + Samplefmt: "fltp", Sampling: 4733, Layout: "atmos", Channels: 83, @@ -238,6 +240,7 @@ func TestProgress(t *testing.T) { Quantizer: 2.3, Width: 4848, Height: 9373, + Samplefmt: "fltp", Sampling: 4733, Layout: "atmos", Channels: 83, @@ -304,6 +307,7 @@ func TestProgress(t *testing.T) { Quantizer: 2.3, Width: 4848, Height: 9373, + Samplefmt: "fltp", Sampling: 4733, Layout: "atmos", Channels: 83,