mirror of
https://github.com/kerberos-io/joy4.git
synced 2025-12-24 13:57:59 +08:00
29 lines
798 B
C
29 lines
798 B
C
|
|
#include <libavformat/avformat.h>
|
|
#include <libavcodec/avcodec.h>
|
|
#include <libavutil/avutil.h>
|
|
//#include <libavresample/avresample.h> -> we got rid of this as its deprecated in n5.0.1
|
|
#include <libavutil/opt.h>
|
|
#include <string.h>
|
|
#include <libswscale/swscale.h>
|
|
#include <libavutil/imgutils.h>
|
|
#include <libavfilter/avfilter.h>
|
|
#include <libavfilter/buffersrc.h>
|
|
#include <libavfilter/buffersink.h>
|
|
|
|
typedef struct {
|
|
AVCodec *codec;
|
|
AVCodecContext *codecCtx;
|
|
AVFrame *frame;
|
|
AVDictionary *options;
|
|
int profile;
|
|
} FFCtx;
|
|
|
|
static inline int avcodec_profile_name_to_int(AVCodec *codec, const char *name) {
|
|
const AVProfile *p;
|
|
for (p = codec->profiles; p != NULL && p->profile != FF_PROFILE_UNKNOWN; p++)
|
|
if (!strcasecmp(p->name, name))
|
|
return p->profile;
|
|
return FF_PROFILE_UNKNOWN;
|
|
}
|