-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding stubs for functions, capapbilities and first test
- Loading branch information
James Yeh
committed
Dec 28, 2016
1 parent
6f424e6
commit 003fcd1
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} | ||
} |