aboutsummaryrefslogtreecommitdiff
path: root/src/creator.h
blob: b89b16cc7c52f2684f2f3bf1bbb9f270c6ce39dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 * render.h
 *
 *  Created on: 26.01.2018
 *      Author: rigtopa
 *
 */

#ifndef CREATOR_H_
#define CREATOR_H_

#define COORDS(x, y, width) ((y)*(width)+(x))

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libavcodec/avcodec.h>
#include <libavutil/frame.h>
#include <libavutil/imgutils.h>


AVFrame *picture;
AVPacket *pkt;

FILE *f;


const AVCodec *codec;
AVCodecContext *c= NULL;
int i, ret, x, y;

static void encode(AVCodecContext *enc_ctx, AVFrame *frame, AVPacket *pkt, FILE *outfile);

int generateVideo(filename, int width, int height, int fps, int bitRate, Config *config, u32 (*sfunc) (long double, long double, u32));

void addFrame(int *frame);

#endif /* RENDER_H_ */