Jan 23 | 3:50 PM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Jan 23 | 3:55 PM |
Jan S. | has entered the room |
Jan S. |
Hello
|
Mark M. |
hello, Jan!
|
Mark M. |
how can I help you today?
|
Jan 23 | 4:00 PM |
Jan S. |
I'm try using cwac camera. It is amazing peace of stuff, but a have real problem with performance.
|
Mark M. |
can you be more specific?
|
Jan S. |
It takes about 5s to take a picture on quadcore cpu :-(
|
Jan S. |
I have Samsung S3.
|
Mark M. |
what orientation?
|
Jan S. |
portrait
|
Mark M. |
there's your problem
|
Jan S. |
Realy?
|
Mark M. |
Samsung only saves landscape images
|
Yogesh | has entered the room |
Mark M. |
they put an EXIF header into the JPEG saying "hey, image viewer, please rotate this"
|
Jan S. |
Is there any workaround?
|
Mark M. |
the default behavior of CWAC-Camera is to rotate the image for you
|
Mark M. | |
Jan S. |
I only need take a small preview image (400x400) and nothing more.
|
Mark M. |
in your CameraHost, return false from rotateBasedOnExif()
|
Mark M. |
however, it does mean that your photo may be portrait or landscape
|
Mark M. |
rather than always matching the device orientation
|
Mark M. |
now, I need to do some work to speed this up, probably involving the NDK
|
Mark M. |
I'll get to that eventually
|
Jan S. |
Ok, thank you very much.
|
Mark M. |
Yogesh: your turn! do you have a question?
|
Jan S. |
Why there is workingCopy.compress(Bitmap.CompressFormat.JPEG, 100, out); in synchronizeModels it takes another 1 second
|
Jan 23 | 4:05 PM |
Mark M. |
JanL are you using the FFC or the rear-facing camera?
|
Mark M. |
(sorry, that was supposed to be "Jan:", not "JanL")
|
Jan S. |
rear-facing
|
Mark M. |
hmmm...
|
Jan S. |
Now I made a test with landscape test and it took about 3s.
|
Mark M. |
once you have rotateBasedOnExif() return false, I should not need to do workingCopy.compress() anymore
|
Mark M. |
you might also pass in false to the takePicture() call where it asks for whether you want the byte array
|
Mark M. | |
Mark M. |
(see last paragraph of that section)
|
Jan S. |
Ok, I will try it. Thank you very much for great work! One more question, when I setup FOCUS_MODE_CONTINUOUS_PICTURE in adjustPreviewParameters. The preview after take picture stay freezen (on Galaxy Nexus only)
|
Jan S. |
Is it any known issue?
|
Mark M. |
I have not tried that mode
|
Mark M. |
if you could, file an issue with the details
|
Jan 23 | 4:10 PM |
Jan S. |
Ok, don't worry about. With FOCUS_MODE_CONTINUOUS_VIDEO working without problem.
|
Mark M. |
Yogesh: do you have a question?
|
Yogesh |
I'm new to this and the world of android in general. I just thought I would hangout here and see the kind of discussions that take place. other than that I would just like to thank you for your amazing book, and would greatly appreciate if you have some pointers for newbies.
|
Mark M. |
thanks for the kind words
|
Mark M. |
the office hours chats are mostly for questions and answers
|
Mark M. |
you can see past chat transcripts at http://commonsware.com/office-hours/
|
Mark M. |
and my general "newbie" pointers are mostly in the book
|
Mark M. |
is there particular area that concerns you?
|
Yogesh |
thanks, I'll take a look at them both. i was just starting out and had a few issues with emulators
|
Yogesh |
first of all.. the nexus 10 emulator does not start when I run it. I am running a Ubuntu 13 and 4…3 android version
|
Yogesh |
I do not see any errors, but the simply get a blank screen
|
Mark M. |
emulators for larger screens need to use the x86 emulator images
|
Mark M. |
the ARM emulator images are much too slow
|
Jan 23 | 4:15 PM |
Mark M. |
however, ARM is what you get by default
|
Yogesh |
all other emulators seem to come up fine
|
Yogesh |
also,I'm not sure if this so
|
Mark M. |
did you follow the instructions -- on the Android site, or in the advanced emulators chapter -- to set up x86 emulator support?
|
Yogesh |
yes
|
Mark M. |
I run Ubuntu -- I am trying it now
|
Mark M. |
I just created and started it, without issue
|
Mark M. |
try checking "Use Host GPU", if you do not have that
|
Mark M. |
otherwise, I do not know what may be going wrong -- sorry
|
Mark M. |
Jan: do you have another question?
|
Jan 23 | 4:20 PM |
Yogesh |
If I enable that I get an error - eglMakeCurrent failed
|
Mark M. |
hmmm...
|
Mark M. |
I used to have a problem on Ubuntu with one of the OpenGL libraries that the emulator used
|
Mark M. |
but that was on an older version of Ubuntu
|
Mark M. |
Use Host GPU has worked for me on 13.04 and 13.10
|
Yogesh |
I am on 13.10
|
Mark M. |
how much RAM and what sort of CPU does your development machine have?
|
Jan S. |
I'm testing your hints ;-) I will let you know If I will have more questions. ...maybe small one. When I take picture I see a lot of info from CWAC-Camera﹕ 2048 x 1536 etc. Is it only debug info about available resolutions?
|
Mark M. |
Jan: I probably left a Log.d() call around in the source
|
Mark M. |
make sure you are on the latest version, as I thought I cleaned those up
|
Yogesh |
I have 8GB RAM on i7 intel
|
Jan 23 | 4:25 PM |
Mark M. |
that's what I have, so there's no problems there
|
Mark M. |
your environment pretty much matches mine, so I do not know why you are having the emulator issues that you are
|
Jan S. |
Thanks
|
Yogesh |
Also, I made a very simple hello world app with different layouts for potrait and landscape mode (I just used a different picture for both layouts). I then tried to change the orientation of the emulator. There was no change. But it works fine on my Nexus7. Also it seems to work fine in genymotion emulator. I am not sure if this is a known bug, I will have to look around for this too.
|
Jan 23 | 4:30 PM |
Mark M. |
there's a known bug in the 4.4 emulators, where orientation changes do not work
|
Jan 23 | 4:30 PM |
Yogesh |
Is there a workaround?
|
Mark M. |
use a 4.3 emulator :-)
|
Mark M. |
I know of no workaround for the 4.4 emulator, unfortunately
|
Yogesh |
Ok :) that works for me. am just randomly expereminting.
|
Mark M. |
you can keep tabs on the issue here: http://code.google.com/p/android/issues/detail?...
|
Yogesh |
Thanks.
|
Mark M. |
if either of you have another question, go right ahead
|
Jan 23 | 4:40 PM |
Yogesh |
Could you give some pointers on troubleshooting the emulator issue?
|
Mark M. |
other than asking at StackOverflow, not really
|
Mark M. |
be sure to describe there your environment and all relevant settings from your emulator
|
Mark M. |
perhaps somebody else will have an idea
|
Yogesh |
Regardin that, one stupid questions, How do I copy the device specifications. I mean, when I click on the "details" button in AVD manager, i see some information on the device, but I cant copy it. Is there an alternative place, from where I can get the same information.
|
Jan 23 | 4:45 PM |
Mark M. |
~/.android/avd lists all your defined emulator instances
|
Mark M. |
the various .ini files there and in the per-emulator subdirectories contain all that info, and more
|
Yogesh |
All I see is the following:
|
Yogesh |
View paste
|
Mark M. |
look in the ~/.android/avd/Nexus10.avd directory
|
Yogesh | |
Jan 23 | 4:50 PM |
Yogesh |
I shall post this on Stackoverflow. Hope I get a good answer soon. Thank you once again
|
Mark M. |
sorry I could not be of greater assistance
|
Mark M. |
with these chats, you win some, and you lose some :-)
|
Jan 23 | 5:00 PM |
Mark M. |
that's a wrap for today's chat
|
Mark M. |
the transcript will be archived at http://commonsware.com/office-hours/ shortly
|
Mark M. |
the next chat is Tuesday at 7:30pm US Eastern Time
|
Mark M. |
have a pleasant day!
|
Jan S. | has left the room |
Yogesh | has left the room |
Mark M. | turned off guest access |