Skip to content

Commit

Permalink
record-tester: Make profiles check required
Browse files Browse the repository at this point in the history
But enforce output profiles if not provided
  • Loading branch information
victorges committed Jun 19, 2024
1 parent 7f8c979 commit 539afad
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/app/recordtester/recordtester_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,10 +453,14 @@ func (rt *recordTester) doOneHTTPStream(fileName, streamName, broadcasterURL str
var err error
apiTry := 0
for {
recordingSpec := rt.RecordingSpec
if recordingSpec == nil {
recordingSpec = &api.RecordingSpec{Profiles: &api.StandardProfiles}
}
session, err = rt.API.CreateStream(api.CreateStreamReq{
Name: streamName,
Record: true,
RecordingSpec: rt.RecordingSpec,
RecordingSpec: recordingSpec,
RecordObjectStoreId: rt.RecordObjectStoreId,
ParentID: stream.ID,
})
Expand Down Expand Up @@ -559,6 +563,7 @@ func (rt *recordTester) checkRecordingHls(stream *api.Stream, url string, stream
if len(vs.SegmentsNum) != expectedProfiles {
glog.Warningf("Number of renditions doesn't match! Has %d should %d. streamId=%s playbackId=%s", len(vs.SegmentsNum), len(api.StandardProfiles)+1, stream.ID, stream.PlaybackID)
es = 35
return es, fmt.Errorf("number of renditions doesn't match (expected: %d actual: %d)", expectedProfiles, len(vs.SegmentsNum))
}
glog.V(model.DEBUG).Infof("Stats: %s streamId=%s playbackId=%s", vs.String(), stream.ID, stream.PlaybackID)
glog.V(model.DEBUG).Infof("Stats raw: %+v streamId=%s playbackId=%s", vs, stream.ID, stream.PlaybackID)
Expand Down

0 comments on commit 539afad

Please sign in to comment.