mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-13 17:48:34 +05:00
added a FFMPEG preprocessaor definition
This commit is contained in:
parent
12fd8ba93f
commit
468e661468
11
ng/ngpkg.cpp
11
ng/ngpkg.cpp
@ -49,7 +49,7 @@ namespace netgen
|
|||||||
#ifdef JPEGLIB
|
#ifdef JPEGLIB
|
||||||
#include <jpeglib.h>
|
#include <jpeglib.h>
|
||||||
#endif
|
#endif
|
||||||
|
#define FFMPEG
|
||||||
#ifdef FFMPEG
|
#ifdef FFMPEG
|
||||||
extern "C" {
|
extern "C" {
|
||||||
/*
|
/*
|
||||||
@ -2321,12 +2321,15 @@ namespace netgen
|
|||||||
// Init codec context etc.:
|
// Init codec context etc.:
|
||||||
//--------------------------
|
//--------------------------
|
||||||
// context = avcodec_alloc_context();
|
// context = avcodec_alloc_context();
|
||||||
context = avcodec_alloc_context3(codec);
|
context = avcodec_alloc_context3(codec);
|
||||||
|
|
||||||
context->bit_rate = bitrate;
|
context->bit_rate = bitrate;
|
||||||
context->width = nx;
|
context->width = nx;
|
||||||
context->height = ny;
|
context->height = ny;
|
||||||
context->time_base = (AVRational){ 1, 25 };
|
AVRational u;
|
||||||
|
u.den=25;
|
||||||
|
u.num=1;
|
||||||
|
context->time_base = u;
|
||||||
context->gop_size = gopsize;
|
context->gop_size = gopsize;
|
||||||
context->max_b_frames = bframes;
|
context->max_b_frames = bframes;
|
||||||
context->pix_fmt = PIX_FMT_YUV420P;
|
context->pix_fmt = PIX_FMT_YUV420P;
|
||||||
|
Loading…
Reference in New Issue
Block a user