Fix build
Change-Id: Ifb5dd0b11bd616ef5a5a1e79b510b00f1d55672a
This commit is contained in:
@@ -88,8 +88,6 @@ EmulatedCamera::~EmulatedCamera()
|
||||
|
||||
status_t EmulatedCamera::Initialize()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
|
||||
/*
|
||||
* Fake required parameters.
|
||||
*/
|
||||
@@ -243,16 +241,12 @@ int EmulatedCamera::isMsgTypeEnabled(int32_t msg_type)
|
||||
|
||||
status_t EmulatedCamera::startPreview()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
|
||||
/* Callback should return a negative errno. */
|
||||
return -doStartPreview();
|
||||
}
|
||||
|
||||
void EmulatedCamera::stopPreview()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
|
||||
doStopPreview();
|
||||
}
|
||||
|
||||
@@ -458,6 +452,8 @@ status_t EmulatedCamera::dumpCamera(int fd)
|
||||
|
||||
status_t EmulatedCamera::doStartPreview()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
|
||||
status_t res = mPreviewWindow.startPreview();
|
||||
|
||||
/* Start the camera. */
|
||||
@@ -474,6 +470,8 @@ status_t EmulatedCamera::doStartPreview()
|
||||
|
||||
status_t EmulatedCamera::doStopPreview()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
|
||||
status_t res = NO_ERROR;
|
||||
/* Stop the camera. */
|
||||
if (getCameraDevice()->isCapturing()) {
|
||||
@@ -490,6 +488,8 @@ status_t EmulatedCamera::doStopPreview()
|
||||
|
||||
status_t EmulatedCamera::startCamera()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
|
||||
status_t res = EINVAL;
|
||||
EmulatedCameraDevice* camera_dev = getCameraDevice();
|
||||
if (camera_dev != NULL) {
|
||||
@@ -539,6 +539,8 @@ status_t EmulatedCamera::startCamera()
|
||||
|
||||
status_t EmulatedCamera::stopCamera()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
|
||||
status_t res = NO_ERROR;
|
||||
EmulatedCameraDevice* const camera_dev = getCameraDevice();
|
||||
if (camera_dev != NULL) {
|
||||
|
||||
@@ -54,8 +54,6 @@ EmulatedCameraDevice::~EmulatedCameraDevice()
|
||||
|
||||
status_t EmulatedCameraDevice::Initialize()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
|
||||
if (isInitialized()) {
|
||||
LOGW("%s: Emulated camera device is already initialized: mState = %d",
|
||||
__FUNCTION__, mState);
|
||||
|
||||
@@ -112,6 +112,8 @@ EmulatedCameraFactory::~EmulatedCameraFactory()
|
||||
|
||||
int EmulatedCameraFactory::cameraDeviceOpen(int camera_id, hw_device_t** device)
|
||||
{
|
||||
LOGV("%s: id = %d", __FUNCTION__, camera_id);
|
||||
|
||||
*device = NULL;
|
||||
|
||||
if (!isConstructedOK()) {
|
||||
@@ -130,6 +132,8 @@ int EmulatedCameraFactory::cameraDeviceOpen(int camera_id, hw_device_t** device)
|
||||
|
||||
int EmulatedCameraFactory::getCameraInfo(int camera_id, struct camera_info* info)
|
||||
{
|
||||
LOGV("%s: id = %d", __FUNCTION__, camera_id);
|
||||
|
||||
if (!isConstructedOK()) {
|
||||
LOGE("%s: EmulatedCameraFactory has failed to initialize", __FUNCTION__);
|
||||
return -EINVAL;
|
||||
|
||||
@@ -43,8 +43,6 @@ EmulatedFakeCamera::~EmulatedFakeCamera()
|
||||
|
||||
status_t EmulatedFakeCamera::Initialize()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
|
||||
status_t res = mFakeCameraDevice.Initialize();
|
||||
if (res != NO_ERROR) {
|
||||
return res;
|
||||
|
||||
@@ -62,7 +62,7 @@ status_t EmulatedQemuCameraDevice::Initialize(const char* device_name)
|
||||
__FUNCTION__, device_name);
|
||||
mDeviceName = device_name;
|
||||
} else {
|
||||
mQemuClient.disconnectDevice();
|
||||
mQemuClient.queryDisconnect();
|
||||
}
|
||||
|
||||
return res;
|
||||
|
||||
@@ -111,6 +111,8 @@ void PreviewWindow::onNextFrameAvailable(const void* frame,
|
||||
nsecs_t timestamp,
|
||||
EmulatedCameraDevice* camera_dev)
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
|
||||
int res;
|
||||
Mutex::Autolock locker(&mObjectLock);
|
||||
|
||||
|
||||
@@ -240,6 +240,8 @@ status_t QemuClient::connectClient(const char* param)
|
||||
|
||||
void QemuClient::disconnectClient()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
|
||||
if (mPipeFD >= 0) {
|
||||
close(mPipeFD);
|
||||
mPipeFD = -1;
|
||||
@@ -368,6 +370,8 @@ FactoryQemuClient::~FactoryQemuClient()
|
||||
|
||||
status_t FactoryQemuClient::listCameras(char** list)
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
|
||||
QemuQuery query(mQueryList);
|
||||
doQuery(&query);
|
||||
if (!query.isQuerySucceeded()) {
|
||||
@@ -424,6 +428,8 @@ CameraQemuClient::~CameraQemuClient()
|
||||
|
||||
status_t CameraQemuClient::queryConnect()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
|
||||
QemuQuery query(mQueryConnect);
|
||||
doQuery(&query);
|
||||
const status_t res = query.getCompletionStatus();
|
||||
@@ -435,6 +441,8 @@ status_t CameraQemuClient::queryConnect()
|
||||
|
||||
status_t CameraQemuClient::queryDisconnect()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
|
||||
QemuQuery query(mQueryDisconnect);
|
||||
doQuery(&query);
|
||||
const status_t res = query.getCompletionStatus();
|
||||
@@ -448,6 +456,8 @@ status_t CameraQemuClient::queryStart(uint32_t pixel_format,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
|
||||
char query_str[256];
|
||||
snprintf(query_str, sizeof(query_str), "%s dim=%dx%d pix=%d",
|
||||
mQueryStart, width, height, pixel_format);
|
||||
@@ -462,6 +472,8 @@ status_t CameraQemuClient::queryStart(uint32_t pixel_format,
|
||||
|
||||
status_t CameraQemuClient::queryStop()
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
|
||||
QemuQuery query(mQueryStop);
|
||||
doQuery(&query);
|
||||
const status_t res = query.getCompletionStatus();
|
||||
@@ -476,6 +488,8 @@ status_t CameraQemuClient::queryFrame(void* vframe,
|
||||
size_t vframe_size,
|
||||
size_t pframe_size)
|
||||
{
|
||||
LOGV("%s", __FUNCTION__);
|
||||
|
||||
char query_str[256];
|
||||
snprintf(query_str, sizeof(query_str), "%s video=%d preview=%d",
|
||||
mQueryFrame, (vframe && vframe_size) ? vframe_size : 0,
|
||||
|
||||
Reference in New Issue
Block a user