blob: 59c281871821ec1cc3b5df019d66bf430f5e66a0 (
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
/*************************************************************************
* Dxr3 Encoding Plugin Configuration Options *
*************************************************************************/
/* 1: enable to buffer the mpeg1 stream;
* 0: write to mpeg device immediately;
* with 1 sync is better, but playback still not smooth (but see below) */
#define USE_MPEG_BUFFER 1
/* 1: write 6 to MV_COMMAND register. This seems to fix playback problems!
* 0: don't write to register */
#define USE_MAGIC_REGISTER 1
/* 1: use libfame for encoding
* 0: use libavcodec from ffmpeg for encoding */
#define USE_LIBFAME 1
/*************************************************************************
* Dxr3 Encoding private stuff below - You shouldn't need to change this *
*************************************************************************/
/* buffer size for encoded mpeg1 stream; will hold one intra frame
* at 640x480 typical sizes are <50 kB. 512 kB should be plenty */
#define DEFAULT_BUFFER_SIZE 512*1024
#if USE_LIBFAME
# define USE_FFMPEG 0
#else
# define USE_FFMPEG 1
#endif
#if USE_LIBFAME
#include <fame.h>
/* some global stuff for libfame, could use some cleanup :-) */
fame_parameters_t fp = FAME_PARAMETERS_INITIALIZER;
fame_object_t *object;
fame_yuv_t yuv;
fame_context_t *fc; /* needed for fame calls */
#endif
#if USE_FFMPEG
/* use libffmpeg */
#include <ffmpeg/avcodec.h>
AVCodecContext *avc;
AVPicture avp;
AVCodec *avcodec;
#endif
/* mpeg1 buffer, used by both encoders */
unsigned char *buffer;
|