Hi Srini, I forgot to add that other than Media player and Camera, no other classes can access ISurface from Surface object in the framework code. Please refer my preview thread http://groups.google.com/group/android-framework/browse_thread/thread/d3f242356375effa
Hope it helps you out. Regards, iblues ------------------------ On Jan 31, 8:46 pm, iblues <[email protected]> wrote: > Hi Srini, > > To answer to your question on how to access the Surface object, follow > the Camera or Media player codes . The following are the things to be > done based on what I saw from the android codes : > > 1. Creating a Surface View and getting the SurfaceHolder from the > application layer. > 2. Using JNI, pass the SurfaceHolder object to your native > application. > 3. Use this object to obtain Surface object. > > Regards, > iblues > > ------------- > > On Jan 28, 9:03 pm, srini amul <[email protected]> wrote: > > > > > Hi, > > > > My requirement needs me to draw the RGB data from the framework > > layer. > > > Is this possible? From the android code, I seem to understand the > > following : > > > 1. Create an ISurface object from a surfaceView -> surfaceHolder > > 2. Create a IMemory object with the RGB data > > 4. Call ISurface->RegisterBuffer() > > > sample piece of code: > > *************************** > > void DisplayFrame(UINT8 * frameBuffer, UINT32 frameSize) > > { > > sp<Surface> surface ; > > > > sp<ISurface> iSurface = surface->getISurface (); > > > > heap = new MemoryHeapBase (frameSize); > > > > mBuffers = new MemoryBase(heap, 0, frameSize); > > > > memcpy (heap->base, frameBuffer, frameSize * 2); > > > > iSurface->registerBuffers (w,h,w,h,PIXEL_FORMAT_RGB_565, heap); > > iSurface->postBuffer(0);} > > > > > > > My doubts are :: > > 1. Is my understanding right? > > 2. How do i create a surface object ? > > > > Thanks & Regards > > S.Sriniamul > > > Unlimited freedom, unlimited storage. Get it now, > > onhttp://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/- > > Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-framework?hl=en -~----------~----~----~----~------~----~------~--~---
