aboutsummaryrefslogtreecommitdiffstats
path: root/android
Commit message (Collapse)AuthorAgeFilesLines
* Fix video recording on WindowsVladimir Chtchetkine2011-09-221-15/+80
| | | | | | | Reseting capture windows on each "stop capture" + setting capture parameters allow to change video frame dimensions. Change-Id: I0ce8ed77dfa9838894acb9e9e84d84692bb3d520
* Fix captured frame pixel format on WindowsVladimir Chtchetkine2011-09-211-2/+2
| | | | | | | Apparently, bitmap obtained through the capXxx + clipboard API is formatted with BRG, not RGB format. Change-Id: Ib161be50d2d3258045a467b152a5a750e1a8fb42
* Fix NV12, and NV21 format descriptorsVladimir Chtchetkine2011-09-213-4/+20
| | | | | | Also adds support for YU12 pixel format that is used in video frames Change-Id: I613beef8b3e2296fd1fab7e2b9d2956fba1ac788
* Print warning on invalid webcam nameVladimir Chtchetkine2011-09-211-0/+4
| | | | Change-Id: I94939964890c4304a47ba86c582baf3a9544b5aa
* Fix win/mac buildVladimir Chtchetkine2011-09-211-4/+4
| | | | Change-Id: I8d074590bb1efd68789e341e37356bc9fb2c9c08
* Fix Mac/Windows buildsVladimir Chtchetkine2011-09-211-0/+14
| | | | Change-Id: I0acc651be93eb9b5bea49280a7dccd18c1386d48
* Implements converters for BAYER pixel formatVladimir Chtchetkine2011-09-212-43/+559
| | | | Change-Id: I68abaa8b89e2b46dc57bff1d7dbd6d9fda213dc8
* Add -webcam commandline option to control webcam emulationVladimir Chtchetkine2011-09-209-44/+430
| | | | | | -webcam name=<name>[,dir=<direction>] options controls web cameras to use for emulation. Change-Id: I961fd399c7e041541adda040dd24f194cc383cb9
* Refactor the converters to make them more manageableVladimir Chtchetkine2011-09-171-1151/+690
| | | | | | | | | | | | | | | The current conversion implementation was laking flexibility as far as adding support for new formats was concerned. In particular, adding support for each new format meant adding four converter routines: new format <--> RGB, new format <--> YUV. This was not scalable, so had to be rewritten. The new conversion implementation consists of four generic converters between different flavors og RGB/YUV formats, and array of descriptors for each supported format. Each descriptor contains information that is sufficient for the converter routines to perform its job. So, adding new format is just creating a new descriptor for that format, and adding it to the array of supported descriptors. Change-Id: Ica107d14fa03fa8f41eb9192f2c023a97f54b62c
* Add support for NV21, and NV12 formatsVladimir Chtchetkine2011-09-162-0/+584
| | | | Change-Id: I4bea0f3678b2ac21f3c6cf80581e997145e2a58d
* Merge "gles: use fast GLES pipe by default (Unix only)"David Turner2011-09-153-4/+60
|\
| * gles: use fast GLES pipe by default (Unix only)David Turner2011-09-133-4/+60
| | | | | | | | | | | | This improves performance of various benchmarks by 5% Change-Id: If2d2be0e9849429ecffe52b7d482cfbee4008473
* | Fixes "stop device" issue on LinuxVladimir Chtchetkine2011-09-141-0/+19
| | | | | | | | | | | | | | | | Apparently, video driver doesn't allow frame size change, once it has been explicitly set. In order to get around this we need to reset the handle to the camera device by closing, and then reopening it. Change-Id: Icfd37b3c196d2643507218b965c5015884ed455b
* | Add cmdline param to control fake camera emulationVladimir Chtchetkine2011-09-134-6/+42
|/ | | | | | | - Enable / Disable fake camera - Set fake camera facing direction: back, or front Change-Id: Iab741a694daf2bf752e91e23df566a83ac7a97e7
* Add -gpu <mode> option to force GPU emulationDavid Turner2011-09-133-0/+44
| | | | | | | | | By default, GPU emulation is still disabled. You can still try to force it with '-gpu on' for experimentation purpose (alternatively, you can define hw.gpu.enabled to 'true' in your AVD config.ini) Change-Id: I87efdf45337a80aeadd94b3922312b3f564c1608
* Fix -ramdisk option handling.David 'Digit' Turner2011-09-131-2/+9
| | | | | | | For some reason, there was a bug, where the option was being ignored if set from the command-line. Change-Id: I61c6e3127b469f4ec661b834b15c4da0841551af
* emulator: fix Win32 runtime crashDavid 'Digit' Turner2011-09-131-2/+2
| | | | Change-Id: I5ca4b1393211c1d8a5caba332c3f6164afb4661b
* Fix Mac buildVladimir Chtchetkine2011-09-121-1/+0
| | | | | | Remove Windows artifact Change-Id: I2ffd5979674619786742f14995edbf10edfff23a
* Fix Mac buildVladimir Chtchetkine2011-09-121-0/+87
| | | | | | Add dummy rutines implementing public camera API on Mac Change-Id: Id3c9d99d863785b0e00d1bdf6deb0a1af49ce91c
* Implements camera service in emulatorVladimir Chtchetkine2011-09-127-461/+2866
| | | | | | | | | | | | This is fully functional camera service implementation, that works (tested) on both, Linux and Windows. Fixed little/big endian bugs in the coverter code. Moved preview frames to use RGB32 instead of RGB565: RGB32 conversions are simpler and faster in the guest. Made "payload size send" a separate routine Change-Id: I96954f4c2cb4e4ef4dd6a20e41897d79c5037bae
* Camera service skeletonVladimir Chtchetkine2011-09-072-0/+349
| | | | | | | | | | Skeleton that implements camera emulation service over QEMU pipe. More meat will be added as the guest camera emulation develops. This is a patch taken from approved AOSP commit that didn't go through because of a merge conflict. Change-Id: I6f0a2e42be4f5f0bd86d3dbf0c2a609e74b200c2
* Fix for a _qemudPipe_recvBuffers bugVladimir Chtchetkine2011-09-071-3/+7
| | | | | | | | | | | | | When filling in qemud buffers in the loop, current offset in the current qemud buffer (off_in_buff variable) has not been accounted for when calculating number of bytes to copy from the message to qemud buffer. This caused data corruption, because number of bytes copied has exceeded the capacity of qemud buffer. Also, off_in_buff has not been reset when switching to the next qemud buffer. Also fixed _qemud_char_service_connect routine to accept a client parameter string Change-Id: I2f5a7ca5924c0b79d8755f4777145044567f3e8d
* Add hw.gpu.enabled hardware propertyDavid 'Digit' Turner2011-08-298-3/+319
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new hardware property to enable GPU emulation (named hw.gpu.enabled). It is currently disabled by default. It also modifies the UI code to display the GL output properly inside the UI window. And sets the kernel parameter qemu.gles to either 0 or 1 to indicate to the guest system's GLES libraries whether to use GPU emulation or fallback to the software renderer. A future patch will also add auto-detection of desktop GL capabilities. For example, if the emulator is started on a headless server without an X11/GL display, hw.gpu.enabled will be forced to 'no', forcing the guest to use the software renderer. Another patch will allow to change the property from the command-line for debugging purpose. NOTE: If you want to test GPU emulation, change the default value of the property in android/avd/hardware-properties.ini from 'no' to 'yes'. You will need to run a ToT master AOSP tree with the following pending patches applied: https://review.source.android.com/25797 https://review.source.android.com/25154 https://review.source.android.com/25759 Change-Id: I1fa3512be24395244fd5068f2bf59ad54db5c7d5
* Fix a crash when GPU emulation doesn't work.David 'Digit' Turner2011-08-291-10/+12
| | | | | | | This patch fixes a simple segmentation fault in the case where we can't connect to the GPU emulation rendering library. Change-Id: I47df0cae9029aee4738fd89083750e3baca5f032
* Fix premature boot-properties service disconnect.Vladimir Chtchetkine2011-08-271-1/+0
| | | | Change-Id: I746147ab0c441a05055f7fc878eda3e035c0da14
* Enable qemud clients to pass connection parameters to emulator.Vladimir Chtchetkine2011-08-255-20/+83
| | | | | | | | | | | | This is useful for qemud pipe clients to be able to pass parameters to the emulator service when connecting. In particular, this would be extremely useful for camera emulation clients, which can pass name of the camera device, and other parameters that may be required to connect to the camera. Parameters are passed when opening the qemud pipe in form: /dev/qemu_pipe/camera:/dev/video0 I.e. parameters follow the service name, separated from it by ':' Change-Id: I67f0ef0ff27008e2b52652e58d72d5216b244646
* Fix qemu pipe's 'poll' callbacksVladimir Chtchetkine2011-08-252-4/+4
| | | | | | | | | Throughout emulator's code pipe's 'poll' callback was returning PIPE_WAKE_XXX, instead of PIPE_POLL_XXX flags. This created whole sort of issues with the qemu pipe service <-> client communications. This is also a fix for http://b/issue?id=5196348 Change-Id: I92202cf4ef4554559eb022c4410ee93923edec1b
* Merge "Fix the darwin build"Vladimir Chtchetkine2011-08-242-2/+5
|\
| * Fix the darwin buildVladimir Chtchetkine2011-08-242-2/+5
| | | | | | | | Change-Id: I87bd356f7673bdbcc8e5f196f4a89182b3a36cbe
* | Merge "Fix build break: make sure darwin build picks up on required ↵Vladimir Chtchetkine2011-08-242-3/+3
|\ \ | |/ | | | | declarations"
| * Fix build break: make sure darwin build picks up on required declarationsVladimir Chtchetkine2011-08-242-3/+3
| | | | | | | | Change-Id: I801d56668d8591e599994c65fb47b9c3ea77ff73
* | Merge "Fix the build by #ifdefing linux-only includes"Vladimir Chtchetkine2011-08-241-2/+4
|\ \ | |/
| * Fix the build by #ifdefing linux-only includesVladimir Chtchetkine2011-08-241-2/+4
| | | | | | | | Change-Id: Ia4b6b45ad305307f28858f834f284b07be7d134d
* | emulator: probe shared library search pathDavid 'Digit' Turner2011-08-241-0/+128
|/ | | | | | | | | | | | | | | | | | | | This patch modifies the 'emulator' launcher program to probe for a adequate directory containing shared libraries that will be required by the emulator core to implement GLES emulation properly. It does that by looking for a library named libOpenglRender.so (or .dll, or .dylib depending on the platform) in various directories around the one containing the executable program. When such a directory is found, it modifies the value of the PATH or LD_LIBRARY_PATH environment variable before calling exec() This is necessary because there is no way to change the list of search directories at runtime, i.e. between the program's start and the moment it calls dlopen() to load such a library. Change-Id: I7346d26597382f44931cdf08936b051e74d3641a
* Add DLL-loading head <android/utils/dll.h>David 'Digit' Turner2011-08-244-0/+299
| | | | | | | | This patch adds several functions to make loading shared libraries dynamically easier. This will be used to load the GLES emulation libraries. Change-Id: Ib401af339530bc647bfa86fb23a2840fe0a201dd
* Merge "Video capturing code for Linux, and Windows"Vladimir Chtchetkine2011-08-248-0/+1468
|\
| * Video capturing code for Linux, and WindowsVladimir Chtchetkine2011-08-188-0/+1468
| | | | | | | | | | | | | | Contains API that connects to a camera device, and pulls video frames from it on request from the client. Change-Id: If1d80c57611afff637a7734ce5c3a2c874cfc85a
* | Revert "Revert "Merge c80340 from master to r13: Move charmap to hardware ↵Xavier Ducrohet2011-08-228-44/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | properties"..." This reverts commit cccd28ca5064a7bd14282cd774ee5bb7126d5845. c80340 add a CL to tools_r13 that broken the build. It was therefore reverted with cccd28. This revert was merged into tools_r13 but shouldn't have been. This reverts the revert to put back the CL in master. Change-Id: I95fcefedb77596cfdf76269f248b2ae80c85c830
* | Fix an emulator crash due to closed qemud pipeVladimir Chtchetkine2011-08-181-25/+51
|/ | | | | | | | | It looks like goldfish_pipe may make a call to the pipe after client has been disconnected and QemudClient instance freed. This results in a sudden death of the emulator, because _qemudPipe_recvBuffers doesn't know that the client for that call is gone. Change-Id: Ie1dd5481a01fd5bbb58d8c2d4e1bbe1ecfeca38a
* opengles: improve throughput of TCP socketDavid Turner2011-08-151-16/+16
| | | | | | | | | | | | | | Disable the TCP Nagle algorithm to drastically improve the throughput of small packets when creating the TCP socket used to talk with the OpenGLES renderer library. Coupled with a corresponding change in the server part of the code, this improves performance of most applications significantly. + get rid of shouldSetSockOpt field, by performing the buffer adjustment just after the socket is created. Change-Id: Ibacca834ff98d1e9a92fb735f450b925e373fdc0
* Merge "Fix fron report on unexpected qemud char channel close."Vladimir Chtchetkine2011-08-121-1/+15
|\
| * Fix fron report on unexpected qemud char channel close.Vladimir Chtchetkine2011-08-121-1/+15
| | | | | | | | Change-Id: Ib6a1f3ff7a77ae35d6b3b264752f9f62122e60fc
* | merge from tools_r13The Android Open-Source Project2011-08-118-70/+44
|\ \ | |/ |/| | | Change-Id: Iabd0b49a5c3ad991da1b4f636ecdf881b1c271aa
| * Revert "Merge c80340 from master to r13: Move charmap to hardware ↵Xavier Ducrohet2011-08-118-70/+44
| | | | | | | | | | | | | | | | properties". do not merge. This reverts commit f490aee025b3bab5bcdb065e5fc1b1abecf16b97. Change-Id: I59a0b2aebc8ab2b788a820a206c6eb4fc6e6e6d2
| * Merge c80340 from master to r13: Move charmap to hardware propertiesDavid 'Digit' Turner2011-08-058-44/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The name of the emulated charmap must be passed to the guest kernel because it is used by the guest input handling code to load the proper charmap files from the system partition. This mandates that the name becomes a hardware property for the sake of supporting proper snapshotting and ui/core separation. From now on, the charmap name found in a skin will be ignored completely. This shouldn't be a problem in practice because all skins used the default name (qwerty2) anyway. The only reason to change the default value would be if emulating a guest system image that depends on a different charmap during emulation. Change-Id: If571684000b159ae9e9849661c9ff18e19b4cc75
| * merge 62ffc42 from master to r13: Added GTV related keysMaciek Molerus2011-08-055-14/+84
| | | | | | | | | | | | | | | | Adds the definitions for keys present in GoogleTV. Standard linux definitions are used to send notifications to emulated system. Change-Id: Iafb84b68a270b6566361d1822b8e1098ee870280
| * Fix Windows space-in-path handling for 'emulator'.David Turner2011-08-041-2/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a back-port from master to tools_r13 This modifies the 'emulator' launcher program to work correctly on Windows when it is installed in a path that contains spaces. The program computed the path of the program to be launched correctly, but it turns out that the problem is in the implementation of execv() in either mingw or MSVCRT.DLL: experimentation shows that one needs to quote argv[0] when it contains spaces. However, you must *not* quote the first argument to execv(), otherwise the call will fail. Change-Id: Icf66426c88424f2f5d6274a25fc8530ca489f908 Orig-Change-Id: If291c5a8bd507f96b40634ecbc946ba38346ee4e
| * Fix window scaling issue.David 'Digit' Turner2011-08-041-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a back-port from master to tools_r13 This patch fixes a bug in the MMX scaling code. The MMX state was not properly empties when we started the scaling functions. The end result was that, if the hardware FPU was in a certain state, rendering would be be erratic. Fixes http://code.google.com/p/android/issues/detail?id=18299 This bug was hard to reproduce, but the fact that it never happens when building a debug version (with -O0) of the emulator indicated a problem in the generated instruction stream. Glad this isn't a compiler error though :) Change-Id: I19d3b35215120b41d92c85473e419b624ffa0f5f Orig-Change-Id: Icea04a7152b8fa5d81cb70cc215c0cd95aed2142
| * Fix -sysdir handling.David 'Digit' Turner2011-08-043-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a back-port from master to tools_r13 This patch fixes the processing of the -sysdir option. Previously, using -sysdir <path> would imply that the -system <path>/<path>/system.img is used, which is incorrect. Also fixes the skin search for the case where we are using the emulator without a pre-existing AVD outside of platform builds (e.g. when running tests). This happens with stuff like: emulator -sysdir /path/to/known/sdk/platforms/<name>/images The patch ensures that the /path/to/known/sdk/platforms/<name>/skins directory is probed (this was the behaviour of the Tools R11 emulator). Change-Id: Ibf7ad97de8e1da375f1049600807e0b3d30bfaaa Orig-Change-Id: I32398bec0d7a28ead234f63c847d3ec95ed14b63 Orig-Change-Id: Id77ea9bdc55bb99c1bfbd2ade291ec41f31ec65d
| * Auto-adjust scale and window position when needed.David 'Digit' Turner2011-08-043-10/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport from master to tools_r13 This patch changes the emulator's default behaviour in two ways: - Automatically compute the window scale to ensure that the emulator's window can be displayed within the current screen. This ensures that it remains usable when emulating a large-resolution device on a small display (e.g. on a 13" laptop running at 1024x768). This check and auto-correction do not happen if you use the -scale or -dpi-monitor options. - When re-centering an out-of-focus window, ensure that the top of the window is visible (which generally includes the window's title bar). This allows the window to be easily moved or minimized by the user is needed. This fixes three bugs: http://code.google.com/p/android/issues/detail?id=16399 http://code.google.com/p/android/issues/detail?id=16398 http://code.google.com/p/android/issues/detail?id=16397 Change-Id: Ibbc3c8458bd99718e4902d0a032b154c7cff4757 Orig-Change-Id: I8e5a624446d064038b5b9ad16556db8328244906