blob: b57a953f06734c31e4b4bcfa003eb8aa78dba41d (
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
Index: xdtv-2.4.0/src/divx.c
===================================================================
--- xdtv-2.4.0.orig/src/divx.c
+++ xdtv-2.4.0/src/divx.c
@@ -1200,70 +1200,7 @@ void divx_init(int width, int height)
sprintf(xawmesstmp, translate("divx_init: initializing %s - build %i.%i.%i\n"), codec_name, A_div.quot, B_div.quot, B_div.rem);}
#endif
strcat(xawmessage,xawmesstmp);
- switch(divx.codec) {
-#ifdef HAVE_FFMPEG_XVID
-#if LIBAVCODEC_BUILD >= 4719
- case FFMPEG_XVID: register_avcodec(&xvid_encoder); break;
-#endif
-#endif
- case FFMPEG_MPEG4: register_avcodec(&mpeg4_encoder); break;
- case FFMPEG_MPEG1: register_avcodec(&mpeg1video_encoder); break;
-#if LIBAVCODEC_BUILD >= 4676
- case FFMPEG_MPEG2: register_avcodec(&mpeg2video_encoder); break;
-#endif
- case FFMPEG_MJPEG: register_avcodec(&mjpeg_encoder); break;
-#if LIBAVCODEC_BUILD >= 4670
- case FFMPEG_LJPEG: register_avcodec(&ljpeg_encoder); break;
- case FFMPEG_FLV1: register_avcodec(&flv_encoder); break;
-#endif
-#if LIBAVCODEC_BUILD >= 4735
- case FFMPEG_RV20: register_avcodec(&rv20_encoder); break;
-#endif
- case FFMPEG_RV10: register_avcodec(&rv10_encoder); break;
-#ifdef HAVE_FFMPEG_X264
-#if LIBAVCODEC_BUILD >= 4748
- case FFMPEG_X264: register_avcodec(&x264_encoder); break;
-#endif
-#endif
- case FFMPEG_H263P: register_avcodec(&h263p_encoder); break;
- case FFMPEG_H263: register_avcodec(&h263_encoder); break;
-#if LIBAVCODEC_BUILD >= 4729
- case FFMPEG_H261: register_avcodec(&h261_encoder); break;
-#endif
- case FFMPEG_MSMPEG4V3: register_avcodec(&msmpeg4v3_encoder); break;
- case FFMPEG_MSMPEG4V2: register_avcodec(&msmpeg4v2_encoder); break;
-/* Already implemented into the 0.4.6 version but only work correctly with the 0.4.7 version */
-#if LIBAVCODEC_BUILD >= 4675
- case FFMPEG_WMV2: register_avcodec(&wmv2_encoder); break;
-#endif
- case FFMPEG_WMV1: register_avcodec(&wmv1_encoder); break;
-#if LIBAVCODEC_BUILD >= 4677
- case FFMPEG_ASV2: register_avcodec(&asv2_encoder); break;
-#endif
-#if LIBAVCODEC_BUILD >= 4668
- case FFMPEG_ASV1: register_avcodec(&asv1_encoder); break;
-#endif
-/* appeared with the 4719 version but don't work correctly actually */
-#if LIBAVCODEC_BUILD >= 16777215
- case FFMPEG_SVQ1: register_avcodec(&svq1_encoder); break;
-#endif
-/* appeared with the 4669 version
-but only work correctly with the 4755 version */
-#if LIBAVCODEC_BUILD >= 4755
- case FFMPEG_FFV1: register_avcodec(&ffv1_encoder); break;
-#endif
-#if LIBAVCODEC_BUILD >= 4719
- case FFMPEG_SNOW: register_avcodec(&snow_encoder); break;
-#endif
-
-#if LIBAVCODEC_BUILD >= 4734
- case FFMPEG_FFVHUFF: register_avcodec(&ffvhuff_encoder); break;
-#endif
- case FFMPEG_HUFFYUV: register_avcodec(&huffyuv_encoder); break;
-#if LIBAVCODEC_BUILD >= 4707
- case FFMPEG_DVVIDEO: register_avcodec(&dvvideo_encoder); break;
-#endif
- }
+ avcodec_register_all();
codec = avcodec_find_encoder(xdtv_to_ffmpeg(divx.codec));
if (codec == NULL)
{
@@ -2092,25 +2029,7 @@ codec_context->mv0_threshold
return;
}
avcodec_init();
- switch(divx.audio_codec) {
- case FFMPEG_MP2: register_avcodec(&mp2_encoder); break;
-#ifdef HAVE_FFMPEG_MP3
- case FFMPEG_MP3: register_avcodec(&mp3lame_encoder); break;
-#endif
-#ifdef HAVE_FFMPEG_AC3
- case FFMPEG_AC3: register_avcodec(&ac3_encoder); break;
-#endif
-#ifdef HAVE_FFMPEG_AAC
- case FFMPEG_AAC: register_avcodec(&faac_encoder); break;
-#endif
- case FFMPEG_PCMS16LE: register_avcodec(&pcm_s16le_encoder); break;
-#ifdef HAVE_FFMPEG_AMR_NB
- case FFMPEG_AMR_NB: register_avcodec(&amr_nb_encoder); break;
-#endif
-#ifdef HAVE_FFMPEG_AMR_WB
- case FFMPEG_AMR_WB: register_avcodec(&amr_wb_encoder); break;
-#endif
- }
+ avcodec_register_all();
if (audio_codec_context == NULL)
audio_codec_context = avcodec_alloc_context();
audio_codec_context->codec_id = xdtv_to_audioffmpeg(divx.audio_codec);
|