Tab mirroring to Roku is broken

RESOLVED FIXED in Firefox 38

Status

()

RESOLVED FIXED
4 years ago
2 years ago

People

(Reporter: rbarker, Assigned: blassey)

Tracking

Trunk
Firefox 38
ARM
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(fennec38+)

Details

Attachments

(3 attachments)

(Reporter)

Description

4 years ago
The patch for bug 1116856 has broken tab mirroring to Roku.
(Reporter)

Comment 1

4 years ago
Created attachment 8552802 [details]
Screen Shot 2015-01-21 at 5.11.46 PM.png

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+
(Reporter)

Comment 3

4 years ago
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.
(Reporter)

Comment 4

4 years ago
It appears bug 1116859 introduced the original problem but it would only manifest when image resolution would decrease mid-stream.
Created attachment 8553791 [details] [diff] [review]
round_to_4px.patch
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+
(Reporter)

Comment 8

4 years ago
(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
Last Resolved: 4 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
(Reporter)

Comment 11

4 years ago
Created attachment 8554844 [details]
Screen Shot 2015-01-26 at 2.56.49 PM.png

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)
(Reporter)

Comment 13

4 years ago
(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)

Comment 14

4 years ago
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

Updated

4 years ago
Depends on: 1037018
You need to log in before you can comment on or make changes to this bug.