Skip to content

Log appsrc state#1141

Merged
milos-lk merged 4 commits intomainfrom
more-state-logs
Mar 2, 2026
Merged

Log appsrc state#1141
milos-lk merged 4 commits intomainfrom
more-state-logs

Conversation

@milos-lk
Copy link
Contributor

@milos-lk milos-lk commented Feb 28, 2026

Continuing the hunt for the source of the issue where a track packets could end up not pushed to the pipeline at all due to a flushing error - indicating that either streaming thread from appsrc hit a pad which isn't activated or it was stopped for some reason. Since the state propagation inside a bin for upward state transitions (NULL->READY->PAUSED->PLAYING) follows sink-source elements order - when the app source hits PLAYING state, all other elements in the src bin should be in that state as well which likely means it wasn't hitting a deactivated pad that was issue here but rather streaming thread stopping. It could stop on downward state transition PAUSED->READY - so one plausible theory is that it was somehow caused by 2 concurrent state transition processes - one global pipeline transition to PLAYING operation and an explicit operation to set the its state to PLAYING after linking it to the pipeline (inside bin.go). One could be driving state to PLAYING much faster and when other starts - it might want to go through the same sequence of state - basically regressing it and maybe stopping the streaming thread. Adding logs to test that theory - if this is the case - we will see states going up and down.

Continuned hunt for the source of the issue where a track packets could end up not pushed to the pipeline at all due to a flushing error - indicating that either streaming thread from appsrc hit a pad which isn't activated or it was stopped for some reason. Since the state propagation inside a bin for upword state transitions (NULL->READY->PAUSED->PLAYING) follows sink-source elements order - when the app source hits PLAYING state, all other elements should be in that state as well which likely means it wasn't hitting a deactivated pad that was issue here but rather streaming thread stopping. It could stop on downwords state transition PAUSED->READY - so one plausible theory is that it was somehow caused by 2 concurrent state transition processes - one global pipeline transition to PLAYING operation and an explict operation to set the state to PLAYING after linking the  source. One could be driving state to PLAYING much faster and when other starts - it might want to go through the same sequence of state - basically regressing it and maybe stopping the streaming thread. Adding logs to test that theory - if this is the case - we will see states going up and down.
@milos-lk milos-lk merged commit bafae9e into main Mar 2, 2026
13 checks passed
@milos-lk milos-lk deleted the more-state-logs branch March 2, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants