Skip to content

Commit

Permalink
feat: major update of cmaf-ingest-receiver.
Browse files Browse the repository at this point in the history
It can now handle much more complex cases
It can align timestamps, handle holes, handle missing init segments etc.
In addition it generates a DASH MPD with SegmentTimeline using Number addressing
  • Loading branch information
tobbee committed Oct 2, 2024
1 parent 34c0171 commit f145110
Show file tree
Hide file tree
Showing 53 changed files with 1,557 additions and 325 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Generation of CMAF ingest streams with a REST-based API
- New program `cmaf-ingest-receiver` that can receive one or more CMAF ingest streams
- New option `--whitelistblocks` for unlimited number of requests to some CIDR blocks
- Much improved `cmaf-ingest-receiver`

### Fixed

Expand Down
20 changes: 11 additions & 9 deletions cmd/cmaf-ingest-receiver/app/basicauth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,19 @@ func TestBasicAuth(t *testing.T) {
defer cancel()
receiver, err := NewReceiver(ctx, &opts, &config)
require.NoError(t, err)
router := setupRouter(receiver)
router := setupRouter(receiver, opts.storage, "")
server := httptest.NewServer(router)
defer server.Close()
for _, c := range cases {
buf := bytes.NewBuffer(data)
url := fmt.Sprintf("%s%s/%s", server.URL, opts.prefix, c.url)
req, err := http.NewRequest(http.MethodPut, url, buf)
require.NoError(t, err)
req.SetBasicAuth(c.user, c.password)
resp, err := http.DefaultClient.Do(req)
require.NoError(t, err)
assert.Equal(t, c.expectedResponseCode, resp.StatusCode)
t.Run(c.desc, func(t *testing.T) {
buf := bytes.NewBuffer(data)
url := fmt.Sprintf("%s%s/%s", server.URL, opts.prefix, c.url)
req, err := http.NewRequest(http.MethodPut, url, buf)
require.NoError(t, err)
req.SetBasicAuth(c.user, c.password)
resp, err := http.DefaultClient.Do(req)
require.NoError(t, err)
assert.Equal(t, c.expectedResponseCode, resp.StatusCode)
})
}
}
Loading

0 comments on commit f145110

Please sign in to comment.