mirror of
https://github.com/datarhei/core.git
synced 2025-10-06 08:27:08 +08:00
Add initialized field in progress data
This commit is contained in:
@@ -4887,9 +4887,6 @@ const docTemplate = `{
|
|||||||
"leader": {
|
"leader": {
|
||||||
"$ref": "#/definitions/api.ClusterAboutLeader"
|
"$ref": "#/definitions/api.ClusterAboutLeader"
|
||||||
},
|
},
|
||||||
"node_id": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
@@ -6834,6 +6831,9 @@ const docTemplate = `{
|
|||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "uint64"
|
"format": "uint64"
|
||||||
},
|
},
|
||||||
|
"initialized": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
|
@@ -4879,9 +4879,6 @@
|
|||||||
"leader": {
|
"leader": {
|
||||||
"$ref": "#/definitions/api.ClusterAboutLeader"
|
"$ref": "#/definitions/api.ClusterAboutLeader"
|
||||||
},
|
},
|
||||||
"node_id": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
@@ -6826,6 +6823,9 @@
|
|||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "uint64"
|
"format": "uint64"
|
||||||
},
|
},
|
||||||
|
"initialized": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
|
@@ -78,8 +78,6 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
leader:
|
leader:
|
||||||
$ref: '#/definitions/api.ClusterAboutLeader'
|
$ref: '#/definitions/api.ClusterAboutLeader'
|
||||||
node_id:
|
|
||||||
type: string
|
|
||||||
nodes:
|
nodes:
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/api.ClusterNode'
|
$ref: '#/definitions/api.ClusterNode'
|
||||||
@@ -1389,6 +1387,8 @@ definitions:
|
|||||||
frame:
|
frame:
|
||||||
format: uint64
|
format: uint64
|
||||||
type: integer
|
type: integer
|
||||||
|
initialized:
|
||||||
|
type: boolean
|
||||||
inputs:
|
inputs:
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/api.ProgressIO'
|
$ref: '#/definitions/api.ProgressIO'
|
||||||
|
@@ -655,6 +655,8 @@ func (p *parser) Progress() Progress {
|
|||||||
progress.Input[i].AVstream = av.export()
|
progress.Input[i].AVstream = av.export()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
progress.Initialized = p.stats.initialized
|
||||||
|
|
||||||
return progress
|
return progress
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -450,6 +450,7 @@ type ProgressIO struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Progress struct {
|
type Progress struct {
|
||||||
|
Initialized bool
|
||||||
Input []ProgressIO
|
Input []ProgressIO
|
||||||
Output []ProgressIO
|
Output []ProgressIO
|
||||||
Mapping StreamMapping
|
Mapping StreamMapping
|
||||||
|
@@ -91,6 +91,7 @@ func (i *ProgressIO) Unmarshal(io *app.ProgressIO) {
|
|||||||
|
|
||||||
// Progress represents the progress of an ffmpeg process
|
// Progress represents the progress of an ffmpeg process
|
||||||
type Progress struct {
|
type Progress struct {
|
||||||
|
Initialized bool `json:"initialized"`
|
||||||
Input []ProgressIO `json:"inputs"`
|
Input []ProgressIO `json:"inputs"`
|
||||||
Output []ProgressIO `json:"outputs"`
|
Output []ProgressIO `json:"outputs"`
|
||||||
Mapping StreamMapping `json:"mapping"`
|
Mapping StreamMapping `json:"mapping"`
|
||||||
@@ -115,6 +116,7 @@ func (progress *Progress) Unmarshal(p *app.Progress) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
progress.Initialized = p.Initialized
|
||||||
progress.Input = make([]ProgressIO, len(p.Input))
|
progress.Input = make([]ProgressIO, len(p.Input))
|
||||||
progress.Output = make([]ProgressIO, len(p.Output))
|
progress.Output = make([]ProgressIO, len(p.Output))
|
||||||
progress.Frame = p.Frame
|
progress.Frame = p.Frame
|
||||||
|
@@ -41,6 +41,7 @@ type ProgressIO struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Progress struct {
|
type Progress struct {
|
||||||
|
Initialized bool
|
||||||
Input []ProgressIO
|
Input []ProgressIO
|
||||||
Output []ProgressIO
|
Output []ProgressIO
|
||||||
Mapping StreamMapping
|
Mapping StreamMapping
|
||||||
|
@@ -1624,6 +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.
|
// convertProgressFromParser converts a ffmpeg/parse.Progress type into a restream/app.Progress type.
|
||||||
func convertProgressFromParser(progress *app.Progress, pprogress parse.Progress) {
|
func convertProgressFromParser(progress *app.Progress, pprogress parse.Progress) {
|
||||||
|
progress.Initialized = pprogress.Initialized
|
||||||
progress.Frame = pprogress.Frame
|
progress.Frame = pprogress.Frame
|
||||||
progress.Packet = pprogress.Packet
|
progress.Packet = pprogress.Packet
|
||||||
progress.FPS = pprogress.FPS
|
progress.FPS = pprogress.FPS
|
||||||
|
Reference in New Issue
Block a user