From 9ef108da3f33d5efacacee93b07bd57e03ecd777 Mon Sep 17 00:00:00 2001 From: niels Date: Mon, 12 Jan 2015 20:33:30 +0100 Subject: [PATCH] assign selected pixel format when one is found (duh), add major/minor version of libavcodec to veejay --features --- veejay-current/veejay-server/libel/vj-avcodec.c | 9 ++++++++- veejay-current/veejay-server/libel/vj-avcodec.h | 1 + veejay-current/veejay-server/libstream/v4l2utils.c | 8 +++++--- veejay-current/veejay-server/veejay/veejay.c | 6 ++++-- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/veejay-current/veejay-server/libel/vj-avcodec.c b/veejay-current/veejay-server/libel/vj-avcodec.c index 410c39b4..bbb8490e 100644 --- a/veejay-current/veejay-server/libel/vj-avcodec.c +++ b/veejay-current/veejay-server/libel/vj-avcodec.c @@ -32,7 +32,7 @@ #endif #include #include - +#include #ifdef STRICT_CHECKING #include #endif @@ -96,6 +96,13 @@ char* vj_avcodec_get_codec_name(int codec_id ) return res; } +void vj_libav_ffmpeg_version() +{ + veejay_msg( VEEJAY_MSG_INFO, "libav versions:"); + veejay_msg( VEEJAY_MSG_INFO, "\tavcodec-%d.%d.%d (%d)", LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO, LIBAVCODEC_BUILD ); +} + + uint8_t *vj_avcodec_get_buf( vj_encoder *av ) { #ifdef SUPPORT_READ_DV2 diff --git a/veejay-current/veejay-server/libel/vj-avcodec.h b/veejay-current/veejay-server/libel/vj-avcodec.h index 59bacad8..05c1e813 100644 --- a/veejay-current/veejay-server/libel/vj-avcodec.h +++ b/veejay-current/veejay-server/libel/vj-avcodec.h @@ -66,6 +66,7 @@ int vj_avcodec_encode_frame(void *encoder,long nframe, int format, uint8_t *src uint8_t *vj_avcodec_get_buf( vj_encoder *av ); const char *vj_avcodec_get_encoder_name(int encoder); int vj_avcodec_free(); +void vj_libav_ffmpeg_version(); /* color space conversion routines, should go somewhere else someday together with subsample.c/colorspace.c into some lib diff --git a/veejay-current/veejay-server/libstream/v4l2utils.c b/veejay-current/veejay-server/libstream/v4l2utils.c index 56ae968c..6b89eaa5 100644 --- a/veejay-current/veejay-server/libstream/v4l2utils.c +++ b/veejay-current/veejay-server/libstream/v4l2utils.c @@ -688,8 +688,10 @@ static int v4l2_negotiate_pixel_format( v4l2info *v, int host_fmt, int wid, int continue; supported = v4l2_pixelformat2ffmpeg( v->supported_pixel_formats[k] ); - if( supported >= 0 ) { + if( supported ) { veejay_msg(VEEJAY_MSG_DEBUG, "v4l2: Capture device supports %x", supported ); + *candidate = supported; + return 1; } } @@ -731,8 +733,8 @@ static int v4l2_configure_format( v4l2info *v, int host_fmt, int wid, int hei ) yuv_plane_sizes( v->info, &(v->planes[0]),&(v->planes[1]),&(v->planes[2]),&(v->planes[3]) ); - veejay_msg(VEEJAY_MSG_INFO, "v4l2: output in %dx%d, source in %dx%d", - wid,hei, src_wid,src_hei ); + veejay_msg(VEEJAY_MSG_INFO, "v4l2: output in %dx%d, source in %dx%d %x", + wid,hei, src_wid,src_hei, cap_pf ); /* if( cap_pf == V4L2_PIX_FMT_JPEG ) { v->info->data[0] = v->tmpbuf[0]; diff --git a/veejay-current/veejay-server/veejay/veejay.c b/veejay-current/veejay-server/veejay/veejay.c index d170eeec..b7173165 100644 --- a/veejay-current/veejay-server/veejay/veejay.c +++ b/veejay-current/veejay-server/veejay/veejay.c @@ -47,7 +47,7 @@ #include #include extern long vj_el_get_mem_size(); - +extern void vj_libav_ffmpeg_version(); static veejay_t *info = NULL; static float override_fps = 0.0; static int default_geometry_x = -1; @@ -114,7 +114,6 @@ static void CompiledWith() #ifdef HAVE_JACK veejay_msg(VEEJAY_MSG_INFO,"\tUsing Jack audio server"); #endif - veejay_msg(VEEJAY_MSG_INFO,"\tUsing Video4linux"); #ifdef SUPPORT_READ_DV2 veejay_msg(VEEJAY_MSG_INFO,"\tSupport for Digital Video enabled"); #endif @@ -147,6 +146,9 @@ static void CompiledWith() #ifdef HAVE_DIRECTFB veejay_msg(VEEJAY_MSG_INFO,"\tUsing DirectFB"); #endif + + vj_libav_ffmpeg_version(); + exit(0); }