Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 70504f6

Browse filesBrowse files
authored
Export makePSSHBox (#90)
1 parent f3ae89b commit 70504f6
Copy full SHA for 70504f6

File tree

Expand file treeCollapse file tree

3 files changed

+8
-8
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+8
-8
lines changed

‎mpd/mpd.go

Copy file name to clipboardExpand all lines: mpd/mpd.go
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ func NewWidevineContentProtection(wvHeader []byte) (*WidevineContentProtection,
779779
if err != nil {
780780
panic(err.Error())
781781
}
782-
psshBox, err := makePSSHBox(wvSystemID, wvHeader)
782+
psshBox, err := MakePSSHBox(wvSystemID, wvHeader)
783783
if err != nil {
784784
return nil, err
785785
}
@@ -853,7 +853,7 @@ func (as *AdaptationSet) AddNewContentProtectionSchemePlayreadyWithPSSH(pro stri
853853
return nil, err
854854
}
855855

856-
psshBox, err := makePSSHBox(prSystemID, proBin)
856+
psshBox, err := MakePSSHBox(prSystemID, proBin)
857857
if err != nil {
858858
return nil, err
859859
}
@@ -885,7 +885,7 @@ func (as *AdaptationSet) AddNewContentProtectionSchemePlayreadyV10WithPSSH(pro s
885885
return nil, err
886886
}
887887

888-
psshBox, err := makePSSHBox(prSystemID, proBin)
888+
psshBox, err := MakePSSHBox(prSystemID, proBin)
889889
if err != nil {
890890
return nil, err
891891
}

‎mpd/pssh.go

Copy file name to clipboardExpand all lines: mpd/pssh.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"fmt"
77
)
88

9-
func makePSSHBox(systemID, payload []byte) ([]byte, error) {
9+
func MakePSSHBox(systemID, payload []byte) ([]byte, error) {
1010
if len(systemID) != 16 {
1111
return nil, fmt.Errorf("SystemID must be 16 bytes, was: %d", len(systemID))
1212
}

‎mpd/pssh_test.go

Copy file name to clipboardExpand all lines: mpd/pssh_test.go
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func TestMakePSSHBox_Widevine(t *testing.T) {
2323
panic(err.Error())
2424
}
2525

26-
psshBox, err := makePSSHBox(wvSystemID, payload)
26+
psshBox, err := MakePSSHBox(wvSystemID, payload)
2727
require.NoError(t, err)
2828

2929
require.EqualString(t, string(expectedPSSH), string(psshBox))
@@ -46,18 +46,18 @@ func TestMakePSSHBox_Playready(t *testing.T) {
4646
panic(err.Error())
4747
}
4848

49-
psshBox, err := makePSSHBox(wvSystemID, payload)
49+
psshBox, err := MakePSSHBox(wvSystemID, payload)
5050
require.NoError(t, err)
5151

5252
require.EqualString(t, string(expectedPSSH), string(psshBox))
5353
}
5454

5555
func TestMakePSSHBox_BadSystemID(t *testing.T) {
56-
_, err := makePSSHBox([]byte("meaningless byte array"), nil)
56+
_, err := MakePSSHBox([]byte("meaningless byte array"), nil)
5757
require.EqualError(t, err, "SystemID must be 16 bytes, was: 22")
5858
}
5959

6060
func TestMakePSSHBox_NilSystemID(t *testing.T) {
61-
_, err := makePSSHBox(nil, nil)
61+
_, err := MakePSSHBox(nil, nil)
6262
require.EqualError(t, err, "SystemID must be 16 bytes, was: 0")
6363
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.