@ -19,7 +19,13 @@
// echo 0x7fffffff > /sys/kernel/debug/msm_vidc/debug_level
// echo 0x7fffffff > /sys/kernel/debug/msm_vidc/debug_level
const int env_debug_encoder = ( getenv ( " DEBUG_ENCODER " ) ! = NULL ) ? atoi ( getenv ( " DEBUG_ENCODER " ) ) : 0 ;
const int env_debug_encoder = ( getenv ( " DEBUG_ENCODER " ) ! = NULL ) ? atoi ( getenv ( " DEBUG_ENCODER " ) ) : 0 ;
# define checked_ioctl(x, y, z) { int _ret = HANDLE_EINTR(ioctl(x, y, z)); if (_ret!=0) { LOGE("checked_ioctl failed %d %lx %p", x, y, z); } assert(_ret==0); }
static void checked_ioctl ( int fd , unsigned long request , void * argp ) {
int ret = util : : safe_ioctl ( fd , request , argp ) ;
if ( ret ! = 0 ) {
LOGE ( " checked_ioctl failed with error %d (%d %lx %p) " , errno , fd , request , argp ) ;
assert ( 0 ) ;
}
}
static void dequeue_buffer ( int fd , v4l2_buf_type buf_type , unsigned int * index = NULL , unsigned int * bytesused = NULL , unsigned int * flags = NULL , struct timeval * timestamp = NULL ) {
static void dequeue_buffer ( int fd , v4l2_buf_type buf_type , unsigned int * index = NULL , unsigned int * bytesused = NULL , unsigned int * flags = NULL , struct timeval * timestamp = NULL ) {
v4l2_plane plane = { 0 } ;
v4l2_plane plane = { 0 } ;