[android-developers] Re: Pixel Format Conversion in SF
Thank you Dianne. But if I set my CameraSurfaceView is of type mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS) for the purpose of pushing the preview frame onto the surface for display, does this surface also serve as my UI window? Thanks alot for your help! On Nov 27, 1:52 pm, Dianne Hackborn wrote: > Yes, you set the format and such by the setters you mentioned. The relation > with surfaceChanged() is that this gets called after any such parameters > have changed to provide a surface with the new configuration. > > > > > > On Fri, Nov 27, 2009 at 8:20 AM, android-newbie wrote: > > Thanks Dianne so much for your reply. > > > So let's say in my example I am working with SurfaceView for my > > CameraSurfaceView. I have a few questions, hope you can help me. > > > 1. When this SurfaceView gets created (I assume via > > final CameraSurfaceView cameraView = new CameraSurfaceView > > (getApplicationContext()), this will result in a call createSurface() > > in SurfaceFlinger with format, width and height. > > > How does the application pass these information like format, width and > > height to SurfaceFlinger for the allocation? Is it by > > using .setFormat, .setFixedSize? > > > 2. How do they methods .setFormat, .setFixedSize related to the > > surfaceHolder.surfaceChanged() callback? > > > On Nov 26, 5:41 pm, Dianne Hackborn wrote: > > > It totally depends. It may be surface flinger, it may be an overlay that > > is > > > YUV, etc. > > > > On Thu, Nov 26, 2009 at 2:39 PM, android-newbie > > wrote: > > > > I am looking at the source code of a Camera Preview application and > > > > learning that the preview buffers coming from the sensor is in YUV422 > > > > format. However, this preview frame is showed on the display in RGB. > > > > > Can someone please let me know where the pixel format conversion > > > > happens? Is it inside Surface Flinger? If yes, can you please point > > > > me to the code? > > > > > Thank you very much for your help, > > > > an > > > > > -- > > > > You received this message because you are subscribed to the Google > > > > Groups "Android Developers" group. > > > > To post to this group, send email to > > android-developers@googlegroups.com > > > > To unsubscribe from this group, send email to > > > > android-developers+unsubscr...@googlegroups.com > > > > > > For more options, visit this group at > > > >http://groups.google.com/group/android-developers?hl=en > > > > -- > > > Dianne Hackborn > > > Android framework engineer > > > hack...@android.com > > > > Note: please don't send private questions to me, as I don't have time to > > > provide private support, and so won't reply to such e-mails. All such > > > questions should be posted on public forums, where I and others can see > > and > > > answer them.- Hide quoted text - > > > > - Show quoted text - > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them.- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Pixel Format Conversion in SF
Yes, you set the format and such by the setters you mentioned. The relation with surfaceChanged() is that this gets called after any such parameters have changed to provide a surface with the new configuration. On Fri, Nov 27, 2009 at 8:20 AM, android-newbie wrote: > Thanks Dianne so much for your reply. > > So let's say in my example I am working with SurfaceView for my > CameraSurfaceView. I have a few questions, hope you can help me. > > 1. When this SurfaceView gets created (I assume via > final CameraSurfaceView cameraView = new CameraSurfaceView > (getApplicationContext()), this will result in a call createSurface() > in SurfaceFlinger with format, width and height. > > How does the application pass these information like format, width and > height to SurfaceFlinger for the allocation? Is it by > using .setFormat, .setFixedSize? > > 2. How do they methods .setFormat, .setFixedSize related to the > surfaceHolder.surfaceChanged() callback? > > On Nov 26, 5:41 pm, Dianne Hackborn wrote: > > It totally depends. It may be surface flinger, it may be an overlay that > is > > YUV, etc. > > > > > > > > > > > > On Thu, Nov 26, 2009 at 2:39 PM, android-newbie > wrote: > > > I am looking at the source code of a Camera Preview application and > > > learning that the preview buffers coming from the sensor is in YUV422 > > > format. However, this preview frame is showed on the display in RGB. > > > > > Can someone please let me know where the pixel format conversion > > > happens? Is it inside Surface Flinger? If yes, can you please point > > > me to the code? > > > > > Thank you very much for your help, > > > an > > > > > -- > > > You received this message because you are subscribed to the Google > > > Groups "Android Developers" group. > > > To post to this group, send email to > android-developers@googlegroups.com > > > To unsubscribe from this group, send email to > > > android-developers+unsubscr...@googlegroups.com > > > > For more options, visit this group at > > >http://groups.google.com/group/android-developers?hl=en > > > > -- > > Dianne Hackborn > > Android framework engineer > > hack...@android.com > > > > Note: please don't send private questions to me, as I don't have time to > > provide private support, and so won't reply to such e-mails. All such > > questions should be posted on public forums, where I and others can see > and > > answer them.- Hide quoted text - > > > > - Show quoted text - > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Pixel Format Conversion in SF
Thanks Dianne so much for your reply. So let's say in my example I am working with SurfaceView for my CameraSurfaceView. I have a few questions, hope you can help me. 1. When this SurfaceView gets created (I assume via final CameraSurfaceView cameraView = new CameraSurfaceView (getApplicationContext()), this will result in a call createSurface() in SurfaceFlinger with format, width and height. How does the application pass these information like format, width and height to SurfaceFlinger for the allocation? Is it by using .setFormat, .setFixedSize? 2. How do they methods .setFormat, .setFixedSize related to the surfaceHolder.surfaceChanged() callback? On Nov 26, 5:41 pm, Dianne Hackborn wrote: > It totally depends. It may be surface flinger, it may be an overlay that is > YUV, etc. > > > > > > On Thu, Nov 26, 2009 at 2:39 PM, android-newbie wrote: > > I am looking at the source code of a Camera Preview application and > > learning that the preview buffers coming from the sensor is in YUV422 > > format. However, this preview frame is showed on the display in RGB. > > > Can someone please let me know where the pixel format conversion > > happens? Is it inside Surface Flinger? If yes, can you please point > > me to the code? > > > Thank you very much for your help, > > an > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them.- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en