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
53
54
55
56
57
58
59
60
61
62
63
|
avcodec.c:194:40: error: use of undeclared identifier 'FF_INPUT_BUFFER_PADDING_SIZE'
static uint8_t ff_input_buffer_padding[FF_INPUT_BUFFER_PADDING_SIZE] = { 0 };
^
avformat.c:471:14: error: use of undeclared identifier 'CODEC_FLAG_LOOP_FILTER'
c->flags|=CODEC_FLAG_LOOP_FILTER; // flags=+loop
^
avformat.c:477:47: error: use of undeclared identifier 'ME_HEX'
av_opt_set_int(c->priv_data, "motion_est", ME_HEX, 0);
^
avformat.c:553:15: error: use of undeclared identifier 'CODEC_FLAG_GLOBAL_HEADER'
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
^
avformat.c:638:31: error: use of undeclared identifier 'CODEC_CAP_VARIABLE_FRAME_SIZE'
if (c->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE) {
^
--- src/mod/applications/mod_av/avcodec.c.orig 2017-07-13 12:07:30 UTC
+++ src/mod/applications/mod_av/avcodec.c
@@ -191,7 +191,7 @@ typedef struct h264_codec_context_s {
int hw_encoder;
} h264_codec_context_t;
-static uint8_t ff_input_buffer_padding[FF_INPUT_BUFFER_PADDING_SIZE] = { 0 };
+static uint8_t ff_input_buffer_padding[AV_INPUT_BUFFER_PADDING_SIZE] = { 0 };
static switch_status_t buffer_h264_nalu(h264_codec_context_t *context, switch_frame_t *frame)
{
--- src/mod/applications/mod_av/avformat.c.orig 2017-07-13 12:07:30 UTC
+++ src/mod/applications/mod_av/avformat.c
@@ -479,13 +479,13 @@
c->ticks_per_frame = 2;
- c->flags|=CODEC_FLAG_LOOP_FILTER; // flags=+loop
+ c->flags|=AV_CODEC_FLAG_LOOP_FILTER; // flags=+loop
c->me_cmp|= 1; // cmp=+chroma, where CHROMA = 1
c->me_range = 16; // me_range=16
c->max_b_frames = 3; // bf=3
av_opt_set_int(c->priv_data, "b_strategy", 1, 0);
- av_opt_set_int(c->priv_data, "motion_est", ME_HEX, 0);
+ av_opt_set(c->priv_data, "motion_est", "hex", 0);
av_opt_set_int(c->priv_data, "coder", 1, 0);
switch (mm->vprofile) {
@@ -568,7 +568,7 @@
/* Some formats want stream headers to be separate. */
if (fc->oformat->flags & AVFMT_GLOBALHEADER) {
- c->flags |= CODEC_FLAG_GLOBAL_HEADER;
+ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
}
mst->active = 1;
@@ -660,7 +660,7 @@
mst->frame->format = AV_SAMPLE_FMT_S16;
mst->frame->channel_layout = c->channel_layout;
- if (c->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE) {
+ if (c->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE) {
//mst->frame->nb_samples = 10000;
mst->frame->nb_samples = (mst->frame->sample_rate / 50) * c->channels;
} else {
|