mirror of
https://github.com/datarhei/core.git
synced 2025-10-06 00:17:07 +08:00
Add sample_fmt to API progress
This commit is contained in:
@@ -40,9 +40,10 @@ type ProgressIO struct {
|
|||||||
Height uint64 `json:"height,omitempty" format:"uint64"`
|
Height uint64 `json:"height,omitempty" format:"uint64"`
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
Sampling uint64 `json:"sampling_hz,omitempty" format:"uint64"`
|
Samplefmt string `json:"sample_fmt,omitempty"`
|
||||||
Layout string `json:"layout,omitempty"`
|
Sampling uint64 `json:"sampling_hz,omitempty" format:"uint64"`
|
||||||
Channels uint64 `json:"channels,omitempty" format:"uint64"`
|
Layout string `json:"layout,omitempty"`
|
||||||
|
Channels uint64 `json:"channels,omitempty" format:"uint64"`
|
||||||
|
|
||||||
// avstream
|
// avstream
|
||||||
AVstream *AVstream `json:"avstream" jsonschema:"anyof_type=null;object"`
|
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.Quantizer = json.ToNumber(io.Quantizer)
|
||||||
i.Width = io.Width
|
i.Width = io.Width
|
||||||
i.Height = io.Height
|
i.Height = io.Height
|
||||||
|
i.Samplefmt = io.Samplefmt
|
||||||
i.Sampling = io.Sampling
|
i.Sampling = io.Sampling
|
||||||
i.Layout = io.Layout
|
i.Layout = io.Layout
|
||||||
i.Channels = io.Channels
|
i.Channels = io.Channels
|
||||||
@@ -105,6 +107,7 @@ func (i *ProgressIO) Marshal() app.ProgressIO {
|
|||||||
Pixfmt: i.Pixfmt,
|
Pixfmt: i.Pixfmt,
|
||||||
Width: i.Width,
|
Width: i.Width,
|
||||||
Height: i.Height,
|
Height: i.Height,
|
||||||
|
Samplefmt: i.Samplefmt,
|
||||||
Sampling: i.Sampling,
|
Sampling: i.Sampling,
|
||||||
Layout: i.Layout,
|
Layout: i.Layout,
|
||||||
Channels: i.Channels,
|
Channels: i.Channels,
|
||||||
|
@@ -114,6 +114,7 @@ func TestProgressIO(t *testing.T) {
|
|||||||
Quantizer: 494.2,
|
Quantizer: 494.2,
|
||||||
Width: 10393,
|
Width: 10393,
|
||||||
Height: 4933,
|
Height: 4933,
|
||||||
|
Samplefmt: "fltp",
|
||||||
Sampling: 58483,
|
Sampling: 58483,
|
||||||
Layout: "atmos",
|
Layout: "atmos",
|
||||||
Channels: 4944,
|
Channels: 4944,
|
||||||
@@ -154,6 +155,7 @@ func TestProgressIOAVstream(t *testing.T) {
|
|||||||
Quantizer: 494.2,
|
Quantizer: 494.2,
|
||||||
Width: 10393,
|
Width: 10393,
|
||||||
Height: 4933,
|
Height: 4933,
|
||||||
|
Samplefmt: "fltp",
|
||||||
Sampling: 58483,
|
Sampling: 58483,
|
||||||
Layout: "atmos",
|
Layout: "atmos",
|
||||||
Channels: 4944,
|
Channels: 4944,
|
||||||
@@ -220,6 +222,7 @@ func TestProgress(t *testing.T) {
|
|||||||
Quantizer: 494.2,
|
Quantizer: 494.2,
|
||||||
Width: 10393,
|
Width: 10393,
|
||||||
Height: 4933,
|
Height: 4933,
|
||||||
|
Samplefmt: "fltp",
|
||||||
Sampling: 58483,
|
Sampling: 58483,
|
||||||
Layout: "atmos",
|
Layout: "atmos",
|
||||||
Channels: 4944,
|
Channels: 4944,
|
||||||
@@ -276,6 +279,7 @@ func TestProgress(t *testing.T) {
|
|||||||
Quantizer: 494.2,
|
Quantizer: 494.2,
|
||||||
Width: 10393,
|
Width: 10393,
|
||||||
Height: 4933,
|
Height: 4933,
|
||||||
|
Samplefmt: "fltp",
|
||||||
Sampling: 58483,
|
Sampling: 58483,
|
||||||
Layout: "atmos",
|
Layout: "atmos",
|
||||||
Channels: 4944,
|
Channels: 4944,
|
||||||
|
@@ -36,9 +36,10 @@ type ProgressIO struct {
|
|||||||
Height uint64
|
Height uint64
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
Sampling uint64
|
Samplefmt string
|
||||||
Layout string
|
Sampling uint64
|
||||||
Channels uint64
|
Layout string
|
||||||
|
Channels uint64
|
||||||
|
|
||||||
// avstream
|
// avstream
|
||||||
AVstream *AVstream
|
AVstream *AVstream
|
||||||
@@ -65,6 +66,7 @@ func (p *ProgressIO) UnmarshalParser(pp *parse.ProgressIO) {
|
|||||||
p.Quantizer = pp.Quantizer
|
p.Quantizer = pp.Quantizer
|
||||||
p.Width = pp.Width
|
p.Width = pp.Width
|
||||||
p.Height = pp.Height
|
p.Height = pp.Height
|
||||||
|
p.Samplefmt = pp.Samplefmt
|
||||||
p.Sampling = pp.Sampling
|
p.Sampling = pp.Sampling
|
||||||
p.Layout = pp.Layout
|
p.Layout = pp.Layout
|
||||||
p.Channels = pp.Channels
|
p.Channels = pp.Channels
|
||||||
@@ -99,6 +101,7 @@ func (p *ProgressIO) MarshalParser() parse.ProgressIO {
|
|||||||
Quantizer: p.Quantizer,
|
Quantizer: p.Quantizer,
|
||||||
Width: p.Width,
|
Width: p.Width,
|
||||||
Height: p.Height,
|
Height: p.Height,
|
||||||
|
Samplefmt: p.Samplefmt,
|
||||||
Sampling: p.Sampling,
|
Sampling: p.Sampling,
|
||||||
Layout: p.Layout,
|
Layout: p.Layout,
|
||||||
Channels: p.Channels,
|
Channels: p.Channels,
|
||||||
|
@@ -37,6 +37,7 @@ func TestProgressIO(t *testing.T) {
|
|||||||
Quantizer: 2.3,
|
Quantizer: 2.3,
|
||||||
Width: 4848,
|
Width: 4848,
|
||||||
Height: 9373,
|
Height: 9373,
|
||||||
|
Samplefmt: "fltp",
|
||||||
Sampling: 4733,
|
Sampling: 4733,
|
||||||
Layout: "atmos",
|
Layout: "atmos",
|
||||||
Channels: 83,
|
Channels: 83,
|
||||||
@@ -81,6 +82,7 @@ func TestProgressIOWithAVstream(t *testing.T) {
|
|||||||
Quantizer: 2.3,
|
Quantizer: 2.3,
|
||||||
Width: 4848,
|
Width: 4848,
|
||||||
Height: 9373,
|
Height: 9373,
|
||||||
|
Samplefmt: "fltp",
|
||||||
Sampling: 4733,
|
Sampling: 4733,
|
||||||
Layout: "atmos",
|
Layout: "atmos",
|
||||||
Channels: 83,
|
Channels: 83,
|
||||||
@@ -238,6 +240,7 @@ func TestProgress(t *testing.T) {
|
|||||||
Quantizer: 2.3,
|
Quantizer: 2.3,
|
||||||
Width: 4848,
|
Width: 4848,
|
||||||
Height: 9373,
|
Height: 9373,
|
||||||
|
Samplefmt: "fltp",
|
||||||
Sampling: 4733,
|
Sampling: 4733,
|
||||||
Layout: "atmos",
|
Layout: "atmos",
|
||||||
Channels: 83,
|
Channels: 83,
|
||||||
@@ -304,6 +307,7 @@ func TestProgress(t *testing.T) {
|
|||||||
Quantizer: 2.3,
|
Quantizer: 2.3,
|
||||||
Width: 4848,
|
Width: 4848,
|
||||||
Height: 9373,
|
Height: 9373,
|
||||||
|
Samplefmt: "fltp",
|
||||||
Sampling: 4733,
|
Sampling: 4733,
|
||||||
Layout: "atmos",
|
Layout: "atmos",
|
||||||
Channels: 83,
|
Channels: 83,
|
||||||
|
Reference in New Issue
Block a user