Add sample_fmt to API progress

This commit is contained in:
Ingo Oppermann
2024-09-05 13:40:04 +02:00
parent 7831992936
commit 1a51db01ea
4 changed files with 20 additions and 6 deletions

View File

@@ -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,