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

[wpe-2.22] Playback of podcast streams (large mp3 files) stops after sometime #1381

Closed
pradeep-raveendranpillai-infosys opened this issue Aug 6, 2024 · 6 comments
Labels

Comments

@pradeep-raveendranpillai-infosys
Copy link

pradeep-raveendranpillai-infosys commented Aug 6, 2024

On wpe 2.22 based build it is seen that playback of Podcasts (basically large mp3 files with play duration of 15+ minutes) is stopping in the middle. The issue is not seen in wpe 2.38 based builds. Radioline app from metrological can be used to play podcasts. One of the direct stream url which can be used to play is https://pdst.fm/e/chrt.fm/track/A27C8C/traffic.megaphone.fm/GLT9276872927.mp3 (size is 53MB, play duration is 37mins)

From the logs it is seen that end of stream notification arrives during the middle of playback. My understanding is seen that CachedResourceStreamingClient::dataReceived() function in WebKitWebSourceGStreamer.cpp gets invoked by loader whenever data is available/downloaded which is then copied to gstreamer buffers. Whenever Gst data buffer is full, it invokes webkitwebsrc callback webKitWebSrcEnoughData() where downloading data is deferred. Similarly when Gst data is less, it invokes callback to resume download of data. These happen in a loop until loader indicates that there is no more data o be downloaded. Gst will then send EOS event once data in its buffers is played completely.

The issue seems to be related with data loss during data download and not on Gst side. To confirm this I modified code to write the data received in CachedResourceStreamingClient::dataReceived() to a file before copying it to Gst. When trying to reproduce the issue, it is seen that only partial data (~23MB) is written to the file. Next I just wrote data to file in the function, and commented copying data to Gst. This time complete data was written, the same was able to play fully on PC media player. In another experiment, I just commented the deferring logic in webKitWebSrcEnoughData() to prevent download of data rom getting deferred. It worked.
Another observation is that, when network bandwidth is low, issue is not seen. These experiments indicate that issue happens when download process is interrupted by Gst. Went through Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp to understand the deferring logic but couldn't get any clue.

@modeveci
Copy link

modeveci commented Aug 7, 2024

@pradeep-raveendranpillai-infosys 2.22 version is not in active development. It is good that the issue is not present on 2.38. If you think it is still relevant, can you open a ticket on RDK Jira then they can arrange priority.

@pradeep-raveendranpillai-infosys
Copy link
Author

Thanks. I have created an RDK ticket - https://jira.rdkcentral.com/jira/browse/WPEBROWSER-47

@calvaris
Copy link
Member

calvaris commented Oct 1, 2024

I checked on wpe 2.22 on the rpi 3 with GStreamer 1.18 and I could not find the problem. I would ask you to let me know your GStreamer version, which hardware you are using and let me know of a way to build it for buildroot.

@calvaris
Copy link
Member

calvaris commented Oct 1, 2024

Also tried with GStreamer 1.16 and same result. Do you have any other customizations I might be missing? Still, please provide the information I require above.

@pradeep-raveendranpillai-infosys
Copy link
Author

I am also using Gstreamer 1.18 version. The issue is reproducible on LGI device which is based on Broadcom BCM72127 SoC. I am not sure you will be able to build for the LGI device. If it is not reproducible on RaspberryPi, then it is possible that the issue might be due to the local patches we apply on top of wpe-2.22 code.

@calvaris
Copy link
Member

calvaris commented Oct 3, 2024

I tried hard to try to make 2.22 work in the sagem box with broadcom hardware. I could not. If you want to provide a buildroot commit + buildroot build recipe I would be happy to try again, but so far I could not and therefore I am closing this issue.

@calvaris calvaris closed this as completed Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants