Closed Bug 1124512 Opened 7 years ago Closed 7 years ago

Tab mirroring to Roku is broken

Categories

(Firefox for Android Graveyard :: Screencasting, defect)

ARM
Android
defect
Not set
normal

Tracking

(fennec38+)

RESOLVED FIXED
Firefox 38
Tracking Status
fennec 38+ ---

People

(Reporter: rbarker, Assigned: blassey)

References

Details

Attachments

(3 files)

The patch for bug 1116856 has broken tab mirroring to Roku.
Screen shot of video received.
tracking-fennec: --- → ?
Blocks: 1116856
OS: Mac OS X → Android
Hardware: x86 → ARM
Appears to be a width/stride issue.  At a guess, luma is off by 2 pixels per line, chroma 1 pixel per line
tracking-fennec: ? → 38+
This problem may pre-date bug 1116856. I did a checkout just prior to the landing of bug 1116856. While the image is initially correct, when the image size is dynamically reduced, I assume to cope with bandwidth usage, the image is distorted similar to the attached screenshot. It seems that bug 1116856 may have just exacerbated issue.
It appears bug 1116859 introduced the original problem but it would only manifest when image resolution would decrease mid-stream.
Assignee: nobody → blassey.bugs
Attachment #8553791 - Flags: review?(rjesup)
Comment on attachment 8553791 [details] [diff] [review]
round_to_4px.patch

Review of attachment 8553791 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/media/webrtc/MediaEngineTabVideoSource.cpp
@@ +218,5 @@
>  
>    IntSize size;
>    // maintain source aspect ratio
>    if (mBufWidthMax/innerWidth < mBufHeightMax/innerHeight) {
> +    int32_t width = mBufWidthMax - (mBufWidthMax %4);

comment why, and add ref to a bug for the reason (apparently limitations in the RGB->YUV converter; file if not already filed)
Space after %

@@ +224,3 @@
>    } else {
> +    int32_t tmpWidth = (mBufHeightMax * ((float) innerWidth/innerHeight));
> +    int32_t width =  tmpWidth - (tmpWidth %4);

space after %
Attachment #8553791 - Flags: review?(rjesup) → review+
(In reply to Randell Jesup [:jesup] from comment #6)
> Comment on attachment 8553791 [details] [diff] [review] 
> comment why, and add ref to a bug for the reason (apparently limitations in
> the RGB->YUV converter; file if not already filed)
> Space after %
> 

I filed Bug 1053482 a while ago. I assume this is the same issue. Not sure if it is appropriate to use that bug or just file a new one?
https://hg.mozilla.org/mozilla-central/rev/fc16e4cd8fbb
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 38
(In reply to Randall Barker [:rbarker] from comment #8)
> (In reply to Randell Jesup [:jesup] from comment #6)
> > Comment on attachment 8553791 [details] [diff] [review] 
> > comment why, and add ref to a bug for the reason (apparently limitations in
> > the RGB->YUV converter; file if not already filed)
> > Space after %
> > 
> 
> I filed Bug 1053482 a while ago. I assume this is the same issue. Not sure
> if it is appropriate to use that bug or just file a new one?

I filed bug 1125393 specifically about the color conversion issue, they're certainly related
I've updated to latest code and tab mirroring to Roku still appears to be broken.
So, the chroma stride is wrong somewhere.  Since we're using a modulo on the width for encoding to % 4, my thought is that the problem is actually on the receiving side.

What are the steps to trigger that bug?  Share any tab?  Share tab and play around with the window size?  A specific URL that always shows it?
Flags: needinfo?(rbarker)
(In reply to Randell Jesup [:jesup] from comment #12)
> So, the chroma stride is wrong somewhere.  Since we're using a modulo on the
> width for encoding to % 4, my thought is that the problem is actually on the
> receiving side.
> 
> What are the steps to trigger that bug?  Share any tab?  Share tab and play
> around with the window size?  A specific URL that always shows it?

I have tracked the issue down to a rendering an unpacking issue with the GL rendering code. I believe the issue has been resolved.
Flags: needinfo?(rbarker)
Can not mirror tab to roku device.
Tested on Samsung Galaxy S4 (Android 4.4.2), Asus Transformer Tab (Android 4.2.1) and Samsung Galaxy R (Android 2.3.4).

On Galaxy S4 I get this exceptions in logcat:

Writing exception to parcel
java.lang.SecurityException: Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:14660)
at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:2469)
at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:687)
at android.content.ContentProvider$Transport.call(ContentProvider.java:325)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:275)
at android.os.Binder.execTransact(Binder.java:404)
at dalvik.system.NativeStart.run(Native Method)


On the other devices I get only the following output:
W/InputMethodManagerService(494): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@414e49e0 attribute=null, token = android.os.BinderProxy@417712e0
Depends on: 1037018
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.