track: expose Set/GetControl

This is useful for clients that need to override the control field, which was
possible prior to 6d5bf0c1bb via the Media field.
This commit is contained in:
Tristan Matthews
2022-02-11 13:56:26 -05:00
committed by Alessandro Ros
parent 247571eec8
commit 1b2a78a744
7 changed files with 24 additions and 14 deletions

View File

@@ -28,7 +28,7 @@ func invalidURLAnnounceReq(t *testing.T, control string) base.Request {
Body: func() []byte {
track, err := NewTrackH264(96, []byte{0x01, 0x02, 0x03, 0x04}, []byte{0x01, 0x02, 0x03, 0x04}, nil)
require.NoError(t, err)
track.setControl(control)
track.SetControl(control)
sout := &psdp.SessionDescription{
SessionName: psdp.SessionName("Stream"),
@@ -260,7 +260,7 @@ func TestServerPublishSetupPath(t *testing.T) {
track, err := NewTrackH264(96, []byte{0x01, 0x02, 0x03, 0x04}, []byte{0x01, 0x02, 0x03, 0x04}, nil)
require.NoError(t, err)
track.setControl(ca.control)
track.SetControl(ca.control)
sout := &psdp.SessionDescription{
SessionName: psdp.SessionName("Stream"),