Skip to content

Commit

Permalink
adding stubs for functions, capapbilities and first test
Browse files Browse the repository at this point in the history
  • Loading branch information
James Yeh committed Dec 28, 2016
1 parent 6f424e6 commit 003fcd1
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
41 changes: 41 additions & 0 deletions provider/bitmovin/bitmovin.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,46 @@
package bitmovin

import "github.com/NYTimes/video-transcoding-api/provider"

// Name is the name used for registering the bitmovin provider in the
// registry of providers.
const Name = "bitmovin"

type bitmovinProvider struct {
}

// func (p *bitmovinProvider) CreatePreset(db.Preset) (string, error) {

// }

// func (p *bitmovinProvider) DeletePreset(presetID string) error {

// }

// func (p *bitmovinProvider) GetPreset(presetID string) (interface{}, error) {

// }

// func (p *bitmovinProvider) Transcode(db.Job) (*provider.JobStatus, error) {

// }

// func (p *bitmovinProvider) JobStatus(db.Job) (*provider.JobStatus, error) {

// }

// func (p *bitmovinProvider) CancelJob(jobID string) error {

// }

// func (p *bitmovinProvider) Healthcheck() error {

// }

func (p *bitmovinProvider) Capabilities() provider.Capabilities {
return provider.Capabilities{
InputFormats: []string{"prores", "h264"},
OutputFormats: []string{"mp4", "hls"},
Destinations: []string{"s3"},
}
}
21 changes: 21 additions & 0 deletions provider/bitmovin/bitmovin_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package bitmovin

import (
"reflect"
"testing"

"github.com/NYTimes/video-transcoding-api/provider"
)

func TestCapabilities(t *testing.T) {
var prov bitmovinProvider
expected := provider.Capabilities{
InputFormats: []string{"prores", "h264"},
OutputFormats: []string{"mp4", "hls"},
Destinations: []string{"s3"},
}
cap := prov.Capabilities()
if !reflect.DeepEqual(cap, expected) {
t.Errorf("Capabilities: want %#v. Got %#v", expected, cap)
}
}

0 comments on commit 003fcd1

Please sign in to comment.