Repository navigation
fix(linux): audio-only media starts immediately and stops showing loading; GStreamer errors reach the app - #259
Open
muthuraj57 wants to merge 1 commit into
Conversation
…; GStreamer errors reach the app - pollDimensionsUntilReady waited 5 s for video dimensions that audio-only media never gets; it now stops as soon as the prerolled pipeline reports no video stream (new nGetVideoStreamCount, playbin n-video). - checkBufferingState set isLoading forever for audio-only media because no frames arrive; it now only applies when there is video. - GStreamer bus errors were only printed. They are kept natively and surfaced as VideoPlayerError.SourceError (new nConsumeError), e.g. a missing AAC decoder or an HTTP failure, instead of reporting playing at 0:00. - With an unknown duration (raw ADTS AAC) the position is still shown and the end of media still detected.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pollDimensionsUntilReadywaited 20 × 250 ms for video dimensions that audio-only media never gets. New nativenGetVideoStreamCount(playbinn-video, -1 until prerolled) lets it stop as soon as the pipeline knows there is no video (Linux counterpart of (MacVideoPlayerState) Unable to retrieve valid dimensions after 20 attempts #167/feat: configure macOS video dimensions timeout #252).checkBufferingStatesetisLoading = truebecause no frames arrive; it now only applies when there is video.nConsumeError); a preroll error fails the open with that message, and a later error stops playback and setsVideoPlayerError.SourceError..aac): the position is still updated and end of media still detected.Test plan
Ubuntu 24.04, GStreamer 1.24, under Xvfb:
isLoadingfalse while playing (was stuck true), seek works; end of media and replay after the end checked on mp3error= "Error opening media: …" within 1 serror= "Your GStreamer installation is missing a plug-in."ktlintCheckadds no findings