mirror of
https://github.com/datarhei/core.git
synced 2025-10-06 00:17:07 +08:00
Rename Initialized to Started
This commit is contained in:
@@ -6831,9 +6831,6 @@ const docTemplate = `{
|
||||
"type": "integer",
|
||||
"format": "uint64"
|
||||
},
|
||||
"initialized": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"inputs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -6864,6 +6861,9 @@ const docTemplate = `{
|
||||
"speed": {
|
||||
"type": "number"
|
||||
},
|
||||
"started": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"time": {
|
||||
"type": "number"
|
||||
}
|
||||
|
@@ -6823,9 +6823,6 @@
|
||||
"type": "integer",
|
||||
"format": "uint64"
|
||||
},
|
||||
"initialized": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"inputs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -6856,6 +6853,9 @@
|
||||
"speed": {
|
||||
"type": "number"
|
||||
},
|
||||
"started": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"time": {
|
||||
"type": "number"
|
||||
}
|
||||
|
@@ -1387,8 +1387,6 @@ definitions:
|
||||
frame:
|
||||
format: uint64
|
||||
type: integer
|
||||
initialized:
|
||||
type: boolean
|
||||
inputs:
|
||||
items:
|
||||
$ref: '#/definitions/api.ProgressIO'
|
||||
@@ -1410,6 +1408,8 @@ definitions:
|
||||
type: integer
|
||||
speed:
|
||||
type: number
|
||||
started:
|
||||
type: boolean
|
||||
time:
|
||||
type: number
|
||||
type: object
|
||||
|
@@ -655,7 +655,7 @@ func (p *parser) Progress() Progress {
|
||||
progress.Input[i].AVstream = av.export()
|
||||
}
|
||||
|
||||
progress.Initialized = p.stats.initialized
|
||||
progress.Started = p.stats.initialized
|
||||
|
||||
return progress
|
||||
}
|
||||
|
@@ -184,7 +184,7 @@ func TestParserLogHistory(t *testing.T) {
|
||||
|
||||
d, _ := time.ParseDuration("3m58s440ms")
|
||||
require.Equal(t, Progress{
|
||||
Initialized: true,
|
||||
Started: true,
|
||||
Frame: 5968,
|
||||
FPS: 0, // is calculated with averager
|
||||
Quantizer: 19.4,
|
||||
@@ -251,7 +251,7 @@ func TestParserLogMinimalHistoryLength(t *testing.T) {
|
||||
|
||||
d, _ := time.ParseDuration("3m58s440ms")
|
||||
require.Equal(t, Progress{
|
||||
Initialized: true,
|
||||
Started: true,
|
||||
Frame: 5968,
|
||||
FPS: 0, // is calculated with averager
|
||||
Quantizer: 19.4,
|
||||
@@ -269,7 +269,7 @@ func TestParserLogMinimalHistoryLength(t *testing.T) {
|
||||
|
||||
d, _ := time.ParseDuration("3m58s440ms")
|
||||
require.Equal(t, Progress{
|
||||
Initialized: true,
|
||||
Started: true,
|
||||
Frame: 5968,
|
||||
FPS: 0, // is calculated with averager
|
||||
Quantizer: 19.4,
|
||||
@@ -813,7 +813,7 @@ func TestParserProgressPlayout(t *testing.T) {
|
||||
progress := parser.Progress()
|
||||
|
||||
require.Equal(t, Progress{
|
||||
Initialized: true,
|
||||
Started: true,
|
||||
Input: []ProgressIO{
|
||||
{
|
||||
Address: "playout:https://cdn.livespotting.com/vpu/e9slfpe3/z60wzayk.m3u8",
|
||||
|
@@ -450,7 +450,7 @@ type ProgressIO struct {
|
||||
}
|
||||
|
||||
type Progress struct {
|
||||
Initialized bool
|
||||
Started bool
|
||||
Input []ProgressIO
|
||||
Output []ProgressIO
|
||||
Mapping StreamMapping
|
||||
|
@@ -91,7 +91,7 @@ func (i *ProgressIO) Unmarshal(io *app.ProgressIO) {
|
||||
|
||||
// Progress represents the progress of an ffmpeg process
|
||||
type Progress struct {
|
||||
Initialized bool `json:"initialized"`
|
||||
Started bool `json:"started"`
|
||||
Input []ProgressIO `json:"inputs"`
|
||||
Output []ProgressIO `json:"outputs"`
|
||||
Mapping StreamMapping `json:"mapping"`
|
||||
@@ -116,7 +116,7 @@ func (progress *Progress) Unmarshal(p *app.Progress) {
|
||||
return
|
||||
}
|
||||
|
||||
progress.Initialized = p.Initialized
|
||||
progress.Started = p.Started
|
||||
progress.Input = make([]ProgressIO, len(p.Input))
|
||||
progress.Output = make([]ProgressIO, len(p.Output))
|
||||
progress.Frame = p.Frame
|
||||
|
@@ -41,7 +41,7 @@ type ProgressIO struct {
|
||||
}
|
||||
|
||||
type Progress struct {
|
||||
Initialized bool
|
||||
Started bool
|
||||
Input []ProgressIO
|
||||
Output []ProgressIO
|
||||
Mapping StreamMapping
|
||||
|
@@ -1624,7 +1624,7 @@ func (r *restream) GetProcessState(id app.ProcessID) (*app.State, error) {
|
||||
|
||||
// convertProgressFromParser converts a ffmpeg/parse.Progress type into a restream/app.Progress type.
|
||||
func convertProgressFromParser(progress *app.Progress, pprogress parse.Progress) {
|
||||
progress.Initialized = pprogress.Initialized
|
||||
progress.Started = pprogress.Started
|
||||
progress.Frame = pprogress.Frame
|
||||
progress.Packet = pprogress.Packet
|
||||
progress.FPS = pprogress.FPS
|
||||
|
Reference in New Issue
Block a user