assign selected pixel format when one is found (duh), add major/minor version of libavcodec to veejay --features

This commit is contained in:
niels
2015-01-12 20:33:30 +01:00
parent a488172286
commit 9ef108da3f
4 changed files with 18 additions and 6 deletions

View File

@@ -32,7 +32,7 @@
#endif
#include <libavutil/avutil.h>
#include <libavcodec/avcodec.h>
#include <libavcodec/version.h>
#ifdef STRICT_CHECKING
#include <assert.h>
#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

View File

@@ -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

View File

@@ -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];

View File

@@ -47,7 +47,7 @@
#include <veejay/vj-OSC.h>
#include <build.h>
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);
}