Closed Bug 829408 Opened 11 years ago Closed 11 years ago

Force stagefright on Galaxy S2 to return video frames

Categories

(Core :: Audio/Video, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: eflores, Assigned: eflores)

Details

Attachments

(1 file, 1 obsolete file)

      No description provided.
Attached patch Possible fixSplinter Review
This patch might be all that's needed to fix most Gingerbread SGS2s. It seems that Samsung at some point updated their libstagefright to add the missing index for enabling `Thumbnail Mode' in the OMX driver.

I think we can try this for now, and if there's still a significant number of devices exhibiting this bug, I'm attaching a (much more hacky) WIP patch that should work for those devices where libstagefright hasn't been patched.
Attachment #700846 - Flags: review?(chris.double)
Attached patch WIP hacky bad fix (obsolete) — Splinter Review
WIP patch that should fix the GB SGS2 bug properly, but introduces more cruft than I'd like to for one device.

Haven't been able to repro, so this patch is untested.
Comment on attachment 700846 [details] [diff] [review]
Possible fix

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

Does this change work on the SGS 2 device we have? Or any device you've tested?

::: media/omx-plugin/OmxPlugin.cpp
@@ +307,2 @@
>      // Let Stagefright choose hardware or software decoder.
> +    sp<MediaSource> videoSource = OMXCodec::Create(omx, aVideoTrack->getFormat(),

Why the change from aOmx to omx? Where is 'omx' from?

@@ +352,5 @@
>  #endif
>    }
>  
> +  MOZ_ASSERT(flags != DEFAULT_STAGEFRIGHT_FLAGS);
> +  return OMXCodec::Create(omx, aVideoTrack->getFormat(), false, aVideoTrack,

Same question about 'omx' here.
(In reply to Edwin Flores [:eflores] [:edwin] from comment #2)
> Haven't been able to repro, so this patch is untested.

What do you mean by this? Does 'repro' mean 'reproduce?' The SGS 2 we have doesn't show the green video frames?
Attachment #700846 - Flags: review?(chris.double) → review-
(In reply to Chris Double (:doublec) from comment #4)
> (In reply to Edwin Flores [:eflores] [:edwin] from comment #2)
> > Haven't been able to repro, so this patch is untested.
> 
> What do you mean by this? Does 'repro' mean 'reproduce?' The SGS 2 we have
> doesn't show the green video frames?

Nope. Got to trying to test it but my getExtensionIndex() never gets hit, presumably because of a hack they've added on the libstagefright side.

I have a GB image somewhere which, IIRC, does show the bug. I'll try that.
(In reply to Chris Double (:doublec) from comment #3)
> Comment on attachment 700846 [details] [diff] [review]
> Possible fix
> 
> Review of attachment 700846 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Does this change work on the SGS 2 device we have? Or any device you've
> tested?

Works on the office SGS2.

> ::: media/omx-plugin/OmxPlugin.cpp
> @@ +307,2 @@
> >      // Let Stagefright choose hardware or software decoder.
> > +    sp<MediaSource> videoSource = OMXCodec::Create(omx, aVideoTrack->getFormat(),
> 
> Why the change from aOmx to omx? Where is 'omx' from?

Blargh. An artefact from splitting the patch into two.
Can't get the green video frames with the other image either. I don't remember whether we tried this in Fennec on GB before or just on B2G...
I don't know why but on our SGS 2 testing device we're no longer see the green frames so can't test or reproduce. Closing WORKSFORME. We'll reopen if the issue appears again so we can reproduce and test.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
The hardware decoder on my SGS 2 still seems to be returning a color format that is not understood. Here's the logcat:

I/OMXCodec( 4054): OMXCodec::Create matchComponentName ((null)), flags (0)
D/OMXCodec( 4054): componentName=OMX.SEC.avcdec, quirks=73728, flags=0
I/OMXCodec( 4054): eColorFormat (19)
I/OmxPlugin( 4054): Unknown video color format: 0x2c
I/OmxPlugin( 4054): Falling back to software decoder

0x2c is the green frame thing isn't it?
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Well that's no good.

Is my build still on there? If so, can you try it with that and see if the same happens?
Comment on attachment 700846 [details] [diff] [review]
Possible fix

Looks like this is what fixed it for me.
Attachment #700846 - Flags: review- → review?(chris.double)
Comment on attachment 700846 [details] [diff] [review]
Possible fix

Patch is good and seems to work. You'll need to fix up the omx vs aOmx as mentioned in comment 3.
Attachment #700846 - Flags: review?(chris.double) → review+
Attachment #700848 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/e9c76968a95e
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: