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,6 +40,7 @@ type ProgressIO struct {
|
||||
Height uint64 `json:"height,omitempty" format:"uint64"`
|
||||
|
||||
// Audio
|
||||
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"`
|
||||
@@ -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,
|
||||
|
@@ -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,
|
||||
|
@@ -36,6 +36,7 @@ type ProgressIO struct {
|
||||
Height uint64
|
||||
|
||||
// Audio
|
||||
Samplefmt string
|
||||
Sampling uint64
|
||||
Layout string
|
||||
Channels uint64
|
||||
@@ -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,
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user