This commit is contained in:
Niels
2016-05-13 18:26:22 +02:00
parent d27c2c8fd3
commit 8e004839fb
2 changed files with 11 additions and 2 deletions

View File

@@ -1918,9 +1918,9 @@ int vj_tag_v4l_set_control( int t1, uint32_t id, int value )
return 0; return 0;
if(tag->source_type != VJ_TAG_TYPE_V4L ) if(tag->source_type != VJ_TAG_TYPE_V4L )
return 0; return 0;
#ifdef HAVE_V4L2
v4l2_set_control( vj_tag_input->unicap[tag->index], id, value ); v4l2_set_control( vj_tag_input->unicap[tag->index], id, value );
#endif
return 1; return 1;
} }

View File

@@ -209,6 +209,7 @@ static void vj_vloopback_setup_ptrs( uint8_t *buf, uint8_t *planes[4], int pixfm
static int vj_vloopback_user_pixelformat( VJFrame *src ) static int vj_vloopback_user_pixelformat( VJFrame *src )
{ {
#ifdef HAVE_V4L2
char *str = getenv( "VEEJAY_VLOOPBACK_PIXELFORMAT" ); char *str = getenv( "VEEJAY_VLOOPBACK_PIXELFORMAT" );
if( str != NULL ) { if( str != NULL ) {
int i; int i;
@@ -227,10 +228,15 @@ static int vj_vloopback_user_pixelformat( VJFrame *src )
} }
return v4l2_ffmpeg2v4l2( src->format ); return v4l2_ffmpeg2v4l2( src->format );
#else
return src->format;
#endif
} }
void *vj_vloopback_open(const char *device_name, VJFrame *src, int dst_w, int dst_h, int dst_format ) void *vj_vloopback_open(const char *device_name, VJFrame *src, int dst_w, int dst_h, int dst_format )
{ {
#ifdef HAVE_V4L2
int dst_v4l2_format = v4l2_ffmpeg2v4l2( dst_format ); int dst_v4l2_format = v4l2_ffmpeg2v4l2( dst_format );
int dst_v4l2_w = dst_w; int dst_v4l2_w = dst_w;
int dst_v4l2_h = dst_h; int dst_v4l2_h = dst_h;
@@ -345,6 +351,9 @@ void *vj_vloopback_open(const char *device_name, VJFrame *src, int dst_w, int ds
} }
return (void*) v; return (void*) v;
#else
return NULL;
#endif
} }
int vj_vloopback_write( void *vloop ) int vj_vloopback_write( void *vloop )