Skip to content
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

Eos timer #541

Merged
merged 6 commits into from
Nov 20, 2023
Merged

Eos timer #541

merged 6 commits into from
Nov 20, 2023

Conversation

frostbyte73
Copy link
Member

No description provided.

@@ -121,6 +121,7 @@ func (c *Controller) messageWatch(msg *gst.Message) bool {
switch msg.Type() {
case gst.MessageEOS:
logger.Infow("EOS received")
c.eosTimer.Stop()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nil check? possible EOS is sent by something else?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't be possible but might as well add it

c.eosTimer = time.AfterFunc(time.Second*30, func() {
c.OnError(errors.ErrPipelineFrozen)
})
c.p.SendEOS()
Copy link
Contributor

@biglittlebigben biglittlebigben Nov 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this be confusing if we mark the session as failed, but the media is still available in the end?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the media won't be available if the eos is never received

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(unless it's HLS, in which case the playlist will not be closed)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My question is about calling c.OnError(errors.ErrPipelineFrozen) after 30s.

@frostbyte73 frostbyte73 merged commit b8ab069 into main Nov 20, 2023
2 checks passed
@frostbyte73 frostbyte73 deleted the eos-timer branch November 20, 2023 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants