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

Sign up
Appearance settings

Commit 70504f6

Browse files
authored
Export makePSSHBox (#90)
1 parent f3ae89b commit 70504f6

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

‎mpd/mpd.go‎

Lines 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‎

Lines 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‎

Lines 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)

AltStyle によって変換されたページ (->オリジナル) /