Skip to content

Commit 003fcd1

Browse files
author
James Yeh
committed
adding stubs for functions, capapbilities and first test
1 parent 6f424e6 commit 003fcd1

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

provider/bitmovin/bitmovin.go

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
11
package bitmovin
22

3+
import "github.com/NYTimes/video-transcoding-api/provider"
4+
35
// Name is the name used for registering the bitmovin provider in the
46
// registry of providers.
57
const Name = "bitmovin"
8+
9+
type bitmovinProvider struct {
10+
}
11+
12+
// func (p *bitmovinProvider) CreatePreset(db.Preset) (string, error) {
13+
14+
// }
15+
16+
// func (p *bitmovinProvider) DeletePreset(presetID string) error {
17+
18+
// }
19+
20+
// func (p *bitmovinProvider) GetPreset(presetID string) (interface{}, error) {
21+
22+
// }
23+
24+
// func (p *bitmovinProvider) Transcode(db.Job) (*provider.JobStatus, error) {
25+
26+
// }
27+
28+
// func (p *bitmovinProvider) JobStatus(db.Job) (*provider.JobStatus, error) {
29+
30+
// }
31+
32+
// func (p *bitmovinProvider) CancelJob(jobID string) error {
33+
34+
// }
35+
36+
// func (p *bitmovinProvider) Healthcheck() error {
37+
38+
// }
39+
40+
func (p *bitmovinProvider) Capabilities() provider.Capabilities {
41+
return provider.Capabilities{
42+
InputFormats: []string{"prores", "h264"},
43+
OutputFormats: []string{"mp4", "hls"},
44+
Destinations: []string{"s3"},
45+
}
46+
}

provider/bitmovin/bitmovin_test.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package bitmovin
2+
3+
import (
4+
"reflect"
5+
"testing"
6+
7+
"github.com/NYTimes/video-transcoding-api/provider"
8+
)
9+
10+
func TestCapabilities(t *testing.T) {
11+
var prov bitmovinProvider
12+
expected := provider.Capabilities{
13+
InputFormats: []string{"prores", "h264"},
14+
OutputFormats: []string{"mp4", "hls"},
15+
Destinations: []string{"s3"},
16+
}
17+
cap := prov.Capabilities()
18+
if !reflect.DeepEqual(cap, expected) {
19+
t.Errorf("Capabilities: want %#v. Got %#v", expected, cap)
20+
}
21+
}

0 commit comments

Comments
 (0)