new NetworkService - allow custom schema load local resource

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Re: new NetworkService - allow custom schema load local reso

Postby Zabrimus » Mon Apr 13, 2020 1:47 pm

I have the exact same problem playing webm videos using a custom schema.
Implemented is a custom scheme 'client://' and the procedures Open and Read. This works without any issue if e.g. a javascript file is read and returned, independant of the size. The Read procedure is called multiple times till all bytes are read.

The observation is completely different if using the mime type 'video/webm'. The browser (used chrome as remote debugger) gets a content-length of 0 in the response header and the procedure Read in the scheme handler is called multiple times.
But if the video size is less than 65536 bytes then the video will be started without any issue using a modified cefsimple client. And if the size is greater than 65536 bytes, then the cefsimple client gets the error message
Code: Select all
ERROR:batching_media_log.cc(38)] MediaEvent: {"error":"FFmpegDemuxer: open context failed"}
ERROR:batching_media_log.cc(35)] MediaEvent: {"pipeline_error":12}


In the first case (< 65536) Read is called twice and the second case (> 65536) Read is called more then twice, as often as normally needed.

If it's useful i can provide either a link a Github project or i could create a standalone project to demonstrate the observation including the two different videos.

I'm current using CEF 81.2.16+gdacda4f+chromium-81.0.4044.92 / Chromium 81.0.4044.92. Both self compiled and the prebuild binary from spotify.
Zabrimus
Newbie
 
Posts: 6
Joined: Mon Apr 13, 2020 1:17 pm

Re: new NetworkService - allow custom schema load local reso

Postby magreenblatt » Mon Apr 13, 2020 2:29 pm

Can you try this PR in your local build to see if it resolves the problem for you?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: new NetworkService - allow custom schema load local reso

Postby Zabrimus » Tue Apr 14, 2020 3:19 am

Unfortunately i haven't found a solution to download the PR as a patch file, so i manually integrated the changes.

And the result is great, really great! Everything works exactly as it should. Thanks for pointing out the PR!
Zabrimus
Newbie
 
Posts: 6
Joined: Mon Apr 13, 2020 1:17 pm

Re: new NetworkService - allow custom schema load local reso

Postby magreenblatt » Tue Apr 14, 2020 11:52 am

Zabrimus wrote:Unfortunately i haven't found a solution to download the PR as a patch file, so i manually integrated the changes.

And the result is great, really great! Everything works exactly as it should. Thanks for pointing out the PR!

Good to hear. Thanks for reporting back :)
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Previous

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 44 guests