mirror of
https://github.com/game-stop/veejay.git
synced 2025-12-15 04:10:00 +01:00
WIP
This commit is contained in:
@@ -229,9 +229,16 @@ static vj_encoder *vj_avcodec_new_encoder( int id, VJFrame *frame, char *filenam
|
|||||||
e->context->pix_fmt = get_ffmpeg_pixfmt( out_pixel_format );
|
e->context->pix_fmt = get_ffmpeg_pixfmt( out_pixel_format );
|
||||||
pf = e->context->pix_fmt;
|
pf = e->context->pix_fmt;
|
||||||
|
|
||||||
|
|
||||||
char *descr = vj_avcodec_get_codec_name( id );
|
char *descr = vj_avcodec_get_codec_name( id );
|
||||||
#if LIBAVCODEC_BUILD > 5400
|
#if LIBAVCODEC_BUILD > 5400
|
||||||
|
|
||||||
|
int n_threads = avhelper_set_num_decoders();
|
||||||
|
|
||||||
|
if( n_threads > 0 ) {
|
||||||
|
e->context->thread_count = n_threads;
|
||||||
|
e->context->thread_type = FF_THREAD_FRAME;
|
||||||
|
}
|
||||||
|
|
||||||
if ( avcodec_open2( e->context, e->codec, NULL ) )
|
if ( avcodec_open2( e->context, e->codec, NULL ) )
|
||||||
#else
|
#else
|
||||||
if ( avcodec_open( e->context, e->codec ) < 0 )
|
if ( avcodec_open( e->context, e->codec ) < 0 )
|
||||||
|
|||||||
@@ -617,6 +617,14 @@ static int v4l2_setup_avcodec_capture( v4l2info *v, int wid, int hei, int codec_
|
|||||||
v->c->flags |= CODEC_FLAG_TRUNCATED;
|
v->c->flags |= CODEC_FLAG_TRUNCATED;
|
||||||
|
|
||||||
#if LIBAVCODEC_BUILD > 5400
|
#if LIBAVCODEC_BUILD > 5400
|
||||||
|
|
||||||
|
int n_threads = avhelper_set_num_decoders();
|
||||||
|
|
||||||
|
if( n_threads > 0 ) {
|
||||||
|
e->context->thread_count = n_threads;
|
||||||
|
e->context->thread_type = FF_THREAD_FRAME;
|
||||||
|
}
|
||||||
|
|
||||||
if( avcodec_open2( v->c, v->codec, NULL ) < 0 )
|
if( avcodec_open2( v->c, v->codec, NULL ) < 0 )
|
||||||
#else
|
#else
|
||||||
if( avcodec_open( v->c, v->codec ) < 0 )
|
if( avcodec_open( v->c, v->codec ) < 0 )
|
||||||
|
|||||||
Reference in New Issue
Block a user