Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Video to work #21

Open
arcanon opened this issue Aug 21, 2010 · 12 comments
Open

Getting Video to work #21

arcanon opened this issue Aug 21, 2010 · 12 comments

Comments

@arcanon
Copy link

arcanon commented Aug 21, 2010

I am a developer interested in getting video to work. What are the technical hurdles that need to be jumped here? In a offline thread comex implied that this would need a heavy re. I am busy looking at the flash code, but thought a online discussion of the issues would help get me (and others) up to speed.

Thanks,
Ash

@comex
Copy link
Owner

comex commented Aug 21, 2010

On the Android side, OMX* in stagefright is barely documented. On the iOS side, there is some codec/acceleration stuff that's completely undocumented, except that apparently old 4.0 SDK betas included headers by mistake. As far as I know, video support is a matter of tying those together.

@arcanon
Copy link
Author

arcanon commented Aug 23, 2010

so I presume the error "Could not find _ZN7android11MediaBufferC1Ej" would have something to do with this?

@comex
Copy link
Owner

comex commented Aug 24, 2010

Yeah, there's that but also virtual methods etc.

@arcanon
Copy link
Author

arcanon commented Aug 30, 2010

Hmm, I got distracted here looking at gnash again. I actually got a youtube video to play now, but this is with SW decode. Where does Frash get its good perf? is it actually using HW accelerated SVG stuff? Or is all the flash rendered in SW?

@comex
Copy link
Owner

comex commented Aug 30, 2010

In software (this is not my choice; the Android pluton doesn't use the canvas API for regular drawing). Of course, it will be a much greater difference when it comes to video. Can I see your code? or are you referring to playing video with Gnash?

@arcanon
Copy link
Author

arcanon commented Aug 30, 2010

sorry, that is in gnash. When I saw your IOSurface work, I saw a new avenue to possibly use gnash and because it was close, I thought I would try get that a bit further. But perf is a problem. Just using SW decode for movies. But this should be fast enough at 320x240, so I don't know what the bottle neck is here.

@comex
Copy link
Owner

comex commented Aug 31, 2010

Try Instruments.

@arcanon
Copy link
Author

arcanon commented Sep 8, 2010

hmm, looks like I need to start using the neon framework. Luckily there is http://code.google.com/p/ffmpeg4iphone this effort. Which seems to get some good perf... lets see if I can leverage that.

@CaptainN
Copy link

I don't know if this is useful, but I wondered if there is a way to have a look at how Flash Packager for iPhone apps handle video decode.

@arcanon
Copy link
Author

arcanon commented Sep 29, 2010

For Instruments, is it possible to use it with out having the correctly signed entitlements? I have not found anyone how has done this. Otherwise I would have to convert to using Xcode?

@arcanon
Copy link
Author

arcanon commented Oct 5, 2010

OK, I made some interesting progress/research. I compiled the android source into frash (at least what it was looking for) so I have eliminated and "could not find" messages. Now, the adobe lib is hitting the "query codec paths". The one bigger problem is that the android source uses OpenBinder to link the different modules together (e.g.
sp sm = defaultServiceManager();
sp binder = sm->getService(String16("media.player"));
sp service = interface_cast(binder);
).

Now I guess we can bypass this altogether once we know which interface classes to use. The next step then is too plug in the codecs from a OpenMax implementation. Bellagio provides a reference implementation that uses ffmpeg for software codecs (ideally uses actual HW codecs, but for now SW is ok...).

Question: Some youtube videos do work, but the video is only visible on the top half of the screen, know why?

@CaptainN
Copy link

CaptainN commented Dec 1, 2010

Youtube may be setting noscale or doing other strange things with it's own dimensions at runtime (which is why it's difficult to embed a youtube video in another swf).

You may need to fix NOSCALE support to fix the youtube position problem: https://github.com/comex/frash/issues#issue/14

Of course, that's just a guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants