Problems with video playback in OSR

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.

Problems with video playback in OSR

Postby Assert » Mon Jul 30, 2018 10:07 pm

Proting to CEF for 69.0.3497.0 (0fb03e7aa14513b47f36a28f41ba4cbff20bb1ee) faced with a completely unexpected problem about the video playback in OSR mode...

x86 debug cefclient.exe --off-screen-rendering-enabled --off-screen-frame-rate=30

Then any video from youtube. After a 30-40 seconds, video playback starts gliching more and more, and then completely freezes... while sound is playing well w\o any problems...
If move a mouse pointer to the window, everything becomes normal, then freezes again, if do not touch it.

With --enable-gpu things becomes worse...

Spent about two days trying to figure out of what is wrong there, but without luck...

I have a very long system uptime (uint32 system timer overflows), and already fixed one bug related to it in CEF. May be this can affect things somehow...

Can anybody please check this behaviour and confirm?
Assert
Techie
 
Posts: 11
Joined: Mon Apr 07, 2014 1:10 am

Re: Problems with video playback in OSR

Postby magreenblatt » Mon Jul 30, 2018 10:27 pm

How does it behave with stable branch builds from http://opensource.spotify.com/cefbuilds/index.html ?
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Problems with video playback in OSR

Postby Assert » Tue Jul 31, 2018 7:03 pm

It's not so easy.

It's not/hardly reproducable on a release versions under no load (with cefclient) and appears only in a real app (but for this app to compile, i need some modifications in chromium).

Debug version of cefclient render process for all branches crashes on my machine because of GetMessageTime() overflow bug (negative times going to blink and fails in checks of the event.cc).

Probably proper fix is:
Code: Select all
diff --git a/libcef/browser/native/browser_platform_delegate_native_win.cc b/libcef/browser/native/browser_platform_delegate_native_win.cc
index 22883a85..277e0610 100644
--- a/libcef/browser/native/browser_platform_delegate_native_win.cc
+++ b/libcef/browser/native/browser_platform_delegate_native_win.cc
@@ -557,8 +557,12 @@ void CefBrowserPlatformDelegateNativeWin::TranslateMouseEvent(
                       TranslateModifiers(mouse_event.modifiers));
 
   // timestamp
+  int64_t time = (int64_t)(GetMessageTime());
+  if (time < 0)
+    time += 0xFFFFFFFF;
+   
   result.SetTimeStamp(base::TimeTicks() +
-                      base::TimeDelta::FromMilliseconds(GetMessageTime()));
+                      base::TimeDelta::FromMilliseconds(time));
 
   result.pointer_type = blink::WebPointerProperties::PointerType::kMouse;
 }


So, i am rolled back my working copy to 3497 and building with this fix to check on a debug cefclient...

But this can intruduce something from my env...
Assert
Techie
 
Posts: 11
Joined: Mon Apr 07, 2014 1:10 am

Re: Problems with video playback in OSR

Postby Assert » Wed Aug 01, 2018 1:58 am

Able to reproduce with stable 3497 (17f019205341ad49dec31cdb00a0613687cbeed0).

Windows Debug GN x86 MSVS 15.7.5
Assert
Techie
 
Posts: 11
Joined: Mon Apr 07, 2014 1:10 am

Re: Problems with video playback in OSR

Postby Assert » Wed Aug 01, 2018 5:11 pm

The problem is strictly related to the OSR mode, in windowed mode same cefclient binary works fine.

It's not a performance problem, because moving mouse pointer over the window in OSR make things work fine.

It's not a general problem, because webgl dynamic rendering works fine even with --enable-gpu.

This is something related to the video stream rendering in OSR, about how it's implemented in the CEF.

With --enable-gpu video stream rendering in OSR becomes worse...

Checking 68.0.3440.75...
Assert
Techie
 
Posts: 11
Joined: Mon Apr 07, 2014 1:10 am

Re: Problems with video playback in OSR

Postby Assert » Wed Aug 01, 2018 7:16 pm

3440 works fine with the fix above...
Assert
Techie
 
Posts: 11
Joined: Mon Apr 07, 2014 1:10 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 26 guests