1
0
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.6 KiB

/******************************************************************************
*
* Copyright (C) 2018 Fuzhou Rockchip Electronics Co., Ltd.
* Modification based on code covered by the License (the "License").
* You may not use this software except in compliance with the License.
* THIS SOFTWARE IS PROVIDED TO YOU ON AN "AS IS" BASIS and ROCKCHP DISCLAIMS
* ANY AND ALL WARRANTIES AND REPRESENTATIONS WITH RESPECT TO SUCH SOFTWARE,
* WHETHER EXPRESS,IMPLIED, STATUTORY OR OTHERWISE, INCLUDING WITHOUT LIMITATION,
* ANY IMPLIED WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, SATISFACTROY
* QUALITY, ACCURACY OR FITNESS FOR A PARTICULAR PURPOSE.
* Rockchip shall not be liable to make any corrections to this software or to
* provide any support or assistance with respect to it.
*
*****************************************************************************/
#ifndef __MESSAGEQUEUE_H__
#define __MESSAGEQUEUE_H__
#include "CameraHal_Tracer.h"
namespace android {
struct Message_cam
{
unsigned int command;
void* arg1;
void* arg2;
void* arg3;
void* arg4;
Message_cam(){
arg1 = NULL;
arg2 = NULL;
arg3 = NULL;
arg4 = NULL;
}
};
class MessageQueue
{
public:
MessageQueue();
MessageQueue(const char *name);
~MessageQueue(); /* ddl@rock-chips.com */
int get(Message_cam*);
int get(Message_cam*, int); /* ddl@rock-chips.com : timeout interface */
int put(Message_cam*);
bool isEmpty();
int dump();
private:
char MsgQueName[30];
int fd_read;
int fd_write;
};
}
#endif