"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. Apps silently close due to low memory (in remote Content Providers)

Some of my apps silently close on my G1 (Android 1.6) because some
Content Providers they use are hosted in processes that are killed due
to low memory. Is there anything to protect an app from silently
closing because a content provider it uses is shut down? Is there some
remote exception to give the app a change to continue its work with
less features (e.g. do not query dead content providers)?
Below is a trace that shows this situation.

Quickdroid uses the BrowserProvider. But since the BrowserProvider and
its hosting Linux process died, Quickdroid is also killed silently.
That is a really bad user experience :-(

I/ActivityManager(   75): Starting activity: Intent
{ cmp=fm.last.android/.activity.Preferences }
I/ActivityManager(   75): Process fm.last.android:player (pid 17574)
has died.
I/ActivityManager(   75): Low Memory: No more background processes.
I/ActivityManager(   75): Displayed activity
fm.last.android/.activity.Preferences: 844 ms (total 844 ms)
D/dalvikvm(17546): GC freed 4991 objects / 247032 bytes in 155ms
I/ActivityManager(   75): Start proc fm.last.android:player for
service fm.last.android/.player.RadioPlayerService: pid=17676
uid=10051 gids={3003, 1015}
I/fm.last.android.player(17676): Player service started
I/ActivityManager(   75): Stopping service:
fm.last.android/.player.RadioPlayerService
I/fm.last.android.player(17676): Player service shutting down
I/ActivityManager(   75): Start proc vu.de.urpool.quickdroid for
activity vu.de.urpool.quickdroid/.Quickdroid: pid=17683 uid=10030 gids=
{}
I/ActivityManager(   75): Process fm.last.android:player (pid 17676)
has died.
I/ActivityManager(   75): Low Memory: No more background processes.
I/ActivityThread(17683): Publishing provider quickdroid:
vu.de.urpool.quickdroid.apps.AppProvider
I/ActivityManager(   75): Start proc com.android.browser for content
provider com.android.browser/.BrowserProvider: pid=17696 uid=10022
gids={3003}
I/ActivityThread(17696): Publishing provider browser:
com.android.browser.BrowserProvider
I/ActivityManager(   75): Displayed activity
vu.de.urpool.quickdroid/.Quickdroid: 2802 ms (total 2802 ms)
I/ActivityManager(   75): Process fm.last.android (pid 17546) has
died.
I/WindowManager(   75): WIN DEATH: Window{4397eb40 fm.last.android/
fm.last.android.activity.Profile paused=false}
I/ActivityManager(   75): Low Memory: No more background processes.
I/ActivityThread(17683): Removing dead content provider: browser
I/ActivityManager(   75): Process com.android.browser (pid 17696) has
died.
I/ActivityManager(   75): Killing app vu.de.urpool.quickdroid (pid
17683) because provider com.android.browser.BrowserProvider is in
dying process com.android.browser
I/Process (   75): Sending signal. PID: 17683 SIG: 9
I/WindowManager(   75): WIN DEATH: Window{43a0eff0
vu.de.urpool.quickdroid/vu.de.urpool.quickdroid.Quickdroid
paused=false}
I/ActivityManager(   75): Low Memory: No more background processes.
I/ActivityManager(   75): Process vu.de.urpool.quickdroid (pid 17683)
has died.
W/UsageStats(   75): Unexpected resume of com.android.launcher while
already resumed in vu.de.urpool.quickdroid
I/ActivityManager(   75): Low Memory: No more background processes.
W/InputManagerService(   75): Got RemoteException sending setActive
(false) notification to pid 17683 uid 10030
I/ActivityManager(   75): Starting activity: Intent
{ act=android.intent.action.MAIN cat=
[android.intent.category.LAUNCHER] flg=0x10200000
cmp=vu.de.urpool.quickdroid/.Quickdroid }
I/ActivityManager(   75): Start proc vu.de.urpool.quickdroid for
activity vu.de.urpool.quickdroid/.Quickdroid: pid=17708 uid=10030 gids=
{}
D/dalvikvm(   50): GC freed 269 objects / 10248 bytes in 174ms
D/dalvikvm(   50): GC freed 42 objects / 1816 bytes in 104ms
D/dalvikvm(   50): GC freed 2 objects / 56 bytes in 83ms
I/ActivityThread(17708): Publishing provider quickdroid:
vu.de.urpool.quickdroid.apps.AppProvider
I/ActivityManager(   75): Displayed activity
vu.de.urpool.quickdroid/.Quickdroid: 1399 ms (total 1399 ms)
I/ActivityManager(   75): Starting activity: Intent
{ act=android.intent.action.MAIN cat=
[android.intent.category.LAUNCHER] flg=0x10000000
cmp=com.android.term/.Term }

-- 

2. Undocumented Permission changes in 2.0.1 on MovieView?

> Yeah, I used that mechanism at first, but what ends up happening is

Really? The very class you were trying to reach has an <intent-filter> on
the video/mp4 MIME type, according to the Android source code. If you
tried it a couple of Android versions ago, give it a fresh shot -- the
behavior might have changed, and perhaps you can switch to the new Intent
starting with SDK_INT 6.


If needed, it's really not all that tough. I have one here with pop-up
control panels based on touch events, a custom timeline with play/pause
control, and so on:

http://github.com/commonsguy/vidtry

Note, though, that I haven't tried this on 2.0.1 yet. The core Android
team *yet again* released an update when I'm on the road...

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


-- 

3. trik kencengin speed 3G/2G

4. Undocumented Permission changes in 2.0.1 on MovieView?

5. Paging bos Anton Japutra

6. Case dan Jamu robot ijo

7. can't access AlertDialog list items