"system_server" during camera preview

by Andy Quan » Sat, 07 Mar 2009 15:42:00 GMT


Sponsored Links
 On real hardware, I happened to find that CPU usage is really high with
"system_server" using around 300MHz when I opened "camera" application in
the launcher panel for preview at 30 fps only. Anybody knows what that
system_server is for during camera preview? I dont find that "system_server"
roars in other applications like media player. Some materials mention that
it has something to do with Java. Could anybody help on this?

-- 
Thanks,
Andy

--~--~---------~--~----~------------~-------~--~----~



"system_server" during camera preview

by Dave Sparks » Sat, 07 Mar 2009 18:08:35 GMT


 Hmm... could that be SurfaceFlinger? I thought it ran in its own
process. If so, it seems likely that you are using the software
blitter instead of a hardware blitter. You didnt mention what hardware
you are using.



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


"system_server" during camera preview

by Andy Quan » Sun, 08 Mar 2009 01:04:28 GMT


 Dave,
Do you mean that "surfaceflinger" is shown as "system_server" in process
list?

Yes, you are right. I am using software YUV->RGB before calling postbuffer.
I just thought that system_server was only limited to Java level and low
level implementation was counted into processes like "mediaserver" or
"surfaceflinger" :). Could you give some hints on this? Thanks.







-- 
Thanks,
Andy

--~--~---------~--~----~------------~-------~--~----~



"system_server" during camera preview

by Andy Quan » Sun, 08 Mar 2009 01:07:16 GMT


 BTW, it is armv5 compatible processor running at 624MHz with 32k L1 I$/D$
and 256k L2$. The LCD is 320x240. Thanks.









-- 
Thanks,
Andy

--~--~---------~--~----~------------~-------~--~----~



"system_server" during camera preview

by Dianne Hackborn » Mon, 09 Mar 2009 23:56:36 GMT


 SurfaceFlinger runs in the system_server process.








-- 
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.  All such questions should be posted on public
forums, where I and others can see and answer them.

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. AudioRecord on Samsung Moment

When switching between the emulator (which supports 8KHz) and a real
phone like the G1 (which supports 16KHz), I used the following code to
set up a valid AudioRecord object:

AudioRecord ar;

// Try to construct at 16KHz
ar = new AudioRecord(
  MediaRecorder.AudioSource.MIC,
  16000,
  AudioFormat.CHANNEL_CONFIGURATION_MONO,
  AudioFormat.ENCODING_PCM_16BIT,
  AUDIO_BUFFER_SIZE);

if (ar.getState() != AudioRecord.STATE_INITIALIZED) {
  // Unable to set up at 16KHz, try at 8KHz
  ar = new AudioRecord(
    MediaRecorder.AudioSource.MIC,
    8000,
    AudioFormat.CHANNEL_CONFIGURATION_MONO,
    AudioFormat.ENCODING_PCM_16BIT,
    AUDIO_BUFFER_SIZE);
}

This seems to work just fine, and a 16KHz AudioRecord object is
instantiated on the G1, and a 8KHz object is instantiated on the
emulator.

However, on the Samsung Moment, which only supports 8KHz,
AudioRecord.getState() returns STATE_INITIALIZED when trying to
construct with 16KHz.  This ends up causing recording to fail since
it's trying to record at 16KHz, even though the phone doesn't support
it.  Also, I don't see any exceptions thrown when I try to wrap the
construction in a try-catch.

Does anyone know of a better way to detect 16KHz vs. 8KHz capabilities
on the device?

2. How to get the real width of pixels of a string?

The string contains different kinds of characters.

-- 

3. How to open new view (call an activity) from options menu defined in XML

4. Strange crashing while using OpenGL

5. Forward locking or copy protection outside the Marketplace

6. HTC S740 Android Porting

7. View.getLocationInWindow() only returns Y (and sometimes not even X)