Skip to content

Commit

Permalink
Add C2PA support (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
leszko authored Oct 26, 2023
1 parent f38d442 commit cc18cfd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions clients/catalyst.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ type UploadVODRequest struct {
TargetSegmentSizeSecs int64 `json:"target_segment_size_secs,omitempty"`
Encryption *EncryptionPayload `json:"encryption,omitempty"`
ClipStrategy ClipStrategy `json:"clip_strategy,omitempty"`
C2PA bool `json:"c2pa,omitempty"`
}

type EncryptionPayload struct {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/golang/glog v1.1.2
github.com/julienschmidt/httprouter v1.3.0
github.com/livepeer/catalyst-api v0.1.2-0.20230925142340-c311569665b4
github.com/livepeer/go-api-client v0.4.10-0.20231019205353-a945419700fc
github.com/livepeer/go-api-client v0.4.10
github.com/livepeer/go-tools v0.3.2
github.com/livepeer/livepeer-data v0.7.5-0.20230927031152-b938ac1dc665
github.com/peterbourgon/ff v1.7.1
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ github.com/livepeer/catalyst-api v0.1.2-0.20230925142340-c311569665b4 h1:UfiMdED
github.com/livepeer/catalyst-api v0.1.2-0.20230925142340-c311569665b4/go.mod h1:Ybiub5AGDrDfvyh1MWdIa551LAwhx/6lSpbQlgb1W1Q=
github.com/livepeer/go-api-client v0.4.10-0.20231019205353-a945419700fc h1:fN5jindUaI3PZXn6Ff8EXG8Vtvi4gxCja2fS8YI6Sw0=
github.com/livepeer/go-api-client v0.4.10-0.20231019205353-a945419700fc/go.mod h1:Jdb+RI7JyzEZOHd1GUuKofwFDKMO/btTa80SdpUpYQw=
github.com/livepeer/go-api-client v0.4.10-0.20231024102521-56796b8b97bc h1:eps/m701USB84hDQhgNXjXZGkTJdWmBS7RLKjMBXQlc=
github.com/livepeer/go-api-client v0.4.10-0.20231024102521-56796b8b97bc/go.mod h1:Jdb+RI7JyzEZOHd1GUuKofwFDKMO/btTa80SdpUpYQw=
github.com/livepeer/go-api-client v0.4.10 h1:WMWJ2guElf000TBcqQpbrC2zGGRlVlin/7w6lMvSGkY=
github.com/livepeer/go-api-client v0.4.10/go.mod h1:Jdb+RI7JyzEZOHd1GUuKofwFDKMO/btTa80SdpUpYQw=
github.com/livepeer/go-tools v0.3.2 h1:5pOUrOmkkGbbcWnpCt2yrSD6cD85G4GcpO4B25NpMJM=
github.com/livepeer/go-tools v0.3.2/go.mod h1:qs31y68b3PQPmSr8nR8l5WQiIWI623z6pqOccqebjos=
github.com/livepeer/livepeer-data v0.7.5-0.20230927031152-b938ac1dc665 h1:EXlI922Fsv9lyIw1LQ7pZN6slCuYya8NQrCFWN8INg4=
Expand Down
4 changes: 4 additions & 0 deletions task/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ type handleUploadVODParams struct {
targetSegmentSizeSecs int64
catalystPipelineStrategy pipeline.Strategy
clipStrategy clients.ClipStrategy
c2pa bool
}

func handleUploadVOD(p handleUploadVODParams) (*TaskHandlerOutput, error) {
Expand Down Expand Up @@ -102,6 +103,7 @@ func handleUploadVOD(p handleUploadVODParams) (*TaskHandlerOutput, error) {
Profiles: p.profiles,
TargetSegmentSizeSecs: p.targetSegmentSizeSecs,
Encryption: encryption,
C2PA: p.c2pa,
}

if clipStrategy != nil {
Expand Down Expand Up @@ -207,6 +209,7 @@ func TaskUpload(tctx *TaskContext) (*TaskHandlerOutput, error) {
}, nil
},
catalystPipelineStrategy: pipeline.Strategy(params.CatalystPipelineStrategy),
c2pa: params.C2PA,
})
}

Expand Down Expand Up @@ -239,6 +242,7 @@ func TaskTranscodeFile(tctx *TaskContext) (*TaskHandlerOutput, error) {
catalystPipelineStrategy: pipeline.Strategy(params.CatalystPipelineStrategy),
targetSegmentSizeSecs: params.TargetSegmentSizeSecs,
profiles: params.Profiles,
c2pa: params.C2PA,
})
}

Expand Down

0 comments on commit cc18cfd

Please sign in to comment.