-
-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transcript: support custom fix and overlay queue #211
base: main
Are you sure you want to change the base?
Conversation
platform/transcript.go
Outdated
// The total segments in overlay HLS. | ||
const maxOverlaySegments = 9 | ||
// The default total segments in overlay HLS. | ||
const defaultMaxOverlaySegments = 9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should not repeat your code:
const defaultMaxOverlaySegments = 9
setEnvDefault("SRS_TRANSCRIPT_OVERLAY_QUEUE_LIMIT", "9")
platform/transcript.go
Outdated
const defaultMaxOverlaySegments = 9 | ||
|
||
// Get the total segments in overlay HLS. | ||
func GetMaxOverlaySegments() (int, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function GetMaxOverlaySegments
should be designed to ignore any error:
func GetMaxOverlaySegments() (int, error)
Use it in the transcript while ignoring any error:
maxOverlaySegments, _ := GetMaxOverlaySegments()
In the doMain
, after setEnvDefault
, check for the error:
setEnvDefault("SRS_TRANSCRIPT_OVERLAY_QUEUE_LIMIT", "9")
if _, err := GetMaxOverlaySegments(); err != nil {
return errors.Wrapf(......)
If the environment is not set as expected, it should fail in main
, not in the transcript.
No description provided.