History

Define AVMediaType enum, and use it instead of enum CodecType, which is deprecated and will be dropped at the next major bump.

Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini committed 16 years ago

Commit 72415b21 parent ca6e770383 files · +1041 −1029Browse files

Unified · Split

383 files
  1. cmdutils.c +8 −8
  2. cmdutils.h +1 −1
  3. ffmpeg.c +75 −75
  4. ffplay.c +46 −46
  5. ffprobe.c +10 −10
  6. ffserver.c +19 −19
  7. libavcodec/4xm.c +1 −1
  8. libavcodec/8bps.c +1 −1
  9. libavcodec/8svx.c +2 −2
  10. libavcodec/aac.c +1 −1
  11. libavcodec/aacenc.c +1 −1
  12. libavcodec/aasc.c +1 −1
  13. libavcodec/ac3dec.c +2 −2
  14. libavcodec/ac3enc.c +1 −1
  15. libavcodec/adpcm.c +2 −2
  16. libavcodec/adxdec.c +1 −1
  17. libavcodec/adxenc.c +1 −1
  18. libavcodec/alac.c +1 −1
  19. libavcodec/alacenc.c +1 −1
  20. libavcodec/alsdec.c +1 −1
  21. libavcodec/amrnbdec.c +1 −1
  22. libavcodec/anm.c +1 −1
  23. libavcodec/apedec.c +1 −1
  24. libavcodec/asv1.c +4 −4
  25. libavcodec/atrac1.c +1 −1
  26. libavcodec/atrac3.c +1 −1
  27. libavcodec/aura.c +1 −1
  28. libavcodec/avcodec.h +27 −15
  29. libavcodec/avs.c +1 −1
  30. libavcodec/bethsoftvideo.c +1 −1
  31. libavcodec/bfi.c +1 −1
  32. libavcodec/bink.c +1 −1
  33. libavcodec/binkaudio.c +2 −2
  34. libavcodec/bmp.c +1 −1
  35. libavcodec/bmpenc.c +1 −1
  36. libavcodec/c93.c +1 −1
  37. libavcodec/cavsdec.c +1 −1
  38. libavcodec/cdgraphics.c +1 −1
  39. libavcodec/cinepak.c +1 −1
  40. libavcodec/cljr.c +2 −2
  41. libavcodec/cook.c +1 −1
  42. libavcodec/cscd.c +1 −1
  43. libavcodec/cyuv.c +2 −2
  44. libavcodec/dca.c +1 −1
  45. libavcodec/dnxhddec.c +1 −1
  46. libavcodec/dnxhdenc.c +1 −1
  47. libavcodec/dpcm.c +1 −1
  48. libavcodec/dpx.c +1 −1
  49. libavcodec/dsicinav.c +2 −2
  50. libavcodec/dv.c +2 −2
  51. libavcodec/dvbsub.c +1 −1
  52. libavcodec/dvbsubdec.c +1 −1
  53. libavcodec/dvdsubdec.c +1 −1
  54. libavcodec/dvdsubenc.c +1 −1
  55. libavcodec/dxa.c +1 −1
  56. libavcodec/dxva2_h264.c +1 −1
  57. libavcodec/dxva2_vc1.c +2 −2
  58. libavcodec/eacmv.c +1 −1
  59. libavcodec/eamad.c +1 −1
  60. libavcodec/eatgq.c +1 −1
  61. libavcodec/eatgv.c +1 −1
  62. libavcodec/eatqi.c +1 −1
  63. libavcodec/escape124.c +1 −1
  64. libavcodec/ffv1.c +2 −2
  65. libavcodec/flacdec.c +1 −1
  66. libavcodec/flacenc.c +1 −1
  67. libavcodec/flashsv.c +1 −1
  68. libavcodec/flashsvenc.c +1 −1
  69. libavcodec/flicvideo.c +1 −1
  70. libavcodec/flvdec.c +1 −1
  71. libavcodec/flvenc.c +1 −1
  72. libavcodec/fraps.c +1 −1
  73. libavcodec/frwu.c +1 −1
  74. libavcodec/g726.c +2 −2
  75. libavcodec/g729dec.c +1 −1
  76. libavcodec/gif.c +1 −1
  77. libavcodec/gifdec.c +1 −1
  78. libavcodec/h261dec.c +1 −1
  79. libavcodec/h261enc.c +1 −1
  80. libavcodec/h263dec.c +1 −1
  81. libavcodec/h264.c +2 −2
  82. libavcodec/huffyuv.c +4 −4
  83. libavcodec/idcinvideo.c +1 −1
  84. libavcodec/iff.c +2 −2
  85. libavcodec/imc.c +1 −1
  86. libavcodec/indeo2.c +1 −1
  87. libavcodec/indeo3.c +1 −1
  88. libavcodec/indeo5.c +1 −1
  89. libavcodec/intelh263dec.c +1 −1
  90. libavcodec/interplayvideo.c +1 −1
  91. libavcodec/jpeglsdec.c +1 −1
  92. libavcodec/jpeglsenc.c +1 −1
  93. libavcodec/kgv1dec.c +1 −1
  94. libavcodec/kmvc.c +1 −1
  95. libavcodec/lcldec.c +2 −2
  96. libavcodec/lclenc.c +1 −1
  97. libavcodec/libdiracdec.c +1 −1
  98. libavcodec/libdiracenc.c +1 −1
  99. libavcodec/libfaac.c +1 −1
  100. libavcodec/libfaad.c +1 −1
  101. libavcodec/libgsm.c +4 −4
  102. libavcodec/libmp3lame.c +1 −1
  103. libavcodec/libopencore-amr.c +3 −3
  104. libavcodec/libopenjpeg.c +1 −1
  105. libavcodec/libschroedingerdec.c +1 −1
  106. libavcodec/libschroedingerenc.c +1 −1
  107. libavcodec/libspeexdec.c +1 −1
  108. libavcodec/libtheoraenc.c +1 −1
  109. libavcodec/libvorbis.c +1 −1
  110. libavcodec/libx264.c +1 −1
  111. libavcodec/libxvidff.c +1 −1
  112. libavcodec/ljpegenc.c +1 −1
  113. libavcodec/loco.c +1 −1
  114. libavcodec/mace.c +2 −2
  115. libavcodec/mdec.c +1 −1
  116. libavcodec/mimic.c +1 −1
  117. libavcodec/mjpegbdec.c +1 −1
  118. libavcodec/mjpegdec.c +2 −2
  119. libavcodec/mjpegenc.c +1 −1
  120. libavcodec/mlpdec.c +2 −2
  121. libavcodec/mmvideo.c +1 −1
  122. libavcodec/motionpixels.c +1 −1
  123. libavcodec/mpc7.c +1 −1
  124. libavcodec/mpc8.c +1 −1
  125. libavcodec/mpeg12.c +6 −6
  126. libavcodec/mpeg12enc.c +2 −2
  127. libavcodec/mpeg4videodec.c +2 −2
  128. libavcodec/mpeg4videoenc.c +1 −1
  129. libavcodec/mpegaudiodec.c +5 −5
  130. libavcodec/mpegaudioenc.c +1 −1
  131. libavcodec/mpegvideo_enc.c +6 −6
  132. libavcodec/msmpeg4.c +4 −4
  133. libavcodec/msrle.c +1 −1
  134. libavcodec/msvideo1.c +1 −1
  135. libavcodec/nellymoserdec.c +1 −1
  136. libavcodec/nellymoserenc.c +1 −1
  137. libavcodec/nuv.c +1 −1
  138. libavcodec/options.c +7 −7
  139. libavcodec/pamenc.c +1 −1
  140. libavcodec/pcm-mpeg.c +1 −1
  141. libavcodec/pcm.c +2 −2
  142. libavcodec/pcx.c +1 −1
  143. libavcodec/pcxenc.c +1 −1
  144. libavcodec/pgssubdec.c +1 −1
  145. libavcodec/pngdec.c +1 −1
  146. libavcodec/pngenc.c +1 −1
  147. libavcodec/pnmdec.c +5 −5
  148. libavcodec/pnmenc.c +4 −4
  149. libavcodec/ptx.c +1 −1
  150. libavcodec/qcelpdec.c +1 −1
  151. libavcodec/qdm2.c +1 −1
  152. libavcodec/qdrw.c +1 −1
  153. libavcodec/qpeg.c +1 −1
  154. libavcodec/qtrle.c +1 −1
  155. libavcodec/qtrleenc.c +1 −1
  156. libavcodec/r210dec.c +1 −1
  157. libavcodec/ra144.c +1 −1
  158. libavcodec/ra288.c +1 −1
  159. libavcodec/rawdec.c +1 −1
  160. libavcodec/rawenc.c +1 −1
  161. libavcodec/rl2.c +1 −1
  162. libavcodec/roqaudioenc.c +1 −1
  163. libavcodec/roqvideodec.c +1 −1
  164. libavcodec/roqvideoenc.c +1 −1
  165. libavcodec/rpza.c +1 −1
  166. libavcodec/rv10.c +2 −2
  167. libavcodec/rv10enc.c +1 −1
  168. libavcodec/rv20enc.c +1 −1
  169. libavcodec/rv30.c +1 −1
  170. libavcodec/rv40.c +1 −1
  171. libavcodec/sgidec.c +1 −1
  172. libavcodec/sgienc.c +1 −1
  173. libavcodec/shorten.c +1 −1
  174. libavcodec/sipr.c +1 −1
  175. libavcodec/smacker.c +2 −2
  176. libavcodec/smc.c +1 −1
  177. libavcodec/snow.c +2 −2
  178. libavcodec/sonic.c +3 −3
  179. libavcodec/sp5xdec.c +2 −2
  180. libavcodec/sunrast.c +1 −1
  181. libavcodec/svq1dec.c +1 −1
  182. libavcodec/svq1enc.c +1 −1
  183. libavcodec/svq3.c +1 −1
  184. libavcodec/targa.c +1 −1
  185. libavcodec/targaenc.c +1 −1
  186. libavcodec/tiertexseqv.c +1 −1
  187. libavcodec/tiff.c +1 −1
  188. libavcodec/tiffenc.c +1 −1
  189. libavcodec/tmv.c +1 −1
  190. libavcodec/truemotion1.c +1 −1
  191. libavcodec/truemotion2.c +1 −1
  192. libavcodec/truespeech.c +1 −1
  193. libavcodec/tscc.c +1 −1
  194. libavcodec/tta.c +1 −1
  195. libavcodec/twinvq.c +1 −1
  196. libavcodec/txd.c +1 −1
  197. libavcodec/ulti.c +1 −1
  198. libavcodec/utils.c +11 −11
  199. libavcodec/v210dec.c +1 −1
  200. libavcodec/v210enc.c +1 −1
  201. libavcodec/v210x.c +1 −1
  202. libavcodec/vaapi_h264.c +1 −1
  203. libavcodec/vaapi_mpeg2.c +1 −1
  204. libavcodec/vaapi_mpeg4.c +2 −2
  205. libavcodec/vaapi_vc1.c +2 −2
  206. libavcodec/vb.c +1 −1
  207. libavcodec/vc1dec.c +4 −4
  208. libavcodec/vcr1.c +2 −2
  209. libavcodec/vmdav.c +2 −2
  210. libavcodec/vmnc.c +1 −1
  211. libavcodec/vorbis_dec.c +1 −1
  212. libavcodec/vorbis_enc.c +1 −1
  213. libavcodec/vp3.c +2 −2
  214. libavcodec/vp5.c +1 −1
  215. libavcodec/vp6.c +3 −3
  216. libavcodec/vqavideo.c +1 −1
  217. libavcodec/wavpack.c +1 −1
  218. libavcodec/wmadec.c +2 −2
  219. libavcodec/wmaenc.c +2 −2
  220. libavcodec/wmaprodec.c +1 −1
  221. libavcodec/wmavoice.c +1 −1
  222. libavcodec/wmv2dec.c +1 −1
  223. libavcodec/wmv2enc.c +1 −1
  224. libavcodec/wnv1.c +1 −1
  225. libavcodec/ws-snd1.c +1 −1
  226. libavcodec/xan.c +2 −2
  227. libavcodec/xl.c +1 −1
  228. libavcodec/xsubdec.c +1 −1
  229. libavcodec/xsubenc.c +1 −1
  230. libavcodec/yop.c +1 −1
  231. libavcodec/zmbv.c +1 −1
  232. libavcodec/zmbvenc.c +1 −1
  233. libavdevice/alsa-audio-dec.c +1 −1
  234. libavdevice/bktr.c +1 −1
  235. libavdevice/jack_audio.c +1 −1
  236. libavdevice/libdc1394.c +1 −1
  237. libavdevice/oss_audio.c +1 −1
  238. libavdevice/v4l.c +1 −1
  239. libavdevice/v4l2.c +1 −1
  240. libavdevice/vfwcap.c +1 −1
  241. libavdevice/x11grab.c +1 −1
  242. libavfilter/avfilter.h +1 −1
  243. libavfilter/vf_aspect.c +4 −4
  244. libavfilter/vf_crop.c +2 −2
  245. libavfilter/vf_format.c +4 −4
  246. libavfilter/vf_null.c +2 −2
  247. libavfilter/vf_scale.c +2 −2
  248. libavfilter/vf_slicify.c +2 −2
  249. libavfilter/vf_vflip.c +2 −2
  250. libavfilter/vsink_nullsink.c +1 −1
  251. libavfilter/vsrc_nullsrc.c +1 −1
  252. libavformat/4xm.c +2 −2
  253. libavformat/aea.c +1 −1
  254. libavformat/aiffdec.c +1 −1
  255. libavformat/amr.c +1 −1
  256. libavformat/anm.c +1 −1
  257. libavformat/apc.c +1 −1
  258. libavformat/ape.c +1 −1
  259. libavformat/asfdec.c +10 −10
  260. libavformat/asfenc.c +9 −9
  261. libavformat/assdec.c +1 −1
  262. libavformat/au.c +1 −1
  263. libavformat/audiointerleave.c +4 −4
  264. libavformat/avformat.h +1 −1
  265. libavformat/avidec.c +13 −13
  266. libavformat/avienc.c +20 −20
  267. libavformat/avisynth.c +2 −2
  268. libavformat/avs.c +2 −2
  269. libavformat/bethsoftvid.c +2 −2
  270. libavformat/bfi.c +2 −2
  271. libavformat/bink.c +2 −2
  272. libavformat/c93.c +2 −2
  273. libavformat/cafdec.c +1 −1
  274. libavformat/cdg.c +1 −1
  275. libavformat/daud.c +1 −1
  276. libavformat/dsicin.c +2 −2
  277. libavformat/dv.c +2 −2
  278. libavformat/dvenc.c +4 −4
  279. libavformat/dxa.c +1 −1
  280. libavformat/eacdata.c +1 −1
  281. libavformat/electronicarts.c +2 −2
  282. libavformat/ffmdec.c +2 −2
  283. libavformat/ffmenc.c +2 −2
  284. libavformat/filmstripdec.c +1 −1
  285. libavformat/flacdec.c +1 −1
  286. libavformat/flic.c +1 −1
  287. libavformat/flvdec.c +3 −3
  288. libavformat/flvenc.c +4 −4
  289. libavformat/gif.c +2 −2
  290. libavformat/gxf.c +10 −10
  291. libavformat/gxfenc.c +8 −8
  292. libavformat/idcin.c +2 −2
  293. libavformat/idroq.c +2 −2
  294. libavformat/iff.c +7 −7
  295. libavformat/img2.c +4 −4
  296. libavformat/ipmovie.c +2 −2
  297. libavformat/iss.c +1 −1
  298. libavformat/iv8.c +1 −1
  299. libavformat/libnut.c +6 −6
  300. libavformat/lmlm4.c +2 −2
  301. libavformat/matroskadec.c +4 −4
  302. libavformat/matroskaenc.c +7 −7
  303. libavformat/mm.c +2 −2
  304. libavformat/mmf.c +1 −1
  305. libavformat/mov.c +19 −19
  306. libavformat/movenc.c +26 −26
  307. libavformat/mp3.c +1 −1
  308. libavformat/mpc.c +1 −1
  309. libavformat/mpc8.c +1 −1
  310. libavformat/mpeg.c +18 −18
  311. libavformat/mpegenc.c +5 −5
  312. libavformat/mpegts.c +29 −29
  313. libavformat/mpegtsenc.c +11 −11
  314. libavformat/msnwc_tcp.c +1 −1
  315. libavformat/mtv.c +2 −2
  316. libavformat/mvi.c +2 −2
  317. libavformat/mxf.c +3 −3
  318. libavformat/mxfdec.c +3 −3
  319. libavformat/mxfenc.c +3 −3
  320. libavformat/ncdec.c +1 −1
  321. libavformat/nsvdec.c +2 −2
  322. libavformat/nutdec.c +6 −6
  323. libavformat/nutenc.c +6 −6
  324. libavformat/nuv.c +2 −2
  325. libavformat/oggdec.c +1 −1
  326. libavformat/oggenc.c +2 −2
  327. libavformat/oggparsedirac.c +2 −2
  328. libavformat/oggparseflac.c +2 −2
  329. libavformat/oggparseogm.c +6 −6
  330. libavformat/oggparseskeleton.c +1 −1
  331. libavformat/oggparsespeex.c +1 −1
  332. libavformat/oggparsetheora.c +1 −1
  333. libavformat/oggparsevorbis.c +1 −1
  334. libavformat/oma.c +1 −1
  335. libavformat/output-example.c +2 −2
  336. libavformat/psxstr.c +2 −2
  337. libavformat/pva.c +2 −2
  338. libavformat/qcp.c +1 −1
  339. libavformat/r3d.c +2 −2
  340. libavformat/raw.c +7 −7
  341. libavformat/rdt.c +4 −4
  342. libavformat/riff.c +3 −3
  343. libavformat/rl2.c +2 −2
  344. libavformat/rmdec.c +9 −9
  345. libavformat/rmenc.c +5 −5
  346. libavformat/rpl.c +4 −4
  347. libavformat/rtp.c +29 −29
  348. libavformat/rtp.h +1 −1
  349. libavformat/rtpdec.c +3 −3
  350. libavformat/rtpdec.h +1 −1
  351. libavformat/rtpdec_amr.c +2 −2
  352. libavformat/rtpdec_asf.c +2 −2
  353. libavformat/rtpdec_h263.c +2 −2
  354. libavformat/rtpdec_h264.c +1 −1
  355. libavformat/rtpdec_theora.c +1 −1
  356. libavformat/rtpdec_vorbis.c +1 −1
  357. libavformat/rtpenc.c +4 −4
  358. libavformat/rtsp.c +7 −7
  359. libavformat/sdp.c +4 −4
  360. libavformat/segafilm.c +2 −2
  361. libavformat/sierravmd.c +2 −2
  362. libavformat/siff.c +2 −2
  363. libavformat/smacker.c +2 −2
  364. libavformat/sol.c +1 −1
  365. libavformat/soxdec.c +1 −1
  366. libavformat/swfdec.c +7 −7
  367. libavformat/swfenc.c +3 −3
  368. libavformat/thp.c +2 −2
  369. libavformat/tiertexseq.c +2 −2
  370. libavformat/tmv.c +2 −2
  371. libavformat/tta.c +1 −1
  372. libavformat/txd.c +1 −1
  373. libavformat/utils.c +38 −38
  374. libavformat/vc1test.c +1 −1
  375. libavformat/vocdec.c +1 −1
  376. libavformat/vocenc.c +1 −1
  377. libavformat/vqf.c +1 −1
  378. libavformat/wc3movie.c +2 −2
  379. libavformat/westwood.c +3 −3
  380. libavformat/wv.c +1 −1
  381. libavformat/xa.c +1 −1
  382. libavformat/yop.c +2 −2
  383. libavformat/yuv4mpeg.c +1 −1
cmdutils.c+8−8
@@ -48,7 +48,7 @@ · 47 unmodified lines
4848
4949 const char **opt_names;
5050 static int opt_name_count;
51−AVCodecContext *avcodec_opts[CODEC_TYPE_NB];
51+AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB];
5252 AVFormatContext *avformat_opts;
5353 struct SwsContext *sws_opts;
5454
@@ -191,7 +191,7 @@ int opt_default(const char *opt, const char *arg){ · 136 unmodified lines
191191 const AVOption *o= NULL;
192192 int opt_types[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0};
193193
194− for(type=0; type<CODEC_TYPE_NB && ret>= 0; type++){
194+ for(type=0; type<AVMEDIA_TYPE_NB && ret>= 0; type++){
195195 const AVOption *o2 = av_find_opt(avcodec_opts[0], opt, NULL, opt_types[type], opt_types[type]);
196196 if(o2)
197197 ret = av_set_string3(avcodec_opts[type], opt, arg, 1, &o);
@@ -202,11 +202,11 @@ int opt_default(const char *opt, const char *arg){ · 4 unmodified lines
202202 ret = av_set_string3(sws_opts, opt, arg, 1, &o);
203203 if(!o){
204204 if(opt[0] == 'a')
205− ret = av_set_string3(avcodec_opts[CODEC_TYPE_AUDIO], opt+1, arg, 1, &o);
205+ ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_AUDIO], opt+1, arg, 1, &o);
206206 else if(opt[0] == 'v')
207− ret = av_set_string3(avcodec_opts[CODEC_TYPE_VIDEO], opt+1, arg, 1, &o);
207+ ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_VIDEO], opt+1, arg, 1, &o);
208208 else if(opt[0] == 's')
209− ret = av_set_string3(avcodec_opts[CODEC_TYPE_SUBTITLE], opt+1, arg, 1, &o);
209+ ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_SUBTITLE], opt+1, arg, 1, &o);
210210 }
211211 if (o && ret < 0) {
212212 fprintf(stderr, "Invalid value '%s' for option '%s'\n", arg, opt);
@@ -535,13 +535,13 @@ void show_codecs(void) · 322 unmodified lines
535535 last_name= p2->name;
536536
537537 switch(p2->type) {
538− case CODEC_TYPE_VIDEO:
538+ case AVMEDIA_TYPE_VIDEO:
539539 type_str = "V";
540540 break;
541− case CODEC_TYPE_AUDIO:
541+ case AVMEDIA_TYPE_AUDIO:
542542 type_str = "A";
543543 break;
544− case CODEC_TYPE_SUBTITLE:
544+ case AVMEDIA_TYPE_SUBTITLE:
545545 type_str = "S";
546546 break;
547547 default:
cmdutils.h+1−1
@@ -40,7 +40,7 @@ extern const int program_birth_year; · 39 unmodified lines
4040 extern const int this_year;
4141
4242 extern const char **opt_names;
43−extern AVCodecContext *avcodec_opts[CODEC_TYPE_NB];
43+extern AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB];
4444 extern AVFormatContext *avformat_opts;
4545 extern struct SwsContext *sws_opts;
4646
ffmpeg.c+75−75
@@ -452,7 +452,7 @@ static int av_exit(int ret) · 451 unmodified lines
452452 powerpc_display_perf_report();
453453 #endif /* CONFIG_POWERPC_PERF */
454454
455− for (i=0;i<CODEC_TYPE_NB;i++)
455+ for (i=0;i<AVMEDIA_TYPE_NB;i++)
456456 av_free(avcodec_opts[i]);
457457 av_free(avformat_opts);
458458 av_free(sws_opts);
@@ -527,9 +527,9 @@ static int read_ffserver_streams(AVFormatContext *s, const char *filename) · 68 unmodified lines
527527 memcpy(st->codec, ic->streams[i]->codec, sizeof(AVCodecContext));
528528 s->streams[i] = st;
529529
530− if (st->codec->codec_type == CODEC_TYPE_AUDIO && audio_stream_copy)
530+ if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && audio_stream_copy)
531531 st->stream_copy = 1;
532− else if (st->codec->codec_type == CODEC_TYPE_VIDEO && video_stream_copy)
532+ else if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && video_stream_copy)
533533 st->stream_copy = 1;
534534
535535 if(!st->codec->thread_count)
@@ -967,7 +967,7 @@ static void do_video_out(AVFormatContext *s, · 431 unmodified lines
967967 }else
968968 ost->sync_opts= lrintf(sync_ipts);
969969
970− nb_frames= FFMIN(nb_frames, max_frames[CODEC_TYPE_VIDEO] - ost->frame_number);
970+ nb_frames= FFMIN(nb_frames, max_frames[AVMEDIA_TYPE_VIDEO] - ost->frame_number);
971971 if (nb_frames <= 0)
972972 return;
973973
@@ -1088,7 +1088,7 @@ static void do_video_out(AVFormatContext *s, · 114 unmodified lines
10881088 /* better than nothing: use input picture interlaced
10891089 settings */
10901090 big_picture.interlaced_frame = in_picture->interlaced_frame;
1091− if(avcodec_opts[CODEC_TYPE_VIDEO]->flags & (CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME)){
1091+ if(avcodec_opts[AVMEDIA_TYPE_VIDEO]->flags & (CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME)){
10921092 if(top_field_first == -1)
10931093 big_picture.top_field_first = in_picture->top_field_first;
10941094 else
@@ -1163,7 +1163,7 @@ static void do_video_stats(AVFormatContext *os, AVOutputStream *ost, · 68 unmodified lines
11631163 }
11641164
11651165 enc = ost->st->codec;
1166− if (enc->codec_type == CODEC_TYPE_VIDEO) {
1166+ if (enc->codec_type == AVMEDIA_TYPE_VIDEO) {
11671167 frame_number = ost->frame_number;
11681168 fprintf(vstats_file, "frame= %5d q= %2.1f ", frame_number, enc->coded_frame->quality/(float)FF_QP2LAMBDA);
11691169 if (enc->flags&CODEC_FLAG_PSNR)
@@ -1223,12 +1223,12 @@ static void print_report(AVFormatContext **output_files, · 53 unmodified lines
12231223 for(i=0;i<nb_ostreams;i++) {
12241224 ost = ost_table[i];
12251225 enc = ost->st->codec;
1226− if (vid && enc->codec_type == CODEC_TYPE_VIDEO) {
1226+ if (vid && enc->codec_type == AVMEDIA_TYPE_VIDEO) {
12271227 snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "q=%2.1f ",
12281228 !ost->st->stream_copy ?
12291229 enc->coded_frame->quality/(float)FF_QP2LAMBDA : -1);
12301230 }
1231− if (!vid && enc->codec_type == CODEC_TYPE_VIDEO) {
1231+ if (!vid && enc->codec_type == AVMEDIA_TYPE_VIDEO) {
12321232 float t = (av_gettime()-timer_start) / 1000000.0;
12331233
12341234 frame_number = ost->frame_number;
@@ -1360,7 +1360,7 @@ static int output_packet(AVInputStream *ist, int ist_index, · 125 unmodified lines
13601360 subtitle_to_free = NULL;
13611361 if (ist->decoding_needed) {
13621362 switch(ist->st->codec->codec_type) {
1363− case CODEC_TYPE_AUDIO:{
1363+ case AVMEDIA_TYPE_AUDIO:{
13641364 if(pkt && samples_size < FFMAX(pkt->size*sizeof(*samples), AVCODEC_MAX_AUDIO_FRAME_SIZE)) {
13651365 samples_size = FFMAX(pkt->size*sizeof(*samples), AVCODEC_MAX_AUDIO_FRAME_SIZE);
13661366 av_free(samples);
@@ -1386,7 +1386,7 @@ static int output_packet(AVInputStream *ist, int ist_index, · 19 unmodified lines
13861386 ist->next_pts += ((int64_t)AV_TIME_BASE/bps * decoded_data_size) /
13871387 (ist->st->codec->sample_rate * ist->st->codec->channels);
13881388 break;}
1389− case CODEC_TYPE_VIDEO:
1389+ case AVMEDIA_TYPE_VIDEO:
13901390 decoded_data_size = (ist->st->codec->width * ist->st->codec->height * 3) / 2;
13911391 /* XXX: allocate picture correctly */
13921392 avcodec_get_frame_defaults(&picture);
@@ -1408,7 +1408,7 @@ static int output_packet(AVInputStream *ist, int ist_index, · 15 unmodified lines
14081408 }
14091409 avpkt.size = 0;
14101410 break;
1411− case CODEC_TYPE_SUBTITLE:
1411+ case AVMEDIA_TYPE_SUBTITLE:
14121412 ret = avcodec_decode_subtitle2(ist->st->codec,
14131413 &subtitle, &got_subtitle, &avpkt);
14141414 if (ret < 0)
@@ -1424,11 +1424,11 @@ static int output_packet(AVInputStream *ist, int ist_index, · 9 unmodified lines
14241424 }
14251425 } else {
14261426 switch(ist->st->codec->codec_type) {
1427− case CODEC_TYPE_AUDIO:
1427+ case AVMEDIA_TYPE_AUDIO:
14281428 ist->next_pts += ((int64_t)AV_TIME_BASE * ist->st->codec->frame_size) /
14291429 ist->st->codec->sample_rate;
14301430 break;
1431− case CODEC_TYPE_VIDEO:
1431+ case AVMEDIA_TYPE_VIDEO:
14321432 if (ist->st->codec->time_base.num != 0) {
14331433 int ticks= ist->st->parser ? ist->st->parser->repeat_pict+1 : ist->st->codec->ticks_per_frame;
14341434 ist->next_pts += ((int64_t)AV_TIME_BASE *
@@ -1442,13 +1442,13 @@ static int output_packet(AVInputStream *ist, int ist_index, · 7 unmodified lines
14421442 }
14431443
14441444 buffer_to_free = NULL;
1445− if (ist->st->codec->codec_type == CODEC_TYPE_VIDEO) {
1445+ if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
14461446 pre_process_video_frame(ist, (AVPicture *)&picture,
14471447 &buffer_to_free);
14481448 }
14491449
14501450 // preprocess audio (volume)
1451− if (ist->st->codec->codec_type == CODEC_TYPE_AUDIO) {
1451+ if (ist->st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
14521452 if (audio_volume != 256) {
14531453 short *volp;
14541454 volp = samples;
@@ -1485,15 +1485,15 @@ static int output_packet(AVInputStream *ist, int ist_index, · 30 unmodified lines
14851485 if (ost->encoding_needed) {
14861486 assert(ist->decoding_needed);
14871487 switch(ost->st->codec->codec_type) {
1488− case CODEC_TYPE_AUDIO:
1488+ case AVMEDIA_TYPE_AUDIO:
14891489 do_audio_out(os, ost, ist, decoded_data_buf, decoded_data_size);
14901490 break;
1491− case CODEC_TYPE_VIDEO:
1491+ case AVMEDIA_TYPE_VIDEO:
14921492 do_video_out(os, ost, ist, &picture, &frame_size);
14931493 if (vstats_filename && frame_size)
14941494 do_video_stats(os, ost, frame_size);
14951495 break;
1496− case CODEC_TYPE_SUBTITLE:
1496+ case AVMEDIA_TYPE_SUBTITLE:
14971497 do_subtitle_out(os, ost, ist, &subtitle,
14981498 pkt->pts);
14991499 break;
@@ -1517,9 +1517,9 @@ static int output_packet(AVInputStream *ist, int ist_index, · 17 unmodified lines
15171517 ost->st->codec->coded_frame= &avframe;
15181518 avframe.key_frame = pkt->flags & PKT_FLAG_KEY;
15191519
1520− if(ost->st->codec->codec_type == CODEC_TYPE_AUDIO)
1520+ if(ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
15211521 audio_size += data_size;
1522− else if (ost->st->codec->codec_type == CODEC_TYPE_VIDEO) {
1522+ else if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
15231523 video_size += data_size;
15241524 ost->sync_opts++;
15251525 }
@@ -1583,9 +1583,9 @@ static int output_packet(AVInputStream *ist, int ist_index, · 57 unmodified lines
15831583 AVCodecContext *enc= ost->st->codec;
15841584 os = output_files[ost->file_index];
15851585
1586− if(ost->st->codec->codec_type == CODEC_TYPE_AUDIO && enc->frame_size <=1)
1586+ if(ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO && enc->frame_size <=1)
15871587 continue;
1588− if(ost->st->codec->codec_type == CODEC_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE))
1588+ if(ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE))
15891589 continue;
15901590
15911591 if (ost->encoding_needed) {
@@ -1596,7 +1596,7 @@ static int output_packet(AVInputStream *ist, int ist_index, · 4 unmodified lines
15961596 pkt.stream_index= ost->index;
15971597
15981598 switch(ost->st->codec->codec_type) {
1599− case CODEC_TYPE_AUDIO:
1599+ case AVMEDIA_TYPE_AUDIO:
16001600 fifo_bytes = av_fifo_size(ost->fifo);
16011601 ret = 0;
16021602 /* encode any samples remaining in fifo */
@@ -1629,7 +1629,7 @@ static int output_packet(AVInputStream *ist, int ist_index, · 26 unmodified lines
16291629 audio_size += ret;
16301630 pkt.flags |= PKT_FLAG_KEY;
16311631 break;
1632− case CODEC_TYPE_VIDEO:
1632+ case AVMEDIA_TYPE_VIDEO:
16331633 ret = avcodec_encode_video(enc, bit_buffer, bit_buffer_size, NULL);
16341634 if (ret < 0) {
16351635 fprintf(stderr, "Video encoding failed\n");
@@ -1946,7 +1946,7 @@ static int av_encode(AVFormatContext **output_files, · 310 unmodified lines
19461946 }else
19471947 codec->time_base = ist->st->time_base;
19481948 switch(codec->codec_type) {
1949− case CODEC_TYPE_AUDIO:
1949+ case AVMEDIA_TYPE_AUDIO:
19501950 if(audio_volume != 256) {
19511951 fprintf(stderr,"-acodec copy and -vol are incompatible (frames are not decoded)\n");
19521952 av_exit(1);
@@ -1961,13 +1961,13 @@ static int av_encode(AVFormatContext **output_files, · 8 unmodified lines
19611961 if(codec->codec_id == CODEC_ID_AC3)
19621962 codec->block_align= 0;
19631963 break;
1964− case CODEC_TYPE_VIDEO:
1964+ case AVMEDIA_TYPE_VIDEO:
19651965 codec->pix_fmt = icodec->pix_fmt;
19661966 codec->width = icodec->width;
19671967 codec->height = icodec->height;
19681968 codec->has_b_frames = icodec->has_b_frames;
19691969 break;
1970− case CODEC_TYPE_SUBTITLE:
1970+ case AVMEDIA_TYPE_SUBTITLE:
19711971 codec->width = icodec->width;
19721972 codec->height = icodec->height;
19731973 break;
@@ -1976,7 +1976,7 @@ static int av_encode(AVFormatContext **output_files, · 2 unmodified lines
19761976 }
19771977 } else {
19781978 switch(codec->codec_type) {
1979− case CODEC_TYPE_AUDIO:
1979+ case AVMEDIA_TYPE_AUDIO:
19801980 ost->fifo= av_fifo_alloc(1024);
19811981 if(!ost->fifo)
19821982 goto fail;
@@ -1986,7 +1986,7 @@ static int av_encode(AVFormatContext **output_files, · 3 unmodified lines
19861986 ist->decoding_needed = 1;
19871987 ost->encoding_needed = 1;
19881988 break;
1989− case CODEC_TYPE_VIDEO:
1989+ case AVMEDIA_TYPE_VIDEO:
19901990 if (ost->st->codec->pix_fmt == PIX_FMT_NONE) {
19911991 fprintf(stderr, "Video pixel format is unknown, stream cannot be encoded\n");
19921992 av_exit(1);
@@ -2050,7 +2050,7 @@ static int av_encode(AVFormatContext **output_files, · 57 unmodified lines
20502050 ost->encoding_needed = 1;
20512051 ist->decoding_needed = 1;
20522052 break;
2053− case CODEC_TYPE_SUBTITLE:
2053+ case AVMEDIA_TYPE_SUBTITLE:
20542054 ost->encoding_needed = 1;
20552055 ist->decoding_needed = 1;
20562056 break;
@@ -2098,7 +2098,7 @@ static int av_encode(AVFormatContext **output_files, · 41 unmodified lines
20982098 }
20992099 }
21002100 }
2101− if(codec->codec_type == CODEC_TYPE_VIDEO){
2101+ if(codec->codec_type == AVMEDIA_TYPE_VIDEO){
21022102 int size= codec->width * codec->height;
21032103 bit_buffer_size= FFMAX(bit_buffer_size, 6*size + 200);
21042104 }
@@ -2155,7 +2155,7 @@ static int av_encode(AVFormatContext **output_files, · 50 unmodified lines
21552155 ret = AVERROR(EINVAL);
21562156 goto dump_format;
21572157 }
2158− //if (ist->st->codec->codec_type == CODEC_TYPE_VIDEO)
2158+ //if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
21592159 // ist->st->codec->flags |= CODEC_FLAG_REPEAT_FIELD;
21602160 }
21612161 }
@@ -2528,7 +2528,7 @@ static int opt_frame_rate(const char *opt, const char *arg) · 366 unmodified lines
25282528
25292529 static int opt_bitrate(const char *opt, const char *arg)
25302530 {
2531− int codec_type = opt[0]=='a' ? CODEC_TYPE_AUDIO : CODEC_TYPE_VIDEO;
2531+ int codec_type = opt[0]=='a' ? AVMEDIA_TYPE_AUDIO : AVMEDIA_TYPE_VIDEO;
25322532
25332533 opt_default(opt, arg);
25342534
@@ -2781,7 +2781,7 @@ static void opt_codec(int *pstream_copy, char **pcodec_name, · 246 unmodified lines
27812781
27822782 static void opt_audio_codec(const char *arg)
27832783 {
2784− opt_codec(&audio_stream_copy, &audio_codec_name, CODEC_TYPE_AUDIO, arg);
2784+ opt_codec(&audio_stream_copy, &audio_codec_name, AVMEDIA_TYPE_AUDIO, arg);
27852785 }
27862786
27872787 static void opt_audio_tag(const char *arg)
@@ -2804,12 +2804,12 @@ static void opt_video_tag(const char *arg) · 16 unmodified lines
28042804
28052805 static void opt_video_codec(const char *arg)
28062806 {
2807− opt_codec(&video_stream_copy, &video_codec_name, CODEC_TYPE_VIDEO, arg);
2807+ opt_codec(&video_stream_copy, &video_codec_name, AVMEDIA_TYPE_VIDEO, arg);
28082808 }
28092809
28102810 static void opt_subtitle_codec(const char *arg)
28112811 {
2812− opt_codec(&subtitle_stream_copy, &subtitle_codec_name, CODEC_TYPE_SUBTITLE, arg);
2812+ opt_codec(&subtitle_stream_copy, &subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, arg);
28132813 }
28142814
28152815 static void opt_subtitle_tag(const char *arg)
@@ -2965,9 +2965,9 @@ static void opt_input_file(const char *filename) · 149 unmodified lines
29652965
29662966 set_context_opts(ic, avformat_opts, AV_OPT_FLAG_DECODING_PARAM);
29672967
2968− ic->video_codec_id = find_codec_or_die(video_codec_name , CODEC_TYPE_VIDEO , 0);
2969− ic->audio_codec_id = find_codec_or_die(audio_codec_name , CODEC_TYPE_AUDIO , 0);
2970− ic->subtitle_codec_id= find_codec_or_die(subtitle_codec_name, CODEC_TYPE_SUBTITLE, 0);
2968+ ic->video_codec_id = find_codec_or_die(video_codec_name , AVMEDIA_TYPE_VIDEO , 0);
2969+ ic->audio_codec_id = find_codec_or_die(audio_codec_name , AVMEDIA_TYPE_AUDIO , 0);
2970+ ic->subtitle_codec_id= find_codec_or_die(subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, 0);
29712971 ic->flags |= AVFMT_FLAG_NONBLOCK;
29722972
29732973 if(pgmyuv_compatibility_hack)
@@ -3035,8 +3035,8 @@ static void opt_input_file(const char *filename) · 61 unmodified lines
30353035 AVCodecContext *enc = st->codec;
30363036 avcodec_thread_init(enc, thread_count);
30373037 switch(enc->codec_type) {
3038− case CODEC_TYPE_AUDIO:
3039− set_context_opts(enc, avcodec_opts[CODEC_TYPE_AUDIO], AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM);
3038+ case AVMEDIA_TYPE_AUDIO:
3039+ set_context_opts(enc, avcodec_opts[AVMEDIA_TYPE_AUDIO], AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM);
30403040 //fprintf(stderr, "\nInput Audio channels: %d", enc->channels);
30413041 channel_layout = enc->channel_layout;
30423042 audio_channels = enc->channels;
@@ -3046,8 +3046,8 @@ static void opt_input_file(const char *filename) · 3 unmodified lines
30463046 if(audio_disable)
30473047 st->discard= AVDISCARD_ALL;
30483048 break;
3049− case CODEC_TYPE_VIDEO:
3050− set_context_opts(enc, avcodec_opts[CODEC_TYPE_VIDEO], AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM);
3049+ case AVMEDIA_TYPE_VIDEO:
3050+ set_context_opts(enc, avcodec_opts[AVMEDIA_TYPE_VIDEO], AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM);
30513051 frame_height = enc->height;
30523052 frame_width = enc->width;
30533053 if(ic->streams[i]->sample_aspect_ratio.num)
@@ -3084,15 +3084,15 @@ static void opt_input_file(const char *filename) · 30 unmodified lines
30843084 else if(video_discard)
30853085 st->discard= video_discard;
30863086 break;
3087− case CODEC_TYPE_DATA:
3087+ case AVMEDIA_TYPE_DATA:
30883088 break;
3089− case CODEC_TYPE_SUBTITLE:
3089+ case AVMEDIA_TYPE_SUBTITLE:
30903090 input_codecs[nb_icodecs++] = avcodec_find_decoder_by_name(subtitle_codec_name);
30913091 if(subtitle_disable)
30923092 st->discard = AVDISCARD_ALL;
30933093 break;
3094− case CODEC_TYPE_ATTACHMENT:
3095− case CODEC_TYPE_UNKNOWN:
3094+ case AVMEDIA_TYPE_ATTACHMENT:
3095+ case AVMEDIA_TYPE_UNKNOWN:
30963096 nb_icodecs++;
30973097 break;
30983098 default:
@@ -3129,18 +3129,18 @@ static void check_audio_video_sub_inputs(int *has_video_ptr, int *has_audio_ptr, · 30 unmodified lines
31293129 for(i=0;i<ic->nb_streams;i++) {
31303130 AVCodecContext *enc = ic->streams[i]->codec;
31313131 switch(enc->codec_type) {
3132− case CODEC_TYPE_AUDIO:
3132+ case AVMEDIA_TYPE_AUDIO:
31333133 has_audio = 1;
31343134 break;
3135− case CODEC_TYPE_VIDEO:
3135+ case AVMEDIA_TYPE_VIDEO:
31363136 has_video = 1;
31373137 break;
3138− case CODEC_TYPE_SUBTITLE:
3138+ case AVMEDIA_TYPE_SUBTITLE:
31393139 has_subtitle = 1;
31403140 break;
3141− case CODEC_TYPE_DATA:
3142− case CODEC_TYPE_ATTACHMENT:
3143− case CODEC_TYPE_UNKNOWN:
3141+ case AVMEDIA_TYPE_DATA:
3142+ case AVMEDIA_TYPE_ATTACHMENT:
3143+ case AVMEDIA_TYPE_UNKNOWN:
31443144 break;
31453145 default:
31463146 abort();
@@ -3163,7 +3163,7 @@ static void new_video_stream(AVFormatContext *oc) · 16 unmodified lines
31633163 fprintf(stderr, "Could not alloc stream\n");
31643164 av_exit(1);
31653165 }
3166− avcodec_get_context_defaults2(st->codec, CODEC_TYPE_VIDEO);
3166+ avcodec_get_context_defaults2(st->codec, AVMEDIA_TYPE_VIDEO);
31673167 bitstream_filters[nb_output_files][oc->nb_streams - 1]= video_bitstream_filters;
31683168 video_bitstream_filters= NULL;
31693169
@@ -3177,16 +3177,16 @@ static void new_video_stream(AVFormatContext *oc) · 7 unmodified lines
31773177 if( (video_global_header&1)
31783178 || (video_global_header==0 && (oc->oformat->flags & AVFMT_GLOBALHEADER))){
31793179 video_enc->flags |= CODEC_FLAG_GLOBAL_HEADER;
3180− avcodec_opts[CODEC_TYPE_VIDEO]->flags|= CODEC_FLAG_GLOBAL_HEADER;
3180+ avcodec_opts[AVMEDIA_TYPE_VIDEO]->flags|= CODEC_FLAG_GLOBAL_HEADER;
31813181 }
31823182 if(video_global_header&2){
31833183 video_enc->flags2 |= CODEC_FLAG2_LOCAL_HEADER;
3184− avcodec_opts[CODEC_TYPE_VIDEO]->flags2|= CODEC_FLAG2_LOCAL_HEADER;
3184+ avcodec_opts[AVMEDIA_TYPE_VIDEO]->flags2|= CODEC_FLAG2_LOCAL_HEADER;
31853185 }
31863186
31873187 if (video_stream_copy) {
31883188 st->stream_copy = 1;
3189− video_enc->codec_type = CODEC_TYPE_VIDEO;
3189+ video_enc->codec_type = AVMEDIA_TYPE_VIDEO;
31903190 video_enc->sample_aspect_ratio =
31913191 st->sample_aspect_ratio = av_d2q(frame_aspect_ratio*frame_height/frame_width, 255);
31923192 } else {
@@ -3196,17 +3196,17 @@ static void new_video_stream(AVFormatContext *oc) · 3 unmodified lines
31963196 AVRational fps= frame_rate.num ? frame_rate : (AVRational){25,1};
31973197
31983198 if (video_codec_name) {
3199− codec_id = find_codec_or_die(video_codec_name, CODEC_TYPE_VIDEO, 1);
3199+ codec_id = find_codec_or_die(video_codec_name, AVMEDIA_TYPE_VIDEO, 1);
32003200 codec = avcodec_find_encoder_by_name(video_codec_name);
32013201 output_codecs[nb_ocodecs] = codec;
32023202 } else {
3203− codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, CODEC_TYPE_VIDEO);
3203+ codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, AVMEDIA_TYPE_VIDEO);
32043204 codec = avcodec_find_encoder(codec_id);
32053205 }
32063206
32073207 video_enc->codec_id = codec_id;
32083208
3209− set_context_opts(video_enc, avcodec_opts[CODEC_TYPE_VIDEO], AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM);
3209+ set_context_opts(video_enc, avcodec_opts[AVMEDIA_TYPE_VIDEO], AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM);
32103210
32113211 if (codec && codec->supported_framerates && !force_fps)
32123212 fps = codec->supported_framerates[av_find_nearest_q_idx(fps, codec->supported_framerates)];
@@ -3300,7 +3300,7 @@ static void new_audio_stream(AVFormatContext *oc) · 87 unmodified lines
33003300 fprintf(stderr, "Could not alloc stream\n");
33013301 av_exit(1);
33023302 }
3303− avcodec_get_context_defaults2(st->codec, CODEC_TYPE_AUDIO);
3303+ avcodec_get_context_defaults2(st->codec, AVMEDIA_TYPE_AUDIO);
33043304
33053305 bitstream_filters[nb_output_files][oc->nb_streams - 1]= audio_bitstream_filters;
33063306 audio_bitstream_filters= NULL;
@@ -3308,14 +3308,14 @@ static void new_audio_stream(AVFormatContext *oc) · 1 unmodified line
33083308 avcodec_thread_init(st->codec, thread_count);
33093309
33103310 audio_enc = st->codec;
3311− audio_enc->codec_type = CODEC_TYPE_AUDIO;
3311+ audio_enc->codec_type = AVMEDIA_TYPE_AUDIO;
33123312
33133313 if(audio_codec_tag)
33143314 audio_enc->codec_tag= audio_codec_tag;
33153315
33163316 if (oc->oformat->flags & AVFMT_GLOBALHEADER) {
33173317 audio_enc->flags |= CODEC_FLAG_GLOBAL_HEADER;
3318− avcodec_opts[CODEC_TYPE_AUDIO]->flags|= CODEC_FLAG_GLOBAL_HEADER;
3318+ avcodec_opts[AVMEDIA_TYPE_AUDIO]->flags|= CODEC_FLAG_GLOBAL_HEADER;
33193319 }
33203320 if (audio_stream_copy) {
33213321 st->stream_copy = 1;
@@ -3323,14 +3323,14 @@ static void new_audio_stream(AVFormatContext *oc) · 1 unmodified line
33233323 } else {
33243324 AVCodec *codec;
33253325
3326− set_context_opts(audio_enc, avcodec_opts[CODEC_TYPE_AUDIO], AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM);
3326+ set_context_opts(audio_enc, avcodec_opts[AVMEDIA_TYPE_AUDIO], AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM);
33273327
33283328 if (audio_codec_name) {
3329− codec_id = find_codec_or_die(audio_codec_name, CODEC_TYPE_AUDIO, 1);
3329+ codec_id = find_codec_or_die(audio_codec_name, AVMEDIA_TYPE_AUDIO, 1);
33303330 codec = avcodec_find_encoder_by_name(audio_codec_name);
33313331 output_codecs[nb_ocodecs] = codec;
33323332 } else {
3333− codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, CODEC_TYPE_AUDIO);
3333+ codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, AVMEDIA_TYPE_AUDIO);
33343334 codec = avcodec_find_encoder(codec_id);
33353335 }
33363336 audio_enc->codec_id = codec_id;
@@ -3370,13 +3370,13 @@ static void new_subtitle_stream(AVFormatContext *oc) · 33 unmodified lines
33703370 fprintf(stderr, "Could not alloc stream\n");
33713371 av_exit(1);
33723372 }
3373− avcodec_get_context_defaults2(st->codec, CODEC_TYPE_SUBTITLE);
3373+ avcodec_get_context_defaults2(st->codec, AVMEDIA_TYPE_SUBTITLE);
33743374
33753375 bitstream_filters[nb_output_files][oc->nb_streams - 1]= subtitle_bitstream_filters;
33763376 subtitle_bitstream_filters= NULL;
33773377
33783378 subtitle_enc = st->codec;
3379− subtitle_enc->codec_type = CODEC_TYPE_SUBTITLE;
3379+ subtitle_enc->codec_type = AVMEDIA_TYPE_SUBTITLE;
33803380
33813381 if(subtitle_codec_tag)
33823382 subtitle_enc->codec_tag= subtitle_codec_tag;
@@ -3384,8 +3384,8 @@ static void new_subtitle_stream(AVFormatContext *oc) · 1 unmodified line
33843384 if (subtitle_stream_copy) {
33853385 st->stream_copy = 1;
33863386 } else {
3387− set_context_opts(avcodec_opts[CODEC_TYPE_SUBTITLE], subtitle_enc, AV_OPT_FLAG_SUBTITLE_PARAM | AV_OPT_FLAG_ENCODING_PARAM);
3388− subtitle_enc->codec_id = find_codec_or_die(subtitle_codec_name, CODEC_TYPE_SUBTITLE, 1);
3387+ set_context_opts(avcodec_opts[AVMEDIA_TYPE_SUBTITLE], subtitle_enc, AV_OPT_FLAG_SUBTITLE_PARAM | AV_OPT_FLAG_ENCODING_PARAM);
3388+ subtitle_enc->codec_id = find_codec_or_die(subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, 1);
33893389 output_codecs[nb_ocodecs] = avcodec_find_encoder_by_name(subtitle_codec_name);
33903390 }
33913391 nb_ocodecs++;
@@ -3739,7 +3739,7 @@ static void opt_target(const char *arg) · 347 unmodified lines
37393739 for(j = 0; j < nb_input_files; j++) {
37403740 for(i = 0; i < input_files[j]->nb_streams; i++) {
37413741 AVCodecContext *c = input_files[j]->streams[i]->codec;
3742− if(c->codec_type != CODEC_TYPE_VIDEO)
3742+ if(c->codec_type != AVMEDIA_TYPE_VIDEO)
37433743 continue;
37443744 fr = c->time_base.den * 1000 / c->time_base.num;
37453745 if(fr == 25000) {
@@ -3965,7 +3965,7 @@ static const OptionDef options[] = { · 219 unmodified lines
39653965 { "itsscale", HAS_ARG, {(void*)opt_input_ts_scale}, "set the input ts scale", "stream:scale" },
39663966 { "timestamp", OPT_FUNC2 | HAS_ARG, {(void*)opt_rec_timestamp}, "set the timestamp ('now' to set the current time)", "time" },
39673967 { "metadata", OPT_FUNC2 | HAS_ARG, {(void*)opt_metadata}, "add metadata", "string=string" },
3968− { "dframes", OPT_INT | HAS_ARG, {(void*)&max_frames[CODEC_TYPE_DATA]}, "set the number of data frames to record", "number" },
3968+ { "dframes", OPT_INT | HAS_ARG, {(void*)&max_frames[AVMEDIA_TYPE_DATA]}, "set the number of data frames to record", "number" },
39693969 { "benchmark", OPT_BOOL | OPT_EXPERT, {(void*)&do_benchmark},
39703970 "add timings for benchmarking" },
39713971 { "timelimit", OPT_FUNC2 | HAS_ARG, {(void*)opt_timelimit}, "set max runtime in seconds", "limit" },
@@ -3993,7 +3993,7 @@ static const OptionDef options[] = { · 21 unmodified lines
39933993 /* video options */
39943994 { "b", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_bitrate}, "set bitrate (in bits/s)", "bitrate" },
39953995 { "vb", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_bitrate}, "set bitrate (in bits/s)", "bitrate" },
3996− { "vframes", OPT_INT | HAS_ARG | OPT_VIDEO, {(void*)&max_frames[CODEC_TYPE_VIDEO]}, "set the number of video frames to record", "number" },
3996+ { "vframes", OPT_INT | HAS_ARG | OPT_VIDEO, {(void*)&max_frames[AVMEDIA_TYPE_VIDEO]}, "set the number of video frames to record", "number" },
39973997 { "r", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_frame_rate}, "set frame rate (Hz value, fraction or abbreviation)", "rate" },
39983998 { "s", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_size}, "set frame size (WxH or abbreviation)", "size" },
39993999 { "aspect", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_aspect_ratio}, "set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)", "aspect" },
@@ -4035,7 +4035,7 @@ static const OptionDef options[] = { · 35 unmodified lines
40354035
40364036 /* audio options */
40374037 { "ab", OPT_FUNC2 | HAS_ARG | OPT_AUDIO, {(void*)opt_bitrate}, "set bitrate (in bits/s)", "bitrate" },
4038− { "aframes", OPT_INT | HAS_ARG | OPT_AUDIO, {(void*)&max_frames[CODEC_TYPE_AUDIO]}, "set the number of audio frames to record", "number" },
4038+ { "aframes", OPT_INT | HAS_ARG | OPT_AUDIO, {(void*)&max_frames[AVMEDIA_TYPE_AUDIO]}, "set the number of audio frames to record", "number" },
40394039 { "aq", OPT_FLOAT | HAS_ARG | OPT_AUDIO, {(void*)&audio_qscale}, "set audio quality (codec-specific)", "quality", },
40404040 { "ar", HAS_ARG | OPT_FUNC2 | OPT_AUDIO, {(void*)opt_audio_rate}, "set audio sampling rate (in Hz)", "rate" },
40414041 { "ac", HAS_ARG | OPT_FUNC2 | OPT_AUDIO, {(void*)opt_audio_channels}, "set number of audio channels", "channels" },
@@ -4090,7 +4090,7 @@ int main(int argc, char **argv) · 48 unmodified lines
40904090 url_set_interrupt_cb(decode_interrupt_cb);
40914091 #endif
40924092
4093− for(i=0; i<CODEC_TYPE_NB; i++){
4093+ for(i=0; i<AVMEDIA_TYPE_NB; i++){
40944094 avcodec_opts[i]= avcodec_alloc_context2(i);
40954095 }
40964096 avformat_opts = avformat_alloc_context();
ffplay.c+46−46
@@ -234,10 +234,10 @@ static int frame_height = 0; · 233 unmodified lines
234234 static enum PixelFormat frame_pix_fmt = PIX_FMT_NONE;
235235 static int audio_disable;
236236 static int video_disable;
237−static int wanted_stream[CODEC_TYPE_NB]={
238− [CODEC_TYPE_AUDIO]=-1,
239− [CODEC_TYPE_VIDEO]=-1,
240− [CODEC_TYPE_SUBTITLE]=-1,
237+static int wanted_stream[AVMEDIA_TYPE_NB]={
238+ [AVMEDIA_TYPE_AUDIO]=-1,
239+ [AVMEDIA_TYPE_VIDEO]=-1,
240+ [AVMEDIA_TYPE_SUBTITLE]=-1,
241241 };
242242 static int seek_by_bytes=-1;
243243 static int display_disable;
@@ -1643,7 +1643,7 @@ static AVFilter input_filter = · 1399 unmodified lines
16431643
16441644 .inputs = (AVFilterPad[]) {{ .name = NULL }},
16451645 .outputs = (AVFilterPad[]) {{ .name = "default",
1646− .type = CODEC_TYPE_VIDEO,
1646+ .type = AVMEDIA_TYPE_VIDEO,
16471647 .request_frame = input_request_frame,
16481648 .config_props = input_config_props, },
16491649 { .name = NULL }},
@@ -1689,7 +1689,7 @@ static AVFilter output_filter = · 39 unmodified lines
16891689 .query_formats = output_query_formats,
16901690
16911691 .inputs = (AVFilterPad[]) {{ .name = "default",
1692− .type = CODEC_TYPE_VIDEO,
1692+ .type = AVMEDIA_TYPE_VIDEO,
16931693 .end_frame = output_end_frame,
16941694 .min_perms = AV_PERM_READ, },
16951695 { .name = NULL }},
@@ -2122,7 +2122,7 @@ static int stream_component_open(VideoState *is, int stream_index) · 426 unmodified lines
21222122 avctx = ic->streams[stream_index]->codec;
21232123
21242124 /* prepare audio output */
2125− if (avctx->codec_type == CODEC_TYPE_AUDIO) {
2125+ if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) {
21262126 if (avctx->channels > 0) {
21272127 avctx->request_channels = FFMIN(2, avctx->channels);
21282128 } else {
@@ -2152,7 +2152,7 @@ static int stream_component_open(VideoState *is, int stream_index) · 23 unmodified lines
21522152 return -1;
21532153
21542154 /* prepare audio output */
2155− if (avctx->codec_type == CODEC_TYPE_AUDIO) {
2155+ if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) {
21562156 wanted_spec.freq = avctx->sample_rate;
21572157 wanted_spec.format = AUDIO_S16SYS;
21582158 wanted_spec.channels = avctx->channels;
@@ -2170,7 +2170,7 @@ static int stream_component_open(VideoState *is, int stream_index) · 11 unmodified lines
21702170
21712171 ic->streams[stream_index]->discard = AVDISCARD_DEFAULT;
21722172 switch(avctx->codec_type) {
2173− case CODEC_TYPE_AUDIO:
2173+ case AVMEDIA_TYPE_AUDIO:
21742174 is->audio_stream = stream_index;
21752175 is->audio_st = ic->streams[stream_index];
21762176 is->audio_buf_size = 0;
@@ -2187,7 +2187,7 @@ static int stream_component_open(VideoState *is, int stream_index) · 10 unmodified lines
21872187 packet_queue_init(&is->audioq);
21882188 SDL_PauseAudio(0);
21892189 break;
2190− case CODEC_TYPE_VIDEO:
2190+ case AVMEDIA_TYPE_VIDEO:
21912191 is->video_stream = stream_index;
21922192 is->video_st = ic->streams[stream_index];
21932193
@@ -2196,7 +2196,7 @@ static int stream_component_open(VideoState *is, int stream_index) · 2 unmodified lines
21962196 packet_queue_init(&is->videoq);
21972197 is->video_tid = SDL_CreateThread(video_thread, is);
21982198 break;
2199− case CODEC_TYPE_SUBTITLE:
2199+ case AVMEDIA_TYPE_SUBTITLE:
22002200 is->subtitle_stream = stream_index;
22012201 is->subtitle_st = ic->streams[stream_index];
22022202 packet_queue_init(&is->subtitleq);
@@ -2219,7 +2219,7 @@ static void stream_component_close(VideoState *is, int stream_index) · 16 unmodified lines
22192219 avctx = ic->streams[stream_index]->codec;
22202220
22212221 switch(avctx->codec_type) {
2222− case CODEC_TYPE_AUDIO:
2222+ case AVMEDIA_TYPE_AUDIO:
22232223 packet_queue_abort(&is->audioq);
22242224
22252225 SDL_CloseAudio();
@@ -2229,7 +2229,7 @@ static void stream_component_close(VideoState *is, int stream_index) · 3 unmodified lines
22292229 av_audio_convert_free(is->reformat_ctx);
22302230 is->reformat_ctx = NULL;
22312231 break;
2232− case CODEC_TYPE_VIDEO:
2232+ case AVMEDIA_TYPE_VIDEO:
22332233 packet_queue_abort(&is->videoq);
22342234
22352235 /* note: we also signal this mutex to make sure we deblock the
@@ -2242,7 +2242,7 @@ static void stream_component_close(VideoState *is, int stream_index) · 6 unmodified lines
22422242
22432243 packet_queue_end(&is->videoq);
22442244 break;
2245− case CODEC_TYPE_SUBTITLE:
2245+ case AVMEDIA_TYPE_SUBTITLE:
22462246 packet_queue_abort(&is->subtitleq);
22472247
22482248 /* note: we also signal this mutex to make sure we deblock the
@@ -2264,15 +2264,15 @@ static void stream_component_close(VideoState *is, int stream_index) · 15 unmodified lines
22642264 ic->streams[stream_index]->discard = AVDISCARD_ALL;
22652265 avcodec_close(avctx);
22662266 switch(avctx->codec_type) {
2267− case CODEC_TYPE_AUDIO:
2267+ case AVMEDIA_TYPE_AUDIO:
22682268 is->audio_st = NULL;
22692269 is->audio_stream = -1;
22702270 break;
2271− case CODEC_TYPE_VIDEO:
2271+ case AVMEDIA_TYPE_VIDEO:
22722272 is->video_st = NULL;
22732273 is->video_stream = -1;
22742274 break;
2275− case CODEC_TYPE_SUBTITLE:
2275+ case AVMEDIA_TYPE_SUBTITLE:
22762276 is->subtitle_st = NULL;
22772277 is->subtitle_stream = -1;
22782278 break;
@@ -2296,9 +2296,9 @@ static int decode_thread(void *arg) · 17 unmodified lines
22962296 VideoState *is = arg;
22972297 AVFormatContext *ic;
22982298 int err, i, ret;
2299− int st_index[CODEC_TYPE_NB];
2300− int st_count[CODEC_TYPE_NB]={0};
2301− int st_best_packet_count[CODEC_TYPE_NB];
2299+ int st_index[AVMEDIA_TYPE_NB];
2300+ int st_count[AVMEDIA_TYPE_NB]={0};
2301+ int st_best_packet_count[AVMEDIA_TYPE_NB];
23022302 AVPacket pkt1, *pkt = &pkt1;
23032303 AVFormatParameters params, *ap = &params;
23042304 int eof=0;
@@ -2366,7 +2366,7 @@ static int decode_thread(void *arg) · 61 unmodified lines
23662366 AVStream *st= ic->streams[i];
23672367 AVCodecContext *avctx = st->codec;
23682368 ic->streams[i]->discard = AVDISCARD_ALL;
2369− if(avctx->codec_type >= (unsigned)CODEC_TYPE_NB)
2369+ if(avctx->codec_type >= (unsigned)AVMEDIA_TYPE_NB)
23702370 continue;
23712371 if(st_count[avctx->codec_type]++ != wanted_stream[avctx->codec_type] && wanted_stream[avctx->codec_type] >= 0)
23722372 continue;
@@ -2376,12 +2376,12 @@ static int decode_thread(void *arg) · 3 unmodified lines
23762376 st_best_packet_count[avctx->codec_type]= st->codec_info_nb_frames;
23772377
23782378 switch(avctx->codec_type) {
2379− case CODEC_TYPE_AUDIO:
2379+ case AVMEDIA_TYPE_AUDIO:
23802380 if (!audio_disable)
2381− st_index[CODEC_TYPE_AUDIO] = i;
2381+ st_index[AVMEDIA_TYPE_AUDIO] = i;
23822382 break;
2383− case CODEC_TYPE_VIDEO:
2384− case CODEC_TYPE_SUBTITLE:
2383+ case AVMEDIA_TYPE_VIDEO:
2384+ case AVMEDIA_TYPE_SUBTITLE:
23852385 if (!video_disable)
23862386 st_index[avctx->codec_type] = i;
23872387 break;
@@ -2394,13 +2394,13 @@ static int decode_thread(void *arg) · 6 unmodified lines
23942394 }
23952395
23962396 /* open the streams */
2397− if (st_index[CODEC_TYPE_AUDIO] >= 0) {
2398− stream_component_open(is, st_index[CODEC_TYPE_AUDIO]);
2397+ if (st_index[AVMEDIA_TYPE_AUDIO] >= 0) {
2398+ stream_component_open(is, st_index[AVMEDIA_TYPE_AUDIO]);
23992399 }
24002400
24012401 ret=-1;
2402− if (st_index[CODEC_TYPE_VIDEO] >= 0) {
2403− ret= stream_component_open(is, st_index[CODEC_TYPE_VIDEO]);
2402+ if (st_index[AVMEDIA_TYPE_VIDEO] >= 0) {
2403+ ret= stream_component_open(is, st_index[AVMEDIA_TYPE_VIDEO]);
24042404 }
24052405 is->refresh_tid = SDL_CreateThread(refresh_thread, is);
24062406 if(ret<0) {
@@ -2408,8 +2408,8 @@ static int decode_thread(void *arg) · 1 unmodified line
24082408 is->show_audio = 2;
24092409 }
24102410
2411− if (st_index[CODEC_TYPE_SUBTITLE] >= 0) {
2412− stream_component_open(is, st_index[CODEC_TYPE_SUBTITLE]);
2411+ if (st_index[AVMEDIA_TYPE_SUBTITLE] >= 0) {
2412+ stream_component_open(is, st_index[AVMEDIA_TYPE_SUBTITLE]);
24132413 }
24142414
24152415 if (is->video_stream < 0 && is->audio_stream < 0) {
@@ -2612,19 +2612,19 @@ static void stream_cycle_channel(VideoState *is, int codec_type) · 196 unmodified lines
26122612 int start_index, stream_index;
26132613 AVStream *st;
26142614
2615− if (codec_type == CODEC_TYPE_VIDEO)
2615+ if (codec_type == AVMEDIA_TYPE_VIDEO)
26162616 start_index = is->video_stream;
2617− else if (codec_type == CODEC_TYPE_AUDIO)
2617+ else if (codec_type == AVMEDIA_TYPE_AUDIO)
26182618 start_index = is->audio_stream;
26192619 else
26202620 start_index = is->subtitle_stream;
2621− if (start_index < (codec_type == CODEC_TYPE_SUBTITLE ? -1 : 0))
2621+ if (start_index < (codec_type == AVMEDIA_TYPE_SUBTITLE ? -1 : 0))
26222622 return;
26232623 stream_index = start_index;
26242624 for(;;) {
26252625 if (++stream_index >= is->ic->nb_streams)
26262626 {
2627− if (codec_type == CODEC_TYPE_SUBTITLE)
2627+ if (codec_type == AVMEDIA_TYPE_SUBTITLE)
26282628 {
26292629 stream_index = -1;
26302630 goto the_end;
@@ -2637,13 +2637,13 @@ static void stream_cycle_channel(VideoState *is, int codec_type) · 6 unmodified lines
26372637 if (st->codec->codec_type == codec_type) {
26382638 /* check that parameters are OK */
26392639 switch(codec_type) {
2640− case CODEC_TYPE_AUDIO:
2640+ case AVMEDIA_TYPE_AUDIO:
26412641 if (st->codec->sample_rate != 0 &&
26422642 st->codec->channels != 0)
26432643 goto the_end;
26442644 break;
2645− case CODEC_TYPE_VIDEO:
2646− case CODEC_TYPE_SUBTITLE:
2645+ case AVMEDIA_TYPE_VIDEO:
2646+ case AVMEDIA_TYPE_SUBTITLE:
26472647 goto the_end;
26482648 default:
26492649 break;
@@ -2690,7 +2690,7 @@ static void do_exit(void) · 40 unmodified lines
26902690 stream_close(cur_stream);
26912691 cur_stream = NULL;
26922692 }
2693− for (i = 0; i < CODEC_TYPE_NB; i++)
2693+ for (i = 0; i < AVMEDIA_TYPE_NB; i++)
26942694 av_free(avcodec_opts[i]);
26952695 av_free(avformat_opts);
26962696 av_free(sws_opts);
@@ -2743,15 +2743,15 @@ static void event_loop(void) · 46 unmodified lines
27432743 break;
27442744 case SDLK_a:
27452745 if (cur_stream)
2746− stream_cycle_channel(cur_stream, CODEC_TYPE_AUDIO);
2746+ stream_cycle_channel(cur_stream, AVMEDIA_TYPE_AUDIO);
27472747 break;
27482748 case SDLK_v:
27492749 if (cur_stream)
2750− stream_cycle_channel(cur_stream, CODEC_TYPE_VIDEO);
2750+ stream_cycle_channel(cur_stream, AVMEDIA_TYPE_VIDEO);
27512751 break;
27522752 case SDLK_t:
27532753 if (cur_stream)
2754− stream_cycle_channel(cur_stream, CODEC_TYPE_SUBTITLE);
2754+ stream_cycle_channel(cur_stream, AVMEDIA_TYPE_SUBTITLE);
27552755 break;
27562756 case SDLK_w:
27572757 toggle_audio_display();
@@ -2943,9 +2943,9 @@ static const OptionDef options[] = { · 185 unmodified lines
29432943 { "fs", OPT_BOOL, {(void*)&is_full_screen}, "force full screen" },
29442944 { "an", OPT_BOOL, {(void*)&audio_disable}, "disable audio" },
29452945 { "vn", OPT_BOOL, {(void*)&video_disable}, "disable video" },
2946− { "ast", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[CODEC_TYPE_AUDIO]}, "select desired audio stream", "stream_number" },
2947− { "vst", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[CODEC_TYPE_VIDEO]}, "select desired video stream", "stream_number" },
2948− { "sst", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[CODEC_TYPE_SUBTITLE]}, "select desired subtitle stream", "stream_number" },
2946+ { "ast", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[AVMEDIA_TYPE_AUDIO]}, "select desired audio stream", "stream_number" },
2947+ { "vst", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[AVMEDIA_TYPE_VIDEO]}, "select desired video stream", "stream_number" },
2948+ { "sst", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[AVMEDIA_TYPE_SUBTITLE]}, "select desired subtitle stream", "stream_number" },
29492949 { "ss", HAS_ARG | OPT_FUNC2, {(void*)&opt_seek}, "seek to a given position in seconds", "pos" },
29502950 { "bytes", OPT_INT | HAS_ARG, {(void*)&seek_by_bytes}, "seek by bytes 0=off 1=on -1=auto", "val" },
29512951 { "nodisp", OPT_BOOL, {(void*)&display_disable}, "disable graphical display" },
@@ -3032,7 +3032,7 @@ int main(int argc, char **argv) · 80 unmodified lines
30323032 #endif
30333033 av_register_all();
30343034
3035− for(i=0; i<CODEC_TYPE_NB; i++){
3035+ for(i=0; i<AVMEDIA_TYPE_NB; i++){
30363036 avcodec_opts[i]= avcodec_alloc_context2(i);
30373037 }
30383038 avformat_opts = avformat_alloc_context();
ffprobe.c+10−10
@@ -101,14 +101,14 @@ static char *time_value_string(char *buf, int buf_size, int64_t val, const AVRat · 100 unmodified lines
101101 return buf;
102102 }
103103
104−static const char *codec_type_string(enum CodecType codec_type)
104+static const char *media_type_string(enum AVMediaType media_type)
105105 {
106− switch (codec_type) {
107− case CODEC_TYPE_VIDEO: return "video";
108− case CODEC_TYPE_AUDIO: return "audio";
109− case CODEC_TYPE_DATA: return "data";
110− case CODEC_TYPE_SUBTITLE: return "subtitle";
111− case CODEC_TYPE_ATTACHMENT: return "attachment";
106+ switch (media_type) {
107+ case AVMEDIA_TYPE_VIDEO: return "video";
108+ case AVMEDIA_TYPE_AUDIO: return "audio";
109+ case AVMEDIA_TYPE_DATA: return "data";
110+ case AVMEDIA_TYPE_SUBTITLE: return "subtitle";
111+ case AVMEDIA_TYPE_ATTACHMENT: return "attachment";
112112 default: return "unknown";
113113 }
114114 }
@@ -134,7 +134,7 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx) · 19 unmodified lines
134134 printf("codec_name=unknown\n");
135135 }
136136
137− printf("codec_type=%s\n", codec_type_string(dec_ctx->codec_type));
137+ printf("codec_type=%s\n", media_type_string(dec_ctx->codec_type));
138138 printf("codec_time_base=%d/%d\n", dec_ctx->time_base.num, dec_ctx->time_base.den);
139139
140140 /* print AVI/FourCC tag */
@@ -150,7 +150,7 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx) · 9 unmodified lines
150150 printf("\ncodec_tag=0x%04x\n", dec_ctx->codec_tag);
151151
152152 switch (dec_ctx->codec_type) {
153− case CODEC_TYPE_VIDEO:
153+ case AVMEDIA_TYPE_VIDEO:
154154 printf("width=%d\n", dec_ctx->width);
155155 printf("height=%d\n", dec_ctx->height);
156156 printf("has_b_frames=%d\n", dec_ctx->has_b_frames);
@@ -162,7 +162,7 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx) · 5 unmodified lines
162162 av_pix_fmt_descriptors[dec_ctx->pix_fmt].name : "unknown");
163163 break;
164164
165− case CODEC_TYPE_AUDIO:
165+ case AVMEDIA_TYPE_AUDIO:
166166 printf("sample_rate=%s\n", value_string(val_str, sizeof(val_str),
167167 dec_ctx->sample_rate,
168168 unit_hertz_str));
ffserver.c+19−19
@@ -1805,7 +1805,7 @@ static void compute_status(HTTPContext *c) · 1804 unmodified lines
18051805 AVStream *st = stream->streams[i];
18061806 AVCodec *codec = avcodec_find_encoder(st->codec->codec_id);
18071807 switch(st->codec->codec_type) {
1808− case CODEC_TYPE_AUDIO:
1808+ case AVMEDIA_TYPE_AUDIO:
18091809 audio_bit_rate += st->codec->bit_rate;
18101810 if (codec) {
18111811 if (*audio_codec_name)
@@ -1813,7 +1813,7 @@ static void compute_status(HTTPContext *c) · 1 unmodified line
18131813 audio_codec_name = codec->name;
18141814 }
18151815 break;
1816− case CODEC_TYPE_VIDEO:
1816+ case AVMEDIA_TYPE_VIDEO:
18171817 video_bit_rate += st->codec->bit_rate;
18181818 if (codec) {
18191819 if (*video_codec_name)
@@ -1821,7 +1821,7 @@ static void compute_status(HTTPContext *c) · 1 unmodified line
18211821 video_codec_name = codec->name;
18221822 }
18231823 break;
1824− case CODEC_TYPE_DATA:
1824+ case AVMEDIA_TYPE_DATA:
18251825 video_bit_rate += st->codec->bit_rate;
18261826 break;
18271827 default:
@@ -1894,11 +1894,11 @@ static void compute_status(HTTPContext *c) · 66 unmodified lines
18941894 parameters[0] = 0;
18951895
18961896 switch(st->codec->codec_type) {
1897− case CODEC_TYPE_AUDIO:
1897+ case AVMEDIA_TYPE_AUDIO:
18981898 type = "audio";
18991899 snprintf(parameters, sizeof(parameters), "%d channel(s), %d Hz", st->codec->channels, st->codec->sample_rate);
19001900 break;
1901− case CODEC_TYPE_VIDEO:
1901+ case AVMEDIA_TYPE_VIDEO:
19021902 type = "video";
19031903 snprintf(parameters, sizeof(parameters), "%dx%d, q=%d-%d, fps=%d", st->codec->width, st->codec->height,
19041904 st->codec->qmin, st->codec->qmax, st->codec->time_base.den / st->codec->time_base.num);
@@ -2047,7 +2047,7 @@ static int open_input_stream(HTTPContext *c, const char *info) · 142 unmodified lines
20472047 c->pts_stream_index = 0;
20482048 for(i=0;i<c->stream->nb_streams;i++) {
20492049 if (c->pts_stream_index == 0 &&
2050− c->stream->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO) {
2050+ c->stream->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
20512051 c->pts_stream_index = i;
20522052 }
20532053 }
@@ -2210,7 +2210,7 @@ static int http_prepare_data(HTTPContext *c) · 156 unmodified lines
22102210 AVStream *st = c->fmt_in->streams[source_index];
22112211 pkt.stream_index = i;
22122212 if (pkt.flags & PKT_FLAG_KEY &&
2213− (st->codec->codec_type == CODEC_TYPE_VIDEO ||
2213+ (st->codec->codec_type == AVMEDIA_TYPE_VIDEO ||
22142214 c->stream->nb_streams == 1))
22152215 c->got_key_frame = 1;
22162216 if (!c->stream->send_on_key || c->got_key_frame)
@@ -3346,12 +3346,12 @@ static int add_av_stream(FFStream *feed, AVStream *st) · 1129 unmodified lines
33463346 av1->bit_rate == av->bit_rate) {
33473347
33483348 switch(av->codec_type) {
3349− case CODEC_TYPE_AUDIO:
3349+ case AVMEDIA_TYPE_AUDIO:
33503350 if (av1->channels == av->channels &&
33513351 av1->sample_rate == av->sample_rate)
33523352 goto found;
33533353 break;
3354− case CODEC_TYPE_VIDEO:
3354+ case AVMEDIA_TYPE_VIDEO:
33553355 if (av1->width == av->width &&
33563356 av1->height == av->height &&
33573357 av1->time_base.den == av->time_base.den &&
@@ -3549,7 +3549,7 @@ static void build_feed_streams(void) · 191 unmodified lines
35493549 } else if (CHECK_CODEC(bit_rate) || CHECK_CODEC(flags)) {
35503550 http_log("Codec bitrates do not match for stream %d\n", i);
35513551 matches = 0;
3552− } else if (ccf->codec_type == CODEC_TYPE_VIDEO) {
3552+ } else if (ccf->codec_type == AVMEDIA_TYPE_VIDEO) {
35533553 if (CHECK_CODEC(time_base.den) ||
35543554 CHECK_CODEC(time_base.num) ||
35553555 CHECK_CODEC(width) ||
@@ -3557,7 +3557,7 @@ static void build_feed_streams(void) · 1 unmodified line
35573557 http_log("Codec width, height and framerate do not match for stream %d\n", i);
35583558 matches = 0;
35593559 }
3560− } else if (ccf->codec_type == CODEC_TYPE_AUDIO) {
3560+ } else if (ccf->codec_type == AVMEDIA_TYPE_AUDIO) {
35613561 if (CHECK_CODEC(sample_rate) ||
35623562 CHECK_CODEC(channels) ||
35633563 CHECK_CODEC(frame_size)) {
@@ -3651,8 +3651,8 @@ static void compute_bandwidth(void) · 87 unmodified lines
36513651 for(i=0;i<stream->nb_streams;i++) {
36523652 AVStream *st = stream->streams[i];
36533653 switch(st->codec->codec_type) {
3654− case CODEC_TYPE_AUDIO:
3655− case CODEC_TYPE_VIDEO:
3654+ case AVMEDIA_TYPE_AUDIO:
3655+ case AVMEDIA_TYPE_VIDEO:
36563656 bandwidth += st->codec->bit_rate;
36573657 break;
36583658 default:
@@ -3670,7 +3670,7 @@ static void add_codec(FFStream *stream, AVCodecContext *av) · 11 unmodified lines
36703670
36713671 /* compute default parameters */
36723672 switch(av->codec_type) {
3673− case CODEC_TYPE_AUDIO:
3673+ case AVMEDIA_TYPE_AUDIO:
36743674 if (av->bit_rate == 0)
36753675 av->bit_rate = 64000;
36763676 if (av->sample_rate == 0)
@@ -3678,7 +3678,7 @@ static void add_codec(FFStream *stream, AVCodecContext *av) · 1 unmodified line
36783678 if (av->channels == 0)
36793679 av->channels = 1;
36803680 break;
3681− case CODEC_TYPE_VIDEO:
3681+ case AVMEDIA_TYPE_VIDEO:
36823682 if (av->bit_rate == 0)
36833683 av->bit_rate = 64000;
36843684 if (av->time_base.num == 0){
@@ -3742,7 +3742,7 @@ static enum CodecID opt_audio_codec(const char *arg) · 57 unmodified lines
37423742 {
37433743 AVCodec *p= avcodec_find_encoder_by_name(arg);
37443744
3745− if (p == NULL || p->type != CODEC_TYPE_AUDIO)
3745+ if (p == NULL || p->type != AVMEDIA_TYPE_AUDIO)
37463746 return CODEC_ID_NONE;
37473747
37483748 return p->id;
@@ -3752,7 +3752,7 @@ static enum CodecID opt_video_codec(const char *arg) · 3 unmodified lines
37523752 {
37533753 AVCodec *p= avcodec_find_encoder_by_name(arg);
37543754
3755− if (p == NULL || p->type != CODEC_TYPE_VIDEO)
3755+ if (p == NULL || p->type != AVMEDIA_TYPE_VIDEO)
37563756 return CODEC_ID_NONE;
37573757
37583758 return p->id;
@@ -4445,12 +4445,12 @@ static int parse_ffconfig(const char *filename) · 686 unmodified lines
44454445 } else {
44464446 if (stream->feed && stream->fmt && strcmp(stream->fmt->name, "ffm") != 0) {
44474447 if (audio_id != CODEC_ID_NONE) {
4448− audio_enc.codec_type = CODEC_TYPE_AUDIO;
4448+ audio_enc.codec_type = AVMEDIA_TYPE_AUDIO;
44494449 audio_enc.codec_id = audio_id;
44504450 add_codec(stream, &audio_enc);
44514451 }
44524452 if (video_id != CODEC_ID_NONE) {
4453− video_enc.codec_type = CODEC_TYPE_VIDEO;
4453+ video_enc.codec_type = AVMEDIA_TYPE_VIDEO;
44544454 video_enc.codec_id = video_id;
44554455 add_codec(stream, &video_enc);
44564456 }
libavcodec/4xm.c+1−1
@@ -842,7 +842,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 841 unmodified lines
842842
843843 AVCodec fourxm_decoder = {
844844 "4xm",
845− CODEC_TYPE_VIDEO,
845+ AVMEDIA_TYPE_VIDEO,
846846 CODEC_ID_4XM,
847847 sizeof(FourXContext),
848848 decode_init,
libavcodec/8bps.c+1−1
@@ -221,7 +221,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 220 unmodified lines
221221
222222 AVCodec eightbps_decoder = {
223223 "8bps",
224− CODEC_TYPE_VIDEO,
224+ AVMEDIA_TYPE_VIDEO,
225225 CODEC_ID_8BPS,
226226 sizeof(EightBpsContext),
227227 decode_init,
libavcodec/8svx.c+2−2
@@ -94,7 +94,7 @@ static av_cold int eightsvx_decode_init(AVCodecContext *avctx) · 93 unmodified lines
9494
9595 AVCodec eightsvx_fib_decoder = {
9696 .name = "8svx_fib",
97− .type = CODEC_TYPE_AUDIO,
97+ .type = AVMEDIA_TYPE_AUDIO,
9898 .id = CODEC_ID_8SVX_FIB,
9999 .priv_data_size = sizeof (EightSvxContext),
100100 .init = eightsvx_decode_init,
@@ -104,7 +104,7 @@ AVCodec eightsvx_fib_decoder = { · 3 unmodified lines
104104
105105 AVCodec eightsvx_exp_decoder = {
106106 .name = "8svx_exp",
107− .type = CODEC_TYPE_AUDIO,
107+ .type = AVMEDIA_TYPE_AUDIO,
108108 .id = CODEC_ID_8SVX_EXP,
109109 .priv_data_size = sizeof (EightSvxContext),
110110 .init = eightsvx_decode_init,
libavcodec/aac.c+1−1
@@ -2091,7 +2091,7 @@ static av_cold int aac_decode_close(AVCodecContext *avccontext) · 2090 unmodified lines
20912091
20922092 AVCodec aac_decoder = {
20932093 "aac",
2094− CODEC_TYPE_AUDIO,
2094+ AVMEDIA_TYPE_AUDIO,
20952095 CODEC_ID_AAC,
20962096 sizeof(AACContext),
20972097 aac_decode_init,
libavcodec/aacenc.c+1−1
@@ -629,7 +629,7 @@ static av_cold int aac_encode_end(AVCodecContext *avctx) · 628 unmodified lines
629629
630630 AVCodec aac_encoder = {
631631 "aac",
632− CODEC_TYPE_AUDIO,
632+ AVMEDIA_TYPE_AUDIO,
633633 CODEC_ID_AAC,
634634 sizeof(AACEncContext),
635635 aac_encode_init,
libavcodec/aasc.c+1−1
@@ -111,7 +111,7 @@ static av_cold int aasc_decode_end(AVCodecContext *avctx) · 110 unmodified lines
111111
112112 AVCodec aasc_decoder = {
113113 "aasc",
114− CODEC_TYPE_VIDEO,
114+ AVMEDIA_TYPE_VIDEO,
115115 CODEC_ID_AASC,
116116 sizeof(AascContext),
117117 aasc_decode_init,
libavcodec/ac3dec.c+2−2
@@ -1439,7 +1439,7 @@ static av_cold int ac3_decode_end(AVCodecContext *avctx) · 1438 unmodified lines
14391439
14401440 AVCodec ac3_decoder = {
14411441 .name = "ac3",
1442− .type = CODEC_TYPE_AUDIO,
1442+ .type = AVMEDIA_TYPE_AUDIO,
14431443 .id = CODEC_ID_AC3,
14441444 .priv_data_size = sizeof (AC3DecodeContext),
14451445 .init = ac3_decode_init,
@@ -1451,7 +1451,7 @@ AVCodec ac3_decoder = { · 5 unmodified lines
14511451 #if CONFIG_EAC3_DECODER
14521452 AVCodec eac3_decoder = {
14531453 .name = "eac3",
1454− .type = CODEC_TYPE_AUDIO,
1454+ .type = AVMEDIA_TYPE_AUDIO,
14551455 .id = CODEC_ID_EAC3,
14561456 .priv_data_size = sizeof (AC3DecodeContext),
14571457 .init = ac3_decode_init,
libavcodec/ac3enc.c+1−1
@@ -1393,7 +1393,7 @@ void test_ac3(void) · 1392 unmodified lines
13931393
13941394 AVCodec ac3_encoder = {
13951395 "ac3",
1396− CODEC_TYPE_AUDIO,
1396+ AVMEDIA_TYPE_AUDIO,
13971397 CODEC_ID_AC3,
13981398 sizeof(AC3EncodeContext),
13991399 AC3_encode_init,
libavcodec/adpcm.c+2−2
@@ -1638,7 +1638,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, · 1637 unmodified lines
16381638 #define ADPCM_ENCODER(id,name,long_name_) \
16391639 AVCodec name ## _encoder = { \
16401640 #name, \
1641− CODEC_TYPE_AUDIO, \
1641+ AVMEDIA_TYPE_AUDIO, \
16421642 id, \
16431643 sizeof(ADPCMContext), \
16441644 adpcm_encode_init, \
@@ -1656,7 +1656,7 @@ AVCodec name ## _encoder = { \ · 11 unmodified lines
16561656 #define ADPCM_DECODER(id,name,long_name_) \
16571657 AVCodec name ## _decoder = { \
16581658 #name, \
1659− CODEC_TYPE_AUDIO, \
1659+ AVMEDIA_TYPE_AUDIO, \
16601660 id, \
16611661 sizeof(ADPCMContext), \
16621662 adpcm_decode_init, \
libavcodec/adxdec.c+1−1
@@ -168,7 +168,7 @@ static int adx_decode_frame(AVCodecContext *avctx, · 167 unmodified lines
168168
169169 AVCodec adpcm_adx_decoder = {
170170 "adpcm_adx",
171− CODEC_TYPE_AUDIO,
171+ AVMEDIA_TYPE_AUDIO,
172172 CODEC_ID_ADPCM_ADX,
173173 sizeof(ADXContext),
174174 adx_decode_init,
libavcodec/adxenc.c+1−1
@@ -185,7 +185,7 @@ static int adx_encode_frame(AVCodecContext *avctx, · 184 unmodified lines
185185
186186 AVCodec adpcm_adx_encoder = {
187187 "adpcm_adx",
188− CODEC_TYPE_AUDIO,
188+ AVMEDIA_TYPE_AUDIO,
189189 CODEC_ID_ADPCM_ADX,
190190 sizeof(ADXContext),
191191 adx_encode_init,
libavcodec/alac.c+1−1
@@ -701,7 +701,7 @@ static av_cold int alac_decode_close(AVCodecContext *avctx) · 700 unmodified lines
701701
702702 AVCodec alac_decoder = {
703703 "alac",
704− CODEC_TYPE_AUDIO,
704+ AVMEDIA_TYPE_AUDIO,
705705 CODEC_ID_ALAC,
706706 sizeof(ALACContext),
707707 alac_decode_init,
libavcodec/alacenc.c+1−1
@@ -521,7 +521,7 @@ static av_cold int alac_encode_close(AVCodecContext *avctx) · 520 unmodified lines
521521
522522 AVCodec alac_encoder = {
523523 "alac",
524− CODEC_TYPE_AUDIO,
524+ AVMEDIA_TYPE_AUDIO,
525525 CODEC_ID_ALAC,
526526 sizeof(AlacEncodeContext),
527527 alac_encode_init,
libavcodec/alsdec.c+1−1
@@ -1622,7 +1622,7 @@ static av_cold void flush(AVCodecContext *avctx) · 1621 unmodified lines
16221622
16231623 AVCodec als_decoder = {
16241624 "als",
1625− CODEC_TYPE_AUDIO,
1625+ AVMEDIA_TYPE_AUDIO,
16261626 CODEC_ID_MP4ALS,
16271627 sizeof(ALSDecContext),
16281628 decode_init,
libavcodec/amrnbdec.c+1−1
@@ -1071,7 +1071,7 @@ static int amrnb_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 1070 unmodified lines
10711071
10721072 AVCodec amrnb_decoder = {
10731073 .name = "amrnb",
1074− .type = CODEC_TYPE_AUDIO,
1074+ .type = AVMEDIA_TYPE_AUDIO,
10751075 .id = CODEC_ID_AMR_NB,
10761076 .priv_data_size = sizeof(AMRContext),
10771077 .init = amrnb_decode_init,
libavcodec/anm.c+1−1
@@ -185,7 +185,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 184 unmodified lines
185185
186186 AVCodec anm_decoder = {
187187 "anm",
188− CODEC_TYPE_VIDEO,
188+ AVMEDIA_TYPE_VIDEO,
189189 CODEC_ID_ANM,
190190 sizeof(AnmContext),
191191 decode_init,
libavcodec/apedec.c+1−1
@@ -879,7 +879,7 @@ static int ape_decode_frame(AVCodecContext * avctx, · 878 unmodified lines
879879
880880 AVCodec ape_decoder = {
881881 "ape",
882− CODEC_TYPE_AUDIO,
882+ AVMEDIA_TYPE_AUDIO,
883883 CODEC_ID_APE,
884884 sizeof(APEContext),
885885 ape_decode_init,
libavcodec/asv1.c+4−4
@@ -615,7 +615,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 614 unmodified lines
615615
616616 AVCodec asv1_decoder = {
617617 "asv1",
618− CODEC_TYPE_VIDEO,
618+ AVMEDIA_TYPE_VIDEO,
619619 CODEC_ID_ASV1,
620620 sizeof(ASV1Context),
621621 decode_init,
@@ -628,7 +628,7 @@ AVCodec asv1_decoder = { · 6 unmodified lines
628628
629629 AVCodec asv2_decoder = {
630630 "asv2",
631− CODEC_TYPE_VIDEO,
631+ AVMEDIA_TYPE_VIDEO,
632632 CODEC_ID_ASV2,
633633 sizeof(ASV1Context),
634634 decode_init,
@@ -642,7 +642,7 @@ AVCodec asv2_decoder = { · 7 unmodified lines
642642 #if CONFIG_ASV1_ENCODER
643643 AVCodec asv1_encoder = {
644644 "asv1",
645− CODEC_TYPE_VIDEO,
645+ AVMEDIA_TYPE_VIDEO,
646646 CODEC_ID_ASV1,
647647 sizeof(ASV1Context),
648648 encode_init,
@@ -656,7 +656,7 @@ AVCodec asv1_encoder = { · 7 unmodified lines
656656 #if CONFIG_ASV2_ENCODER
657657 AVCodec asv2_encoder = {
658658 "asv2",
659− CODEC_TYPE_VIDEO,
659+ AVMEDIA_TYPE_VIDEO,
660660 CODEC_ID_ASV2,
661661 sizeof(ASV1Context),
662662 encode_init,
libavcodec/atrac1.c+1−1
@@ -372,7 +372,7 @@ static av_cold int atrac1_decode_end(AVCodecContext * avctx) { · 371 unmodified lines
372372
373373 AVCodec atrac1_decoder = {
374374 .name = "atrac1",
375− .type = CODEC_TYPE_AUDIO,
375+ .type = AVMEDIA_TYPE_AUDIO,
376376 .id = CODEC_ID_ATRAC1,
377377 .priv_data_size = sizeof(AT1Ctx),
378378 .init = atrac1_decode_init,
libavcodec/atrac3.c+1−1
@@ -1016,7 +1016,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx) · 1015 unmodified lines
10161016 AVCodec atrac3_decoder =
10171017 {
10181018 .name = "atrac3",
1019− .type = CODEC_TYPE_AUDIO,
1019+ .type = AVMEDIA_TYPE_AUDIO,
10201020 .id = CODEC_ID_ATRAC3,
10211021 .priv_data_size = sizeof(ATRAC3Context),
10221022 .init = atrac3_decode_init,
libavcodec/aura.c+1−1
@@ -124,7 +124,7 @@ static av_cold int aura_decode_end(AVCodecContext *avctx) · 123 unmodified lines
124124
125125 AVCodec aura2_decoder = {
126126 "aura2",
127− CODEC_TYPE_VIDEO,
127+ AVMEDIA_TYPE_VIDEO,
128128 CODEC_ID_AURA2,
129129 sizeof(AuraDecodeContext),
130130 aura_decode_init,
libavcodec/avcodec.h+27−15
@@ -30,7 +30,7 @@ · 29 unmodified lines
3030 #include "libavutil/avutil.h"
3131
3232 #define LIBAVCODEC_VERSION_MAJOR 52
33−#define LIBAVCODEC_VERSION_MINOR 63
33+#define LIBAVCODEC_VERSION_MINOR 64
3434 #define LIBAVCODEC_VERSION_MICRO 0
3535
3636 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
@@ -355,16 +355,28 @@ enum CodecID { · 318 unmodified lines
355355 * stream (only used by libavformat) */
356356 };
357357
358−enum CodecType {
359− CODEC_TYPE_UNKNOWN = -1,
360− CODEC_TYPE_VIDEO,
361− CODEC_TYPE_AUDIO,
362− CODEC_TYPE_DATA,
363− CODEC_TYPE_SUBTITLE,
364− CODEC_TYPE_ATTACHMENT,
365− CODEC_TYPE_NB
358+enum AVMediaType {
359+ AVMEDIA_TYPE_UNKNOWN = -1,
360+ AVMEDIA_TYPE_VIDEO,
361+ AVMEDIA_TYPE_AUDIO,
362+ AVMEDIA_TYPE_DATA,
363+ AVMEDIA_TYPE_SUBTITLE,
364+ AVMEDIA_TYPE_ATTACHMENT,
365+ AVMEDIA_TYPE_NB
366366 };
367367
368+#if LIBAVCODEC_VERSION_MAJOR < 53
369+#define CodecType AVMediaType
370+
371+#define CODEC_TYPE_UNKNOWN AVMEDIA_TYPE_UNKNOWN
372+#define CODEC_TYPE_VIDEO AVMEDIA_TYPE_VIDEO
373+#define CODEC_TYPE_AUDIO AVMEDIA_TYPE_AUDIO
374+#define CODEC_TYPE_DATA AVMEDIA_TYPE_DATA
375+#define CODEC_TYPE_SUBTITLE AVMEDIA_TYPE_SUBTITLE
376+#define CODEC_TYPE_ATTACHMENT AVMEDIA_TYPE_ATTACHMENT
377+#define CODEC_TYPE_NB AVMEDIA_TYPE_NB
378+#endif
379+
368380 /**
369381 * all in native-endian format
370382 */
@@ -1277,7 +1289,7 @@ typedef struct AVCodecContext { · 906 unmodified lines
12771289 void *opaque;
12781290
12791291 char codec_name[32];
1280− enum CodecType codec_type; /* see CODEC_TYPE_xxx */
1292+ enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */
12811293 enum CodecID codec_id; /* see CODEC_ID_xxx */
12821294
12831295 /**
@@ -2657,7 +2669,7 @@ typedef struct AVCodec { · 1373 unmodified lines
26572669 * This is the primary way to find a codec from the user perspective.
26582670 */
26592671 const char *name;
2660− enum CodecType type;
2672+ enum AVMediaType type;
26612673 enum CodecID id;
26622674 int priv_data_size;
26632675 int (*init)(AVCodecContext *);
@@ -2701,9 +2713,9 @@ typedef struct AVHWAccel { · 37 unmodified lines
27012713 /**
27022714 * Type of codec implemented by the hardware accelerator.
27032715 *
2704− * See CODEC_TYPE_xxx
2716+ * See AVMEDIA_TYPE_xxx
27052717 */
2706− enum CodecType type;
2718+ enum AVMediaType type;
27072719
27082720 /**
27092721 * Codec implemented by the hardware accelerator.
@@ -3241,7 +3253,7 @@ void avcodec_get_context_defaults(AVCodecContext *s); · 531 unmodified lines
32413253
32423254 /** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API!
32433255 * we WILL change its arguments and name a few times! */
3244−void avcodec_get_context_defaults2(AVCodecContext *s, enum CodecType);
3256+void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType);
32453257
32463258 /**
32473259 * Allocates an AVCodecContext and sets its fields to default values. The
@@ -3254,7 +3266,7 @@ AVCodecContext *avcodec_alloc_context(void); · 6 unmodified lines
32543266
32553267 /** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API!
32563268 * we WILL change its arguments and name a few times! */
3257−AVCodecContext *avcodec_alloc_context2(enum CodecType);
3269+AVCodecContext *avcodec_alloc_context2(enum AVMediaType);
32583270
32593271 /**
32603272 * Sets the fields of the given AVFrame to default values.
libavcodec/avs.c+1−1
@@ -152,7 +152,7 @@ static av_cold int avs_decode_init(AVCodecContext * avctx) · 151 unmodified lines
152152
153153 AVCodec avs_decoder = {
154154 "avs",
155− CODEC_TYPE_VIDEO,
155+ AVMEDIA_TYPE_VIDEO,
156156 CODEC_ID_AVS,
157157 sizeof(AvsContext),
158158 avs_decode_init,
libavcodec/bethsoftvideo.c+1−1
@@ -132,7 +132,7 @@ static av_cold int bethsoftvid_decode_end(AVCodecContext *avctx) · 131 unmodified lines
132132
133133 AVCodec bethsoftvid_decoder = {
134134 .name = "bethsoftvid",
135− .type = CODEC_TYPE_VIDEO,
135+ .type = AVMEDIA_TYPE_VIDEO,
136136 .id = CODEC_ID_BETHSOFTVID,
137137 .priv_data_size = sizeof(BethsoftvidContext),
138138 .init = bethsoftvid_decode_init,
libavcodec/bfi.c+1−1
@@ -173,7 +173,7 @@ static av_cold int bfi_decode_close(AVCodecContext * avctx) · 172 unmodified lines
173173
174174 AVCodec bfi_decoder = {
175175 .name = "bfi",
176− .type = CODEC_TYPE_VIDEO,
176+ .type = AVMEDIA_TYPE_VIDEO,
177177 .id = CODEC_ID_BFI,
178178 .priv_data_size = sizeof(BFIContext),
179179 .init = bfi_decode_init,
libavcodec/bink.c+1−1
@@ -1001,7 +1001,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 1000 unmodified lines
10011001
10021002 AVCodec bink_decoder = {
10031003 "binkvideo",
1004− CODEC_TYPE_VIDEO,
1004+ AVMEDIA_TYPE_VIDEO,
10051005 CODEC_ID_BINKVIDEO,
10061006 sizeof(BinkContext),
10071007 decode_init,
libavcodec/binkaudio.c+2−2
@@ -288,7 +288,7 @@ static int decode_frame(AVCodecContext *avctx, · 287 unmodified lines
288288
289289 AVCodec binkaudio_rdft_decoder = {
290290 "binkaudio_rdft",
291− CODEC_TYPE_AUDIO,
291+ AVMEDIA_TYPE_AUDIO,
292292 CODEC_ID_BINKAUDIO_RDFT,
293293 sizeof(BinkAudioContext),
294294 decode_init,
@@ -300,7 +300,7 @@ AVCodec binkaudio_rdft_decoder = { · 5 unmodified lines
300300
301301 AVCodec binkaudio_dct_decoder = {
302302 "binkaudio_dct",
303− CODEC_TYPE_AUDIO,
303+ AVMEDIA_TYPE_AUDIO,
304304 CODEC_ID_BINKAUDIO_DCT,
305305 sizeof(BinkAudioContext),
306306 decode_init,
libavcodec/bmp.c+1−1
@@ -337,7 +337,7 @@ static av_cold int bmp_decode_end(AVCodecContext *avctx) · 336 unmodified lines
337337
338338 AVCodec bmp_decoder = {
339339 "bmp",
340− CODEC_TYPE_VIDEO,
340+ AVMEDIA_TYPE_VIDEO,
341341 CODEC_ID_BMP,
342342 sizeof(BMPContext),
343343 bmp_decode_init,
libavcodec/bmpenc.c+1−1
@@ -133,7 +133,7 @@ static int bmp_encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_s · 132 unmodified lines
133133
134134 AVCodec bmp_encoder = {
135135 "bmp",
136− CODEC_TYPE_VIDEO,
136+ AVMEDIA_TYPE_VIDEO,
137137 CODEC_ID_BMP,
138138 sizeof(BMPContext),
139139 bmp_encode_init,
libavcodec/c93.c+1−1
@@ -244,7 +244,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, · 243 unmodified lines
244244
245245 AVCodec c93_decoder = {
246246 "c93",
247− CODEC_TYPE_VIDEO,
247+ AVMEDIA_TYPE_VIDEO,
248248 CODEC_ID_C93,
249249 sizeof(C93DecoderContext),
250250 decode_init,
libavcodec/cavsdec.c+1−1
@@ -711,7 +711,7 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size, · 710 unmodified lines
711711
712712 AVCodec cavs_decoder = {
713713 "cavs",
714− CODEC_TYPE_VIDEO,
714+ AVMEDIA_TYPE_VIDEO,
715715 CODEC_ID_CAVS,
716716 sizeof(AVSContext),
717717 ff_cavs_init,
libavcodec/cdgraphics.c+1−1
@@ -369,7 +369,7 @@ static av_cold int cdg_decode_end(AVCodecContext *avctx) · 368 unmodified lines
369369
370370 AVCodec cdgraphics_decoder = {
371371 "cdgraphics",
372− CODEC_TYPE_VIDEO,
372+ AVMEDIA_TYPE_VIDEO,
373373 CODEC_ID_CDGRAPHICS,
374374 sizeof(CDGraphicsContext),
375375 cdg_decode_init,
libavcodec/cinepak.c+1−1
@@ -457,7 +457,7 @@ static av_cold int cinepak_decode_end(AVCodecContext *avctx) · 456 unmodified lines
457457
458458 AVCodec cinepak_decoder = {
459459 "cinepak",
460− CODEC_TYPE_VIDEO,
460+ AVMEDIA_TYPE_VIDEO,
461461 CODEC_ID_CINEPAK,
462462 sizeof(CinepakContext),
463463 cinepak_decode_init,
libavcodec/cljr.c+2−2
@@ -137,7 +137,7 @@ static av_cold int encode_init(AVCodecContext *avctx){ · 136 unmodified lines
137137
138138 AVCodec cljr_decoder = {
139139 "cljr",
140− CODEC_TYPE_VIDEO,
140+ AVMEDIA_TYPE_VIDEO,
141141 CODEC_ID_CLJR,
142142 sizeof(CLJRContext),
143143 decode_init,
@@ -151,7 +151,7 @@ AVCodec cljr_decoder = { · 7 unmodified lines
151151 #if CONFIG_CLJR_ENCODER
152152 AVCodec cljr_encoder = {
153153 "cljr",
154− CODEC_TYPE_VIDEO,
154+ AVMEDIA_TYPE_VIDEO,
155155 CODEC_ID_CLJR,
156156 sizeof(CLJRContext),
157157 encode_init,
libavcodec/cook.c+1−1
@@ -1288,7 +1288,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) · 1287 unmodified lines
12881288 AVCodec cook_decoder =
12891289 {
12901290 .name = "cook",
1291− .type = CODEC_TYPE_AUDIO,
1291+ .type = AVMEDIA_TYPE_AUDIO,
12921292 .id = CODEC_ID_COOK,
12931293 .priv_data_size = sizeof(COOKContext),
12941294 .init = cook_decode_init,
libavcodec/cscd.c+1−1
@@ -249,7 +249,7 @@ static av_cold int decode_end(AVCodecContext *avctx) { · 248 unmodified lines
249249
250250 AVCodec cscd_decoder = {
251251 "camstudio",
252− CODEC_TYPE_VIDEO,
252+ AVMEDIA_TYPE_VIDEO,
253253 CODEC_ID_CSCD,
254254 sizeof(CamStudioContext),
255255 decode_init,
libavcodec/cyuv.c+2−2
@@ -180,7 +180,7 @@ static av_cold int cyuv_decode_end(AVCodecContext *avctx) · 179 unmodified lines
180180 #if CONFIG_AURA_DECODER
181181 AVCodec aura_decoder = {
182182 "aura",
183− CODEC_TYPE_VIDEO,
183+ AVMEDIA_TYPE_VIDEO,
184184 CODEC_ID_AURA,
185185 sizeof(CyuvDecodeContext),
186186 cyuv_decode_init,
@@ -196,7 +196,7 @@ AVCodec aura_decoder = { · 9 unmodified lines
196196 #if CONFIG_CYUV_DECODER
197197 AVCodec cyuv_decoder = {
198198 "cyuv",
199− CODEC_TYPE_VIDEO,
199+ AVMEDIA_TYPE_VIDEO,
200200 CODEC_ID_CYUV,
201201 sizeof(CyuvDecodeContext),
202202 cyuv_decode_init,
libavcodec/dca.c+1−1
@@ -1330,7 +1330,7 @@ static av_cold int dca_decode_end(AVCodecContext * avctx) · 1329 unmodified lines
13301330
13311331 AVCodec dca_decoder = {
13321332 .name = "dca",
1333− .type = CODEC_TYPE_AUDIO,
1333+ .type = AVMEDIA_TYPE_AUDIO,
13341334 .id = CODEC_ID_DTS,
13351335 .priv_data_size = sizeof(DCAContext),
13361336 .init = dca_decode_init,
libavcodec/dnxhddec.c+1−1
@@ -346,7 +346,7 @@ static av_cold int dnxhd_decode_close(AVCodecContext *avctx) · 345 unmodified lines
346346
347347 AVCodec dnxhd_decoder = {
348348 "dnxhd",
349− CODEC_TYPE_VIDEO,
349+ AVMEDIA_TYPE_VIDEO,
350350 CODEC_ID_DNXHD,
351351 sizeof(DNXHDContext),
352352 dnxhd_decode_init,
libavcodec/dnxhdenc.c+1−1
@@ -850,7 +850,7 @@ static int dnxhd_encode_end(AVCodecContext *avctx) · 849 unmodified lines
850850
851851 AVCodec dnxhd_encoder = {
852852 "dnxhd",
853− CODEC_TYPE_VIDEO,
853+ AVMEDIA_TYPE_VIDEO,
854854 CODEC_ID_DNXHD,
855855 sizeof(DNXHDEncContext),
856856 dnxhd_encode_init,
libavcodec/dpcm.c+1−1
@@ -301,7 +301,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, · 300 unmodified lines
301301 #define DPCM_DECODER(id, name, long_name_) \
302302 AVCodec name ## _decoder = { \
303303 #name, \
304− CODEC_TYPE_AUDIO, \
304+ AVMEDIA_TYPE_AUDIO, \
305305 id, \
306306 sizeof(DPCMContext), \
307307 dpcm_decode_init, \
libavcodec/dpx.c+1−1
@@ -216,7 +216,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 215 unmodified lines
216216
217217 AVCodec dpx_decoder = {
218218 "dpx",
219− CODEC_TYPE_VIDEO,
219+ AVMEDIA_TYPE_VIDEO,
220220 CODEC_ID_DPX,
221221 sizeof(DPXContext),
222222 decode_init,
libavcodec/dsicinav.c+2−2
@@ -345,7 +345,7 @@ static int cinaudio_decode_frame(AVCodecContext *avctx, · 344 unmodified lines
345345
346346 AVCodec dsicinvideo_decoder = {
347347 "dsicinvideo",
348− CODEC_TYPE_VIDEO,
348+ AVMEDIA_TYPE_VIDEO,
349349 CODEC_ID_DSICINVIDEO,
350350 sizeof(CinVideoContext),
351351 cinvideo_decode_init,
@@ -358,7 +358,7 @@ AVCodec dsicinvideo_decoder = { · 6 unmodified lines
358358
359359 AVCodec dsicinaudio_decoder = {
360360 "dsicinaudio",
361− CODEC_TYPE_AUDIO,
361+ AVMEDIA_TYPE_AUDIO,
362362 CODEC_ID_DSICINAUDIO,
363363 sizeof(CinAudioContext),
364364 cinaudio_decode_init,
libavcodec/dv.c+2−2
@@ -1282,7 +1282,7 @@ static int dvvideo_close(AVCodecContext *c) · 1281 unmodified lines
12821282 #if CONFIG_DVVIDEO_ENCODER
12831283 AVCodec dvvideo_encoder = {
12841284 "dvvideo",
1285− CODEC_TYPE_VIDEO,
1285+ AVMEDIA_TYPE_VIDEO,
12861286 CODEC_ID_DVVIDEO,
12871287 sizeof(DVVideoContext),
12881288 dvvideo_init_encoder,
@@ -1295,7 +1295,7 @@ AVCodec dvvideo_encoder = { · 6 unmodified lines
12951295 #if CONFIG_DVVIDEO_DECODER
12961296 AVCodec dvvideo_decoder = {
12971297 "dvvideo",
1298− CODEC_TYPE_VIDEO,
1298+ AVMEDIA_TYPE_VIDEO,
12991299 CODEC_ID_DVVIDEO,
13001300 sizeof(DVVideoContext),
13011301 dvvideo_init,
libavcodec/dvbsub.c+1−1
@@ -404,7 +404,7 @@ static int dvbsub_encode(AVCodecContext *avctx, · 403 unmodified lines
404404
405405 AVCodec dvbsub_encoder = {
406406 "dvbsub",
407− CODEC_TYPE_SUBTITLE,
407+ AVMEDIA_TYPE_SUBTITLE,
408408 CODEC_ID_DVB_SUBTITLE,
409409 sizeof(DVBSubtitleContext),
410410 NULL,
libavcodec/dvbsubdec.c+1−1
@@ -1413,7 +1413,7 @@ static int dvbsub_decode(AVCodecContext *avctx, · 1412 unmodified lines
14131413
14141414 AVCodec dvbsub_decoder = {
14151415 "dvbsub",
1416− CODEC_TYPE_SUBTITLE,
1416+ AVMEDIA_TYPE_SUBTITLE,
14171417 CODEC_ID_DVB_SUBTITLE,
14181418 sizeof(DVBSubContext),
14191419 dvbsub_init_decoder,
libavcodec/dvdsubdec.c+1−1
@@ -488,7 +488,7 @@ static int dvdsub_decode(AVCodecContext *avctx, · 487 unmodified lines
488488
489489 AVCodec dvdsub_decoder = {
490490 "dvdsub",
491− CODEC_TYPE_SUBTITLE,
491+ AVMEDIA_TYPE_SUBTITLE,
492492 CODEC_ID_DVD_SUBTITLE,
493493 0,
494494 NULL,
libavcodec/dvdsubenc.c+1−1
@@ -217,7 +217,7 @@ static int dvdsub_encode(AVCodecContext *avctx, · 216 unmodified lines
217217
218218 AVCodec dvdsub_encoder = {
219219 "dvdsub",
220− CODEC_TYPE_SUBTITLE,
220+ AVMEDIA_TYPE_SUBTITLE,
221221 CODEC_ID_DVD_SUBTITLE,
222222 0,
223223 NULL,
libavcodec/dxa.c+1−1
@@ -319,7 +319,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 318 unmodified lines
319319
320320 AVCodec dxa_decoder = {
321321 "dxa",
322− CODEC_TYPE_VIDEO,
322+ AVMEDIA_TYPE_VIDEO,
323323 CODEC_ID_DXA,
324324 sizeof(DxaDecContext),
325325 decode_init,
libavcodec/dxva2_h264.c+1−1
@@ -425,7 +425,7 @@ static int end_frame(AVCodecContext *avctx) · 424 unmodified lines
425425
426426 AVHWAccel h264_dxva2_hwaccel = {
427427 .name = "h264_dxva2",
428− .type = CODEC_TYPE_VIDEO,
428+ .type = AVMEDIA_TYPE_VIDEO,
429429 .id = CODEC_ID_H264,
430430 .pix_fmt = PIX_FMT_DXVA2_VLD,
431431 .capabilities = 0,
libavcodec/dxva2_vc1.c+2−2
@@ -266,7 +266,7 @@ static int end_frame(AVCodecContext *avctx) · 265 unmodified lines
266266 #if CONFIG_WMV3_DXVA2_HWACCEL
267267 AVHWAccel wmv3_dxva2_hwaccel = {
268268 .name = "wmv3_dxva2",
269− .type = CODEC_TYPE_VIDEO,
269+ .type = AVMEDIA_TYPE_VIDEO,
270270 .id = CODEC_ID_WMV3,
271271 .pix_fmt = PIX_FMT_DXVA2_VLD,
272272 .capabilities = 0,
@@ -279,7 +279,7 @@ AVHWAccel wmv3_dxva2_hwaccel = { · 6 unmodified lines
279279
280280 AVHWAccel vc1_dxva2_hwaccel = {
281281 .name = "vc1_dxva2",
282− .type = CODEC_TYPE_VIDEO,
282+ .type = AVMEDIA_TYPE_VIDEO,
283283 .id = CODEC_ID_VC1,
284284 .pix_fmt = PIX_FMT_DXVA2_VLD,
285285 .capabilities = 0,
libavcodec/eacmv.c+1−1
@@ -205,7 +205,7 @@ static av_cold int cmv_decode_end(AVCodecContext *avctx){ · 204 unmodified lines
205205
206206 AVCodec eacmv_decoder = {
207207 "eacmv",
208− CODEC_TYPE_VIDEO,
208+ AVMEDIA_TYPE_VIDEO,
209209 CODEC_ID_CMV,
210210 sizeof(CmvContext),
211211 cmv_decode_init,
libavcodec/eamad.c+1−1
@@ -307,7 +307,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 306 unmodified lines
307307
308308 AVCodec eamad_decoder = {
309309 "eamad",
310− CODEC_TYPE_VIDEO,
310+ AVMEDIA_TYPE_VIDEO,
311311 CODEC_ID_MAD,
312312 sizeof(MadContext),
313313 decode_init,
libavcodec/eatgq.c+1−1
@@ -245,7 +245,7 @@ static av_cold int tgq_decode_end(AVCodecContext *avctx){ · 244 unmodified lines
245245
246246 AVCodec eatgq_decoder = {
247247 "eatgq",
248− CODEC_TYPE_VIDEO,
248+ AVMEDIA_TYPE_VIDEO,
249249 CODEC_ID_TGQ,
250250 sizeof(TgqContext),
251251 tgq_decode_init,
libavcodec/eatgv.c+1−1
@@ -335,7 +335,7 @@ static av_cold int tgv_decode_end(AVCodecContext *avctx) · 334 unmodified lines
335335
336336 AVCodec eatgv_decoder = {
337337 "eatgv",
338− CODEC_TYPE_VIDEO,
338+ AVMEDIA_TYPE_VIDEO,
339339 CODEC_ID_TGV,
340340 sizeof(TgvContext),
341341 tgv_decode_init,
libavcodec/eatqi.c+1−1
@@ -156,7 +156,7 @@ static av_cold int tqi_decode_end(AVCodecContext *avctx) · 155 unmodified lines
156156
157157 AVCodec eatqi_decoder = {
158158 "eatqi",
159− CODEC_TYPE_VIDEO,
159+ AVMEDIA_TYPE_VIDEO,
160160 CODEC_ID_TQI,
161161 sizeof(TqiContext),
162162 tqi_decode_init,
libavcodec/escape124.c+1−1
@@ -374,7 +374,7 @@ static int escape124_decode_frame(AVCodecContext *avctx, · 373 unmodified lines
374374
375375 AVCodec escape124_decoder = {
376376 "escape124",
377− CODEC_TYPE_VIDEO,
377+ AVMEDIA_TYPE_VIDEO,
378378 CODEC_ID_ESCAPE124,
379379 sizeof(Escape124Context),
380380 escape124_decode_init,
libavcodec/ffv1.c+2−2
@@ -1125,7 +1125,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac · 1124 unmodified lines
11251125
11261126 AVCodec ffv1_decoder = {
11271127 "ffv1",
1128− CODEC_TYPE_VIDEO,
1128+ AVMEDIA_TYPE_VIDEO,
11291129 CODEC_ID_FFV1,
11301130 sizeof(FFV1Context),
11311131 decode_init,
@@ -1140,7 +1140,7 @@ AVCodec ffv1_decoder = { · 8 unmodified lines
11401140 #if CONFIG_FFV1_ENCODER
11411141 AVCodec ffv1_encoder = {
11421142 "ffv1",
1143− CODEC_TYPE_VIDEO,
1143+ AVMEDIA_TYPE_VIDEO,
11441144 CODEC_ID_FFV1,
11451145 sizeof(FFV1Context),
11461146 encode_init,
libavcodec/flacdec.c+1−1
@@ -799,7 +799,7 @@ static void flac_flush(AVCodecContext *avctx) · 798 unmodified lines
799799
800800 AVCodec flac_decoder = {
801801 "flac",
802− CODEC_TYPE_AUDIO,
802+ AVMEDIA_TYPE_AUDIO,
803803 CODEC_ID_FLAC,
804804 sizeof(FLACContext),
805805 flac_decode_init,
libavcodec/flacenc.c+1−1
@@ -1253,7 +1253,7 @@ static av_cold int flac_encode_close(AVCodecContext *avctx) · 1252 unmodified lines
12531253
12541254 AVCodec flac_encoder = {
12551255 "flac",
1256− CODEC_TYPE_AUDIO,
1256+ AVMEDIA_TYPE_AUDIO,
12571257 CODEC_ID_FLAC,
12581258 sizeof(FlacEncodeContext),
12591259 flac_encode_init,
libavcodec/flashsv.c+1−1
@@ -252,7 +252,7 @@ static av_cold int flashsv_decode_end(AVCodecContext *avctx) · 251 unmodified lines
252252
253253 AVCodec flashsv_decoder = {
254254 "flashsv",
255− CODEC_TYPE_VIDEO,
255+ AVMEDIA_TYPE_VIDEO,
256256 CODEC_ID_FLASHSV,
257257 sizeof(FlashSVContext),
258258 flashsv_decode_init,
libavcodec/flashsvenc.c+1−1
@@ -282,7 +282,7 @@ static av_cold int flashsv_encode_end(AVCodecContext *avctx) · 281 unmodified lines
282282
283283 AVCodec flashsv_encoder = {
284284 "flashsv",
285− CODEC_TYPE_VIDEO,
285+ AVMEDIA_TYPE_VIDEO,
286286 CODEC_ID_FLASHSV,
287287 sizeof(FlashSVContext),
288288 flashsv_encode_init,
libavcodec/flicvideo.c+1−1
@@ -739,7 +739,7 @@ static av_cold int flic_decode_end(AVCodecContext *avctx) · 738 unmodified lines
739739
740740 AVCodec flic_decoder = {
741741 "flic",
742− CODEC_TYPE_VIDEO,
742+ AVMEDIA_TYPE_VIDEO,
743743 CODEC_ID_FLIC,
744744 sizeof(FlicDecodeContext),
745745 flic_decode_init,
libavcodec/flvdec.c+1−1
@@ -119,7 +119,7 @@ int ff_flv_decode_picture_header(MpegEncContext *s) · 118 unmodified lines
119119
120120 AVCodec flv_decoder = {
121121 "flv",
122− CODEC_TYPE_VIDEO,
122+ AVMEDIA_TYPE_VIDEO,
123123 CODEC_ID_FLV1,
124124 sizeof(MpegEncContext),
125125 ff_h263_decode_init,
libavcodec/flvenc.c+1−1
@@ -86,7 +86,7 @@ void ff_flv2_encode_ac_esc(PutBitContext *pb, int slevel, int level, int run, in · 85 unmodified lines
8686
8787 AVCodec flv_encoder = {
8888 "flv",
89− CODEC_TYPE_VIDEO,
89+ AVMEDIA_TYPE_VIDEO,
9090 CODEC_ID_FLV1,
9191 sizeof(MpegEncContext),
9292 MPV_encode_init,
libavcodec/fraps.c+1−1
@@ -366,7 +366,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 365 unmodified lines
366366
367367 AVCodec fraps_decoder = {
368368 "fraps",
369− CODEC_TYPE_VIDEO,
369+ AVMEDIA_TYPE_VIDEO,
370370 CODEC_ID_FRAPS,
371371 sizeof(FrapsContext),
372372 decode_init,
libavcodec/frwu.c+1−1
@@ -111,7 +111,7 @@ static av_cold int decode_close(AVCodecContext *avctx) · 110 unmodified lines
111111
112112 AVCodec frwu_decoder = {
113113 "FRWU",
114− CODEC_TYPE_VIDEO,
114+ AVMEDIA_TYPE_VIDEO,
115115 CODEC_ID_FRWU,
116116 0,
117117 decode_init,
libavcodec/g726.c+2−2
@@ -387,7 +387,7 @@ static int g726_decode_frame(AVCodecContext *avctx, · 386 unmodified lines
387387 #if CONFIG_ADPCM_G726_ENCODER
388388 AVCodec adpcm_g726_encoder = {
389389 "g726",
390− CODEC_TYPE_AUDIO,
390+ AVMEDIA_TYPE_AUDIO,
391391 CODEC_ID_ADPCM_G726,
392392 sizeof(G726Context),
393393 g726_init,
@@ -401,7 +401,7 @@ AVCodec adpcm_g726_encoder = { · 7 unmodified lines
401401
402402 AVCodec adpcm_g726_decoder = {
403403 "g726",
404− CODEC_TYPE_AUDIO,
404+ AVMEDIA_TYPE_AUDIO,
405405 CODEC_ID_ADPCM_G726,
406406 sizeof(G726Context),
407407 g726_init,
libavcodec/g729dec.c+1−1
@@ -315,7 +315,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 314 unmodified lines
315315 AVCodec g729_decoder =
316316 {
317317 "g729",
318− CODEC_TYPE_AUDIO,
318+ AVMEDIA_TYPE_AUDIO,
319319 CODEC_ID_G729,
320320 sizeof(G729Context),
321321 decoder_init,
libavcodec/gif.c+1−1
@@ -168,7 +168,7 @@ static int gif_encode_close(AVCodecContext *avctx) · 167 unmodified lines
168168
169169 AVCodec gif_encoder = {
170170 "gif",
171− CODEC_TYPE_VIDEO,
171+ AVMEDIA_TYPE_VIDEO,
172172 CODEC_ID_GIF,
173173 sizeof(GIFContext),
174174 gif_encode_init,
libavcodec/gifdec.c+1−1
@@ -328,7 +328,7 @@ static av_cold int gif_decode_close(AVCodecContext *avctx) · 327 unmodified lines
328328
329329 AVCodec gif_decoder = {
330330 "gif",
331− CODEC_TYPE_VIDEO,
331+ AVMEDIA_TYPE_VIDEO,
332332 CODEC_ID_GIF,
333333 sizeof(GifState),
334334 gif_decode_init,
libavcodec/h261dec.c+1−1
@@ -643,7 +643,7 @@ static av_cold int h261_decode_end(AVCodecContext *avctx) · 642 unmodified lines
643643
644644 AVCodec h261_decoder = {
645645 "h261",
646− CODEC_TYPE_VIDEO,
646+ AVMEDIA_TYPE_VIDEO,
647647 CODEC_ID_H261,
648648 sizeof(H261Context),
649649 h261_decode_init,
libavcodec/h261enc.c+1−1
@@ -323,7 +323,7 @@ static void h261_encode_block(H261Context * h, DCTELEM * block, int n){ · 322 unmodified lines
323323
324324 AVCodec h261_encoder = {
325325 "h261",
326− CODEC_TYPE_VIDEO,
326+ AVMEDIA_TYPE_VIDEO,
327327 CODEC_ID_H261,
328328 sizeof(H261Context),
329329 MPV_encode_init,
libavcodec/h263dec.c+1−1
@@ -727,7 +727,7 @@ av_log(avctx, AV_LOG_DEBUG, "%"PRId64"\n", rdtsc()-time); · 726 unmodified lines
727727
728728 AVCodec h263_decoder = {
729729 "h263",
730− CODEC_TYPE_VIDEO,
730+ AVMEDIA_TYPE_VIDEO,
731731 CODEC_ID_H263,
732732 sizeof(MpegEncContext),
733733 ff_h263_decode_init,
libavcodec/h264.c+2−2
@@ -3148,7 +3148,7 @@ av_cold int ff_h264_decode_end(AVCodecContext *avctx) · 3147 unmodified lines
31483148
31493149 AVCodec h264_decoder = {
31503150 "h264",
3151− CODEC_TYPE_VIDEO,
3151+ AVMEDIA_TYPE_VIDEO,
31523152 CODEC_ID_H264,
31533153 sizeof(H264Context),
31543154 ff_h264_decode_init,
@@ -3164,7 +3164,7 @@ AVCodec h264_decoder = { · 9 unmodified lines
31643164 #if CONFIG_H264_VDPAU_DECODER
31653165 AVCodec h264_vdpau_decoder = {
31663166 "h264_vdpau",
3167− CODEC_TYPE_VIDEO,
3167+ AVMEDIA_TYPE_VIDEO,
31683168 CODEC_ID_H264,
31693169 sizeof(H264Context),
31703170 ff_h264_decode_init,
libavcodec/huffyuv.c+4−4
@@ -1414,7 +1414,7 @@ static av_cold int encode_end(AVCodecContext *avctx) · 1413 unmodified lines
14141414 #if CONFIG_HUFFYUV_DECODER
14151415 AVCodec huffyuv_decoder = {
14161416 "huffyuv",
1417− CODEC_TYPE_VIDEO,
1417+ AVMEDIA_TYPE_VIDEO,
14181418 CODEC_ID_HUFFYUV,
14191419 sizeof(HYuvContext),
14201420 decode_init,
@@ -1430,7 +1430,7 @@ AVCodec huffyuv_decoder = { · 9 unmodified lines
14301430 #if CONFIG_FFVHUFF_DECODER
14311431 AVCodec ffvhuff_decoder = {
14321432 "ffvhuff",
1433− CODEC_TYPE_VIDEO,
1433+ AVMEDIA_TYPE_VIDEO,
14341434 CODEC_ID_FFVHUFF,
14351435 sizeof(HYuvContext),
14361436 decode_init,
@@ -1446,7 +1446,7 @@ AVCodec ffvhuff_decoder = { · 9 unmodified lines
14461446 #if CONFIG_HUFFYUV_ENCODER
14471447 AVCodec huffyuv_encoder = {
14481448 "huffyuv",
1449− CODEC_TYPE_VIDEO,
1449+ AVMEDIA_TYPE_VIDEO,
14501450 CODEC_ID_HUFFYUV,
14511451 sizeof(HYuvContext),
14521452 encode_init,
@@ -1460,7 +1460,7 @@ AVCodec huffyuv_encoder = { · 7 unmodified lines
14601460 #if CONFIG_FFVHUFF_ENCODER
14611461 AVCodec ffvhuff_encoder = {
14621462 "ffvhuff",
1463− CODEC_TYPE_VIDEO,
1463+ AVMEDIA_TYPE_VIDEO,
14641464 CODEC_ID_FFVHUFF,
14651465 sizeof(HYuvContext),
14661466 encode_init,
libavcodec/idcinvideo.c+1−1
@@ -255,7 +255,7 @@ static av_cold int idcin_decode_end(AVCodecContext *avctx) · 254 unmodified lines
255255
256256 AVCodec idcin_decoder = {
257257 "idcinvideo",
258− CODEC_TYPE_VIDEO,
258+ AVMEDIA_TYPE_VIDEO,
259259 CODEC_ID_IDCIN,
260260 sizeof(IdcinContext),
261261 idcin_decode_init,
libavcodec/iff.c+2−2
@@ -218,7 +218,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 217 unmodified lines
218218
219219 AVCodec iff_ilbm_decoder = {
220220 "iff_ilbm",
221− CODEC_TYPE_VIDEO,
221+ AVMEDIA_TYPE_VIDEO,
222222 CODEC_ID_IFF_ILBM,
223223 sizeof(IffContext),
224224 decode_init,
@@ -231,7 +231,7 @@ AVCodec iff_ilbm_decoder = { · 6 unmodified lines
231231
232232 AVCodec iff_byterun1_decoder = {
233233 "iff_byterun1",
234− CODEC_TYPE_VIDEO,
234+ AVMEDIA_TYPE_VIDEO,
235235 CODEC_ID_IFF_BYTERUN1,
236236 sizeof(IffContext),
237237 decode_init,
libavcodec/imc.c+1−1
@@ -823,7 +823,7 @@ static av_cold int imc_decode_close(AVCodecContext * avctx) · 822 unmodified lines
823823
824824 AVCodec imc_decoder = {
825825 .name = "imc",
826− .type = CODEC_TYPE_AUDIO,
826+ .type = AVMEDIA_TYPE_AUDIO,
827827 .id = CODEC_ID_IMC,
828828 .priv_data_size = sizeof(IMCContext),
829829 .init = imc_decode_init,
libavcodec/indeo2.c+1−1
@@ -226,7 +226,7 @@ static av_cold int ir2_decode_end(AVCodecContext *avctx){ · 225 unmodified lines
226226
227227 AVCodec indeo2_decoder = {
228228 "indeo2",
229− CODEC_TYPE_VIDEO,
229+ AVMEDIA_TYPE_VIDEO,
230230 CODEC_ID_INDEO2,
231231 sizeof(Ir2Context),
232232 ir2_decode_init,
libavcodec/indeo3.c+1−1
@@ -1138,7 +1138,7 @@ static av_cold int indeo3_decode_end(AVCodecContext *avctx) · 1137 unmodified lines
11381138
11391139 AVCodec indeo3_decoder = {
11401140 "indeo3",
1141− CODEC_TYPE_VIDEO,
1141+ AVMEDIA_TYPE_VIDEO,
11421142 CODEC_ID_INDEO3,
11431143 sizeof(Indeo3DecodeContext),
11441144 indeo3_decode_init,
libavcodec/indeo5.c+1−1
@@ -817,7 +817,7 @@ static av_cold int decode_close(AVCodecContext *avctx) · 816 unmodified lines
817817
818818 AVCodec indeo5_decoder = {
819819 .name = "indeo5",
820− .type = CODEC_TYPE_VIDEO,
820+ .type = AVMEDIA_TYPE_VIDEO,
821821 .id = CODEC_ID_INDEO5,
822822 .priv_data_size = sizeof(IVI5DecContext),
823823 .init = decode_init,
libavcodec/intelh263dec.c+1−1
@@ -117,7 +117,7 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s) · 116 unmodified lines
117117
118118 AVCodec h263i_decoder = {
119119 "h263i",
120− CODEC_TYPE_VIDEO,
120+ AVMEDIA_TYPE_VIDEO,
121121 CODEC_ID_H263I,
122122 sizeof(MpegEncContext),
123123 ff_h263_decode_init,
libavcodec/interplayvideo.c+1−1
@@ -1095,7 +1095,7 @@ static av_cold int ipvideo_decode_end(AVCodecContext *avctx) · 1094 unmodified lines
10951095
10961096 AVCodec interplay_video_decoder = {
10971097 "interplayvideo",
1098− CODEC_TYPE_VIDEO,
1098+ AVMEDIA_TYPE_VIDEO,
10991099 CODEC_ID_INTERPLAY_VIDEO,
11001100 sizeof(IpvideoContext),
11011101 ipvideo_decode_init,
libavcodec/jpeglsdec.c+1−1
@@ -365,7 +365,7 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near, int point_transfor · 364 unmodified lines
365365
366366 AVCodec jpegls_decoder = {
367367 "jpegls",
368− CODEC_TYPE_VIDEO,
368+ AVMEDIA_TYPE_VIDEO,
369369 CODEC_ID_JPEGLS,
370370 sizeof(MJpegDecodeContext),
371371 ff_mjpeg_decode_init,
libavcodec/jpeglsenc.c+1−1
@@ -384,7 +384,7 @@ static av_cold int encode_init_ls(AVCodecContext *ctx) { · 383 unmodified lines
384384
385385 AVCodec jpegls_encoder = { //FIXME avoid MPV_* lossless JPEG should not need them
386386 "jpegls",
387− CODEC_TYPE_VIDEO,
387+ AVMEDIA_TYPE_VIDEO,
388388 CODEC_ID_JPEGLS,
389389 sizeof(JpeglsContext),
390390 encode_init_ls,
libavcodec/kgv1dec.c+1−1
@@ -165,7 +165,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 164 unmodified lines
165165
166166 AVCodec kgv1_decoder = {
167167 "kgv1",
168− CODEC_TYPE_VIDEO,
168+ AVMEDIA_TYPE_VIDEO,
169169 CODEC_ID_KGV1,
170170 sizeof(KgvContext),
171171 decode_init,
libavcodec/kmvc.c+1−1
@@ -403,7 +403,7 @@ static av_cold int decode_end(AVCodecContext * avctx) · 402 unmodified lines
403403
404404 AVCodec kmvc_decoder = {
405405 "kmvc",
406− CODEC_TYPE_VIDEO,
406+ AVMEDIA_TYPE_VIDEO,
407407 CODEC_ID_KMVC,
408408 sizeof(KmvcContext),
409409 decode_init,
libavcodec/lcldec.c+2−2
@@ -611,7 +611,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 610 unmodified lines
611611 #if CONFIG_MSZH_DECODER
612612 AVCodec mszh_decoder = {
613613 "mszh",
614− CODEC_TYPE_VIDEO,
614+ AVMEDIA_TYPE_VIDEO,
615615 CODEC_ID_MSZH,
616616 sizeof(LclDecContext),
617617 decode_init,
@@ -626,7 +626,7 @@ AVCodec mszh_decoder = { · 8 unmodified lines
626626 #if CONFIG_ZLIB_DECODER
627627 AVCodec zlib_decoder = {
628628 "zlib",
629− CODEC_TYPE_VIDEO,
629+ AVMEDIA_TYPE_VIDEO,
630630 CODEC_ID_ZLIB,
631631 sizeof(LclDecContext),
632632 decode_init,
libavcodec/lclenc.c+1−1
@@ -180,7 +180,7 @@ static av_cold int encode_end(AVCodecContext *avctx) · 179 unmodified lines
180180
181181 AVCodec zlib_encoder = {
182182 "zlib",
183− CODEC_TYPE_VIDEO,
183+ AVMEDIA_TYPE_VIDEO,
184184 CODEC_ID_ZLIB,
185185 sizeof(LclEncContext),
186186 encode_init,
libavcodec/libdiracdec.c+1−1
@@ -195,7 +195,7 @@ static void libdirac_flush(AVCodecContext *avccontext) · 194 unmodified lines
195195
196196 AVCodec libdirac_decoder = {
197197 "libdirac",
198− CODEC_TYPE_VIDEO,
198+ AVMEDIA_TYPE_VIDEO,
199199 CODEC_ID_DIRAC,
200200 sizeof(FfmpegDiracDecoderParams),
201201 libdirac_decode_init,
libavcodec/libdiracenc.c+1−1
@@ -393,7 +393,7 @@ static av_cold int libdirac_encode_close(AVCodecContext *avccontext) · 392 unmodified lines
393393
394394 AVCodec libdirac_encoder = {
395395 "libdirac",
396− CODEC_TYPE_VIDEO,
396+ AVMEDIA_TYPE_VIDEO,
397397 CODEC_ID_DIRAC,
398398 sizeof(FfmpegDiracEncoderParams),
399399 libdirac_encode_init,
libavcodec/libfaac.c+1−1
@@ -147,7 +147,7 @@ static av_cold int Faac_encode_close(AVCodecContext *avctx) · 146 unmodified lines
147147
148148 AVCodec libfaac_encoder = {
149149 "libfaac",
150− CODEC_TYPE_AUDIO,
150+ AVMEDIA_TYPE_AUDIO,
151151 CODEC_ID_AAC,
152152 sizeof(FaacAudioContext),
153153 Faac_encode_init,
libavcodec/libfaad.c+1−1
@@ -322,7 +322,7 @@ static av_cold int faac_decode_init(AVCodecContext *avctx) · 321 unmodified lines
322322
323323 AVCodec libfaad_decoder = {
324324 "libfaad",
325− CODEC_TYPE_AUDIO,
325+ AVMEDIA_TYPE_AUDIO,
326326 CODEC_ID_AAC,
327327 sizeof(FAACContext),
328328 faac_decode_init,
libavcodec/libgsm.c+4−4
@@ -114,7 +114,7 @@ static int libgsm_encode_frame(AVCodecContext *avctx, · 113 unmodified lines
114114
115115 AVCodec libgsm_encoder = {
116116 "libgsm",
117− CODEC_TYPE_AUDIO,
117+ AVMEDIA_TYPE_AUDIO,
118118 CODEC_ID_GSM,
119119 0,
120120 libgsm_init,
@@ -126,7 +126,7 @@ AVCodec libgsm_encoder = { · 5 unmodified lines
126126
127127 AVCodec libgsm_ms_encoder = {
128128 "libgsm_ms",
129− CODEC_TYPE_AUDIO,
129+ AVMEDIA_TYPE_AUDIO,
130130 CODEC_ID_GSM_MS,
131131 0,
132132 libgsm_init,
@@ -158,7 +158,7 @@ static int libgsm_decode_frame(AVCodecContext *avctx, · 25 unmodified lines
158158
159159 AVCodec libgsm_decoder = {
160160 "libgsm",
161− CODEC_TYPE_AUDIO,
161+ AVMEDIA_TYPE_AUDIO,
162162 CODEC_ID_GSM,
163163 0,
164164 libgsm_init,
@@ -170,7 +170,7 @@ AVCodec libgsm_decoder = { · 5 unmodified lines
170170
171171 AVCodec libgsm_ms_decoder = {
172172 "libgsm_ms",
173− CODEC_TYPE_AUDIO,
173+ AVMEDIA_TYPE_AUDIO,
174174 CODEC_ID_GSM_MS,
175175 0,
176176 libgsm_init,
libavcodec/libmp3lame.c+1−1
@@ -216,7 +216,7 @@ static av_cold int MP3lame_encode_close(AVCodecContext *avctx) · 215 unmodified lines
216216
217217 AVCodec libmp3lame_encoder = {
218218 "libmp3lame",
219− CODEC_TYPE_AUDIO,
219+ AVMEDIA_TYPE_AUDIO,
220220 CODEC_ID_MP3,
221221 sizeof(Mp3AudioContext),
222222 MP3lame_encode_init,
libavcodec/libopencore-amr.c+3−3
@@ -141,7 +141,7 @@ static int amr_nb_decode_frame(AVCodecContext *avctx, void *data, · 140 unmodified lines
141141
142142 AVCodec libopencore_amrnb_decoder = {
143143 "libopencore_amrnb",
144− CODEC_TYPE_AUDIO,
144+ AVMEDIA_TYPE_AUDIO,
145145 CODEC_ID_AMR_NB,
146146 sizeof(AMRContext),
147147 amr_nb_decode_init,
@@ -215,7 +215,7 @@ static int amr_nb_encode_frame(AVCodecContext *avctx, · 67 unmodified lines
215215
216216 AVCodec libopencore_amrnb_encoder = {
217217 "libopencore_amrnb",
218− CODEC_TYPE_AUDIO,
218+ AVMEDIA_TYPE_AUDIO,
219219 CODEC_ID_AMR_NB,
220220 sizeof(AMRContext),
221221 amr_nb_encode_init,
@@ -312,7 +312,7 @@ static int amr_wb_decode_close(AVCodecContext *avctx) · 90 unmodified lines
312312
313313 AVCodec libopencore_amrwb_decoder = {
314314 "libopencore_amrwb",
315− CODEC_TYPE_AUDIO,
315+ AVMEDIA_TYPE_AUDIO,
316316 CODEC_ID_AMR_WB,
317317 sizeof(AMRWBContext),
318318 amr_wb_decode_init,
libavcodec/libopenjpeg.c+1−1
@@ -185,7 +185,7 @@ static av_cold int libopenjpeg_decode_close(AVCodecContext *avctx) · 184 unmodified lines
185185
186186 AVCodec libopenjpeg_decoder = {
187187 "libopenjpeg",
188− CODEC_TYPE_VIDEO,
188+ AVMEDIA_TYPE_VIDEO,
189189 CODEC_ID_JPEG2000,
190190 sizeof(LibOpenJPEGContext),
191191 libopenjpeg_decode_init,
libavcodec/libschroedingerdec.c+1−1
@@ -347,7 +347,7 @@ static void libschroedinger_flush(AVCodecContext *avccontext) · 346 unmodified lines
347347
348348 AVCodec libschroedinger_decoder = {
349349 "libschroedinger",
350− CODEC_TYPE_VIDEO,
350+ AVMEDIA_TYPE_VIDEO,
351351 CODEC_ID_DIRAC,
352352 sizeof(FfmpegSchroDecoderParams),
353353 libschroedinger_decode_init,
libavcodec/libschroedingerenc.c+1−1
@@ -407,7 +407,7 @@ static int libschroedinger_encode_close(AVCodecContext *avccontext) · 406 unmodified lines
407407
408408 AVCodec libschroedinger_encoder = {
409409 "libschroedinger",
410− CODEC_TYPE_VIDEO,
410+ AVMEDIA_TYPE_VIDEO,
411411 CODEC_ID_DIRAC,
412412 sizeof(FfmpegSchroEncoderParams),
413413 libschroedinger_encode_init,
libavcodec/libspeexdec.c+1−1
@@ -140,7 +140,7 @@ static av_cold int libspeex_decode_close(AVCodecContext *avctx) · 139 unmodified lines
140140
141141 AVCodec libspeex_decoder = {
142142 "libspeex",
143− CODEC_TYPE_AUDIO,
143+ AVMEDIA_TYPE_AUDIO,
144144 CODEC_ID_SPEEX,
145145 sizeof(LibSpeexContext),
146146 libspeex_decode_init,
libavcodec/libtheoraenc.c+1−1
@@ -361,7 +361,7 @@ static av_cold int encode_close(AVCodecContext* avc_context) · 360 unmodified lines
361361 /*! AVCodec struct exposed to libavcodec */
362362 AVCodec libtheora_encoder = {
363363 .name = "libtheora",
364− .type = CODEC_TYPE_VIDEO,
364+ .type = AVMEDIA_TYPE_VIDEO,
365365 .id = CODEC_ID_THEORA,
366366 .priv_data_size = sizeof(TheoraContext),
367367 .init = encode_init,
libavcodec/libvorbis.c+1−1
@@ -217,7 +217,7 @@ static av_cold int oggvorbis_encode_close(AVCodecContext *avccontext) { · 216 unmodified lines
217217
218218 AVCodec libvorbis_encoder = {
219219 "libvorbis",
220− CODEC_TYPE_AUDIO,
220+ AVMEDIA_TYPE_AUDIO,
221221 CODEC_ID_VORBIS,
222222 sizeof(OggVorbisContext),
223223 oggvorbis_encode_init,
libavcodec/libx264.c+1−1
@@ -317,7 +317,7 @@ static av_cold int X264_init(AVCodecContext *avctx) · 316 unmodified lines
317317
318318 AVCodec libx264_encoder = {
319319 .name = "libx264",
320− .type = CODEC_TYPE_VIDEO,
320+ .type = AVMEDIA_TYPE_VIDEO,
321321 .id = CODEC_ID_H264,
322322 .priv_data_size = sizeof(X264Context),
323323 .init = X264_init,
libavcodec/libxvidff.c+1−1
@@ -769,7 +769,7 @@ int xvid_ff_2pass(void *ref, int cmd, void *p1, void *p2) { · 768 unmodified lines
769769 */
770770 AVCodec libxvid_encoder = {
771771 "libxvid",
772− CODEC_TYPE_VIDEO,
772+ AVMEDIA_TYPE_VIDEO,
773773 CODEC_ID_MPEG4,
774774 sizeof(struct xvid_context),
775775 xvid_encode_init,
libavcodec/ljpegenc.c+1−1
@@ -188,7 +188,7 @@ static int encode_picture_lossless(AVCodecContext *avctx, unsigned char *buf, in · 187 unmodified lines
188188
189189 AVCodec ljpeg_encoder = { //FIXME avoid MPV_* lossless JPEG should not need them
190190 "ljpeg",
191− CODEC_TYPE_VIDEO,
191+ AVMEDIA_TYPE_VIDEO,
192192 CODEC_ID_LJPEG,
193193 sizeof(MpegEncContext),
194194 MPV_encode_init,
libavcodec/loco.c+1−1
@@ -287,7 +287,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 286 unmodified lines
287287
288288 AVCodec loco_decoder = {
289289 "loco",
290− CODEC_TYPE_VIDEO,
290+ AVMEDIA_TYPE_VIDEO,
291291 CODEC_ID_LOCO,
292292 sizeof(LOCOContext),
293293 decode_init,
libavcodec/mace.c+2−2
@@ -281,7 +281,7 @@ static int mace_decode_frame(AVCodecContext *avctx, · 280 unmodified lines
281281
282282 AVCodec mace3_decoder = {
283283 "mace3",
284− CODEC_TYPE_AUDIO,
284+ AVMEDIA_TYPE_AUDIO,
285285 CODEC_ID_MACE3,
286286 sizeof(MACEContext),
287287 mace_decode_init,
@@ -293,7 +293,7 @@ AVCodec mace3_decoder = { · 5 unmodified lines
293293
294294 AVCodec mace6_decoder = {
295295 "mace6",
296− CODEC_TYPE_AUDIO,
296+ AVMEDIA_TYPE_AUDIO,
297297 CODEC_ID_MACE6,
298298 sizeof(MACEContext),
299299 mace_decode_init,
libavcodec/mdec.c+1−1
@@ -250,7 +250,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 249 unmodified lines
250250
251251 AVCodec mdec_decoder = {
252252 "mdec",
253− CODEC_TYPE_VIDEO,
253+ AVMEDIA_TYPE_VIDEO,
254254 CODEC_ID_MDEC,
255255 sizeof(MDECContext),
256256 decode_init,
libavcodec/mimic.c+1−1
@@ -380,7 +380,7 @@ static av_cold int mimic_decode_end(AVCodecContext *avctx) · 379 unmodified lines
380380
381381 AVCodec mimic_decoder = {
382382 "mimic",
383− CODEC_TYPE_VIDEO,
383+ AVMEDIA_TYPE_VIDEO,
384384 CODEC_ID_MIMIC,
385385 sizeof(MimicContext),
386386 mimic_decode_init,
libavcodec/mjpegbdec.c+1−1
@@ -147,7 +147,7 @@ read_header: · 146 unmodified lines
147147
148148 AVCodec mjpegb_decoder = {
149149 "mjpegb",
150− CODEC_TYPE_VIDEO,
150+ AVMEDIA_TYPE_VIDEO,
151151 CODEC_ID_MJPEGB,
152152 sizeof(MJpegDecodeContext),
153153 ff_mjpeg_decode_init,
libavcodec/mjpegdec.c+2−2
@@ -1533,7 +1533,7 @@ av_cold int ff_mjpeg_decode_end(AVCodecContext *avctx) · 1532 unmodified lines
15331533
15341534 AVCodec mjpeg_decoder = {
15351535 "mjpeg",
1536− CODEC_TYPE_VIDEO,
1536+ AVMEDIA_TYPE_VIDEO,
15371537 CODEC_ID_MJPEG,
15381538 sizeof(MJpegDecodeContext),
15391539 ff_mjpeg_decode_init,
@@ -1547,7 +1547,7 @@ AVCodec mjpeg_decoder = { · 7 unmodified lines
15471547
15481548 AVCodec thp_decoder = {
15491549 "thp",
1550− CODEC_TYPE_VIDEO,
1550+ AVMEDIA_TYPE_VIDEO,
15511551 CODEC_ID_THP,
15521552 sizeof(MJpegDecodeContext),
15531553 ff_mjpeg_decode_init,
libavcodec/mjpegenc.c+1−1
@@ -445,7 +445,7 @@ void ff_mjpeg_encode_mb(MpegEncContext *s, DCTELEM block[6][64]) · 444 unmodified lines
445445
446446 AVCodec mjpeg_encoder = {
447447 "mjpeg",
448− CODEC_TYPE_VIDEO,
448+ AVMEDIA_TYPE_VIDEO,
449449 CODEC_ID_MJPEG,
450450 sizeof(MpegEncContext),
451451 MPV_encode_init,
libavcodec/mlpdec.c+2−2
@@ -1136,7 +1136,7 @@ error: · 1135 unmodified lines
11361136
11371137 AVCodec mlp_decoder = {
11381138 "mlp",
1139− CODEC_TYPE_AUDIO,
1139+ AVMEDIA_TYPE_AUDIO,
11401140 CODEC_ID_MLP,
11411141 sizeof(MLPDecodeContext),
11421142 mlp_decode_init,
@@ -1149,7 +1149,7 @@ AVCodec mlp_decoder = { · 6 unmodified lines
11491149 #if CONFIG_TRUEHD_DECODER
11501150 AVCodec truehd_decoder = {
11511151 "truehd",
1152− CODEC_TYPE_AUDIO,
1152+ AVMEDIA_TYPE_AUDIO,
11531153 CODEC_ID_TRUEHD,
11541154 sizeof(MLPDecodeContext),
11551155 mlp_decode_init,
libavcodec/mmvideo.c+1−1
@@ -200,7 +200,7 @@ static av_cold int mm_decode_end(AVCodecContext *avctx) · 199 unmodified lines
200200
201201 AVCodec mmvideo_decoder = {
202202 "mmvideo",
203− CODEC_TYPE_VIDEO,
203+ AVMEDIA_TYPE_VIDEO,
204204 CODEC_ID_MMVIDEO,
205205 sizeof(MmContext),
206206 mm_decode_init,
libavcodec/motionpixels.c+1−1
@@ -304,7 +304,7 @@ static av_cold int mp_decode_end(AVCodecContext *avctx) · 303 unmodified lines
304304
305305 AVCodec motionpixels_decoder = {
306306 "motionpixels",
307− CODEC_TYPE_VIDEO,
307+ AVMEDIA_TYPE_VIDEO,
308308 CODEC_ID_MOTIONPIXELS,
309309 sizeof(MotionPixelsContext),
310310 mp_decode_init,
libavcodec/mpc7.c+1−1
@@ -290,7 +290,7 @@ static void mpc7_decode_flush(AVCodecContext *avctx) · 289 unmodified lines
290290
291291 AVCodec mpc7_decoder = {
292292 "mpc7",
293− CODEC_TYPE_AUDIO,
293+ AVMEDIA_TYPE_AUDIO,
294294 CODEC_ID_MUSEPACK7,
295295 sizeof(MPCContext),
296296 mpc7_decode_init,
libavcodec/mpc8.c+1−1
@@ -401,7 +401,7 @@ static int mpc8_decode_frame(AVCodecContext * avctx, · 400 unmodified lines
401401
402402 AVCodec mpc8_decoder = {
403403 "mpc8",
404− CODEC_TYPE_AUDIO,
404+ AVMEDIA_TYPE_AUDIO,
405405 CODEC_ID_MUSEPACK8,
406406 sizeof(MPCContext),
407407 mpc8_decode_init,
libavcodec/mpeg12.c+6−6
@@ -2502,7 +2502,7 @@ static int mpeg_decode_end(AVCodecContext *avctx) · 2501 unmodified lines
25022502
25032503 AVCodec mpeg1video_decoder = {
25042504 "mpeg1video",
2505− CODEC_TYPE_VIDEO,
2505+ AVMEDIA_TYPE_VIDEO,
25062506 CODEC_ID_MPEG1VIDEO,
25072507 sizeof(Mpeg1Context),
25082508 mpeg_decode_init,
@@ -2516,7 +2516,7 @@ AVCodec mpeg1video_decoder = { · 7 unmodified lines
25162516
25172517 AVCodec mpeg2video_decoder = {
25182518 "mpeg2video",
2519− CODEC_TYPE_VIDEO,
2519+ AVMEDIA_TYPE_VIDEO,
25202520 CODEC_ID_MPEG2VIDEO,
25212521 sizeof(Mpeg1Context),
25222522 mpeg_decode_init,
@@ -2531,7 +2531,7 @@ AVCodec mpeg2video_decoder = { · 8 unmodified lines
25312531 //legacy decoder
25322532 AVCodec mpegvideo_decoder = {
25332533 "mpegvideo",
2534− CODEC_TYPE_VIDEO,
2534+ AVMEDIA_TYPE_VIDEO,
25352535 CODEC_ID_MPEG2VIDEO,
25362536 sizeof(Mpeg1Context),
25372537 mpeg_decode_init,
@@ -2562,7 +2562,7 @@ static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx){ · 24 unmodified lines
25622562
25632563 AVCodec mpeg_xvmc_decoder = {
25642564 "mpegvideo_xvmc",
2565− CODEC_TYPE_VIDEO,
2565+ AVMEDIA_TYPE_VIDEO,
25662566 CODEC_ID_MPEG2VIDEO_XVMC,
25672567 sizeof(Mpeg1Context),
25682568 mpeg_mc_decode_init,
@@ -2579,7 +2579,7 @@ AVCodec mpeg_xvmc_decoder = { · 10 unmodified lines
25792579 #if CONFIG_MPEG_VDPAU_DECODER
25802580 AVCodec mpeg_vdpau_decoder = {
25812581 "mpegvideo_vdpau",
2582− CODEC_TYPE_VIDEO,
2582+ AVMEDIA_TYPE_VIDEO,
25832583 CODEC_ID_MPEG2VIDEO,
25842584 sizeof(Mpeg1Context),
25852585 mpeg_decode_init,
@@ -2595,7 +2595,7 @@ AVCodec mpeg_vdpau_decoder = { · 9 unmodified lines
25952595 #if CONFIG_MPEG1_VDPAU_DECODER
25962596 AVCodec mpeg1_vdpau_decoder = {
25972597 "mpeg1video_vdpau",
2598− CODEC_TYPE_VIDEO,
2598+ AVMEDIA_TYPE_VIDEO,
25992599 CODEC_ID_MPEG1VIDEO,
26002600 sizeof(Mpeg1Context),
26012601 mpeg_decode_init,
libavcodec/mpeg12enc.c+2−2
@@ -932,7 +932,7 @@ static void mpeg1_encode_block(MpegEncContext *s, · 931 unmodified lines
932932
933933 AVCodec mpeg1video_encoder = {
934934 "mpeg1video",
935− CODEC_TYPE_VIDEO,
935+ AVMEDIA_TYPE_VIDEO,
936936 CODEC_ID_MPEG1VIDEO,
937937 sizeof(MpegEncContext),
938938 encode_init,
@@ -946,7 +946,7 @@ AVCodec mpeg1video_encoder = { · 7 unmodified lines
946946
947947 AVCodec mpeg2video_encoder = {
948948 "mpeg2video",
949− CODEC_TYPE_VIDEO,
949+ AVMEDIA_TYPE_VIDEO,
950950 CODEC_ID_MPEG2VIDEO,
951951 sizeof(MpegEncContext),
952952 encode_init,
libavcodec/mpeg4videodec.c+2−2
@@ -2236,7 +2236,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 2235 unmodified lines
22362236
22372237 AVCodec mpeg4_decoder = {
22382238 "mpeg4",
2239− CODEC_TYPE_VIDEO,
2239+ AVMEDIA_TYPE_VIDEO,
22402240 CODEC_ID_MPEG4,
22412241 sizeof(MpegEncContext),
22422242 decode_init,
@@ -2253,7 +2253,7 @@ AVCodec mpeg4_decoder = { · 10 unmodified lines
22532253 #if CONFIG_MPEG4_VDPAU_DECODER
22542254 AVCodec mpeg4_vdpau_decoder = {
22552255 "mpeg4_vdpau",
2256− CODEC_TYPE_VIDEO,
2256+ AVMEDIA_TYPE_VIDEO,
22572257 CODEC_ID_MPEG4,
22582258 sizeof(MpegEncContext),
22592259 decode_init,
libavcodec/mpeg4videoenc.c+1−1
@@ -1340,7 +1340,7 @@ void ff_mpeg4_encode_video_packet_header(MpegEncContext *s) · 1339 unmodified lines
13401340
13411341 AVCodec mpeg4_encoder = {
13421342 "mpeg4",
1343− CODEC_TYPE_VIDEO,
1343+ AVMEDIA_TYPE_VIDEO,
13441344 CODEC_ID_MPEG4,
13451345 sizeof(MpegEncContext),
13461346 encode_init,
libavcodec/mpegaudiodec.c+5−5
@@ -2485,7 +2485,7 @@ static int decode_frame_mp3on4(AVCodecContext * avctx, · 2484 unmodified lines
24852485 AVCodec mp1_decoder =
24862486 {
24872487 "mp1",
2488− CODEC_TYPE_AUDIO,
2488+ AVMEDIA_TYPE_AUDIO,
24892489 CODEC_ID_MP1,
24902490 sizeof(MPADecodeContext),
24912491 decode_init,
@@ -2501,7 +2501,7 @@ AVCodec mp1_decoder = · 9 unmodified lines
25012501 AVCodec mp2_decoder =
25022502 {
25032503 "mp2",
2504− CODEC_TYPE_AUDIO,
2504+ AVMEDIA_TYPE_AUDIO,
25052505 CODEC_ID_MP2,
25062506 sizeof(MPADecodeContext),
25072507 decode_init,
@@ -2517,7 +2517,7 @@ AVCodec mp2_decoder = · 9 unmodified lines
25172517 AVCodec mp3_decoder =
25182518 {
25192519 "mp3",
2520− CODEC_TYPE_AUDIO,
2520+ AVMEDIA_TYPE_AUDIO,
25212521 CODEC_ID_MP3,
25222522 sizeof(MPADecodeContext),
25232523 decode_init,
@@ -2533,7 +2533,7 @@ AVCodec mp3_decoder = · 9 unmodified lines
25332533 AVCodec mp3adu_decoder =
25342534 {
25352535 "mp3adu",
2536− CODEC_TYPE_AUDIO,
2536+ AVMEDIA_TYPE_AUDIO,
25372537 CODEC_ID_MP3ADU,
25382538 sizeof(MPADecodeContext),
25392539 decode_init,
@@ -2549,7 +2549,7 @@ AVCodec mp3adu_decoder = · 9 unmodified lines
25492549 AVCodec mp3on4_decoder =
25502550 {
25512551 "mp3on4",
2552− CODEC_TYPE_AUDIO,
2552+ AVMEDIA_TYPE_AUDIO,
25532553 CODEC_ID_MP3ON4,
25542554 sizeof(MP3On4DecodeContext),
25552555 decode_init_mp3on4,
libavcodec/mpegaudioenc.c+1−1
@@ -790,7 +790,7 @@ static av_cold int MPA_encode_close(AVCodecContext *avctx) · 789 unmodified lines
790790
791791 AVCodec mp2_encoder = {
792792 "mp2",
793− CODEC_TYPE_AUDIO,
793+ AVMEDIA_TYPE_AUDIO,
794794 CODEC_ID_MP2,
795795 sizeof(MpegAudioContext),
796796 MPA_encode_init,
libavcodec/mpegvideo_enc.c+6−6
@@ -3771,7 +3771,7 @@ int dct_quantize_c(MpegEncContext *s, · 3770 unmodified lines
37713771
37723772 AVCodec h263_encoder = {
37733773 "h263",
3774− CODEC_TYPE_VIDEO,
3774+ AVMEDIA_TYPE_VIDEO,
37753775 CODEC_ID_H263,
37763776 sizeof(MpegEncContext),
37773777 MPV_encode_init,
@@ -3783,7 +3783,7 @@ AVCodec h263_encoder = { · 5 unmodified lines
37833783
37843784 AVCodec h263p_encoder = {
37853785 "h263p",
3786− CODEC_TYPE_VIDEO,
3786+ AVMEDIA_TYPE_VIDEO,
37873787 CODEC_ID_H263P,
37883788 sizeof(MpegEncContext),
37893789 MPV_encode_init,
@@ -3795,7 +3795,7 @@ AVCodec h263p_encoder = { · 5 unmodified lines
37953795
37963796 AVCodec msmpeg4v1_encoder = {
37973797 "msmpeg4v1",
3798− CODEC_TYPE_VIDEO,
3798+ AVMEDIA_TYPE_VIDEO,
37993799 CODEC_ID_MSMPEG4V1,
38003800 sizeof(MpegEncContext),
38013801 MPV_encode_init,
@@ -3807,7 +3807,7 @@ AVCodec msmpeg4v1_encoder = { · 5 unmodified lines
38073807
38083808 AVCodec msmpeg4v2_encoder = {
38093809 "msmpeg4v2",
3810− CODEC_TYPE_VIDEO,
3810+ AVMEDIA_TYPE_VIDEO,
38113811 CODEC_ID_MSMPEG4V2,
38123812 sizeof(MpegEncContext),
38133813 MPV_encode_init,
@@ -3819,7 +3819,7 @@ AVCodec msmpeg4v2_encoder = { · 5 unmodified lines
38193819
38203820 AVCodec msmpeg4v3_encoder = {
38213821 "msmpeg4",
3822− CODEC_TYPE_VIDEO,
3822+ AVMEDIA_TYPE_VIDEO,
38233823 CODEC_ID_MSMPEG4V3,
38243824 sizeof(MpegEncContext),
38253825 MPV_encode_init,
@@ -3831,7 +3831,7 @@ AVCodec msmpeg4v3_encoder = { · 5 unmodified lines
38313831
38323832 AVCodec wmv1_encoder = {
38333833 "wmv1",
3834− CODEC_TYPE_VIDEO,
3834+ AVMEDIA_TYPE_VIDEO,
38353835 CODEC_ID_WMV1,
38363836 sizeof(MpegEncContext),
38373837 MPV_encode_init,
libavcodec/msmpeg4.c+4−4
@@ -1921,7 +1921,7 @@ int ff_msmpeg4_decode_motion(MpegEncContext * s, · 1920 unmodified lines
19211921
19221922 AVCodec msmpeg4v1_decoder = {
19231923 "msmpeg4v1",
1924− CODEC_TYPE_VIDEO,
1924+ AVMEDIA_TYPE_VIDEO,
19251925 CODEC_ID_MSMPEG4V1,
19261926 sizeof(MpegEncContext),
19271927 ff_msmpeg4_decode_init,
@@ -1935,7 +1935,7 @@ AVCodec msmpeg4v1_decoder = { · 7 unmodified lines
19351935
19361936 AVCodec msmpeg4v2_decoder = {
19371937 "msmpeg4v2",
1938− CODEC_TYPE_VIDEO,
1938+ AVMEDIA_TYPE_VIDEO,
19391939 CODEC_ID_MSMPEG4V2,
19401940 sizeof(MpegEncContext),
19411941 ff_msmpeg4_decode_init,
@@ -1949,7 +1949,7 @@ AVCodec msmpeg4v2_decoder = { · 7 unmodified lines
19491949
19501950 AVCodec msmpeg4v3_decoder = {
19511951 "msmpeg4",
1952− CODEC_TYPE_VIDEO,
1952+ AVMEDIA_TYPE_VIDEO,
19531953 CODEC_ID_MSMPEG4V3,
19541954 sizeof(MpegEncContext),
19551955 ff_msmpeg4_decode_init,
@@ -1963,7 +1963,7 @@ AVCodec msmpeg4v3_decoder = { · 7 unmodified lines
19631963
19641964 AVCodec wmv1_decoder = {
19651965 "wmv1",
1966− CODEC_TYPE_VIDEO,
1966+ AVMEDIA_TYPE_VIDEO,
19671967 CODEC_ID_WMV1,
19681968 sizeof(MpegEncContext),
19691969 ff_msmpeg4_decode_init,
libavcodec/msrle.c+1−1
@@ -145,7 +145,7 @@ static av_cold int msrle_decode_end(AVCodecContext *avctx) · 144 unmodified lines
145145
146146 AVCodec msrle_decoder = {
147147 "msrle",
148− CODEC_TYPE_VIDEO,
148+ AVMEDIA_TYPE_VIDEO,
149149 CODEC_ID_MSRLE,
150150 sizeof(MsrleContext),
151151 msrle_decode_init,
libavcodec/msvideo1.c+1−1
@@ -333,7 +333,7 @@ static av_cold int msvideo1_decode_end(AVCodecContext *avctx) · 332 unmodified lines
333333
334334 AVCodec msvideo1_decoder = {
335335 "msvideo1",
336− CODEC_TYPE_VIDEO,
336+ AVMEDIA_TYPE_VIDEO,
337337 CODEC_ID_MSVIDEO1,
338338 sizeof(Msvideo1Context),
339339 msvideo1_decode_init,
libavcodec/nellymoserdec.c+1−1
@@ -200,7 +200,7 @@ static av_cold int decode_end(AVCodecContext * avctx) { · 199 unmodified lines
200200
201201 AVCodec nellymoser_decoder = {
202202 "nellymoser",
203− CODEC_TYPE_AUDIO,
203+ AVMEDIA_TYPE_AUDIO,
204204 CODEC_ID_NELLYMOSER,
205205 sizeof(NellyMoserDecodeContext),
206206 decode_init,
libavcodec/nellymoserenc.c+1−1
@@ -384,7 +384,7 @@ static int encode_frame(AVCodecContext *avctx, uint8_t *frame, int buf_size, voi · 383 unmodified lines
384384
385385 AVCodec nellymoser_encoder = {
386386 .name = "nellymoser",
387− .type = CODEC_TYPE_AUDIO,
387+ .type = AVMEDIA_TYPE_AUDIO,
388388 .id = CODEC_ID_NELLYMOSER,
389389 .priv_data_size = sizeof(NellyMoserEncodeContext),
390390 .init = encode_init,
libavcodec/nuv.c+1−1
@@ -274,7 +274,7 @@ static av_cold int decode_end(AVCodecContext *avctx) { · 273 unmodified lines
274274
275275 AVCodec nuv_decoder = {
276276 "nuv",
277− CODEC_TYPE_VIDEO,
277+ AVMEDIA_TYPE_VIDEO,
278278 CODEC_ID_NUV,
279279 sizeof(NuvContext),
280280 decode_init,
libavcodec/options.c+7−7
@@ -423,18 +423,18 @@ static const AVOption options[]={ · 422 unmodified lines
423423
424424 static const AVClass av_codec_context_class = { "AVCodecContext", context_to_name, options };
425425
426−void avcodec_get_context_defaults2(AVCodecContext *s, enum CodecType codec_type){
426+void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType codec_type){
427427 int flags=0;
428428 memset(s, 0, sizeof(AVCodecContext));
429429
430430 s->av_class= &av_codec_context_class;
431431
432432 s->codec_type = codec_type;
433− if(codec_type == CODEC_TYPE_AUDIO)
433+ if(codec_type == AVMEDIA_TYPE_AUDIO)
434434 flags= AV_OPT_FLAG_AUDIO_PARAM;
435− else if(codec_type == CODEC_TYPE_VIDEO)
435+ else if(codec_type == AVMEDIA_TYPE_VIDEO)
436436 flags= AV_OPT_FLAG_VIDEO_PARAM;
437− else if(codec_type == CODEC_TYPE_SUBTITLE)
437+ else if(codec_type == AVMEDIA_TYPE_SUBTITLE)
438438 flags= AV_OPT_FLAG_SUBTITLE_PARAM;
439439 av_opt_set_defaults2(s, flags, flags);
440440
@@ -453,7 +453,7 @@ void avcodec_get_context_defaults2(AVCodecContext *s, enum CodecType codec_type) · 12 unmodified lines
453453 s->reordered_opaque= AV_NOPTS_VALUE;
454454 }
455455
456−AVCodecContext *avcodec_alloc_context2(enum CodecType codec_type){
456+AVCodecContext *avcodec_alloc_context2(enum AVMediaType codec_type){
457457 AVCodecContext *avctx= av_malloc(sizeof(AVCodecContext));
458458
459459 if(avctx==NULL) return NULL;
@@ -464,10 +464,10 @@ AVCodecContext *avcodec_alloc_context2(enum CodecType codec_type){ · 4 unmodified lines
464464 }
465465
466466 void avcodec_get_context_defaults(AVCodecContext *s){
467− avcodec_get_context_defaults2(s, CODEC_TYPE_UNKNOWN);
467+ avcodec_get_context_defaults2(s, AVMEDIA_TYPE_UNKNOWN);
468468 }
469469
470470 AVCodecContext *avcodec_alloc_context(void){
471− return avcodec_alloc_context2(CODEC_TYPE_UNKNOWN);
471+ return avcodec_alloc_context2(AVMEDIA_TYPE_UNKNOWN);
472472 }
473473
libavcodec/pamenc.c+1−1
@@ -110,7 +110,7 @@ static int pam_encode_frame(AVCodecContext *avctx, unsigned char *outbuf, · 109 unmodified lines
110110
111111 AVCodec pam_encoder = {
112112 "pam",
113− CODEC_TYPE_VIDEO,
113+ AVMEDIA_TYPE_VIDEO,
114114 CODEC_ID_PAM,
115115 sizeof(PNMContext),
116116 ff_pnm_init,
libavcodec/pcm-mpeg.c+1−1
@@ -297,7 +297,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, · 296 unmodified lines
297297
298298 AVCodec pcm_bluray_decoder = {
299299 "pcm_bluray",
300− CODEC_TYPE_AUDIO,
300+ AVMEDIA_TYPE_AUDIO,
301301 CODEC_ID_PCM_BLURAY,
302302 0,
303303 NULL,
libavcodec/pcm.c+2−2
@@ -516,7 +516,7 @@ static int pcm_decode_frame(AVCodecContext *avctx, · 515 unmodified lines
516516 #define PCM_ENCODER(id,sample_fmt_,name,long_name_) \
517517 AVCodec name ## _encoder = { \
518518 #name, \
519− CODEC_TYPE_AUDIO, \
519+ AVMEDIA_TYPE_AUDIO, \
520520 id, \
521521 0, \
522522 pcm_encode_init, \
@@ -534,7 +534,7 @@ AVCodec name ## _encoder = { \ · 11 unmodified lines
534534 #define PCM_DECODER(id,sample_fmt_,name,long_name_) \
535535 AVCodec name ## _decoder = { \
536536 #name, \
537− CODEC_TYPE_AUDIO, \
537+ AVMEDIA_TYPE_AUDIO, \
538538 id, \
539539 sizeof(PCMDecode), \
540540 pcm_decode_init, \
libavcodec/pcx.c+1−1
@@ -244,7 +244,7 @@ static av_cold int pcx_end(AVCodecContext *avctx) { · 243 unmodified lines
244244
245245 AVCodec pcx_decoder = {
246246 "pcx",
247− CODEC_TYPE_VIDEO,
247+ AVMEDIA_TYPE_VIDEO,
248248 CODEC_ID_PCX,
249249 sizeof(PCXContext),
250250 pcx_init,
libavcodec/pcxenc.c+1−1
@@ -191,7 +191,7 @@ static int pcx_encode_frame(AVCodecContext *avctx, · 190 unmodified lines
191191
192192 AVCodec pcx_encoder = {
193193 "pcx",
194− CODEC_TYPE_VIDEO,
194+ AVMEDIA_TYPE_VIDEO,
195195 CODEC_ID_PCX,
196196 sizeof(PCXContext),
197197 pcx_encode_init,
libavcodec/pgssubdec.c+1−1
@@ -454,7 +454,7 @@ static int decode(AVCodecContext *avctx, void *data, int *data_size, · 453 unmodified lines
454454
455455 AVCodec pgssub_decoder = {
456456 "pgssub",
457− CODEC_TYPE_SUBTITLE,
457+ AVMEDIA_TYPE_SUBTITLE,
458458 CODEC_ID_HDMV_PGS_SUBTITLE,
459459 sizeof(PGSSubContext),
460460 init_decoder,
libavcodec/pngdec.c+1−1
@@ -656,7 +656,7 @@ static av_cold int png_dec_end(AVCodecContext *avctx) · 655 unmodified lines
656656
657657 AVCodec png_decoder = {
658658 "png",
659− CODEC_TYPE_VIDEO,
659+ AVMEDIA_TYPE_VIDEO,
660660 CODEC_ID_PNG,
661661 sizeof(PNGDecContext),
662662 png_dec_init,
libavcodec/pngenc.c+1−1
@@ -438,7 +438,7 @@ static av_cold int png_enc_init(AVCodecContext *avctx){ · 437 unmodified lines
438438
439439 AVCodec png_encoder = {
440440 "png",
441− CODEC_TYPE_VIDEO,
441+ AVMEDIA_TYPE_VIDEO,
442442 CODEC_ID_PNG,
443443 sizeof(PNGEncContext),
444444 png_enc_init,
libavcodec/pnmdec.c+5−5
@@ -190,7 +190,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data, · 189 unmodified lines
190190 #if CONFIG_PGM_DECODER
191191 AVCodec pgm_decoder = {
192192 "pgm",
193− CODEC_TYPE_VIDEO,
193+ AVMEDIA_TYPE_VIDEO,
194194 CODEC_ID_PGM,
195195 sizeof(PNMContext),
196196 ff_pnm_init,
@@ -206,7 +206,7 @@ AVCodec pgm_decoder = { · 9 unmodified lines
206206 #if CONFIG_PGMYUV_DECODER
207207 AVCodec pgmyuv_decoder = {
208208 "pgmyuv",
209− CODEC_TYPE_VIDEO,
209+ AVMEDIA_TYPE_VIDEO,
210210 CODEC_ID_PGMYUV,
211211 sizeof(PNMContext),
212212 ff_pnm_init,
@@ -222,7 +222,7 @@ AVCodec pgmyuv_decoder = { · 9 unmodified lines
222222 #if CONFIG_PPM_DECODER
223223 AVCodec ppm_decoder = {
224224 "ppm",
225− CODEC_TYPE_VIDEO,
225+ AVMEDIA_TYPE_VIDEO,
226226 CODEC_ID_PPM,
227227 sizeof(PNMContext),
228228 ff_pnm_init,
@@ -238,7 +238,7 @@ AVCodec ppm_decoder = { · 9 unmodified lines
238238 #if CONFIG_PBM_DECODER
239239 AVCodec pbm_decoder = {
240240 "pbm",
241− CODEC_TYPE_VIDEO,
241+ AVMEDIA_TYPE_VIDEO,
242242 CODEC_ID_PBM,
243243 sizeof(PNMContext),
244244 ff_pnm_init,
@@ -254,7 +254,7 @@ AVCodec pbm_decoder = { · 9 unmodified lines
254254 #if CONFIG_PAM_DECODER
255255 AVCodec pam_decoder = {
256256 "pam",
257− CODEC_TYPE_VIDEO,
257+ AVMEDIA_TYPE_VIDEO,
258258 CODEC_ID_PAM,
259259 sizeof(PNMContext),
260260 ff_pnm_init,
libavcodec/pnmenc.c+4−4
@@ -115,7 +115,7 @@ static int pnm_encode_frame(AVCodecContext *avctx, unsigned char *outbuf, · 114 unmodified lines
115115 #if CONFIG_PGM_ENCODER
116116 AVCodec pgm_encoder = {
117117 "pgm",
118− CODEC_TYPE_VIDEO,
118+ AVMEDIA_TYPE_VIDEO,
119119 CODEC_ID_PGM,
120120 sizeof(PNMContext),
121121 ff_pnm_init,
@@ -128,7 +128,7 @@ AVCodec pgm_encoder = { · 6 unmodified lines
128128 #if CONFIG_PGMYUV_ENCODER
129129 AVCodec pgmyuv_encoder = {
130130 "pgmyuv",
131− CODEC_TYPE_VIDEO,
131+ AVMEDIA_TYPE_VIDEO,
132132 CODEC_ID_PGMYUV,
133133 sizeof(PNMContext),
134134 ff_pnm_init,
@@ -141,7 +141,7 @@ AVCodec pgmyuv_encoder = { · 6 unmodified lines
141141 #if CONFIG_PPM_ENCODER
142142 AVCodec ppm_encoder = {
143143 "ppm",
144− CODEC_TYPE_VIDEO,
144+ AVMEDIA_TYPE_VIDEO,
145145 CODEC_ID_PPM,
146146 sizeof(PNMContext),
147147 ff_pnm_init,
@@ -154,7 +154,7 @@ AVCodec ppm_encoder = { · 6 unmodified lines
154154 #if CONFIG_PBM_ENCODER
155155 AVCodec pbm_encoder = {
156156 "pbm",
157− CODEC_TYPE_VIDEO,
157+ AVMEDIA_TYPE_VIDEO,
158158 CODEC_ID_PBM,
159159 sizeof(PNMContext),
160160 ff_pnm_init,
libavcodec/ptx.c+1−1
@@ -107,7 +107,7 @@ static av_cold int ptx_end(AVCodecContext *avctx) { · 106 unmodified lines
107107
108108 AVCodec ptx_decoder = {
109109 "ptx",
110− CODEC_TYPE_VIDEO,
110+ AVMEDIA_TYPE_VIDEO,
111111 CODEC_ID_PTX,
112112 sizeof(PTXContext),
113113 ptx_init,
libavcodec/qcelpdec.c+1−1
@@ -813,7 +813,7 @@ erasure: · 812 unmodified lines
813813 AVCodec qcelp_decoder =
814814 {
815815 .name = "qcelp",
816− .type = CODEC_TYPE_AUDIO,
816+ .type = AVMEDIA_TYPE_AUDIO,
817817 .id = CODEC_ID_QCELP,
818818 .init = qcelp_decode_init,
819819 .decode = qcelp_decode_frame,
libavcodec/qdm2.c+1−1
@@ -1974,7 +1974,7 @@ static int qdm2_decode_frame(AVCodecContext *avctx, · 1973 unmodified lines
19741974 AVCodec qdm2_decoder =
19751975 {
19761976 .name = "qdm2",
1977− .type = CODEC_TYPE_AUDIO,
1977+ .type = AVMEDIA_TYPE_AUDIO,
19781978 .id = CODEC_ID_QDM2,
19791979 .priv_data_size = sizeof(QDM2Context),
19801980 .init = qdm2_decode_init,
libavcodec/qdrw.c+1−1
@@ -152,7 +152,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 151 unmodified lines
152152
153153 AVCodec qdraw_decoder = {
154154 "qdraw",
155− CODEC_TYPE_VIDEO,
155+ AVMEDIA_TYPE_VIDEO,
156156 CODEC_ID_QDRAW,
157157 sizeof(QdrawContext),
158158 decode_init,
libavcodec/qpeg.c+1−1
@@ -313,7 +313,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 312 unmodified lines
313313
314314 AVCodec qpeg_decoder = {
315315 "qpeg",
316− CODEC_TYPE_VIDEO,
316+ AVMEDIA_TYPE_VIDEO,
317317 CODEC_ID_QPEG,
318318 sizeof(QpegContext),
319319 decode_init,
libavcodec/qtrle.c+1−1
@@ -539,7 +539,7 @@ static av_cold int qtrle_decode_end(AVCodecContext *avctx) · 538 unmodified lines
539539
540540 AVCodec qtrle_decoder = {
541541 "qtrle",
542− CODEC_TYPE_VIDEO,
542+ AVMEDIA_TYPE_VIDEO,
543543 CODEC_ID_QTRLE,
544544 sizeof(QtrleContext),
545545 qtrle_decode_init,
libavcodec/qtrleenc.c+1−1
@@ -322,7 +322,7 @@ static av_cold int qtrle_encode_end(AVCodecContext *avctx) · 321 unmodified lines
322322
323323 AVCodec qtrle_encoder = {
324324 "qtrle",
325− CODEC_TYPE_VIDEO,
325+ AVMEDIA_TYPE_VIDEO,
326326 CODEC_ID_QTRLE,
327327 sizeof(QtrleEncContext),
328328 qtrle_encode_init,
libavcodec/r210dec.c+1−1
@@ -92,7 +92,7 @@ static av_cold int decode_close(AVCodecContext *avctx) · 91 unmodified lines
9292
9393 AVCodec r210_decoder = {
9494 "r210",
95− CODEC_TYPE_VIDEO,
95+ AVMEDIA_TYPE_VIDEO,
9696 CODEC_ID_R210,
9797 0,
9898 decode_init,
libavcodec/ra144.c+1−1
@@ -353,7 +353,7 @@ static int ra144_decode_frame(AVCodecContext * avctx, void *vdata, · 352 unmodified lines
353353 AVCodec ra_144_decoder =
354354 {
355355 "real_144",
356− CODEC_TYPE_AUDIO,
356+ AVMEDIA_TYPE_AUDIO,
357357 CODEC_ID_RA_144,
358358 sizeof(RA144Context),
359359 ra144_decode_init,
libavcodec/ra288.c+1−1
@@ -206,7 +206,7 @@ static int ra288_decode_frame(AVCodecContext * avctx, void *data, · 205 unmodified lines
206206 AVCodec ra_288_decoder =
207207 {
208208 "real_288",
209− CODEC_TYPE_AUDIO,
209+ AVMEDIA_TYPE_AUDIO,
210210 CODEC_ID_RA_288,
211211 sizeof(RA288Context),
212212 ra288_decode_init,
libavcodec/rawdec.c+1−1
@@ -185,7 +185,7 @@ static av_cold int raw_close_decoder(AVCodecContext *avctx) · 184 unmodified lines
185185
186186 AVCodec rawvideo_decoder = {
187187 "rawvideo",
188− CODEC_TYPE_VIDEO,
188+ AVMEDIA_TYPE_VIDEO,
189189 CODEC_ID_RAWVIDEO,
190190 sizeof(RawVideoContext),
191191 raw_init_decoder,
libavcodec/rawenc.c+1−1
@@ -57,7 +57,7 @@ static int raw_encode(AVCodecContext *avctx, · 56 unmodified lines
5757
5858 AVCodec rawvideo_encoder = {
5959 "rawvideo",
60− CODEC_TYPE_VIDEO,
60+ AVMEDIA_TYPE_VIDEO,
6161 CODEC_ID_RAWVIDEO,
6262 sizeof(AVFrame),
6363 raw_init_encoder,
libavcodec/rl2.c+1−1
@@ -230,7 +230,7 @@ static av_cold int rl2_decode_end(AVCodecContext *avctx) · 229 unmodified lines
230230
231231 AVCodec rl2_decoder = {
232232 "rl2",
233− CODEC_TYPE_VIDEO,
233+ AVMEDIA_TYPE_VIDEO,
234234 CODEC_ID_RL2,
235235 sizeof(Rl2Context),
236236 rl2_decode_init,
libavcodec/roqaudioenc.c+1−1
@@ -155,7 +155,7 @@ static av_cold int roq_dpcm_encode_close(AVCodecContext *avctx) · 154 unmodified lines
155155
156156 AVCodec roq_dpcm_encoder = {
157157 "roq_dpcm",
158− CODEC_TYPE_AUDIO,
158+ AVMEDIA_TYPE_AUDIO,
159159 CODEC_ID_ROQ_DPCM,
160160 sizeof(ROQDPCMContext),
161161 roq_dpcm_encode_init,
libavcodec/roqvideodec.c+1−1
@@ -212,7 +212,7 @@ static av_cold int roq_decode_end(AVCodecContext *avctx) · 211 unmodified lines
212212
213213 AVCodec roq_decoder = {
214214 "roqvideo",
215− CODEC_TYPE_VIDEO,
215+ AVMEDIA_TYPE_VIDEO,
216216 CODEC_ID_ROQ,
217217 sizeof(RoqContext),
218218 roq_decode_init,
libavcodec/roqvideoenc.c+1−1
@@ -1057,7 +1057,7 @@ static int roq_encode_end(AVCodecContext *avctx) · 1056 unmodified lines
10571057 AVCodec roq_encoder =
10581058 {
10591059 "roqvideo",
1060− CODEC_TYPE_VIDEO,
1060+ AVMEDIA_TYPE_VIDEO,
10611061 CODEC_ID_ROQ,
10621062 sizeof(RoqContext),
10631063 roq_encode_init,
libavcodec/rpza.c+1−1
@@ -277,7 +277,7 @@ static av_cold int rpza_decode_end(AVCodecContext *avctx) · 276 unmodified lines
277277
278278 AVCodec rpza_decoder = {
279279 "rpza",
280− CODEC_TYPE_VIDEO,
280+ AVMEDIA_TYPE_VIDEO,
281281 CODEC_ID_RPZA,
282282 sizeof(RpzaContext),
283283 rpza_decode_init,
libavcodec/rv10.c+2−2
@@ -708,7 +708,7 @@ static int rv10_decode_frame(AVCodecContext *avctx, · 707 unmodified lines
708708
709709 AVCodec rv10_decoder = {
710710 "rv10",
711− CODEC_TYPE_VIDEO,
711+ AVMEDIA_TYPE_VIDEO,
712712 CODEC_ID_RV10,
713713 sizeof(MpegEncContext),
714714 rv10_decode_init,
@@ -722,7 +722,7 @@ AVCodec rv10_decoder = { · 7 unmodified lines
722722
723723 AVCodec rv20_decoder = {
724724 "rv20",
725− CODEC_TYPE_VIDEO,
725+ AVMEDIA_TYPE_VIDEO,
726726 CODEC_ID_RV20,
727727 sizeof(MpegEncContext),
728728 rv10_decode_init,
libavcodec/rv10enc.c+1−1
@@ -58,7 +58,7 @@ void rv10_encode_picture_header(MpegEncContext *s, int picture_number) · 57 unmodified lines
5858
5959 AVCodec rv10_encoder = {
6060 "rv10",
61− CODEC_TYPE_VIDEO,
61+ AVMEDIA_TYPE_VIDEO,
6262 CODEC_ID_RV10,
6363 sizeof(MpegEncContext),
6464 MPV_encode_init,
libavcodec/rv20enc.c+1−1
@@ -59,7 +59,7 @@ void rv20_encode_picture_header(MpegEncContext *s, int picture_number){ · 58 unmodified lines
5959
6060 AVCodec rv20_encoder = {
6161 "rv20",
62− CODEC_TYPE_VIDEO,
62+ AVMEDIA_TYPE_VIDEO,
6363 CODEC_ID_RV20,
6464 sizeof(MpegEncContext),
6565 MPV_encode_init,
libavcodec/rv30.c+1−1
@@ -268,7 +268,7 @@ static av_cold int rv30_decode_init(AVCodecContext *avctx) · 267 unmodified lines
268268
269269 AVCodec rv30_decoder = {
270270 "rv30",
271− CODEC_TYPE_VIDEO,
271+ AVMEDIA_TYPE_VIDEO,
272272 CODEC_ID_RV30,
273273 sizeof(RV34DecContext),
274274 rv30_decode_init,
libavcodec/rv40.c+1−1
@@ -668,7 +668,7 @@ static av_cold int rv40_decode_init(AVCodecContext *avctx) · 667 unmodified lines
668668
669669 AVCodec rv40_decoder = {
670670 "rv40",
671− CODEC_TYPE_VIDEO,
671+ AVMEDIA_TYPE_VIDEO,
672672 CODEC_ID_RV40,
673673 sizeof(RV34DecContext),
674674 rv40_decode_init,
libavcodec/sgidec.c+1−1
@@ -260,7 +260,7 @@ static av_cold int sgi_end(AVCodecContext *avctx) · 259 unmodified lines
260260
261261 AVCodec sgi_decoder = {
262262 "sgi",
263− CODEC_TYPE_VIDEO,
263+ AVMEDIA_TYPE_VIDEO,
264264 CODEC_ID_SGI,
265265 sizeof(SgiState),
266266 sgi_init,
libavcodec/sgienc.c+1−1
@@ -161,7 +161,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, · 160 unmodified lines
161161
162162 AVCodec sgi_encoder = {
163163 "sgi",
164− CODEC_TYPE_VIDEO,
164+ AVMEDIA_TYPE_VIDEO,
165165 CODEC_ID_SGI,
166166 sizeof(SgiContext),
167167 encode_init,
libavcodec/shorten.c+1−1
@@ -527,7 +527,7 @@ static void shorten_flush(AVCodecContext *avctx){ · 526 unmodified lines
527527
528528 AVCodec shorten_decoder = {
529529 "shorten",
530− CODEC_TYPE_AUDIO,
530+ AVMEDIA_TYPE_AUDIO,
531531 CODEC_ID_SHORTEN,
532532 sizeof(ShortenContext),
533533 shorten_decode_init,
libavcodec/sipr.c+1−1
@@ -579,7 +579,7 @@ static int sipr_decode_frame(AVCodecContext *avctx, void *datap, · 578 unmodified lines
579579
580580 AVCodec sipr_decoder = {
581581 "sipr",
582− CODEC_TYPE_AUDIO,
582+ AVMEDIA_TYPE_AUDIO,
583583 CODEC_ID_SIPR,
584584 sizeof(SiprContext),
585585 sipr_decoder_init,
libavcodec/smacker.c+2−2
@@ -691,7 +691,7 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 690 unmodified lines
691691
692692 AVCodec smacker_decoder = {
693693 "smackvid",
694− CODEC_TYPE_VIDEO,
694+ AVMEDIA_TYPE_VIDEO,
695695 CODEC_ID_SMACKVIDEO,
696696 sizeof(SmackVContext),
697697 decode_init,
@@ -704,7 +704,7 @@ AVCodec smacker_decoder = { · 6 unmodified lines
704704
705705 AVCodec smackaud_decoder = {
706706 "smackaud",
707− CODEC_TYPE_AUDIO,
707+ AVMEDIA_TYPE_AUDIO,
708708 CODEC_ID_SMACKAUDIO,
709709 0,
710710 smka_decode_init,
libavcodec/smc.c+1−1
@@ -473,7 +473,7 @@ static av_cold int smc_decode_end(AVCodecContext *avctx) · 472 unmodified lines
473473
474474 AVCodec smc_decoder = {
475475 "smc",
476− CODEC_TYPE_VIDEO,
476+ AVMEDIA_TYPE_VIDEO,
477477 CODEC_ID_SMC,
478478 sizeof(SmcContext),
479479 smc_decode_init,
libavcodec/snow.c+2−2
@@ -2237,7 +2237,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 2236 unmodified lines
22372237
22382238 AVCodec snow_decoder = {
22392239 "snow",
2240− CODEC_TYPE_VIDEO,
2240+ AVMEDIA_TYPE_VIDEO,
22412241 CODEC_ID_SNOW,
22422242 sizeof(SnowContext),
22432243 decode_init,
@@ -3988,7 +3988,7 @@ static av_cold int encode_end(AVCodecContext *avctx) · 1744 unmodified lines
39883988
39893989 AVCodec snow_encoder = {
39903990 "snow",
3991− CODEC_TYPE_VIDEO,
3991+ AVMEDIA_TYPE_VIDEO,
39923992 CODEC_ID_SNOW,
39933993 sizeof(SnowContext),
39943994 encode_init,
libavcodec/sonic.c+3−3
@@ -937,7 +937,7 @@ static int sonic_decode_frame(AVCodecContext *avctx, · 936 unmodified lines
937937
938938 AVCodec sonic_decoder = {
939939 "sonic",
940− CODEC_TYPE_AUDIO,
940+ AVMEDIA_TYPE_AUDIO,
941941 CODEC_ID_SONIC,
942942 sizeof(SonicContext),
943943 sonic_decode_init,
@@ -951,7 +951,7 @@ AVCodec sonic_decoder = { · 7 unmodified lines
951951 #if CONFIG_SONIC_ENCODER
952952 AVCodec sonic_encoder = {
953953 "sonic",
954− CODEC_TYPE_AUDIO,
954+ AVMEDIA_TYPE_AUDIO,
955955 CODEC_ID_SONIC,
956956 sizeof(SonicContext),
957957 sonic_encode_init,
@@ -965,7 +965,7 @@ AVCodec sonic_encoder = { · 7 unmodified lines
965965 #if CONFIG_SONIC_LS_ENCODER
966966 AVCodec sonic_ls_encoder = {
967967 "sonicls",
968− CODEC_TYPE_AUDIO,
968+ AVMEDIA_TYPE_AUDIO,
969969 CODEC_ID_SONIC_LS,
970970 sizeof(SonicContext),
971971 sonic_encode_init,
libavcodec/sp5xdec.c+2−2
@@ -195,7 +195,7 @@ static int sp5x_decode_frame(AVCodecContext *avctx, · 194 unmodified lines
195195
196196 AVCodec sp5x_decoder = {
197197 "sp5x",
198− CODEC_TYPE_VIDEO,
198+ AVMEDIA_TYPE_VIDEO,
199199 CODEC_ID_SP5X,
200200 sizeof(MJpegDecodeContext),
201201 ff_mjpeg_decode_init,
@@ -209,7 +209,7 @@ AVCodec sp5x_decoder = { · 7 unmodified lines
209209
210210 AVCodec amv_decoder = {
211211 "amv",
212− CODEC_TYPE_VIDEO,
212+ AVMEDIA_TYPE_VIDEO,
213213 CODEC_ID_AMV,
214214 sizeof(MJpegDecodeContext),
215215 ff_mjpeg_decode_init,
libavcodec/sunrast.c+1−1
@@ -185,7 +185,7 @@ static av_cold int sunrast_end(AVCodecContext *avctx) { · 184 unmodified lines
185185
186186 AVCodec sunrast_decoder = {
187187 "sunrast",
188− CODEC_TYPE_VIDEO,
188+ AVMEDIA_TYPE_VIDEO,
189189 CODEC_ID_SUNRAST,
190190 sizeof(SUNRASTContext),
191191 sunrast_init,
libavcodec/svq1dec.c+1−1
@@ -828,7 +828,7 @@ static av_cold int svq1_decode_end(AVCodecContext *avctx) · 827 unmodified lines
828828
829829 AVCodec svq1_decoder = {
830830 "svq1",
831− CODEC_TYPE_VIDEO,
831+ AVMEDIA_TYPE_VIDEO,
832832 CODEC_ID_SVQ1,
833833 sizeof(MpegEncContext),
834834 svq1_decode_init,
libavcodec/svq1enc.c+1−1
@@ -574,7 +574,7 @@ static av_cold int svq1_encode_end(AVCodecContext *avctx) · 573 unmodified lines
574574
575575 AVCodec svq1_encoder = {
576576 "svq1",
577− CODEC_TYPE_VIDEO,
577+ AVMEDIA_TYPE_VIDEO,
578578 CODEC_ID_SVQ1,
579579 sizeof(SVQ1Context),
580580 svq1_encode_init,
libavcodec/svq3.c+1−1
@@ -1071,7 +1071,7 @@ static int svq3_decode_frame(AVCodecContext *avctx, · 1070 unmodified lines
10711071
10721072 AVCodec svq3_decoder = {
10731073 "svq3",
1074− CODEC_TYPE_VIDEO,
1074+ AVMEDIA_TYPE_VIDEO,
10751075 CODEC_ID_SVQ3,
10761076 sizeof(H264Context),
10771077 svq3_decode_init,
libavcodec/targa.c+1−1
@@ -243,7 +243,7 @@ static av_cold int targa_end(AVCodecContext *avctx){ · 242 unmodified lines
243243
244244 AVCodec targa_decoder = {
245245 "targa",
246− CODEC_TYPE_VIDEO,
246+ AVMEDIA_TYPE_VIDEO,
247247 CODEC_ID_TARGA,
248248 sizeof(TargaContext),
249249 targa_init,
libavcodec/targaenc.c+1−1
@@ -153,7 +153,7 @@ static av_cold int targa_encode_init(AVCodecContext *avctx) · 152 unmodified lines
153153
154154 AVCodec targa_encoder = {
155155 .name = "targa",
156− .type = CODEC_TYPE_VIDEO,
156+ .type = AVMEDIA_TYPE_VIDEO,
157157 .id = CODEC_ID_TARGA,
158158 .priv_data_size = sizeof(TargaContext),
159159 .init = targa_encode_init,
libavcodec/tiertexseqv.c+1−1
@@ -221,7 +221,7 @@ static av_cold int seqvideo_decode_end(AVCodecContext *avctx) · 220 unmodified lines
221221
222222 AVCodec tiertexseqvideo_decoder = {
223223 "tiertexseqvideo",
224− CODEC_TYPE_VIDEO,
224+ AVMEDIA_TYPE_VIDEO,
225225 CODEC_ID_TIERTEXSEQVIDEO,
226226 sizeof(SeqVideoContext),
227227 seqvideo_decode_init,
libavcodec/tiff.c+1−1
@@ -592,7 +592,7 @@ static av_cold int tiff_end(AVCodecContext *avctx) · 591 unmodified lines
592592
593593 AVCodec tiff_decoder = {
594594 "tiff",
595− CODEC_TYPE_VIDEO,
595+ AVMEDIA_TYPE_VIDEO,
596596 CODEC_ID_TIFF,
597597 sizeof(TiffContext),
598598 tiff_init,
libavcodec/tiffenc.c+1−1
@@ -444,7 +444,7 @@ fail: · 443 unmodified lines
444444
445445 AVCodec tiff_encoder = {
446446 "tiff",
447− CODEC_TYPE_VIDEO,
447+ AVMEDIA_TYPE_VIDEO,
448448 CODEC_ID_TIFF,
449449 sizeof(TiffEncoderContext),
450450 NULL,
libavcodec/tmv.c+1−1
@@ -100,7 +100,7 @@ static av_cold int tmv_decode_close(AVCodecContext *avctx) · 99 unmodified lines
100100
101101 AVCodec tmv_decoder = {
102102 .name = "tmv",
103− .type = CODEC_TYPE_VIDEO,
103+ .type = AVMEDIA_TYPE_VIDEO,
104104 .id = CODEC_ID_TMV,
105105 .priv_data_size = sizeof(TMVContext),
106106 .close = tmv_decode_close,
libavcodec/truemotion1.c+1−1
@@ -892,7 +892,7 @@ static av_cold int truemotion1_decode_end(AVCodecContext *avctx) · 891 unmodified lines
892892
893893 AVCodec truemotion1_decoder = {
894894 "truemotion1",
895− CODEC_TYPE_VIDEO,
895+ AVMEDIA_TYPE_VIDEO,
896896 CODEC_ID_TRUEMOTION1,
897897 sizeof(TrueMotion1Context),
898898 truemotion1_decode_init,
libavcodec/truemotion2.c+1−1
@@ -872,7 +872,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 871 unmodified lines
872872
873873 AVCodec truemotion2_decoder = {
874874 "truemotion2",
875− CODEC_TYPE_VIDEO,
875+ AVMEDIA_TYPE_VIDEO,
876876 CODEC_ID_TRUEMOTION2,
877877 sizeof(TM2Context),
878878 decode_init,
libavcodec/truespeech.c+1−1
@@ -378,7 +378,7 @@ static int truespeech_decode_frame(AVCodecContext *avctx, · 377 unmodified lines
378378
379379 AVCodec truespeech_decoder = {
380380 "truespeech",
381− CODEC_TYPE_AUDIO,
381+ AVMEDIA_TYPE_AUDIO,
382382 CODEC_ID_TRUESPEECH,
383383 sizeof(TSContext),
384384 truespeech_decode_init,
libavcodec/tscc.c+1−1
@@ -199,7 +199,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 198 unmodified lines
199199
200200 AVCodec tscc_decoder = {
201201 "camtasia",
202− CODEC_TYPE_VIDEO,
202+ AVMEDIA_TYPE_VIDEO,
203203 CODEC_ID_TSCC,
204204 sizeof(CamtasiaContext),
205205 decode_init,
libavcodec/tta.c+1−1
@@ -449,7 +449,7 @@ static av_cold int tta_decode_close(AVCodecContext *avctx) { · 448 unmodified lines
449449
450450 AVCodec tta_decoder = {
451451 "tta",
452− CODEC_TYPE_AUDIO,
452+ AVMEDIA_TYPE_AUDIO,
453453 CODEC_ID_TTA,
454454 sizeof(TTAContext),
455455 tta_decode_init,
libavcodec/twinvq.c+1−1
@@ -1119,7 +1119,7 @@ static av_cold int twin_decode_close(AVCodecContext *avctx) · 1118 unmodified lines
11191119 AVCodec twinvq_decoder =
11201120 {
11211121 "twinvq",
1122− CODEC_TYPE_AUDIO,
1122+ AVMEDIA_TYPE_AUDIO,
11231123 CODEC_ID_TWINVQ,
11241124 sizeof(TwinContext),
11251125 twin_decode_init,
libavcodec/txd.c+1−1
@@ -156,7 +156,7 @@ static av_cold int txd_end(AVCodecContext *avctx) { · 155 unmodified lines
156156
157157 AVCodec txd_decoder = {
158158 "txd",
159− CODEC_TYPE_VIDEO,
159+ AVMEDIA_TYPE_VIDEO,
160160 CODEC_ID_TXD,
161161 sizeof(TXDContext),
162162 txd_init,
libavcodec/ulti.c+1−1
@@ -406,7 +406,7 @@ static int ulti_decode_frame(AVCodecContext *avctx, · 405 unmodified lines
406406
407407 AVCodec ulti_decoder = {
408408 "ultimotion",
409− CODEC_TYPE_VIDEO,
409+ AVMEDIA_TYPE_VIDEO,
410410 CODEC_ID_ULTI,
411411 sizeof(UltimotionDecodeContext),
412412 ulti_decode_init,
libavcodec/utils.c+11−11
@@ -497,7 +497,7 @@ int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec) · 496 unmodified lines
497497 }
498498
499499 avctx->codec = codec;
500− if ((avctx->codec_type == CODEC_TYPE_UNKNOWN || avctx->codec_type == codec->type) &&
500+ if ((avctx->codec_type == AVMEDIA_TYPE_UNKNOWN || avctx->codec_type == codec->type) &&
501501 avctx->codec_id == CODEC_ID_NONE) {
502502 avctx->codec_type = codec->type;
503503 avctx->codec_id = codec->id;
@@ -775,20 +775,20 @@ static int get_bit_rate(AVCodecContext *ctx) · 271 unmodified lines
775775 int bits_per_sample;
776776
777777 switch(ctx->codec_type) {
778− case CODEC_TYPE_VIDEO:
778+ case AVMEDIA_TYPE_VIDEO:
779779 bit_rate = ctx->bit_rate;
780780 break;
781− case CODEC_TYPE_AUDIO:
781+ case AVMEDIA_TYPE_AUDIO:
782782 bits_per_sample = av_get_bits_per_sample(ctx->codec_id);
783783 bit_rate = bits_per_sample ? ctx->sample_rate * ctx->channels * bits_per_sample : ctx->bit_rate;
784784 break;
785− case CODEC_TYPE_DATA:
785+ case AVMEDIA_TYPE_DATA:
786786 bit_rate = ctx->bit_rate;
787787 break;
788− case CODEC_TYPE_SUBTITLE:
788+ case AVMEDIA_TYPE_SUBTITLE:
789789 bit_rate = ctx->bit_rate;
790790 break;
791− case CODEC_TYPE_ATTACHMENT:
791+ case AVMEDIA_TYPE_ATTACHMENT:
792792 bit_rate = ctx->bit_rate;
793793 break;
794794 default:
@@ -836,7 +836,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) · 41 unmodified lines
836836 }
837837
838838 switch(enc->codec_type) {
839− case CODEC_TYPE_VIDEO:
839+ case AVMEDIA_TYPE_VIDEO:
840840 snprintf(buf, buf_size,
841841 "Video: %s%s",
842842 codec_name, enc->mb_decision ? " (hq)" : "");
@@ -871,7 +871,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) · 28 unmodified lines
871871 ", q=%d-%d", enc->qmin, enc->qmax);
872872 }
873873 break;
874− case CODEC_TYPE_AUDIO:
874+ case AVMEDIA_TYPE_AUDIO:
875875 snprintf(buf, buf_size,
876876 "Audio: %s",
877877 codec_name);
@@ -886,13 +886,13 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) · 8 unmodified lines
886886 ", %s", avcodec_get_sample_fmt_name(enc->sample_fmt));
887887 }
888888 break;
889− case CODEC_TYPE_DATA:
889+ case AVMEDIA_TYPE_DATA:
890890 snprintf(buf, buf_size, "Data: %s", codec_name);
891891 break;
892− case CODEC_TYPE_SUBTITLE:
892+ case AVMEDIA_TYPE_SUBTITLE:
893893 snprintf(buf, buf_size, "Subtitle: %s", codec_name);
894894 break;
895− case CODEC_TYPE_ATTACHMENT:
895+ case AVMEDIA_TYPE_ATTACHMENT:
896896 snprintf(buf, buf_size, "Attachment: %s", codec_name);
897897 break;
898898 default:
libavcodec/v210dec.c+1−1
@@ -122,7 +122,7 @@ static av_cold int decode_close(AVCodecContext *avctx) · 121 unmodified lines
122122
123123 AVCodec v210_decoder = {
124124 "v210",
125− CODEC_TYPE_VIDEO,
125+ AVMEDIA_TYPE_VIDEO,
126126 CODEC_ID_V210,
127127 0,
128128 decode_init,
libavcodec/v210enc.c+1−1
@@ -119,7 +119,7 @@ static av_cold int encode_close(AVCodecContext *avctx) · 118 unmodified lines
119119
120120 AVCodec v210_encoder = {
121121 "v210",
122− CODEC_TYPE_VIDEO,
122+ AVMEDIA_TYPE_VIDEO,
123123 CODEC_ID_V210,
124124 0,
125125 encode_init,
libavcodec/v210x.c+1−1
@@ -134,7 +134,7 @@ static av_cold int decode_close(AVCodecContext *avctx) · 133 unmodified lines
134134
135135 AVCodec v210x_decoder = {
136136 "v210x",
137− CODEC_TYPE_VIDEO,
137+ AVMEDIA_TYPE_VIDEO,
138138 CODEC_ID_V210X,
139139 0,
140140 decode_init,
libavcodec/vaapi_h264.c+1−1
@@ -336,7 +336,7 @@ static int decode_slice(AVCodecContext *avctx, · 335 unmodified lines
336336
337337 AVHWAccel h264_vaapi_hwaccel = {
338338 .name = "h264_vaapi",
339− .type = CODEC_TYPE_VIDEO,
339+ .type = AVMEDIA_TYPE_VIDEO,
340340 .id = CODEC_ID_H264,
341341 .pix_fmt = PIX_FMT_VAAPI_VLD,
342342 .capabilities = 0,
libavcodec/vaapi_mpeg2.c+1−1
@@ -140,7 +140,7 @@ static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer · 139 unmodified lines
140140
141141 AVHWAccel mpeg2_vaapi_hwaccel = {
142142 .name = "mpeg2_vaapi",
143− .type = CODEC_TYPE_VIDEO,
143+ .type = AVMEDIA_TYPE_VIDEO,
144144 .id = CODEC_ID_MPEG2VIDEO,
145145 .pix_fmt = PIX_FMT_VAAPI_VLD,
146146 .capabilities = 0,
libavcodec/vaapi_mpeg4.c+2−2
@@ -151,7 +151,7 @@ static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer · 150 unmodified lines
151151 #if CONFIG_MPEG4_VAAPI_HWACCEL
152152 AVHWAccel mpeg4_vaapi_hwaccel = {
153153 .name = "mpeg4_vaapi",
154− .type = CODEC_TYPE_VIDEO,
154+ .type = AVMEDIA_TYPE_VIDEO,
155155 .id = CODEC_ID_MPEG4,
156156 .pix_fmt = PIX_FMT_VAAPI_VLD,
157157 .capabilities = 0,
@@ -165,7 +165,7 @@ AVHWAccel mpeg4_vaapi_hwaccel = { · 7 unmodified lines
165165 #if CONFIG_H263_VAAPI_HWACCEL
166166 AVHWAccel h263_vaapi_hwaccel = {
167167 .name = "h263_vaapi",
168− .type = CODEC_TYPE_VIDEO,
168+ .type = AVMEDIA_TYPE_VIDEO,
169169 .id = CODEC_ID_H263,
170170 .pix_fmt = PIX_FMT_VAAPI_VLD,
171171 .capabilities = 0,
libavcodec/vaapi_vc1.c+2−2
@@ -328,7 +328,7 @@ static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, · 327 unmodified lines
328328 #if CONFIG_WMV3_VAAPI_HWACCEL
329329 AVHWAccel wmv3_vaapi_hwaccel = {
330330 .name = "wmv3_vaapi",
331− .type = CODEC_TYPE_VIDEO,
331+ .type = AVMEDIA_TYPE_VIDEO,
332332 .id = CODEC_ID_WMV3,
333333 .pix_fmt = PIX_FMT_VAAPI_VLD,
334334 .capabilities = 0,
@@ -341,7 +341,7 @@ AVHWAccel wmv3_vaapi_hwaccel = { · 6 unmodified lines
341341
342342 AVHWAccel vc1_vaapi_hwaccel = {
343343 .name = "vc1_vaapi",
344− .type = CODEC_TYPE_VIDEO,
344+ .type = AVMEDIA_TYPE_VIDEO,
345345 .id = CODEC_ID_VC1,
346346 .pix_fmt = PIX_FMT_VAAPI_VLD,
347347 .capabilities = 0,
libavcodec/vb.c+1−1
@@ -289,7 +289,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 288 unmodified lines
289289
290290 AVCodec vb_decoder = {
291291 "vb",
292− CODEC_TYPE_VIDEO,
292+ AVMEDIA_TYPE_VIDEO,
293293 CODEC_ID_VB,
294294 sizeof(VBDecContext),
295295 decode_init,
libavcodec/vc1dec.c+4−4
@@ -3319,7 +3319,7 @@ static av_cold int vc1_decode_end(AVCodecContext *avctx) · 3318 unmodified lines
33193319
33203320 AVCodec vc1_decoder = {
33213321 "vc1",
3322− CODEC_TYPE_VIDEO,
3322+ AVMEDIA_TYPE_VIDEO,
33233323 CODEC_ID_VC1,
33243324 sizeof(VC1Context),
33253325 vc1_decode_init,
@@ -3335,7 +3335,7 @@ AVCodec vc1_decoder = { · 9 unmodified lines
33353335 #if CONFIG_WMV3_DECODER
33363336 AVCodec wmv3_decoder = {
33373337 "wmv3",
3338− CODEC_TYPE_VIDEO,
3338+ AVMEDIA_TYPE_VIDEO,
33393339 CODEC_ID_WMV3,
33403340 sizeof(VC1Context),
33413341 vc1_decode_init,
@@ -3352,7 +3352,7 @@ AVCodec wmv3_decoder = { · 10 unmodified lines
33523352 #if CONFIG_WMV3_VDPAU_DECODER
33533353 AVCodec wmv3_vdpau_decoder = {
33543354 "wmv3_vdpau",
3355− CODEC_TYPE_VIDEO,
3355+ AVMEDIA_TYPE_VIDEO,
33563356 CODEC_ID_WMV3,
33573357 sizeof(VC1Context),
33583358 vc1_decode_init,
@@ -3369,7 +3369,7 @@ AVCodec wmv3_vdpau_decoder = { · 10 unmodified lines
33693369 #if CONFIG_VC1_VDPAU_DECODER
33703370 AVCodec vc1_vdpau_decoder = {
33713371 "vc1_vdpau",
3372− CODEC_TYPE_VIDEO,
3372+ AVMEDIA_TYPE_VIDEO,
33733373 CODEC_ID_VC1,
33743374 sizeof(VC1Context),
33753375 vc1_decode_init,
libavcodec/vcr1.c+2−2
@@ -178,7 +178,7 @@ static av_cold int encode_init(AVCodecContext *avctx){ · 177 unmodified lines
178178
179179 AVCodec vcr1_decoder = {
180180 "vcr1",
181− CODEC_TYPE_VIDEO,
181+ AVMEDIA_TYPE_VIDEO,
182182 CODEC_ID_VCR1,
183183 sizeof(VCR1Context),
184184 decode_init,
@@ -192,7 +192,7 @@ AVCodec vcr1_decoder = { · 7 unmodified lines
192192 #if CONFIG_VCR1_ENCODER
193193 AVCodec vcr1_encoder = {
194194 "vcr1",
195− CODEC_TYPE_VIDEO,
195+ AVMEDIA_TYPE_VIDEO,
196196 CODEC_ID_VCR1,
197197 sizeof(VCR1Context),
198198 encode_init,
libavcodec/vmdav.c+2−2
@@ -567,7 +567,7 @@ static int vmdaudio_decode_frame(AVCodecContext *avctx, · 566 unmodified lines
567567
568568 AVCodec vmdvideo_decoder = {
569569 "vmdvideo",
570− CODEC_TYPE_VIDEO,
570+ AVMEDIA_TYPE_VIDEO,
571571 CODEC_ID_VMDVIDEO,
572572 sizeof(VmdVideoContext),
573573 vmdvideo_decode_init,
@@ -580,7 +580,7 @@ AVCodec vmdvideo_decoder = { · 6 unmodified lines
580580
581581 AVCodec vmdaudio_decoder = {
582582 "vmdaudio",
583− CODEC_TYPE_AUDIO,
583+ AVMEDIA_TYPE_AUDIO,
584584 CODEC_ID_VMDAUDIO,
585585 sizeof(VmdAudioContext),
586586 vmdaudio_decode_init,
libavcodec/vmnc.c+1−1
@@ -510,7 +510,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 509 unmodified lines
510510
511511 AVCodec vmnc_decoder = {
512512 "vmnc",
513− CODEC_TYPE_VIDEO,
513+ AVMEDIA_TYPE_VIDEO,
514514 CODEC_ID_VMNC,
515515 sizeof(VmncContext),
516516 decode_init,
libavcodec/vorbis_dec.c+1−1
@@ -1645,7 +1645,7 @@ static av_cold int vorbis_decode_close(AVCodecContext *avccontext) · 1644 unmodified lines
16451645
16461646 AVCodec vorbis_decoder = {
16471647 "vorbis",
1648− CODEC_TYPE_AUDIO,
1648+ AVMEDIA_TYPE_AUDIO,
16491649 CODEC_ID_VORBIS,
16501650 sizeof(vorbis_context),
16511651 vorbis_decode_init,
libavcodec/vorbis_enc.c+1−1
@@ -1093,7 +1093,7 @@ static av_cold int vorbis_encode_close(AVCodecContext *avccontext) · 1092 unmodified lines
10931093
10941094 AVCodec vorbis_encoder = {
10951095 "vorbis",
1096− CODEC_TYPE_AUDIO,
1096+ AVMEDIA_TYPE_AUDIO,
10971097 CODEC_ID_VORBIS,
10981098 sizeof(vorbis_enc_context),
10991099 vorbis_encode_init,
libavcodec/vp3.c+2−2
@@ -2191,7 +2191,7 @@ static av_cold int theora_decode_init(AVCodecContext *avctx) · 2190 unmodified lines
21912191
21922192 AVCodec theora_decoder = {
21932193 "theora",
2194− CODEC_TYPE_VIDEO,
2194+ AVMEDIA_TYPE_VIDEO,
21952195 CODEC_ID_THEORA,
21962196 sizeof(Vp3DecodeContext),
21972197 theora_decode_init,
@@ -2206,7 +2206,7 @@ AVCodec theora_decoder = { · 8 unmodified lines
22062206
22072207 AVCodec vp3_decoder = {
22082208 "vp3",
2209− CODEC_TYPE_VIDEO,
2209+ AVMEDIA_TYPE_VIDEO,
22102210 CODEC_ID_VP3,
22112211 sizeof(Vp3DecodeContext),
22122212 vp3_decode_init,
libavcodec/vp5.c+1−1
@@ -286,7 +286,7 @@ static av_cold int vp5_decode_init(AVCodecContext *avctx) · 285 unmodified lines
286286
287287 AVCodec vp5_decoder = {
288288 "vp5",
289− CODEC_TYPE_VIDEO,
289+ AVMEDIA_TYPE_VIDEO,
290290 CODEC_ID_VP5,
291291 sizeof(VP56Context),
292292 vp5_decode_init,
libavcodec/vp6.c+3−3
@@ -621,7 +621,7 @@ static av_cold int vp6_decode_free(AVCodecContext *avctx) · 620 unmodified lines
621621
622622 AVCodec vp6_decoder = {
623623 "vp6",
624− CODEC_TYPE_VIDEO,
624+ AVMEDIA_TYPE_VIDEO,
625625 CODEC_ID_VP6,
626626 sizeof(VP56Context),
627627 vp6_decode_init,
@@ -635,7 +635,7 @@ AVCodec vp6_decoder = { · 7 unmodified lines
635635 /* flash version, not flipped upside-down */
636636 AVCodec vp6f_decoder = {
637637 "vp6f",
638− CODEC_TYPE_VIDEO,
638+ AVMEDIA_TYPE_VIDEO,
639639 CODEC_ID_VP6F,
640640 sizeof(VP56Context),
641641 vp6_decode_init,
@@ -649,7 +649,7 @@ AVCodec vp6f_decoder = { · 7 unmodified lines
649649 /* flash version, not flipped upside-down, with alpha channel */
650650 AVCodec vp6a_decoder = {
651651 "vp6a",
652− CODEC_TYPE_VIDEO,
652+ AVMEDIA_TYPE_VIDEO,
653653 CODEC_ID_VP6A,
654654 sizeof(VP56Context),
655655 vp6_decode_init,
libavcodec/vqavideo.c+1−1
@@ -610,7 +610,7 @@ static av_cold int vqa_decode_end(AVCodecContext *avctx) · 609 unmodified lines
610610
611611 AVCodec vqa_decoder = {
612612 "vqavideo",
613− CODEC_TYPE_VIDEO,
613+ AVMEDIA_TYPE_VIDEO,
614614 CODEC_ID_WS_VQA,
615615 sizeof(VqaContext),
616616 vqa_decode_init,
libavcodec/wavpack.c+1−1
@@ -1020,7 +1020,7 @@ static int wavpack_decode_frame(AVCodecContext *avctx, · 1019 unmodified lines
10201020
10211021 AVCodec wavpack_decoder = {
10221022 "wavpack",
1023− CODEC_TYPE_AUDIO,
1023+ AVMEDIA_TYPE_AUDIO,
10241024 CODEC_ID_WAVPACK,
10251025 sizeof(WavpackContext),
10261026 wavpack_decode_init,
libavcodec/wmadec.c+2−2
@@ -942,7 +942,7 @@ static av_cold void flush(AVCodecContext *avctx) · 941 unmodified lines
942942 AVCodec wmav1_decoder =
943943 {
944944 "wmav1",
945− CODEC_TYPE_AUDIO,
945+ AVMEDIA_TYPE_AUDIO,
946946 CODEC_ID_WMAV1,
947947 sizeof(WMACodecContext),
948948 wma_decode_init,
@@ -956,7 +956,7 @@ AVCodec wmav1_decoder = · 7 unmodified lines
956956 AVCodec wmav2_decoder =
957957 {
958958 "wmav2",
959− CODEC_TYPE_AUDIO,
959+ AVMEDIA_TYPE_AUDIO,
960960 CODEC_ID_WMAV2,
961961 sizeof(WMACodecContext),
962962 wma_decode_init,
libavcodec/wmaenc.c+2−2
@@ -386,7 +386,7 @@ static int encode_superframe(AVCodecContext *avctx, · 385 unmodified lines
386386 AVCodec wmav1_encoder =
387387 {
388388 "wmav1",
389− CODEC_TYPE_AUDIO,
389+ AVMEDIA_TYPE_AUDIO,
390390 CODEC_ID_WMAV1,
391391 sizeof(WMACodecContext),
392392 encode_init,
@@ -399,7 +399,7 @@ AVCodec wmav1_encoder = · 6 unmodified lines
399399 AVCodec wmav2_encoder =
400400 {
401401 "wmav2",
402− CODEC_TYPE_AUDIO,
402+ AVMEDIA_TYPE_AUDIO,
403403 CODEC_ID_WMAV2,
404404 sizeof(WMACodecContext),
405405 encode_init,
libavcodec/wmaprodec.c+1−1
@@ -1565,7 +1565,7 @@ static void flush(AVCodecContext *avctx) · 1564 unmodified lines
15651565 */
15661566 AVCodec wmapro_decoder = {
15671567 "wmapro",
1568− CODEC_TYPE_AUDIO,
1568+ AVMEDIA_TYPE_AUDIO,
15691569 CODEC_ID_WMAPRO,
15701570 sizeof(WMAProDecodeCtx),
15711571 decode_init,
libavcodec/wmavoice.c+1−1
@@ -1555,7 +1555,7 @@ static av_cold void wmavoice_flush(AVCodecContext *ctx) · 1554 unmodified lines
15551555
15561556 AVCodec wmavoice_decoder = {
15571557 "wmavoice",
1558− CODEC_TYPE_AUDIO,
1558+ AVMEDIA_TYPE_AUDIO,
15591559 CODEC_ID_WMAVOICE,
15601560 sizeof(WMAVoiceContext),
15611561 wmavoice_decode_init,
libavcodec/wmv2dec.c+1−1
@@ -486,7 +486,7 @@ static av_cold int wmv2_decode_end(AVCodecContext *avctx) · 485 unmodified lines
486486
487487 AVCodec wmv2_decoder = {
488488 "wmv2",
489− CODEC_TYPE_VIDEO,
489+ AVMEDIA_TYPE_VIDEO,
490490 CODEC_ID_WMV2,
491491 sizeof(Wmv2Context),
492492 wmv2_decode_init,
libavcodec/wmv2enc.c+1−1
@@ -213,7 +213,7 @@ void ff_wmv2_encode_mb(MpegEncContext * s, · 212 unmodified lines
213213
214214 AVCodec wmv2_encoder = {
215215 "wmv2",
216− CODEC_TYPE_VIDEO,
216+ AVMEDIA_TYPE_VIDEO,
217217 CODEC_ID_WMV2,
218218 sizeof(Wmv2Context),
219219 wmv2_encode_init,
libavcodec/wnv1.c+1−1
@@ -156,7 +156,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 155 unmodified lines
156156
157157 AVCodec wnv1_decoder = {
158158 "wnv1",
159− CODEC_TYPE_VIDEO,
159+ AVMEDIA_TYPE_VIDEO,
160160 CODEC_ID_WNV1,
161161 sizeof(WNV1Context),
162162 decode_init,
libavcodec/ws-snd1.c+1−1
@@ -147,7 +147,7 @@ static int ws_snd_decode_frame(AVCodecContext *avctx, · 146 unmodified lines
147147
148148 AVCodec ws_snd1_decoder = {
149149 "ws_snd1",
150− CODEC_TYPE_AUDIO,
150+ AVMEDIA_TYPE_AUDIO,
151151 CODEC_ID_WESTWOOD_SND1,
152152 0,
153153 ws_snd_decode_init,
libavcodec/xan.c+2−2
@@ -417,7 +417,7 @@ static av_cold int xan_decode_end(AVCodecContext *avctx) · 416 unmodified lines
417417
418418 AVCodec xan_wc3_decoder = {
419419 "xan_wc3",
420− CODEC_TYPE_VIDEO,
420+ AVMEDIA_TYPE_VIDEO,
421421 CODEC_ID_XAN_WC3,
422422 sizeof(XanContext),
423423 xan_decode_init,
@@ -431,7 +431,7 @@ AVCodec xan_wc3_decoder = { · 7 unmodified lines
431431 /*
432432 AVCodec xan_wc4_decoder = {
433433 "xan_wc4",
434− CODEC_TYPE_VIDEO,
434+ AVMEDIA_TYPE_VIDEO,
435435 CODEC_ID_XAN_WC4,
436436 sizeof(XanContext),
437437 xan_decode_init,
libavcodec/xl.c+1−1
@@ -140,7 +140,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ · 139 unmodified lines
140140
141141 AVCodec xl_decoder = {
142142 "xl",
143− CODEC_TYPE_VIDEO,
143+ AVMEDIA_TYPE_VIDEO,
144144 CODEC_ID_VIXL,
145145 sizeof(VideoXLContext),
146146 decode_init,
libavcodec/xsubdec.c+1−1
@@ -132,7 +132,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 131 unmodified lines
132132
133133 AVCodec xsub_decoder = {
134134 "xsub",
135− CODEC_TYPE_SUBTITLE,
135+ AVMEDIA_TYPE_SUBTITLE,
136136 CODEC_ID_XSUB,
137137 0,
138138 decode_init,
libavcodec/xsubenc.c+1−1
@@ -212,7 +212,7 @@ static av_cold int xsub_encoder_init(AVCodecContext *avctx) · 211 unmodified lines
212212
213213 AVCodec xsub_encoder = {
214214 "xsub",
215− CODEC_TYPE_SUBTITLE,
215+ AVMEDIA_TYPE_SUBTITLE,
216216 CODEC_ID_XSUB,
217217 0,
218218 xsub_encoder_init,
libavcodec/yop.c+1−1
@@ -249,7 +249,7 @@ static int yop_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 248 unmodified lines
249249
250250 AVCodec yop_decoder = {
251251 "yop",
252− CODEC_TYPE_VIDEO,
252+ AVMEDIA_TYPE_VIDEO,
253253 CODEC_ID_YOP,
254254 sizeof(YopDecContext),
255255 yop_decode_init,
libavcodec/zmbv.c+1−1
@@ -654,7 +654,7 @@ static av_cold int decode_end(AVCodecContext *avctx) · 653 unmodified lines
654654
655655 AVCodec zmbv_decoder = {
656656 "zmbv",
657− CODEC_TYPE_VIDEO,
657+ AVMEDIA_TYPE_VIDEO,
658658 CODEC_ID_ZMBV,
659659 sizeof(ZmbvContext),
660660 decode_init,
libavcodec/zmbvenc.c+1−1
@@ -325,7 +325,7 @@ static av_cold int encode_end(AVCodecContext *avctx) · 324 unmodified lines
325325
326326 AVCodec zmbv_encoder = {
327327 "zmbv",
328− CODEC_TYPE_VIDEO,
328+ AVMEDIA_TYPE_VIDEO,
329329 CODEC_ID_ZMBV,
330330 sizeof(ZmbvEncContext),
331331 encode_init,
libavdevice/alsa-audio-dec.c+1−1
@@ -111,7 +111,7 @@ static av_cold int audio_read_header(AVFormatContext *s1, · 110 unmodified lines
111111 }
112112
113113 /* take real parameters */
114− st->codec->codec_type = CODEC_TYPE_AUDIO;
114+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
115115 st->codec->codec_id = codec_id;
116116 st->codec->sample_rate = sample_rate;
117117 st->codec->channels = ap->channels;
libavdevice/bktr.c+1−1
@@ -269,7 +269,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap) · 268 unmodified lines
269269 s->frame_rate_base = frame_rate_base;
270270 s->per_frame = ((uint64_t)1000000 * s->frame_rate_base) / s->frame_rate;
271271
272− st->codec->codec_type = CODEC_TYPE_VIDEO;
272+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
273273 st->codec->pix_fmt = PIX_FMT_YUV420P;
274274 st->codec->codec_id = CODEC_ID_RAWVIDEO;
275275 st->codec->width = width;
libavdevice/jack_audio.c+1−1
@@ -237,7 +237,7 @@ static int audio_read_header(AVFormatContext *context, AVFormatParameters *param · 236 unmodified lines
237237 return AVERROR(ENOMEM);
238238 }
239239
240− stream->codec->codec_type = CODEC_TYPE_AUDIO;
240+ stream->codec->codec_type = AVMEDIA_TYPE_AUDIO;
241241 #if HAVE_BIGENDIAN
242242 stream->codec->codec_id = CODEC_ID_PCM_F32BE;
243243 #else
libavdevice/libdc1394.c+1−1
@@ -117,7 +117,7 @@ static inline int dc1394_read_common(AVFormatContext *c, AVFormatParameters *ap, · 116 unmodified lines
117117 if (!vst)
118118 goto out;
119119 av_set_pts_info(vst, 64, 1, 1000);
120− vst->codec->codec_type = CODEC_TYPE_VIDEO;
120+ vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
121121 vst->codec->codec_id = CODEC_ID_RAWVIDEO;
122122 vst->codec->time_base.den = fps->frame_rate;
123123 vst->codec->time_base.num = 1000;
libavdevice/oss_audio.c+1−1
@@ -232,7 +232,7 @@ static int audio_read_header(AVFormatContext *s1, AVFormatParameters *ap) · 231 unmodified lines
232232 }
233233
234234 /* take real parameters */
235− st->codec->codec_type = CODEC_TYPE_AUDIO;
235+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
236236 st->codec->codec_id = s->codec_id;
237237 st->codec->sample_rate = s->sample_rate;
238238 st->codec->channels = s->channels;
libavdevice/v4l.c+1−1
@@ -242,7 +242,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap) · 241 unmodified lines
242242
243243 s->fd = video_fd;
244244
245− st->codec->codec_type = CODEC_TYPE_VIDEO;
245+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
246246 st->codec->codec_id = CODEC_ID_RAWVIDEO;
247247 st->codec->width = s->video_win.width;
248248 st->codec->height = s->video_win.height;
libavdevice/v4l2.c+1−1
@@ -646,7 +646,7 @@ static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap) · 645 unmodified lines
646646 }
647647 s->top_field_first = first_field(s->fd);
648648
649− st->codec->codec_type = CODEC_TYPE_VIDEO;
649+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
650650 st->codec->codec_id = codec_id;
651651 st->codec->width = width;
652652 st->codec->height = height;
libavdevice/vfwcap.c+1−1
@@ -353,7 +353,7 @@ static int vfw_read_header(AVFormatContext *s, AVFormatParameters *ap) · 352 unmodified lines
353353
354354 codec = st->codec;
355355 codec->time_base = ap->time_base;
356− codec->codec_type = CODEC_TYPE_VIDEO;
356+ codec->codec_type = AVMEDIA_TYPE_VIDEO;
357357 codec->width = width;
358358 codec->height = height;
359359 codec->pix_fmt = vfw_pixfmt(biCompression, biBitCount);
libavdevice/x11grab.c+1−1
@@ -226,7 +226,7 @@ x11grab_read_header(AVFormatContext *s1, AVFormatParameters *ap) · 225 unmodified lines
226226 x11grab->image = image;
227227 x11grab->use_shm = use_shm;
228228
229− st->codec->codec_type = CODEC_TYPE_VIDEO;
229+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
230230 st->codec->codec_id = CODEC_ID_RAWVIDEO;
231231 st->codec->width = ap->width;
232232 st->codec->height = ap->height;
libavfilter/avfilter.h+1−1
@@ -280,7 +280,7 @@ struct AVFilterPad · 279 unmodified lines
280280 * AVFilterPad type. Only video supported now, hopefully someone will
281281 * add audio in the future.
282282 */
283− enum CodecType type;
283+ enum AVMediaType type;
284284
285285 /**
286286 * Minimum required permissions on incoming buffers. Any buffer with
libavfilter/vf_aspect.c+4−4
@@ -86,7 +86,7 @@ AVFilter avfilter_vf_aspect = { · 85 unmodified lines
8686 .priv_size = sizeof(AspectContext),
8787
8888 .inputs = (AVFilterPad[]) {{ .name = "default",
89− .type = CODEC_TYPE_VIDEO,
89+ .type = AVMEDIA_TYPE_VIDEO,
9090 .config_props = frameaspect_config_props,
9191 .get_video_buffer = avfilter_null_get_video_buffer,
9292 .start_frame = start_frame,
@@ -94,7 +94,7 @@ AVFilter avfilter_vf_aspect = { · 1 unmodified line
9494 { .name = NULL}},
9595
9696 .outputs = (AVFilterPad[]) {{ .name = "default",
97− .type = CODEC_TYPE_VIDEO, },
97+ .type = AVMEDIA_TYPE_VIDEO, },
9898 { .name = NULL}},
9999 };
100100 #endif /* CONFIG_ASPECT_FILTER */
@@ -109,14 +109,14 @@ AVFilter avfilter_vf_pixelaspect = { · 8 unmodified lines
109109 .priv_size = sizeof(AspectContext),
110110
111111 .inputs = (AVFilterPad[]) {{ .name = "default",
112− .type = CODEC_TYPE_VIDEO,
112+ .type = AVMEDIA_TYPE_VIDEO,
113113 .get_video_buffer = avfilter_null_get_video_buffer,
114114 .start_frame = start_frame,
115115 .end_frame = avfilter_null_end_frame },
116116 { .name = NULL}},
117117
118118 .outputs = (AVFilterPad[]) {{ .name = "default",
119− .type = CODEC_TYPE_VIDEO, },
119+ .type = AVMEDIA_TYPE_VIDEO, },
120120 { .name = NULL}},
121121 };
122122 #endif /* CONFIG_PIXELASPECT_FILTER */
libavfilter/vf_crop.c+2−2
@@ -214,14 +214,14 @@ AVFilter avfilter_vf_crop = { · 213 unmodified lines
214214 .init = init,
215215
216216 .inputs = (AVFilterPad[]) {{ .name = "default",
217− .type = CODEC_TYPE_VIDEO,
217+ .type = AVMEDIA_TYPE_VIDEO,
218218 .start_frame = start_frame,
219219 .draw_slice = draw_slice,
220220 .get_video_buffer = avfilter_null_get_video_buffer,
221221 .config_props = config_input, },
222222 { .name = NULL}},
223223 .outputs = (AVFilterPad[]) {{ .name = "default",
224− .type = CODEC_TYPE_VIDEO,
224+ .type = AVMEDIA_TYPE_VIDEO,
225225 .config_props = config_output, },
226226 { .name = NULL}},
227227 };
libavfilter/vf_format.c+4−4
@@ -103,14 +103,14 @@ AVFilter avfilter_vf_format = { · 102 unmodified lines
103103 .priv_size = sizeof(FormatContext),
104104
105105 .inputs = (AVFilterPad[]) {{ .name = "default",
106− .type = CODEC_TYPE_VIDEO,
106+ .type = AVMEDIA_TYPE_VIDEO,
107107 .get_video_buffer= avfilter_null_get_video_buffer,
108108 .start_frame = avfilter_null_start_frame,
109109 .draw_slice = avfilter_null_draw_slice,
110110 .end_frame = avfilter_null_end_frame, },
111111 { .name = NULL}},
112112 .outputs = (AVFilterPad[]) {{ .name = "default",
113− .type = CODEC_TYPE_VIDEO },
113+ .type = AVMEDIA_TYPE_VIDEO },
114114 { .name = NULL}},
115115 };
116116 #endif /* CONFIG_FORMAT_FILTER */
@@ -133,14 +133,14 @@ AVFilter avfilter_vf_noformat = { · 16 unmodified lines
133133 .priv_size = sizeof(FormatContext),
134134
135135 .inputs = (AVFilterPad[]) {{ .name = "default",
136− .type = CODEC_TYPE_VIDEO,
136+ .type = AVMEDIA_TYPE_VIDEO,
137137 .get_video_buffer= avfilter_null_get_video_buffer,
138138 .start_frame = avfilter_null_start_frame,
139139 .draw_slice = avfilter_null_draw_slice,
140140 .end_frame = avfilter_null_end_frame, },
141141 { .name = NULL}},
142142 .outputs = (AVFilterPad[]) {{ .name = "default",
143− .type = CODEC_TYPE_VIDEO },
143+ .type = AVMEDIA_TYPE_VIDEO },
144144 { .name = NULL}},
145145 };
146146 #endif /* CONFIG_NOFORMAT_FILTER */
libavfilter/vf_null.c+2−2
@@ -30,13 +30,13 @@ AVFilter avfilter_vf_null = { · 29 unmodified lines
3030 .priv_size = 0,
3131
3232 .inputs = (AVFilterPad[]) {{ .name = "default",
33− .type = CODEC_TYPE_VIDEO,
33+ .type = AVMEDIA_TYPE_VIDEO,
3434 .get_video_buffer = avfilter_null_get_video_buffer,
3535 .start_frame = avfilter_null_start_frame,
3636 .end_frame = avfilter_null_end_frame },
3737 { .name = NULL}},
3838
3939 .outputs = (AVFilterPad[]) {{ .name = "default",
40− .type = CODEC_TYPE_VIDEO, },
40+ .type = AVMEDIA_TYPE_VIDEO, },
4141 { .name = NULL}},
4242 };
libavfilter/vf_scale.c+2−2
@@ -197,13 +197,13 @@ AVFilter avfilter_vf_scale = { · 196 unmodified lines
197197 .priv_size = sizeof(ScaleContext),
198198
199199 .inputs = (AVFilterPad[]) {{ .name = "default",
200− .type = CODEC_TYPE_VIDEO,
200+ .type = AVMEDIA_TYPE_VIDEO,
201201 .start_frame = start_frame,
202202 .draw_slice = draw_slice,
203203 .min_perms = AV_PERM_READ, },
204204 { .name = NULL}},
205205 .outputs = (AVFilterPad[]) {{ .name = "default",
206− .type = CODEC_TYPE_VIDEO,
206+ .type = AVMEDIA_TYPE_VIDEO,
207207 .config_props = config_props, },
208208 { .name = NULL}},
209209 };
libavfilter/vf_slicify.c+2−2
@@ -104,7 +104,7 @@ AVFilter avfilter_vf_slicify = { · 103 unmodified lines
104104 .priv_size = sizeof(SliceContext),
105105
106106 .inputs = (AVFilterPad[]) {{ .name = "default",
107− .type = CODEC_TYPE_VIDEO,
107+ .type = AVMEDIA_TYPE_VIDEO,
108108 .get_video_buffer = avfilter_null_get_video_buffer,
109109 .start_frame = start_frame,
110110 .draw_slice = draw_slice,
@@ -112,6 +112,6 @@ AVFilter avfilter_vf_slicify = { · 1 unmodified line
112112 .end_frame = avfilter_null_end_frame, },
113113 { .name = NULL}},
114114 .outputs = (AVFilterPad[]) {{ .name = "default",
115− .type = CODEC_TYPE_VIDEO, },
115+ .type = AVMEDIA_TYPE_VIDEO, },
116116 { .name = NULL}},
117117 };
libavfilter/vf_vflip.c+2−2
@@ -91,7 +91,7 @@ AVFilter avfilter_vf_vflip = { · 90 unmodified lines
9191 .priv_size = sizeof(FlipContext),
9292
9393 .inputs = (AVFilterPad[]) {{ .name = "default",
94− .type = CODEC_TYPE_VIDEO,
94+ .type = AVMEDIA_TYPE_VIDEO,
9595 .get_video_buffer = get_video_buffer,
9696 .start_frame = start_frame,
9797 .draw_slice = draw_slice,
@@ -99,6 +99,6 @@ AVFilter avfilter_vf_vflip = { · 1 unmodified line
9999 .config_props = config_input, },
100100 { .name = NULL}},
101101 .outputs = (AVFilterPad[]) {{ .name = "default",
102− .type = CODEC_TYPE_VIDEO, },
102+ .type = AVMEDIA_TYPE_VIDEO, },
103103 { .name = NULL}},
104104 };
libavfilter/vsink_nullsink.c+1−1
@@ -35,7 +35,7 @@ AVFilter avfilter_vsink_nullsink = { · 34 unmodified lines
3535 .inputs = (AVFilterPad[]) {
3636 {
3737 .name = "default",
38− .type = CODEC_TYPE_VIDEO,
38+ .type = AVMEDIA_TYPE_VIDEO,
3939 .start_frame = start_frame,
4040 .end_frame = end_frame,
4141 },
libavfilter/vsrc_nullsrc.c+1−1
@@ -74,7 +74,7 @@ AVFilter avfilter_vsrc_nullsrc = { · 73 unmodified lines
7474 .outputs = (AVFilterPad[]) {
7575 {
7676 .name = "default",
77− .type = CODEC_TYPE_VIDEO,
77+ .type = AVMEDIA_TYPE_VIDEO,
7878 .config_props = config_props,
7979 .request_frame = request_frame,
8080 },
libavformat/4xm.c+2−2
@@ -149,7 +149,7 @@ static int fourxm_read_header(AVFormatContext *s, · 148 unmodified lines
149149
150150 fourxm->video_stream_index = st->index;
151151
152− st->codec->codec_type = CODEC_TYPE_VIDEO;
152+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
153153 st->codec->codec_id = CODEC_ID_4XM;
154154 st->codec->extradata_size = 4;
155155 st->codec->extradata = av_malloc(4);
@@ -198,7 +198,7 @@ static int fourxm_read_header(AVFormatContext *s, · 42 unmodified lines
198198
199199 fourxm->tracks[current_track].stream_index = st->index;
200200
201− st->codec->codec_type = CODEC_TYPE_AUDIO;
201+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
202202 st->codec->codec_tag = 0;
203203 st->codec->channels = fourxm->tracks[current_track].channels;
204204 st->codec->sample_rate = fourxm->tracks[current_track].sample_rate;
libavformat/aea.c+1−1
@@ -71,7 +71,7 @@ static int aea_read_header(AVFormatContext *s, · 70 unmodified lines
7171 url_fskip(s->pb, 1783);
7272
7373
74− st->codec->codec_type = CODEC_TYPE_AUDIO;
74+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
7575 st->codec->codec_id = CODEC_ID_ATRAC1;
7676 st->codec->sample_rate = 44100;
7777 st->codec->bit_rate = 292000;
libavformat/aiffdec.c+1−1
@@ -92,7 +92,7 @@ static unsigned int get_aiff_header(ByteIOContext *pb, AVCodecContext *codec, · 91 unmodified lines
9292
9393 if (size & 1)
9494 size++;
95− codec->codec_type = CODEC_TYPE_AUDIO;
95+ codec->codec_type = AVMEDIA_TYPE_AUDIO;
9696 codec->channels = get_be16(pb);
9797 num_frames = get_be32(pb);
9898 codec->bits_per_coded_sample = get_be16(pb);
libavformat/amr.c+1−1
@@ -108,7 +108,7 @@ static int amr_read_header(AVFormatContext *s, · 107 unmodified lines
108108 st->codec->sample_rate = 8000;
109109 }
110110 st->codec->channels = 1;
111− st->codec->codec_type = CODEC_TYPE_AUDIO;
111+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
112112 av_set_pts_info(st, 64, 1, st->codec->sample_rate);
113113
114114 return 0;
libavformat/anm.c+1−1
@@ -100,7 +100,7 @@ static int read_header(AVFormatContext *s, · 99 unmodified lines
100100 st = av_new_stream(s, 0);
101101 if (!st)
102102 return AVERROR(ENOMEM);
103− st->codec->codec_type = CODEC_TYPE_VIDEO;
103+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
104104 st->codec->codec_id = CODEC_ID_ANM;
105105 st->codec->codec_tag = 0; /* no fourcc */
106106 st->codec->width = get_le16(pb);
libavformat/apc.c+1−1
@@ -43,7 +43,7 @@ static int apc_read_header(AVFormatContext *s, AVFormatParameters *ap) · 42 unmodified lines
4343 if (!st)
4444 return AVERROR(ENOMEM);
4545
46− st->codec->codec_type = CODEC_TYPE_AUDIO;
46+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
4747 st->codec->codec_id = CODEC_ID_ADPCM_IMA_WS;
4848
4949 get_le32(pb); /* number of samples */
libavformat/ape.c+1−1
@@ -301,7 +301,7 @@ static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap) · 300 unmodified lines
301301
302302 total_blocks = (ape->totalframes == 0) ? 0 : ((ape->totalframes - 1) * ape->blocksperframe) + ape->finalframeblocks;
303303
304− st->codec->codec_type = CODEC_TYPE_AUDIO;
304+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
305305 st->codec->codec_id = CODEC_ID_APE;
306306 st->codec->codec_tag = MKTAG('A', 'P', 'E', ' ');
307307 st->codec->channels = ape->channels;
libavformat/asfdec.c+10−10
@@ -236,7 +236,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) · 235 unmodified lines
236236 asf->hdr.max_bitrate = get_le32(pb);
237237 s->packet_size = asf->hdr.max_pktsize;
238238 } else if (!guidcmp(&g, &ff_asf_stream_header)) {
239− enum CodecType type;
239+ enum AVMediaType type;
240240 int type_specific_size, sizeX;
241241 uint64_t total_size;
242242 unsigned int tag1;
@@ -265,14 +265,14 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) · 22 unmodified lines
265265
266266 test_for_ext_stream_audio = 0;
267267 if (!guidcmp(&g, &ff_asf_audio_stream)) {
268− type = CODEC_TYPE_AUDIO;
268+ type = AVMEDIA_TYPE_AUDIO;
269269 } else if (!guidcmp(&g, &ff_asf_video_stream)) {
270− type = CODEC_TYPE_VIDEO;
270+ type = AVMEDIA_TYPE_VIDEO;
271271 } else if (!guidcmp(&g, &ff_asf_command_stream)) {
272− type = CODEC_TYPE_DATA;
272+ type = AVMEDIA_TYPE_DATA;
273273 } else if (!guidcmp(&g, &ff_asf_ext_stream_embed_stream_header)) {
274274 test_for_ext_stream_audio = 1;
275− type = CODEC_TYPE_UNKNOWN;
275+ type = AVMEDIA_TYPE_UNKNOWN;
276276 } else {
277277 return -1;
278278 }
@@ -289,7 +289,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) · 10 unmodified lines
289289 if (test_for_ext_stream_audio) {
290290 get_guid(pb, &g);
291291 if (!guidcmp(&g, &ff_asf_ext_stream_audio_stream)) {
292− type = CODEC_TYPE_AUDIO;
292+ type = AVMEDIA_TYPE_AUDIO;
293293 is_dvr_ms_audio=1;
294294 get_guid(pb, &g);
295295 get_le32(pb);
@@ -301,7 +301,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) · 5 unmodified lines
301301 }
302302
303303 st->codec->codec_type = type;
304− if (type == CODEC_TYPE_AUDIO) {
304+ if (type == AVMEDIA_TYPE_AUDIO) {
305305 ff_get_wav_header(pb, st->codec, type_specific_size);
306306 if (is_dvr_ms_audio) {
307307 // codec_id and codec_tag are unreliable in dvr_ms
@@ -351,7 +351,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) · 43 unmodified lines
351351 st->codec->frame_size = 1;
352352 break;
353353 }
354− } else if (type == CODEC_TYPE_VIDEO) {
354+ } else if (type == AVMEDIA_TYPE_VIDEO) {
355355 get_le32(pb);
356356 get_le32(pb);
357357 get_byte(pb);
@@ -889,8 +889,8 @@ static int ff_asf_parse_packet(AVFormatContext *s, ByteIOContext *pb, AVPacket * · 531 unmodified lines
889889 asf_st->packet_pos= asf->packet_pos;
890890 //printf("new packet: stream:%d key:%d packet_key:%d audio:%d size:%d\n",
891891 //asf->stream_index, asf->packet_key_frame, asf_st->pkt.flags & PKT_FLAG_KEY,
892−//s->streams[asf->stream_index]->codec->codec_type == CODEC_TYPE_AUDIO, asf->packet_obj_size);
893− if (s->streams[asf->stream_index]->codec->codec_type == CODEC_TYPE_AUDIO)
892+//s->streams[asf->stream_index]->codec->codec_type == AVMEDIA_TYPE_AUDIO, asf->packet_obj_size);
893+ if (s->streams[asf->stream_index]->codec->codec_type == AVMEDIA_TYPE_AUDIO)
894894 asf->packet_key_frame = 1;
895895 if (asf->packet_key_frame)
896896 asf_st->pkt.flags |= PKT_FLAG_KEY;
libavformat/asfenc.c+9−9
@@ -375,13 +375,13 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data · 374 unmodified lines
375375
376376
377377 switch(enc->codec_type) {
378− case CODEC_TYPE_AUDIO:
378+ case AVMEDIA_TYPE_AUDIO:
379379 wav_extra_size = 0;
380380 extra_size = 18 + wav_extra_size;
381381 extra_size2 = 8;
382382 break;
383383 default:
384− case CODEC_TYPE_VIDEO:
384+ case AVMEDIA_TYPE_VIDEO:
385385 wav_extra_size = enc->extradata_size;
386386 extra_size = 0x33 + wav_extra_size;
387387 extra_size2 = 0;
@@ -389,7 +389,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data · 1 unmodified line
389389 }
390390
391391 hpos = put_header(pb, &ff_asf_stream_header);
392− if (enc->codec_type == CODEC_TYPE_AUDIO) {
392+ if (enc->codec_type == AVMEDIA_TYPE_AUDIO) {
393393 put_guid(pb, &ff_asf_audio_stream);
394394 put_guid(pb, &ff_asf_audio_conceal_spread);
395395 } else {
@@ -403,7 +403,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data · 7 unmodified lines
403403 put_le16(pb, n + 1); /* stream number */
404404 put_le32(pb, 0); /* ??? */
405405
406− if (enc->codec_type == CODEC_TYPE_AUDIO) {
406+ if (enc->codec_type == AVMEDIA_TYPE_AUDIO) {
407407 /* WAVEFORMATEX header */
408408 int wavsize = ff_put_wav_header(pb, enc);
409409 if ((enc->codec_id != CODEC_ID_MP3) && (enc->codec_id != CODEC_ID_MP2) && (enc->codec_id != CODEC_ID_ADPCM_IMA_WAV) && (enc->extradata_size==0)) {
@@ -457,9 +457,9 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data · 47 unmodified lines
457457 enc = s->streams[n]->codec;
458458 p = avcodec_find_encoder(enc->codec_id);
459459
460− if(enc->codec_type == CODEC_TYPE_AUDIO)
460+ if(enc->codec_type == AVMEDIA_TYPE_AUDIO)
461461 put_le16(pb, 2);
462− else if(enc->codec_type == CODEC_TYPE_VIDEO)
462+ else if(enc->codec_type == AVMEDIA_TYPE_VIDEO)
463463 put_le16(pb, 1);
464464 else
465465 put_le16(pb, -1);
@@ -483,7 +483,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data · 17 unmodified lines
483483
484484
485485 /* id */
486− if (enc->codec_type == CODEC_TYPE_AUDIO) {
486+ if (enc->codec_type == AVMEDIA_TYPE_AUDIO) {
487487 put_le16(pb, 2);
488488 put_le16(pb, enc->codec_tag);
489489 } else {
@@ -722,7 +722,7 @@ static void put_frame( · 232 unmodified lines
722722 // multi payloads
723723 frag_len1 = asf->packet_size_left - PAYLOAD_HEADER_SIZE_MULTIPLE_PAYLOADS - PACKET_HEADER_MIN_SIZE - 1;
724724
725− if(frag_len1 < payload_len && avst->codec->codec_type == CODEC_TYPE_AUDIO){
725+ if(frag_len1 < payload_len && avst->codec->codec_type == AVMEDIA_TYPE_AUDIO){
726726 flush_packet(s);
727727 continue;
728728 }
@@ -770,7 +770,7 @@ static int asf_write_packet(AVFormatContext *s, AVPacket *pkt) · 41 unmodified lines
770770 codec = s->streams[pkt->stream_index]->codec;
771771 stream = &asf->streams[pkt->stream_index];
772772
773− if(codec->codec_type == CODEC_TYPE_AUDIO)
773+ if(codec->codec_type == AVMEDIA_TYPE_AUDIO)
774774 flags &= ~PKT_FLAG_KEY;
775775
776776 pts = (pkt->pts != AV_NOPTS_VALUE) ? pkt->pts : pkt->dts;
libavformat/assdec.c+1−1
@@ -99,7 +99,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) · 98 unmodified lines
9999 if (!st)
100100 return -1;
101101 av_set_pts_info(st, 64, 1, 100);
102− st->codec->codec_type = CODEC_TYPE_SUBTITLE;
102+ st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
103103 st->codec->codec_id= CODEC_ID_SSA;
104104
105105 header_remaining= INT_MAX;
libavformat/au.c+1−1
@@ -148,7 +148,7 @@ static int au_read_header(AVFormatContext *s, · 147 unmodified lines
148148 st = av_new_stream(s, 0);
149149 if (!st)
150150 return -1;
151− st->codec->codec_type = CODEC_TYPE_AUDIO;
151+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
152152 st->codec->codec_tag = id;
153153 st->codec->codec_id = codec;
154154 st->codec->channels = channels;
libavformat/audiointerleave.c+4−4
@@ -32,7 +32,7 @@ void ff_audio_interleave_close(AVFormatContext *s) · 31 unmodified lines
3232 AVStream *st = s->streams[i];
3333 AudioInterleaveContext *aic = st->priv_data;
3434
35− if (st->codec->codec_type == CODEC_TYPE_AUDIO)
35+ if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
3636 av_fifo_free(aic->fifo);
3737 }
3838 }
@@ -50,7 +50,7 @@ int ff_audio_interleave_init(AVFormatContext *s, · 11 unmodified lines
5050 AVStream *st = s->streams[i];
5151 AudioInterleaveContext *aic = st->priv_data;
5252
53− if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
53+ if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
5454 aic->sample_size = (st->codec->channels *
5555 av_get_bits_per_sample(st->codec->codec_id)) / 8;
5656 if (!aic->sample_size) {
@@ -103,7 +103,7 @@ int ff_audio_rechunk_interleave(AVFormatContext *s, AVPacket *out, AVPacket *pkt · 46 unmodified lines
103103 if (pkt) {
104104 AVStream *st = s->streams[pkt->stream_index];
105105 AudioInterleaveContext *aic = st->priv_data;
106− if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
106+ if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
107107 unsigned new_size = av_fifo_size(aic->fifo) + pkt->size;
108108 if (new_size > aic->fifo_size) {
109109 if (av_fifo_realloc2(aic->fifo, new_size) < 0)
@@ -122,7 +122,7 @@ int ff_audio_rechunk_interleave(AVFormatContext *s, AVPacket *out, AVPacket *pkt · 12 unmodified lines
122122
123123 for (i = 0; i < s->nb_streams; i++) {
124124 AVStream *st = s->streams[i];
125− if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
125+ if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
126126 AVPacket new_pkt;
127127 while (ff_interleave_new_audio_packet(s, &new_pkt, i, flush))
128128 ff_interleave_add_packet(s, &new_pkt, compare_ts);
libavformat/avformat.h+1−1
@@ -804,7 +804,7 @@ AVOutputFormat *av_guess_format(const char *short_name, · 803 unmodified lines
804804 */
805805 enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
806806 const char *filename, const char *mime_type,
807− enum CodecType type);
807+ enum AVMediaType type);
808808
809809 /**
810810 * Sends a nice hexadecimal dump of a buffer to the specified file stream.
libavformat/avidec.c+13−13
@@ -442,19 +442,19 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 441 unmodified lines
442442
443443 switch(tag1) {
444444 case MKTAG('v', 'i', 'd', 's'):
445− codec_type = CODEC_TYPE_VIDEO;
445+ codec_type = AVMEDIA_TYPE_VIDEO;
446446
447447 ast->sample_size = 0;
448448 break;
449449 case MKTAG('a', 'u', 'd', 's'):
450− codec_type = CODEC_TYPE_AUDIO;
450+ codec_type = AVMEDIA_TYPE_AUDIO;
451451 break;
452452 case MKTAG('t', 'x', 't', 's'):
453453 //FIXME
454− codec_type = CODEC_TYPE_DATA; //CODEC_TYPE_SUB ? FIXME
454+ codec_type = AVMEDIA_TYPE_DATA; //AVMEDIA_TYPE_SUB ? FIXME
455455 break;
456456 case MKTAG('d', 'a', 't', 's'):
457− codec_type = CODEC_TYPE_DATA;
457+ codec_type = AVMEDIA_TYPE_DATA;
458458 break;
459459 default:
460460 av_log(s, AV_LOG_ERROR, "unknown stream type %X\n", tag1);
@@ -475,11 +475,11 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 14 unmodified lines
475475 size = FFMIN(size, list_end - cur_pos);
476476 st = s->streams[stream_index];
477477 switch(codec_type) {
478− case CODEC_TYPE_VIDEO:
478+ case AVMEDIA_TYPE_VIDEO:
479479 if(amv_file_format){
480480 st->codec->width=avih_width;
481481 st->codec->height=avih_height;
482− st->codec->codec_type = CODEC_TYPE_VIDEO;
482+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
483483 st->codec->codec_id = CODEC_ID_AMV;
484484 url_fskip(pb, size);
485485 break;
@@ -497,7 +497,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 11 unmodified lines
497497 get_le32(pb); /* ClrImportant */
498498
499499 if (tag1 == MKTAG('D', 'X', 'S', 'B') || tag1 == MKTAG('D','X','S','A')) {
500− st->codec->codec_type = CODEC_TYPE_SUBTITLE;
500+ st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
501501 st->codec->codec_tag = tag1;
502502 st->codec->codec_id = CODEC_ID_XSUB;
503503 break;
@@ -534,7 +534,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 30 unmodified lines
534534 #ifdef DEBUG
535535 print_tag("video", tag1, 0);
536536 #endif
537− st->codec->codec_type = CODEC_TYPE_VIDEO;
537+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
538538 st->codec->codec_tag = tag1;
539539 st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tag1);
540540 st->need_parsing = AVSTREAM_PARSE_HEADERS; // This is needed to get the pict type which is necessary for generating correct pts.
@@ -554,7 +554,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 13 unmodified lines
554554
555555 // url_fskip(pb, size - 5 * 4);
556556 break;
557− case CODEC_TYPE_AUDIO:
557+ case AVMEDIA_TYPE_AUDIO:
558558 ff_get_wav_header(pb, st->codec, size);
559559 if(ast->sample_size && st->codec->block_align && ast->sample_size != st->codec->block_align){
560560 av_log(s, AV_LOG_WARNING, "sample size (%d) != block align (%d)\n", ast->sample_size, st->codec->block_align);
@@ -580,7 +580,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) · 19 unmodified lines
580580 st->codec->codec_id = CODEC_ID_ADPCM_IMA_AMV;
581581 break;
582582 default:
583− st->codec->codec_type = CODEC_TYPE_DATA;
583+ st->codec->codec_type = AVMEDIA_TYPE_DATA;
584584 st->codec->codec_id= CODEC_ID_NONE;
585585 st->codec->codec_tag= 0;
586586 url_fskip(pb, size);
@@ -787,7 +787,7 @@ resync: · 200 unmodified lines
787787 //av_log(s, AV_LOG_DEBUG, "dts:%"PRId64" offset:%"PRId64" %d/%d smpl_siz:%d base:%d st:%d size:%d\n", pkt->dts, ast->frame_offset, ast->scale, ast->rate, ast->sample_size, AV_TIME_BASE, avi->stream_index, size);
788788 pkt->stream_index = avi->stream_index;
789789
790− if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
790+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
791791 AVIndexEntry *e;
792792 int index;
793793 assert(st->index_entries);
@@ -871,8 +871,8 @@ resync: · 77 unmodified lines
871871 //workaround for broken small-file-bug402.avi
872872 if( d[2] == 'w' && d[3] == 'b'
873873 && n==0
874− && st ->codec->codec_type == CODEC_TYPE_VIDEO
875− && st1->codec->codec_type == CODEC_TYPE_AUDIO
874+ && st ->codec->codec_type == AVMEDIA_TYPE_VIDEO
875+ && st1->codec->codec_type == AVMEDIA_TYPE_AUDIO
876876 && ast->prefix == 'd'*256+'c'
877877 && (d[2]*256+d[3] == ast1->prefix || !ast1->prefix_count)
878878 ){
libavformat/avienc.c+20−20
@@ -83,14 +83,14 @@ static int64_t avi_start_new_riff(AVFormatContext *s, ByteIOContext *pb, · 82 unmodified lines
8383 return loff;
8484 }
8585
86−static char* avi_stream2fourcc(char* tag, int index, enum CodecType type)
86+static char* avi_stream2fourcc(char* tag, int index, enum AVMediaType type)
8787 {
8888 tag[0] = '0';
8989 tag[1] = '0' + index;
90− if (type == CODEC_TYPE_VIDEO) {
90+ if (type == AVMEDIA_TYPE_VIDEO) {
9191 tag[2] = 'd';
9292 tag[3] = 'c';
93− } else if (type == CODEC_TYPE_SUBTITLE) {
93+ } else if (type == AVMEDIA_TYPE_SUBTITLE) {
9494 // note: this is not an official code
9595 tag[2] = 's';
9696 tag[3] = 'b';
@@ -136,7 +136,7 @@ static int avi_write_counters(AVFormatContext* s, int riff_id) · 39 unmodified lines
136136 } else {
137137 put_le32(pb, avist->audio_strm_length / au_ssize);
138138 }
139− if(stream->codec_type == CODEC_TYPE_VIDEO)
139+ if(stream->codec_type == AVMEDIA_TYPE_VIDEO)
140140 nb_frames = FFMAX(nb_frames, avist->packet_count);
141141 }
142142 if(riff_id == 1) {
@@ -177,7 +177,7 @@ static int avi_write_header(AVFormatContext *s) · 34 unmodified lines
177177 for(n=0;n<s->nb_streams;n++) {
178178 stream = s->streams[n]->codec;
179179 bitrate += stream->bit_rate;
180− if (stream->codec_type == CODEC_TYPE_VIDEO)
180+ if (stream->codec_type == AVMEDIA_TYPE_VIDEO)
181181 video_enc = stream;
182182 }
183183
@@ -222,16 +222,16 @@ static int avi_write_header(AVFormatContext *s) · 38 unmodified lines
222222 /* stream generic header */
223223 strh = ff_start_tag(pb, "strh");
224224 switch(stream->codec_type) {
225− case CODEC_TYPE_SUBTITLE:
225+ case AVMEDIA_TYPE_SUBTITLE:
226226 // XSUB subtitles behave like video tracks, other subtitles
227227 // are not (yet) supported.
228228 if (stream->codec_id != CODEC_ID_XSUB) break;
229− case CODEC_TYPE_VIDEO: put_tag(pb, "vids"); break;
230− case CODEC_TYPE_AUDIO: put_tag(pb, "auds"); break;
231−// case CODEC_TYPE_TEXT : put_tag(pb, "txts"); break;
232− case CODEC_TYPE_DATA : put_tag(pb, "dats"); break;
229+ case AVMEDIA_TYPE_VIDEO: put_tag(pb, "vids"); break;
230+ case AVMEDIA_TYPE_AUDIO: put_tag(pb, "auds"); break;
231+// case AVMEDIA_TYPE_TEXT : put_tag(pb, "txts"); break;
232+ case AVMEDIA_TYPE_DATA : put_tag(pb, "dats"); break;
233233 }
234− if(stream->codec_type == CODEC_TYPE_VIDEO ||
234+ if(stream->codec_type == AVMEDIA_TYPE_VIDEO ||
235235 stream->codec_id == CODEC_ID_XSUB)
236236 put_le32(pb, stream->codec_tag);
237237 else
@@ -255,9 +255,9 @@ static int avi_write_header(AVFormatContext *s) · 17 unmodified lines
255255 put_le32(pb, 0); /* length, XXX: filled later */
256256
257257 /* suggested buffer size */ //FIXME set at the end to largest chunk
258− if(stream->codec_type == CODEC_TYPE_VIDEO)
258+ if(stream->codec_type == AVMEDIA_TYPE_VIDEO)
259259 put_le32(pb, 1024 * 1024);
260− else if(stream->codec_type == CODEC_TYPE_AUDIO)
260+ else if(stream->codec_type == AVMEDIA_TYPE_AUDIO)
261261 put_le32(pb, 12 * 1024);
262262 else
263263 put_le32(pb, 0);
@@ -268,17 +268,17 @@ static int avi_write_header(AVFormatContext *s) · 4 unmodified lines
268268 put_le16(pb, stream->height);
269269 ff_end_tag(pb, strh);
270270
271− if(stream->codec_type != CODEC_TYPE_DATA){
271+ if(stream->codec_type != AVMEDIA_TYPE_DATA){
272272 strf = ff_start_tag(pb, "strf");
273273 switch(stream->codec_type) {
274− case CODEC_TYPE_SUBTITLE:
274+ case AVMEDIA_TYPE_SUBTITLE:
275275 // XSUB subtitles behave like video tracks, other subtitles
276276 // are not (yet) supported.
277277 if (stream->codec_id != CODEC_ID_XSUB) break;
278− case CODEC_TYPE_VIDEO:
278+ case AVMEDIA_TYPE_VIDEO:
279279 ff_put_bmp_header(pb, stream, ff_codec_bmp_tags, 0);
280280 break;
281− case CODEC_TYPE_AUDIO:
281+ case AVMEDIA_TYPE_AUDIO:
282282 if (ff_put_wav_header(pb, stream) < 0) {
283283 return -1;
284284 }
@@ -322,7 +322,7 @@ static int avi_write_header(AVFormatContext *s) · 37 unmodified lines
322322 ff_end_tag(pb, avist->indexes.indx_start);
323323 }
324324
325− if( stream->codec_type == CODEC_TYPE_VIDEO
325+ if( stream->codec_type == AVMEDIA_TYPE_VIDEO
326326 && s->streams[i]->sample_aspect_ratio.num>0
327327 && s->streams[i]->sample_aspect_ratio.den>0){
328328 int vprp= ff_start_tag(pb, "vprp");
@@ -542,7 +542,7 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt) · 213 unmodified lines
542542 avi_stream2fourcc(&tag[0], stream_index, enc->codec_type);
543543 if(pkt->flags&PKT_FLAG_KEY)
544544 flags = 0x10;
545− if (enc->codec_type == CODEC_TYPE_AUDIO) {
545+ if (enc->codec_type == AVMEDIA_TYPE_AUDIO) {
546546 avist->audio_strm_length += size;
547547 }
548548
@@ -603,7 +603,7 @@ static int avi_write_trailer(AVFormatContext *s) · 54 unmodified lines
603603 AVCodecContext *stream = s->streams[n]->codec;
604604 AVIStream *avist= s->streams[n]->priv_data;
605605
606− if (stream->codec_type == CODEC_TYPE_VIDEO) {
606+ if (stream->codec_type == AVMEDIA_TYPE_VIDEO) {
607607 if (nb_frames < avist->packet_count)
608608 nb_frames = avist->packet_count;
609609 } else {
libavformat/avisynth.c+2−2
@@ -85,7 +85,7 @@ static int avisynth_read_header(AVFormatContext *s, AVFormatParameters *ap) · 84 unmodified lines
8585 continue;
8686
8787 st = av_new_stream(s, id);
88− st->codec->codec_type = CODEC_TYPE_AUDIO;
88+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
8989
9090 st->codec->block_align = wvfmt.nBlockAlign;
9191 st->codec->channels = wvfmt.nChannels;
@@ -111,7 +111,7 @@ static int avisynth_read_header(AVFormatContext *s, AVFormatParameters *ap) · 19 unmodified lines
111111 continue;
112112
113113 st = av_new_stream(s, id);
114− st->codec->codec_type = CODEC_TYPE_VIDEO;
114+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
115115 st->r_frame_rate.num = stream->info.dwRate;
116116 st->r_frame_rate.den = stream->info.dwScale;
117117
libavformat/avs.c+2−2
@@ -178,7 +178,7 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt) · 177 unmodified lines
178178 avs->st_video = av_new_stream(s, AVS_VIDEO);
179179 if (avs->st_video == NULL)
180180 return AVERROR(ENOMEM);
181− avs->st_video->codec->codec_type = CODEC_TYPE_VIDEO;
181+ avs->st_video->codec->codec_type = AVMEDIA_TYPE_VIDEO;
182182 avs->st_video->codec->codec_id = CODEC_ID_AVS;
183183 avs->st_video->codec->width = avs->width;
184184 avs->st_video->codec->height = avs->height;
@@ -195,7 +195,7 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt) · 10 unmodified lines
195195 avs->st_audio = av_new_stream(s, AVS_AUDIO);
196196 if (avs->st_audio == NULL)
197197 return AVERROR(ENOMEM);
198− avs->st_audio->codec->codec_type = CODEC_TYPE_AUDIO;
198+ avs->st_audio->codec->codec_type = AVMEDIA_TYPE_AUDIO;
199199 }
200200 avs->remaining_audio_size = size - 4;
201201 size = avs_read_audio_packet(s, pkt);
libavformat/bethsoftvid.c+2−2
@@ -74,7 +74,7 @@ static int vid_read_header(AVFormatContext *s, · 73 unmodified lines
7474 if (!stream)
7575 return AVERROR(ENOMEM);
7676 av_set_pts_info(stream, 32, 1, 60); // 16 ms increments, i.e. 60 fps
77− stream->codec->codec_type = CODEC_TYPE_VIDEO;
77+ stream->codec->codec_type = AVMEDIA_TYPE_VIDEO;
7878 stream->codec->codec_id = CODEC_ID_BETHSOFTVID;
7979 stream->codec->width = get_le16(pb);
8080 stream->codec->height = get_le16(pb);
@@ -86,7 +86,7 @@ static int vid_read_header(AVFormatContext *s, · 5 unmodified lines
8686 stream = av_new_stream(s, 0);
8787 if (!stream)
8888 return AVERROR(ENOMEM);
89− stream->codec->codec_type = CODEC_TYPE_AUDIO;
89+ stream->codec->codec_type = AVMEDIA_TYPE_AUDIO;
9090 stream->codec->codec_id = CODEC_ID_PCM_U8;
9191 stream->codec->channels = 1;
9292 stream->codec->sample_rate = 11025;
libavformat/bfi.c+2−2
@@ -87,12 +87,12 @@ static int bfi_read_header(AVFormatContext * s, AVFormatParameters * ap) · 86 unmodified lines
8787
8888 /* Set up the video codec... */
8989 av_set_pts_info(vstream, 32, 1, fps);
90− vstream->codec->codec_type = CODEC_TYPE_VIDEO;
90+ vstream->codec->codec_type = AVMEDIA_TYPE_VIDEO;
9191 vstream->codec->codec_id = CODEC_ID_BFI;
9292 vstream->codec->pix_fmt = PIX_FMT_PAL8;
9393
9494 /* Set up the audio codec now... */
95− astream->codec->codec_type = CODEC_TYPE_AUDIO;
95+ astream->codec->codec_type = AVMEDIA_TYPE_AUDIO;
9696 astream->codec->codec_id = CODEC_ID_PCM_U8;
9797 astream->codec->channels = 1;
9898 astream->codec->bits_per_coded_sample = 8;
libavformat/bink.c+2−2
@@ -111,7 +111,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) · 110 unmodified lines
111111 }
112112 av_set_pts_info(vst, 64, fps_den, fps_num);
113113
114− vst->codec->codec_type = CODEC_TYPE_VIDEO;
114+ vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
115115 vst->codec->codec_id = CODEC_ID_BINKVIDEO;
116116 vst->codec->extradata = av_mallocz(4 + FF_INPUT_BUFFER_PADDING_SIZE);
117117 vst->codec->extradata_size = 4;
@@ -133,7 +133,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) · 15 unmodified lines
133133 ast = av_new_stream(s, 1);
134134 if (!ast)
135135 return AVERROR(ENOMEM);
136− ast->codec->codec_type = CODEC_TYPE_AUDIO;
136+ ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
137137 ast->codec->codec_tag = 0;
138138 ast->codec->sample_rate = get_le16(pb);
139139 av_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
libavformat/c93.c+2−2
@@ -83,7 +83,7 @@ static int read_header(AVFormatContext *s, · 82 unmodified lines
8383 if (!video)
8484 return AVERROR(ENOMEM);
8585
86− video->codec->codec_type = CODEC_TYPE_VIDEO;
86+ video->codec->codec_type = AVMEDIA_TYPE_VIDEO;
8787 video->codec->codec_id = CODEC_ID_C93;
8888 video->codec->width = 320;
8989 video->codec->height = 192;
@@ -120,7 +120,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) · 30 unmodified lines
120120 c93->audio = av_new_stream(s, 1);
121121 if (!c93->audio)
122122 return AVERROR(ENOMEM);
123− c93->audio->codec->codec_type = CODEC_TYPE_AUDIO;
123+ c93->audio->codec->codec_type = AVMEDIA_TYPE_AUDIO;
124124 }
125125 url_fskip(pb, 26); /* VOC header */
126126 ret = voc_get_packet(s, pkt, c93->audio, datasize - 26);
libavformat/cafdec.c+1−1
@@ -64,7 +64,7 @@ static int read_desc_chunk(AVFormatContext *s) · 63 unmodified lines
6464 return AVERROR_NOMEM;
6565
6666 /* parse format description */
67− st->codec->codec_type = CODEC_TYPE_AUDIO;
67+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
6868 st->codec->sample_rate = av_int2dbl(get_be64(pb));
6969 st->codec->codec_tag = get_be32(pb);
7070 flags = get_be32(pb);
libavformat/cdg.c+1−1
@@ -32,7 +32,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) · 31 unmodified lines
3232 if (!vst)
3333 return AVERROR(ENOMEM);
3434
35− vst->codec->codec_type = CODEC_TYPE_VIDEO;
35+ vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
3636 vst->codec->codec_id = CODEC_ID_CDGRAPHICS;
3737
3838 /// 75 sectors/sec * 4 packets/sector = 300 packets/sec
libavformat/daud.c+1−1
@@ -24,7 +24,7 @@ static int daud_header(AVFormatContext *s, AVFormatParameters *ap) { · 23 unmodified lines
2424 AVStream *st = av_new_stream(s, 0);
2525 if (!st)
2626 return AVERROR(ENOMEM);
27− st->codec->codec_type = CODEC_TYPE_AUDIO;
27+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
2828 st->codec->codec_id = CODEC_ID_PCM_S24DAUD;
2929 st->codec->codec_tag = MKTAG('d', 'a', 'u', 'd');
3030 st->codec->channels = 6;
libavformat/dsicin.c+2−2
@@ -113,7 +113,7 @@ static int cin_read_header(AVFormatContext *s, AVFormatParameters *ap) · 112 unmodified lines
113113
114114 av_set_pts_info(st, 32, 1, 12);
115115 cin->video_stream_index = st->index;
116− st->codec->codec_type = CODEC_TYPE_VIDEO;
116+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
117117 st->codec->codec_id = CODEC_ID_DSICINVIDEO;
118118 st->codec->codec_tag = 0; /* no fourcc */
119119 st->codec->width = hdr->video_frame_width;
@@ -126,7 +126,7 @@ static int cin_read_header(AVFormatContext *s, AVFormatParameters *ap) · 6 unmodified lines
126126
127127 av_set_pts_info(st, 32, 1, 22050);
128128 cin->audio_stream_index = st->index;
129− st->codec->codec_type = CODEC_TYPE_AUDIO;
129+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
130130 st->codec->codec_id = CODEC_ID_DSICINAUDIO;
131131 st->codec->codec_tag = 0; /* no tag */
132132 st->codec->channels = 1;
libavformat/dv.c+2−2
@@ -214,7 +214,7 @@ static int dv_extract_audio_info(DVDemuxContext* c, uint8_t* frame) · 213 unmodified lines
214214 if (!c->ast[i])
215215 break;
216216 av_set_pts_info(c->ast[i], 64, 1, 30000);
217− c->ast[i]->codec->codec_type = CODEC_TYPE_AUDIO;
217+ c->ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO;
218218 c->ast[i]->codec->codec_id = CODEC_ID_PCM_S16LE;
219219
220220 av_init_packet(&c->audio_pkt[i]);
@@ -290,7 +290,7 @@ DVDemuxContext* dv_init_demux(AVFormatContext *s) · 69 unmodified lines
290290 c->frames = 0;
291291 c->abytes = 0;
292292
293− c->vst->codec->codec_type = CODEC_TYPE_VIDEO;
293+ c->vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
294294 c->vst->codec->codec_id = CODEC_ID_DVVIDEO;
295295 c->vst->codec->bit_rate = 25000000;
296296 c->vst->start_time = 0;
libavformat/dvenc.c+4−4
@@ -239,7 +239,7 @@ int dv_assemble_frame(DVMuxContext *c, AVStream* st, · 238 unmodified lines
239239 reqasize = 4 * dv_audio_frame_size(c->sys, c->frames);
240240
241241 switch (st->codec->codec_type) {
242− case CODEC_TYPE_VIDEO:
242+ case AVMEDIA_TYPE_VIDEO:
243243 /* FIXME: we have to have more sensible approach than this one */
244244 if (c->has_video)
245245 av_log(st->codec, AV_LOG_ERROR, "Can't process DV frame #%d. Insufficient audio data or severe sync problem.\n", c->frames);
@@ -247,7 +247,7 @@ int dv_assemble_frame(DVMuxContext *c, AVStream* st, · 1 unmodified line
247247 memcpy(*frame, data, c->sys->frame_size);
248248 c->has_video = 1;
249249 break;
250− case CODEC_TYPE_AUDIO:
250+ case AVMEDIA_TYPE_AUDIO:
251251 for (i = 0; i < c->n_ast && st != c->ast[i]; i++);
252252
253253 /* FIXME: we have to have more sensible approach than this one */
@@ -299,11 +299,11 @@ DVMuxContext* dv_init_mux(AVFormatContext* s) · 45 unmodified lines
299299 /* We have to sort out where audio and where video stream is */
300300 for (i=0; i<s->nb_streams; i++) {
301301 switch (s->streams[i]->codec->codec_type) {
302− case CODEC_TYPE_VIDEO:
302+ case AVMEDIA_TYPE_VIDEO:
303303 if (vst) return NULL;
304304 vst = s->streams[i];
305305 break;
306− case CODEC_TYPE_AUDIO:
306+ case AVMEDIA_TYPE_AUDIO:
307307 if (c->n_ast > 1) return NULL;
308308 c->ast[c->n_ast++] = s->streams[i];
309309 break;
libavformat/dxa.c+1−1
@@ -119,7 +119,7 @@ static int dxa_read_header(AVFormatContext *s, AVFormatParameters *ap) · 118 unmodified lines
119119 }
120120
121121 /* now we are ready: build format streams */
122− st->codec->codec_type = CODEC_TYPE_VIDEO;
122+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
123123 st->codec->codec_id = CODEC_ID_DXA;
124124 st->codec->width = w;
125125 st->codec->height = h;
libavformat/eacdata.c+1−1
@@ -67,7 +67,7 @@ static int cdata_read_header(AVFormatContext *s, AVFormatParameters *ap) · 66 unmodified lines
6767 st = av_new_stream(s, 0);
6868 if (!st)
6969 return AVERROR(ENOMEM);
70− st->codec->codec_type = CODEC_TYPE_AUDIO;
70+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
7171 st->codec->codec_tag = 0; /* no fourcc */
7272 st->codec->codec_id = CODEC_ID_ADPCM_EA_XAS;
7373 st->codec->channels = cdata->channels;
libavformat/electronicarts.c+2−2
@@ -414,7 +414,7 @@ static int ea_read_header(AVFormatContext *s, · 413 unmodified lines
414414 if (!st)
415415 return AVERROR(ENOMEM);
416416 ea->video_stream_index = st->index;
417− st->codec->codec_type = CODEC_TYPE_VIDEO;
417+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
418418 st->codec->codec_id = ea->video_codec;
419419 st->codec->codec_tag = 0; /* no fourcc */
420420 st->codec->time_base = ea->time_base;
@@ -428,7 +428,7 @@ static int ea_read_header(AVFormatContext *s, · 7 unmodified lines
428428 if (!st)
429429 return AVERROR(ENOMEM);
430430 av_set_pts_info(st, 33, 1, ea->sample_rate);
431− st->codec->codec_type = CODEC_TYPE_AUDIO;
431+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
432432 st->codec->codec_id = ea->audio_codec;
433433 st->codec->codec_tag = 0; /* no tag */
434434 st->codec->channels = ea->num_channels;
libavformat/ffmdec.c+2−2
@@ -301,7 +301,7 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap) · 300 unmodified lines
301301 codec->debug = get_be32(pb);
302302 /* specific info */
303303 switch(codec->codec_type) {
304− case CODEC_TYPE_VIDEO:
304+ case AVMEDIA_TYPE_VIDEO:
305305 codec->time_base.num = get_be32(pb);
306306 codec->time_base.den = get_be32(pb);
307307 codec->width = get_be16(pb);
@@ -350,7 +350,7 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap) · 42 unmodified lines
350350 codec->refs = get_be32(pb);
351351 codec->directpred = get_be32(pb);
352352 break;
353− case CODEC_TYPE_AUDIO:
353+ case AVMEDIA_TYPE_AUDIO:
354354 codec->sample_rate = get_be32(pb);
355355 codec->channels = get_le16(pb);
356356 codec->frame_size = get_le16(pb);
libavformat/ffmenc.c+2−2
@@ -119,7 +119,7 @@ static int ffm_write_header(AVFormatContext *s) · 118 unmodified lines
119119 put_be32(pb, codec->debug);
120120 /* specific info */
121121 switch(codec->codec_type) {
122− case CODEC_TYPE_VIDEO:
122+ case AVMEDIA_TYPE_VIDEO:
123123 put_be32(pb, codec->time_base.num);
124124 put_be32(pb, codec->time_base.den);
125125 put_be16(pb, codec->width);
@@ -168,7 +168,7 @@ static int ffm_write_header(AVFormatContext *s) · 42 unmodified lines
168168 put_be32(pb, codec->refs);
169169 put_be32(pb, codec->directpred);
170170 break;
171− case CODEC_TYPE_AUDIO:
171+ case AVMEDIA_TYPE_AUDIO:
172172 put_be32(pb, codec->sample_rate);
173173 put_le16(pb, codec->channels);
174174 put_le16(pb, codec->frame_size);
libavformat/filmstripdec.c+1−1
@@ -60,7 +60,7 @@ static int read_header(AVFormatContext *s, · 59 unmodified lines
6060 }
6161
6262 url_fskip(pb, 2);
63− st->codec->codec_type = CODEC_TYPE_VIDEO;
63+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
6464 st->codec->codec_id = CODEC_ID_RAWVIDEO;
6565 st->codec->pix_fmt = PIX_FMT_RGBA;
6666 st->codec->codec_tag = 0; /* no fourcc */
libavformat/flacdec.c+1−1
@@ -36,7 +36,7 @@ static int flac_read_header(AVFormatContext *s, · 35 unmodified lines
3636 AVStream *st = av_new_stream(s, 0);
3737 if (!st)
3838 return AVERROR(ENOMEM);
39− st->codec->codec_type = CODEC_TYPE_AUDIO;
39+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
4040 st->codec->codec_id = CODEC_ID_FLAC;
4141 st->need_parsing = AVSTREAM_PARSE_FULL;
4242 /* the parameters will be extracted from the compressed bitstream */
libavformat/flic.c+1−1
@@ -103,7 +103,7 @@ static int flic_read_header(AVFormatContext *s, · 102 unmodified lines
103103 if (!st)
104104 return AVERROR(ENOMEM);
105105 flic->video_stream_index = st->index;
106− st->codec->codec_type = CODEC_TYPE_VIDEO;
106+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
107107 st->codec->codec_id = CODEC_ID_FLIC;
108108 st->codec->codec_tag = 0; /* no fourcc */
109109 st->codec->width = AV_RL16(&header[0x08]);
libavformat/flvdec.c+3−3
@@ -221,8 +221,8 @@ static int flv_read_metabody(AVFormatContext *s, int64_t next_pos) { · 220 unmodified lines
221221 //find the streams now so that amf_parse_object doesn't need to do the lookup every time it is called.
222222 for(i = 0; i < s->nb_streams; i++) {
223223 stream = s->streams[i];
224− if (stream->codec->codec_type == CODEC_TYPE_AUDIO) astream = stream;
225− else if(stream->codec->codec_type == CODEC_TYPE_VIDEO) vstream = stream;
224+ if (stream->codec->codec_type == AVMEDIA_TYPE_AUDIO) astream = stream;
225+ else if(stream->codec->codec_type == AVMEDIA_TYPE_VIDEO) vstream = stream;
226226 }
227227
228228 //parse the second object (we want a mixed array)
@@ -236,7 +236,7 @@ static AVStream *create_stream(AVFormatContext *s, int is_audio){ · 7 unmodified lines
236236 AVStream *st = av_new_stream(s, is_audio);
237237 if (!st)
238238 return NULL;
239− st->codec->codec_type = is_audio ? CODEC_TYPE_AUDIO : CODEC_TYPE_VIDEO;
239+ st->codec->codec_type = is_audio ? AVMEDIA_TYPE_AUDIO : AVMEDIA_TYPE_VIDEO;
240240 av_set_pts_info(st, 32, 1, 1000); /* 32 bit pts in ms */
241241 return st;
242242 }
libavformat/flvenc.c+4−4
@@ -166,7 +166,7 @@ static int flv_write_header(AVFormatContext *s) · 165 unmodified lines
166166
167167 for(i=0; i<s->nb_streams; i++){
168168 AVCodecContext *enc = s->streams[i]->codec;
169− if (enc->codec_type == CODEC_TYPE_VIDEO) {
169+ if (enc->codec_type == AVMEDIA_TYPE_VIDEO) {
170170 if (s->streams[i]->r_frame_rate.den && s->streams[i]->r_frame_rate.num) {
171171 framerate = av_q2d(s->streams[i]->r_frame_rate);
172172 } else {
@@ -275,7 +275,7 @@ static int flv_write_header(AVFormatContext *s) · 102 unmodified lines
275275 AVCodecContext *enc = s->streams[i]->codec;
276276 if (enc->codec_id == CODEC_ID_AAC || enc->codec_id == CODEC_ID_H264) {
277277 int64_t pos;
278− put_byte(pb, enc->codec_type == CODEC_TYPE_VIDEO ?
278+ put_byte(pb, enc->codec_type == AVMEDIA_TYPE_VIDEO ?
279279 FLV_TAG_TYPE_VIDEO : FLV_TAG_TYPE_AUDIO);
280280 put_be24(pb, 0); // size patched later
281281 put_be24(pb, 0); // ts
@@ -342,7 +342,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt) · 60 unmodified lines
342342 else
343343 flags_size= 1;
344344
345− if (enc->codec_type == CODEC_TYPE_VIDEO) {
345+ if (enc->codec_type == AVMEDIA_TYPE_VIDEO) {
346346 put_byte(pb, FLV_TAG_TYPE_VIDEO);
347347
348348 flags = enc->codec_tag;
@@ -353,7 +353,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt) · 4 unmodified lines
353353
354354 flags |= pkt->flags & PKT_FLAG_KEY ? FLV_FRAME_KEY : FLV_FRAME_INTER;
355355 } else {
356− assert(enc->codec_type == CODEC_TYPE_AUDIO);
356+ assert(enc->codec_type == AVMEDIA_TYPE_AUDIO);
357357 flags = get_audio_flags(enc);
358358
359359 assert(size);
libavformat/gif.c+2−2
@@ -266,7 +266,7 @@ static int gif_write_header(AVFormatContext *s) · 265 unmodified lines
266266 video_enc = NULL;
267267 for(i=0;i<s->nb_streams;i++) {
268268 enc = s->streams[i]->codec;
269− if (enc->codec_type != CODEC_TYPE_AUDIO)
269+ if (enc->codec_type != AVMEDIA_TYPE_AUDIO)
270270 video_enc = enc;
271271 }
272272
@@ -329,7 +329,7 @@ static int gif_write_video(AVFormatContext *s, · 56 unmodified lines
329329 static int gif_write_packet(AVFormatContext *s, AVPacket *pkt)
330330 {
331331 AVCodecContext *codec = s->streams[pkt->stream_index]->codec;
332− if (codec->codec_type == CODEC_TYPE_AUDIO)
332+ if (codec->codec_type == AVMEDIA_TYPE_AUDIO)
333333 return 0; /* just ignore audio */
334334 else
335335 return gif_write_video(s, codec, pkt->data, pkt->size);
libavformat/gxf.c+10−10
@@ -87,34 +87,34 @@ static int get_sindex(AVFormatContext *s, int id, int format) { · 86 unmodified lines
8787 switch (format) {
8888 case 3:
8989 case 4:
90− st->codec->codec_type = CODEC_TYPE_VIDEO;
90+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
9191 st->codec->codec_id = CODEC_ID_MJPEG;
9292 break;
9393 case 13:
9494 case 15:
95− st->codec->codec_type = CODEC_TYPE_VIDEO;
95+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
9696 st->codec->codec_id = CODEC_ID_DVVIDEO;
9797 break;
9898 case 14:
9999 case 16:
100− st->codec->codec_type = CODEC_TYPE_VIDEO;
100+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
101101 st->codec->codec_id = CODEC_ID_DVVIDEO;
102102 break;
103103 case 11:
104104 case 12:
105105 case 20:
106− st->codec->codec_type = CODEC_TYPE_VIDEO;
106+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
107107 st->codec->codec_id = CODEC_ID_MPEG2VIDEO;
108108 st->need_parsing = AVSTREAM_PARSE_HEADERS; //get keyframe flag etc.
109109 break;
110110 case 22:
111111 case 23:
112− st->codec->codec_type = CODEC_TYPE_VIDEO;
112+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
113113 st->codec->codec_id = CODEC_ID_MPEG1VIDEO;
114114 st->need_parsing = AVSTREAM_PARSE_HEADERS; //get keyframe flag etc.
115115 break;
116116 case 9:
117− st->codec->codec_type = CODEC_TYPE_AUDIO;
117+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
118118 st->codec->codec_id = CODEC_ID_PCM_S24LE;
119119 st->codec->channels = 1;
120120 st->codec->sample_rate = 48000;
@@ -123,7 +123,7 @@ static int get_sindex(AVFormatContext *s, int id, int format) { · 2 unmodified lines
123123 st->codec->bits_per_coded_sample = 24;
124124 break;
125125 case 10:
126− st->codec->codec_type = CODEC_TYPE_AUDIO;
126+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
127127 st->codec->codec_id = CODEC_ID_PCM_S16LE;
128128 st->codec->channels = 1;
129129 st->codec->sample_rate = 48000;
@@ -132,7 +132,7 @@ static int get_sindex(AVFormatContext *s, int id, int format) { · 2 unmodified lines
132132 st->codec->bits_per_coded_sample = 16;
133133 break;
134134 case 17:
135− st->codec->codec_type = CODEC_TYPE_AUDIO;
135+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
136136 st->codec->codec_id = CODEC_ID_AC3;
137137 st->codec->channels = 2;
138138 st->codec->sample_rate = 48000;
@@ -141,11 +141,11 @@ static int get_sindex(AVFormatContext *s, int id, int format) { · 2 unmodified lines
141141 case 7:
142142 case 8:
143143 case 24:
144− st->codec->codec_type = CODEC_TYPE_DATA;
144+ st->codec->codec_type = AVMEDIA_TYPE_DATA;
145145 st->codec->codec_id = CODEC_ID_NONE;
146146 break;
147147 default:
148− st->codec->codec_type = CODEC_TYPE_UNKNOWN;
148+ st->codec->codec_type = AVMEDIA_TYPE_UNKNOWN;
149149 st->codec->codec_id = CODEC_ID_NONE;
150150 break;
151151 }
libavformat/gxfenc.c+8−8
@@ -644,7 +644,7 @@ static int gxf_write_header(AVFormatContext *s) · 643 unmodified lines
644644 st->priv_data = sc;
645645
646646 sc->media_type = ff_codec_get_tag(gxf_media_types, st->codec->codec_id);
647− if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
647+ if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
648648 if (st->codec->codec_id != CODEC_ID_PCM_S16LE) {
649649 av_log(s, AV_LOG_ERROR, "only 16 BIT PCM LE allowed for now\n");
650650 return -1;
@@ -667,7 +667,7 @@ static int gxf_write_header(AVFormatContext *s) · 16 unmodified lines
667667 gxf->audio_tracks++;
668668 gxf->flags |= 0x04000000; /* audio is 16 bit pcm */
669669 media_info = 'A';
670− } else if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
670+ } else if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
671671 if (i != 0) {
672672 av_log(s, AV_LOG_ERROR, "video stream must be the first track\n");
673673 return -1;
@@ -811,7 +811,7 @@ static int gxf_write_media_preamble(AVFormatContext *s, AVPacket *pkt, int size) · 137 unmodified lines
811811 /* If the video is frame-encoded, the frame numbers shall be represented by
812812 * even field numbers.
813813 * see SMPTE360M-2004 6.4.2.1.3 Media field number */
814− if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
814+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
815815 field_nb = gxf->nb_fields;
816816 } else {
817817 field_nb = av_rescale_rnd(pkt->dts, gxf->time_base.den,
@@ -821,7 +821,7 @@ static int gxf_write_media_preamble(AVFormatContext *s, AVPacket *pkt, int size) · 3 unmodified lines
821821 put_byte(pb, sc->media_type);
822822 put_byte(pb, st->index);
823823 put_be32(pb, field_nb);
824− if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
824+ if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
825825 put_be16(pb, 0);
826826 put_be16(pb, size / 2);
827827 } else if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO) {
@@ -859,13 +859,13 @@ static int gxf_write_packet(AVFormatContext *s, AVPacket *pkt) · 31 unmodified lines
859859 gxf_write_packet_header(pb, PKT_MEDIA);
860860 if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO && pkt->size % 4) /* MPEG-2 frames must be padded */
861861 padding = 4 - pkt->size % 4;
862− else if (st->codec->codec_type == CODEC_TYPE_AUDIO)
862+ else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
863863 padding = GXF_AUDIO_PACKET_SIZE - pkt->size;
864864 gxf_write_media_preamble(s, pkt, pkt->size + padding);
865865 put_buffer(pb, pkt->data, pkt->size);
866866 gxf_write_padding(pb, padding);
867867
868− if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
868+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
869869 if (!(gxf->flt_entries_nb % 500)) {
870870 gxf->flt_entries = av_realloc(gxf->flt_entries,
871871 (gxf->flt_entries_nb+500)*sizeof(*gxf->flt_entries));
@@ -901,7 +901,7 @@ static int gxf_compare_field_nb(AVFormatContext *s, AVPacket *next, AVPacket *cu · 29 unmodified lines
901901 for (i = 0; i < 2; i++) {
902902 AVStream *st = s->streams[pkt[i]->stream_index];
903903 sc[i] = st->priv_data;
904− if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
904+ if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
905905 field_nb[i] = av_rescale_rnd(pkt[i]->dts, gxf->time_base.den,
906906 (int64_t)48000*gxf->time_base.num, AV_ROUND_UP);
907907 field_nb[i] &= ~1; // compare against even field number because audio must be before video
@@ -915,7 +915,7 @@ static int gxf_compare_field_nb(AVFormatContext *s, AVPacket *next, AVPacket *cu · 7 unmodified lines
915915
916916 static int gxf_interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush)
917917 {
918− if (pkt && s->streams[pkt->stream_index]->codec->codec_type == CODEC_TYPE_VIDEO)
918+ if (pkt && s->streams[pkt->stream_index]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
919919 pkt->duration = 2; // enforce 2 fields
920920 return ff_audio_rechunk_interleave(s, out, pkt, flush,
921921 av_interleave_packet_per_dts, gxf_compare_field_nb);
libavformat/idcin.c+2−2
@@ -160,7 +160,7 @@ static int idcin_read_header(AVFormatContext *s, · 159 unmodified lines
160160 return AVERROR(ENOMEM);
161161 av_set_pts_info(st, 33, 1, IDCIN_FPS);
162162 idcin->video_stream_index = st->index;
163− st->codec->codec_type = CODEC_TYPE_VIDEO;
163+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
164164 st->codec->codec_id = CODEC_ID_IDCIN;
165165 st->codec->codec_tag = 0; /* no fourcc */
166166 st->codec->width = width;
@@ -183,7 +183,7 @@ static int idcin_read_header(AVFormatContext *s, · 16 unmodified lines
183183 return AVERROR(ENOMEM);
184184 av_set_pts_info(st, 33, 1, IDCIN_FPS);
185185 idcin->audio_stream_index = st->index;
186− st->codec->codec_type = CODEC_TYPE_AUDIO;
186+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
187187 st->codec->codec_tag = 1;
188188 st->codec->channels = channels;
189189 st->codec->sample_rate = sample_rate;
libavformat/idroq.c+2−2
@@ -89,7 +89,7 @@ static int roq_read_header(AVFormatContext *s, · 88 unmodified lines
8989 return AVERROR(ENOMEM);
9090 av_set_pts_info(st, 63, 1, framerate);
9191 roq->video_stream_index = st->index;
92− st->codec->codec_type = CODEC_TYPE_VIDEO;
92+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
9393 st->codec->codec_id = CODEC_ID_ROQ;
9494 st->codec->codec_tag = 0; /* no fourcc */
9595
@@ -171,7 +171,7 @@ static int roq_read_packet(AVFormatContext *s, · 75 unmodified lines
171171 return AVERROR(ENOMEM);
172172 av_set_pts_info(st, 32, 1, RoQ_AUDIO_SAMPLE_RATE);
173173 roq->audio_stream_index = st->index;
174− st->codec->codec_type = CODEC_TYPE_AUDIO;
174+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
175175 st->codec->codec_id = CODEC_ID_ROQ_DPCM;
176176 st->codec->codec_tag = 0; /* no tag */
177177 st->codec->channels = roq->audio_channels = chunk_type == RoQ_SOUND_STEREO ? 2 : 1;
libavformat/iff.c+7−7
@@ -119,7 +119,7 @@ static int iff_read_header(AVFormatContext *s, · 118 unmodified lines
119119
120120 switch(chunk_id) {
121121 case ID_VHDR:
122− st->codec->codec_type = CODEC_TYPE_AUDIO;
122+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
123123 url_fskip(pb, 12);
124124 st->codec->sample_rate = get_be16(pb);
125125 url_fskip(pb, 1);
@@ -146,7 +146,7 @@ static int iff_read_header(AVFormatContext *s, · 20 unmodified lines
146146 break;
147147
148148 case ID_BMHD:
149− st->codec->codec_type = CODEC_TYPE_VIDEO;
149+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
150150 st->codec->width = get_be16(pb);
151151 st->codec->height = get_be16(pb);
152152 url_fskip(pb, 4); // x, y offset
@@ -175,7 +175,7 @@ static int iff_read_header(AVFormatContext *s, · 22 unmodified lines
175175 }
176176
177177 switch(st->codec->codec_type) {
178− case CODEC_TYPE_AUDIO:
178+ case AVMEDIA_TYPE_AUDIO:
179179 av_set_pts_info(st, 32, 1, st->codec->sample_rate);
180180
181181 switch(compression) {
@@ -198,7 +198,7 @@ static int iff_read_header(AVFormatContext *s, · 16 unmodified lines
198198 st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample;
199199 break;
200200
201− case CODEC_TYPE_VIDEO:
201+ case AVMEDIA_TYPE_VIDEO:
202202 switch (compression) {
203203 case BITMAP_RAW:
204204 if (st->codec->codec_tag == ID_ILBM) {
@@ -256,7 +256,7 @@ static int iff_read_packet(AVFormatContext *s, · 51 unmodified lines
256256 st->codec->extradata_size = 0;
257257
258258 ret = get_buffer(pb, pkt->data, iff->body_size);
259− } else if (s->streams[0]->codec->codec_type == CODEC_TYPE_VIDEO) {
259+ } else if (s->streams[0]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
260260 ret = av_get_packet(pb, pkt, iff->body_size);
261261 } else {
262262 ret = av_get_packet(pb, pkt, PACKET_SIZE);
@@ -265,13 +265,13 @@ static int iff_read_packet(AVFormatContext *s, · 2 unmodified lines
265265 if(iff->sent_bytes == 0)
266266 pkt->flags |= PKT_FLAG_KEY;
267267
268− if(s->streams[0]->codec->codec_type == CODEC_TYPE_AUDIO) {
268+ if(s->streams[0]->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
269269 iff->sent_bytes += PACKET_SIZE;
270270 } else {
271271 iff->sent_bytes = iff->body_size;
272272 }
273273 pkt->stream_index = 0;
274− if(s->streams[0]->codec->codec_type == CODEC_TYPE_AUDIO) {
274+ if(s->streams[0]->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
275275 pkt->pts = iff->audio_frame_count;
276276 iff->audio_frame_count += ret / s->streams[0]->codec->channels;
277277 }
libavformat/img2.c+4−4
@@ -233,16 +233,16 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap) · 232 unmodified lines
233233 }
234234
235235 if(s1->video_codec_id){
236− st->codec->codec_type = CODEC_TYPE_VIDEO;
236+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
237237 st->codec->codec_id = s1->video_codec_id;
238238 }else if(s1->audio_codec_id){
239− st->codec->codec_type = CODEC_TYPE_AUDIO;
239+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
240240 st->codec->codec_id = s1->audio_codec_id;
241241 }else{
242− st->codec->codec_type = CODEC_TYPE_VIDEO;
242+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
243243 st->codec->codec_id = av_str2id(img_tags, s->path);
244244 }
245− if(st->codec->codec_type == CODEC_TYPE_VIDEO && ap->pix_fmt != PIX_FMT_NONE)
245+ if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO && ap->pix_fmt != PIX_FMT_NONE)
246246 st->codec->pix_fmt = ap->pix_fmt;
247247
248248 return 0;
libavformat/ipmovie.c+2−2
@@ -566,7 +566,7 @@ static int ipmovie_read_header(AVFormatContext *s, · 565 unmodified lines
566566 return AVERROR(ENOMEM);
567567 av_set_pts_info(st, 63, 1, 1000000);
568568 ipmovie->video_stream_index = st->index;
569− st->codec->codec_type = CODEC_TYPE_VIDEO;
569+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
570570 st->codec->codec_id = CODEC_ID_INTERPLAY_VIDEO;
571571 st->codec->codec_tag = 0; /* no fourcc */
572572 st->codec->width = ipmovie->video_width;
@@ -582,7 +582,7 @@ static int ipmovie_read_header(AVFormatContext *s, · 9 unmodified lines
582582 return AVERROR(ENOMEM);
583583 av_set_pts_info(st, 32, 1, ipmovie->audio_sample_rate);
584584 ipmovie->audio_stream_index = st->index;
585− st->codec->codec_type = CODEC_TYPE_AUDIO;
585+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
586586 st->codec->codec_id = ipmovie->audio_type;
587587 st->codec->codec_tag = 0; /* no tag */
588588 st->codec->channels = ipmovie->audio_channels;
libavformat/iss.c+1−1
@@ -92,7 +92,7 @@ static av_cold int iss_read_header(AVFormatContext *s, AVFormatParameters *ap) · 91 unmodified lines
9292 st = av_new_stream(s, 0);
9393 if (!st)
9494 return AVERROR(ENOMEM);
95− st->codec->codec_type = CODEC_TYPE_AUDIO;
95+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
9696 st->codec->codec_id = CODEC_ID_ADPCM_IMA_ISS;
9797 st->codec->channels = stereo ? 2 : 1;
9898 st->codec->sample_rate = 44100;
libavformat/iv8.c+1−1
@@ -44,7 +44,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) · 43 unmodified lines
4444 if (!st)
4545 return AVERROR(ENOMEM);
4646
47− st->codec->codec_type = CODEC_TYPE_VIDEO;
47+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
4848 st->codec->codec_id = CODEC_ID_MPEG4;
4949 st->need_parsing = AVSTREAM_PARSE_FULL;
5050 av_set_pts_info(st, 64, 1, 90000);
libavformat/libnut.c+6−6
@@ -77,14 +77,14 @@ static int nut_write_header(AVFormatContext * avf) { · 76 unmodified lines
7777 int fourcc = 0;
7878 int num, denom, ssize;
7979
80− s[i].type = codec->codec_type == CODEC_TYPE_VIDEO ? NUT_VIDEO_CLASS : NUT_AUDIO_CLASS;
80+ s[i].type = codec->codec_type == AVMEDIA_TYPE_VIDEO ? NUT_VIDEO_CLASS : NUT_AUDIO_CLASS;
8181
8282 if (codec->codec_tag) fourcc = codec->codec_tag;
8383 else fourcc = ff_codec_get_tag(nut_tags, codec->codec_id);
8484
8585 if (!fourcc) {
86− if (codec->codec_type == CODEC_TYPE_VIDEO) fourcc = ff_codec_get_tag(ff_codec_bmp_tags, codec->codec_id);
87− if (codec->codec_type == CODEC_TYPE_AUDIO) fourcc = ff_codec_get_tag(ff_codec_wav_tags, codec->codec_id);
86+ if (codec->codec_type == AVMEDIA_TYPE_VIDEO) fourcc = ff_codec_get_tag(ff_codec_bmp_tags, codec->codec_id);
87+ if (codec->codec_type == AVMEDIA_TYPE_AUDIO) fourcc = ff_codec_get_tag(ff_codec_wav_tags, codec->codec_id);
8888 }
8989
9090 s[i].fourcc_len = 4;
@@ -102,7 +102,7 @@ static int nut_write_header(AVFormatContext * avf) { · 11 unmodified lines
102102 s[i].codec_specific_len = codec->extradata_size;
103103 s[i].codec_specific = codec->extradata;
104104
105− if (codec->codec_type == CODEC_TYPE_VIDEO) {
105+ if (codec->codec_type == AVMEDIA_TYPE_VIDEO) {
106106 s[i].width = codec->width;
107107 s[i].height = codec->height;
108108 s[i].sample_width = 0;
@@ -234,14 +234,14 @@ static int nut_read_header(AVFormatContext * avf, AVFormatParameters * ap) { · 125 unmodified lines
234234
235235 switch(s[i].type) {
236236 case NUT_AUDIO_CLASS:
237− st->codec->codec_type = CODEC_TYPE_AUDIO;
237+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
238238 if (st->codec->codec_id == CODEC_ID_NONE) st->codec->codec_id = ff_codec_get_id(ff_codec_wav_tags, st->codec->codec_tag);
239239
240240 st->codec->channels = s[i].channel_count;
241241 st->codec->sample_rate = s[i].samplerate_num / s[i].samplerate_denom;
242242 break;
243243 case NUT_VIDEO_CLASS:
244− st->codec->codec_type = CODEC_TYPE_VIDEO;
244+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
245245 if (st->codec->codec_id == CODEC_ID_NONE) st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, st->codec->codec_tag);
246246
247247 st->codec->width = s[i].width;
libavformat/lmlm4.c+2−2
@@ -62,14 +62,14 @@ static int lmlm4_read_header(AVFormatContext *s, AVFormatParameters *ap) { · 61 unmodified lines
6262
6363 if (!(st = av_new_stream(s, 0)))
6464 return AVERROR(ENOMEM);
65− st->codec->codec_type = CODEC_TYPE_VIDEO;
65+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
6666 st->codec->codec_id = CODEC_ID_MPEG4;
6767 st->need_parsing = AVSTREAM_PARSE_HEADERS;
6868 av_set_pts_info(st, 64, 1001, 30000);
6969
7070 if (!(st = av_new_stream(s, 1)))
7171 return AVERROR(ENOMEM);
72− st->codec->codec_type = CODEC_TYPE_AUDIO;
72+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
7373 st->codec->codec_id = CODEC_ID_MP2;
7474 st->need_parsing = AVSTREAM_PARSE_HEADERS;
7575
libavformat/matroskadec.c+4−4
@@ -1378,7 +1378,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) · 1377 unmodified lines
13781378 }
13791379
13801380 if (track->type == MATROSKA_TRACK_TYPE_VIDEO) {
1381− st->codec->codec_type = CODEC_TYPE_VIDEO;
1381+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
13821382 st->codec->codec_tag = track->video.fourcc;
13831383 st->codec->width = track->video.pixel_width;
13841384 st->codec->height = track->video.pixel_height;
@@ -1390,11 +1390,11 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) · 5 unmodified lines
13901390 if (st->codec->codec_id != CODEC_ID_H264)
13911391 st->need_parsing = AVSTREAM_PARSE_HEADERS;
13921392 } else if (track->type == MATROSKA_TRACK_TYPE_AUDIO) {
1393− st->codec->codec_type = CODEC_TYPE_AUDIO;
1393+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
13941394 st->codec->sample_rate = track->audio.out_samplerate;
13951395 st->codec->channels = track->audio.channels;
13961396 } else if (track->type == MATROSKA_TRACK_TYPE_SUBTITLE) {
1397− st->codec->codec_type = CODEC_TYPE_SUBTITLE;
1397+ st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
13981398 }
13991399 }
14001400
@@ -1409,7 +1409,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) · 8 unmodified lines
14091409 break;
14101410 av_metadata_set(&st->metadata, "filename",attachements[j].filename);
14111411 st->codec->codec_id = CODEC_ID_NONE;
1412− st->codec->codec_type = CODEC_TYPE_ATTACHMENT;
1412+ st->codec->codec_type = AVMEDIA_TYPE_ATTACHMENT;
14131413 st->codec->extradata = av_malloc(attachements[j].bin.size);
14141414 if(st->codec->extradata == NULL)
14151415 break;
libavformat/matroskaenc.c+7−7
@@ -475,7 +475,7 @@ static int mkv_write_codecprivate(AVFormatContext *s, ByteIOContext *pb, AVCodec · 474 unmodified lines
475475 ret = ff_isom_write_avcc(dyn_cp, codec->extradata, codec->extradata_size);
476476 else if (codec->extradata_size)
477477 put_buffer(dyn_cp, codec->extradata, codec->extradata_size);
478− } else if (codec->codec_type == CODEC_TYPE_VIDEO) {
478+ } else if (codec->codec_type == AVMEDIA_TYPE_VIDEO) {
479479 if (qt_id) {
480480 if (!codec->codec_tag)
481481 codec->codec_tag = ff_codec_get_tag(codec_movvideo_tags, codec->codec_id);
@@ -492,7 +492,7 @@ static int mkv_write_codecprivate(AVFormatContext *s, ByteIOContext *pb, AVCodec · 10 unmodified lines
492492 ff_put_bmp_header(dyn_cp, codec, ff_codec_bmp_tags, 0);
493493 }
494494
495− } else if (codec->codec_type == CODEC_TYPE_AUDIO) {
495+ } else if (codec->codec_type == AVMEDIA_TYPE_AUDIO) {
496496 unsigned int tag;
497497 tag = ff_codec_get_tag(ff_codec_wav_tags, codec->codec_id);
498498 if (!tag) {
@@ -565,7 +565,7 @@ static int mkv_write_tracks(AVFormatContext *s) · 66 unmodified lines
565565 }
566566
567567 switch (codec->codec_type) {
568− case CODEC_TYPE_VIDEO:
568+ case AVMEDIA_TYPE_VIDEO:
569569 put_ebml_uint(pb, MATROSKA_ID_TRACKTYPE, MATROSKA_TRACK_TYPE_VIDEO);
570570
571571 if (!native_id &&
@@ -596,7 +596,7 @@ static int mkv_write_tracks(AVFormatContext *s) · 24 unmodified lines
596596 end_ebml_master(pb, subinfo);
597597 break;
598598
599− case CODEC_TYPE_AUDIO:
599+ case AVMEDIA_TYPE_AUDIO:
600600 put_ebml_uint(pb, MATROSKA_ID_TRACKTYPE, MATROSKA_TRACK_TYPE_AUDIO);
601601
602602 if (!native_id)
@@ -613,7 +613,7 @@ static int mkv_write_tracks(AVFormatContext *s) · 10 unmodified lines
613613 end_ebml_master(pb, subinfo);
614614 break;
615615
616− case CODEC_TYPE_SUBTITLE:
616+ case AVMEDIA_TYPE_SUBTITLE:
617617 put_ebml_uint(pb, MATROSKA_ID_TRACKTYPE, MATROSKA_TRACK_TYPE_SUBTITLE);
618618 break;
619619 default:
@@ -893,7 +893,7 @@ static int mkv_write_packet(AVFormatContext *s, AVPacket *pkt) · 273 unmodified lines
893893 av_md5_update(mkv->md5_ctx, pkt->data, FFMIN(200, pkt->size));
894894 }
895895
896− if (codec->codec_type != CODEC_TYPE_SUBTITLE) {
896+ if (codec->codec_type != AVMEDIA_TYPE_SUBTITLE) {
897897 mkv_write_block(s, pb, MATROSKA_ID_SIMPLEBLOCK, pkt, keyframe << 7);
898898 } else if (codec->codec_id == CODEC_ID_SSA) {
899899 duration = mkv_write_ass_blocks(s, pb, pkt);
@@ -905,7 +905,7 @@ static int mkv_write_packet(AVFormatContext *s, AVPacket *pkt) · 5 unmodified lines
905905 end_ebml_master(pb, blockgroup);
906906 }
907907
908− if (codec->codec_type == CODEC_TYPE_VIDEO && keyframe) {
908+ if (codec->codec_type == AVMEDIA_TYPE_VIDEO && keyframe) {
909909 ret = mkv_add_cuepoint(mkv->cues, pkt->stream_index, ts, mkv->cluster_pos);
910910 if (ret < 0) return ret;
911911 }
libavformat/mm.c+2−2
@@ -108,7 +108,7 @@ static int read_header(AVFormatContext *s, · 107 unmodified lines
108108 st = av_new_stream(s, 0);
109109 if (!st)
110110 return AVERROR(ENOMEM);
111− st->codec->codec_type = CODEC_TYPE_VIDEO;
111+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
112112 st->codec->codec_id = CODEC_ID_MMVIDEO;
113113 st->codec->codec_tag = 0; /* no fourcc */
114114 st->codec->width = width;
@@ -120,7 +120,7 @@ static int read_header(AVFormatContext *s, · 5 unmodified lines
120120 st = av_new_stream(s, 0);
121121 if (!st)
122122 return AVERROR(ENOMEM);
123− st->codec->codec_type = CODEC_TYPE_AUDIO;
123+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
124124 st->codec->codec_tag = 0; /* no fourcc */
125125 st->codec->codec_id = CODEC_ID_PCM_U8;
126126 st->codec->channels = 1;
libavformat/mmf.c+1−1
@@ -244,7 +244,7 @@ static int mmf_read_header(AVFormatContext *s, · 243 unmodified lines
244244 if (!st)
245245 return AVERROR(ENOMEM);
246246
247− st->codec->codec_type = CODEC_TYPE_AUDIO;
247+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
248248 st->codec->codec_id = CODEC_ID_ADPCM_YAMAHA;
249249 st->codec->sample_rate = rate;
250250 st->codec->channels = 1;
libavformat/mov.c+19−19
@@ -411,13 +411,13 @@ static int mov_read_hdlr(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 410 unmodified lines
411411 dprintf(c->fc, "stype= %.4s\n", (char*)&type);
412412
413413 if (type == MKTAG('v','i','d','e'))
414− st->codec->codec_type = CODEC_TYPE_VIDEO;
414+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
415415 else if(type == MKTAG('s','o','u','n'))
416− st->codec->codec_type = CODEC_TYPE_AUDIO;
416+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
417417 else if(type == MKTAG('m','1','a',' '))
418418 st->codec->codec_id = CODEC_ID_MP2;
419419 else if(type == MKTAG('s','u','b','p'))
420− st->codec->codec_type = CODEC_TYPE_SUBTITLE;
420+ st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
421421
422422 get_be32(pb); /* component manufacture */
423423 get_be32(pb); /* component flags */
@@ -933,19 +933,19 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 509 unmodified lines
933933 if (id<=0 && ((format&0xFFFF) == 'm'+('s'<<8) || (format&0xFFFF) == 'T'+('S'<<8)))
934934 id = ff_codec_get_id(ff_codec_wav_tags, bswap_32(format)&0xFFFF);
935935
936− if (st->codec->codec_type != CODEC_TYPE_VIDEO && id > 0) {
937− st->codec->codec_type = CODEC_TYPE_AUDIO;
938− } else if (st->codec->codec_type != CODEC_TYPE_AUDIO && /* do not overwrite codec type */
936+ if (st->codec->codec_type != AVMEDIA_TYPE_VIDEO && id > 0) {
937+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
938+ } else if (st->codec->codec_type != AVMEDIA_TYPE_AUDIO && /* do not overwrite codec type */
939939 format && format != MKTAG('m','p','4','s')) { /* skip old asf mpeg4 tag */
940940 id = ff_codec_get_id(codec_movvideo_tags, format);
941941 if (id <= 0)
942942 id = ff_codec_get_id(ff_codec_bmp_tags, format);
943943 if (id > 0)
944− st->codec->codec_type = CODEC_TYPE_VIDEO;
945− else if(st->codec->codec_type == CODEC_TYPE_DATA){
944+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
945+ else if(st->codec->codec_type == AVMEDIA_TYPE_DATA){
946946 id = ff_codec_get_id(ff_codec_movsubtitle_tags, format);
947947 if(id > 0)
948− st->codec->codec_type = CODEC_TYPE_SUBTITLE;
948+ st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
949949 }
950950 }
951951
@@ -953,7 +953,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 1 unmodified line
953953 (format >> 0) & 0xff, (format >> 8) & 0xff, (format >> 16) & 0xff,
954954 (format >> 24) & 0xff, st->codec->codec_type);
955955
956− if(st->codec->codec_type==CODEC_TYPE_VIDEO) {
956+ if(st->codec->codec_type==AVMEDIA_TYPE_VIDEO) {
957957 unsigned int color_depth, len;
958958 int color_greyscale;
959959
@@ -1057,7 +1057,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 97 unmodified lines
10571057 }
10581058 st->codec->palctrl->palette_changed = 1;
10591059 }
1060− } else if(st->codec->codec_type==CODEC_TYPE_AUDIO) {
1060+ } else if(st->codec->codec_type==AVMEDIA_TYPE_AUDIO) {
10611061 int bits_per_sample, flags;
10621062 uint16_t version = get_be16(pb);
10631063
@@ -1137,7 +1137,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 73 unmodified lines
11371137 st->codec->bits_per_coded_sample = bits_per_sample;
11381138 sc->sample_size = (bits_per_sample >> 3) * st->codec->channels;
11391139 }
1140− } else if(st->codec->codec_type==CODEC_TYPE_SUBTITLE){
1140+ } else if(st->codec->codec_type==AVMEDIA_TYPE_SUBTITLE){
11411141 // ttxt stsd contains display flags, justification, background
11421142 // color, fonts, and default styles, so fake an atom to read it
11431143 MOVAtom fake_atom = { .size = size - (url_ftell(pb) - start_pos) };
@@ -1159,7 +1159,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 15 unmodified lines
11591159 url_fskip(pb, a.size);
11601160 }
11611161
1162− if(st->codec->codec_type==CODEC_TYPE_AUDIO && st->codec->sample_rate==0 && sc->time_scale>1)
1162+ if(st->codec->codec_type==AVMEDIA_TYPE_AUDIO && st->codec->sample_rate==0 && sc->time_scale>1)
11631163 st->codec->sample_rate= sc->time_scale;
11641164
11651165 /* special codec parameters handling */
@@ -1196,7 +1196,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 30 unmodified lines
11961196 break;
11971197 case CODEC_ID_MP2:
11981198 case CODEC_ID_MP3:
1199− st->codec->codec_type = CODEC_TYPE_AUDIO; /* force type after stsd for m1a hdlr */
1199+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO; /* force type after stsd for m1a hdlr */
12001200 st->need_parsing = AVSTREAM_PARSE_FULL;
12011201 break;
12021202 case CODEC_ID_GSM:
@@ -1490,7 +1490,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st) · 287 unmodified lines
14901490 }
14911491
14921492 /* only use old uncompressed audio chunk demuxing when stts specifies it */
1493− if (!(st->codec->codec_type == CODEC_TYPE_AUDIO &&
1493+ if (!(st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
14941494 sc->stts_count == 1 && sc->stts_data[0].duration == 1)) {
14951495 unsigned int current_sample = 0;
14961496 unsigned int stts_sample = 0;
@@ -1698,7 +1698,7 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 201 unmodified lines
16981698 if (!sc) return AVERROR(ENOMEM);
16991699
17001700 st->priv_data = sc;
1701− st->codec->codec_type = CODEC_TYPE_DATA;
1701+ st->codec->codec_type = AVMEDIA_TYPE_DATA;
17021702 sc->ffindex = st->index;
17031703
17041704 if ((ret = mov_read_default(c, pb, atom)) < 0)
@@ -1721,7 +1721,7 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 16 unmodified lines
17211721
17221722 av_set_pts_info(st, 64, 1, sc->time_scale);
17231723
1724− if (st->codec->codec_type == CODEC_TYPE_AUDIO &&
1724+ if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
17251725 !st->codec->frame_size && sc->stts_count == 1) {
17261726 st->codec->frame_size = av_rescale(sc->stts_data[0].duration,
17271727 st->codec->sample_rate, sc->time_scale);
@@ -1741,7 +1741,7 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 13 unmodified lines
17411741 } else
17421742 sc->pb = c->fc->pb;
17431743
1744− if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
1744+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
17451745 if (st->codec->width != sc->width || st->codec->height != sc->height) {
17461746 AVRational r = av_d2q(((double)st->codec->height * sc->width) /
17471747 ((double)st->codec->width * sc->height), INT_MAX);
@@ -2004,7 +2004,7 @@ static int mov_read_trun(MOVContext *c, ByteIOContext *pb, MOVAtom atom) · 256 unmodified lines
20042004 sc->ctts_data[sc->ctts_count].duration = get_be32(pb);
20052005 sc->ctts_count++;
20062006 }
2007− if ((keyframe = st->codec->codec_type == CODEC_TYPE_AUDIO ||
2007+ if ((keyframe = st->codec->codec_type == AVMEDIA_TYPE_AUDIO ||
20082008 (flags & 0x004 && !i && !sample_flags) || sample_flags & 0x2000000))
20092009 distance = 0;
20102010 av_add_index_entry(st, offset, dts, sample_size, distance,
libavformat/movenc.c+26−26
@@ -333,7 +333,7 @@ static int mov_write_esds_tag(ByteIOContext *pb, MOVTrack *track) // Basic · 332 unmodified lines
333333
334334 // the following fields is made of 6 bits to identify the streamtype (4 for video, 5 for audio)
335335 // plus 1 bit to indicate upstream and 1 bit set to 1 (reserved)
336− if(track->enc->codec_type == CODEC_TYPE_AUDIO)
336+ if(track->enc->codec_type == AVMEDIA_TYPE_AUDIO)
337337 put_byte(pb, 0x15); // flags (= Audiostream)
338338 else
339339 put_byte(pb, 0x11); // flags (= Visualstream)
@@ -620,8 +620,8 @@ static int mp4_get_codec_tag(AVFormatContext *s, MOVTrack *track) · 280 unmodified lines
620620 else if (track->enc->codec_id == CODEC_ID_AC3) tag = MKTAG('a','c','-','3');
621621 else if (track->enc->codec_id == CODEC_ID_DIRAC) tag = MKTAG('d','r','a','c');
622622 else if (track->enc->codec_id == CODEC_ID_MOV_TEXT) tag = MKTAG('t','x','3','g');
623− else if (track->enc->codec_type == CODEC_TYPE_VIDEO) tag = MKTAG('m','p','4','v');
624− else if (track->enc->codec_type == CODEC_TYPE_AUDIO) tag = MKTAG('m','p','4','a');
623+ else if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) tag = MKTAG('m','p','4','v');
624+ else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO) tag = MKTAG('m','p','4','a');
625625
626626 return tag;
627627 }
@@ -642,7 +642,7 @@ static int ipod_get_codec_tag(AVFormatContext *s, MOVTrack *track) · 14 unmodified lines
642642 int tag = track->enc->codec_tag;
643643
644644 // keep original tag for subs, ipod supports both formats
645− if (!(track->enc->codec_type == CODEC_TYPE_SUBTITLE &&
645+ if (!(track->enc->codec_type == AVMEDIA_TYPE_SUBTITLE &&
646646 (tag == MKTAG('t','x','3','g') ||
647647 tag == MKTAG('t','e','x','t'))))
648648 tag = ff_codec_get_tag(codec_ipod_tags, track->enc->codec_id);
@@ -714,7 +714,7 @@ static int mov_get_codec_tag(AVFormatContext *s, MOVTrack *track) · 65 unmodified lines
714714 tag = mov_get_dv_codec_tag(s, track);
715715 else if (track->enc->codec_id == CODEC_ID_RAWVIDEO)
716716 tag = mov_get_rawvideo_codec_tag(s, track);
717− else if (track->enc->codec_type == CODEC_TYPE_VIDEO) {
717+ else if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) {
718718 tag = ff_codec_get_tag(codec_movvideo_tags, track->enc->codec_id);
719719 if (!tag) { // if no mac fcc found, try with Microsoft tags
720720 tag = ff_codec_get_tag(ff_codec_bmp_tags, track->enc->codec_id);
@@ -722,7 +722,7 @@ static int mov_get_codec_tag(AVFormatContext *s, MOVTrack *track) · 1 unmodified line
722722 av_log(s, AV_LOG_INFO, "Warning, using MS style video codec tag, "
723723 "the file may be unplayable!\n");
724724 }
725− } else if (track->enc->codec_type == CODEC_TYPE_AUDIO) {
725+ } else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO) {
726726 tag = ff_codec_get_tag(codec_movaudio_tags, track->enc->codec_id);
727727 if (!tag) { // if no mac fcc found, try with Microsoft tags
728728 int ms_tag = ff_codec_get_tag(ff_codec_wav_tags, track->enc->codec_id);
@@ -732,7 +732,7 @@ static int mov_get_codec_tag(AVFormatContext *s, MOVTrack *track) · 3 unmodified lines
732732 "the file may be unplayable!\n");
733733 }
734734 }
735− } else if (track->enc->codec_type == CODEC_TYPE_SUBTITLE)
735+ } else if (track->enc->codec_type == AVMEDIA_TYPE_SUBTITLE)
736736 tag = ff_codec_get_tag(ff_codec_movsubtitle_tags, track->enc->codec_id);
737737 }
738738
@@ -868,11 +868,11 @@ static int mov_write_stsd_tag(ByteIOContext *pb, MOVTrack *track) · 129 unmodified lines
868868 put_tag(pb, "stsd");
869869 put_be32(pb, 0); /* version & flags */
870870 put_be32(pb, 1); /* entry count */
871− if (track->enc->codec_type == CODEC_TYPE_VIDEO)
871+ if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO)
872872 mov_write_video_tag(pb, track);
873− else if (track->enc->codec_type == CODEC_TYPE_AUDIO)
873+ else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO)
874874 mov_write_audio_tag(pb, track);
875− else if (track->enc->codec_type == CODEC_TYPE_SUBTITLE)
875+ else if (track->enc->codec_type == AVMEDIA_TYPE_SUBTITLE)
876876 mov_write_subtitle_tag(pb, track);
877877 return updateSize(pb, pos);
878878 }
@@ -918,7 +918,7 @@ static int mov_write_stts_tag(ByteIOContext *pb, MOVTrack *track) · 39 unmodified lines
918918 uint32_t atom_size;
919919 int i;
920920
921− if (track->enc->codec_type == CODEC_TYPE_AUDIO && !track->audio_vbr) {
921+ if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO && !track->audio_vbr) {
922922 stts_entries = av_malloc(sizeof(*stts_entries)); /* one entry */
923923 stts_entries[0].count = track->sampleCount;
924924 stts_entries[0].duration = 1;
@@ -973,12 +973,12 @@ static int mov_write_stbl_tag(ByteIOContext *pb, MOVTrack *track) · 48 unmodified lines
973973 put_tag(pb, "stbl");
974974 mov_write_stsd_tag(pb, track);
975975 mov_write_stts_tag(pb, track);
976− if (track->enc->codec_type == CODEC_TYPE_VIDEO &&
976+ if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO &&
977977 track->hasKeyframes && track->hasKeyframes < track->entry)
978978 mov_write_stss_tag(pb, track, MOV_SYNC_SAMPLE);
979979 if (track->mode == MODE_MOV && track->flags & MOV_TRACK_STPS)
980980 mov_write_stss_tag(pb, track, MOV_PARTIAL_SYNC_SAMPLE);
981− if (track->enc->codec_type == CODEC_TYPE_VIDEO &&
981+ if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO &&
982982 track->flags & MOV_TRACK_CTTS)
983983 mov_write_ctts_tag(pb, track);
984984 mov_write_stsc_tag(pb, track);
@@ -1050,13 +1050,13 @@ static int mov_write_hdlr_tag(ByteIOContext *pb, MOVTrack *track) · 65 unmodified lines
10501050 descr = "DataHandler";
10511051 } else {
10521052 hdlr = (track->mode == MODE_MOV) ? "mhlr" : "\0\0\0\0";
1053− if (track->enc->codec_type == CODEC_TYPE_VIDEO) {
1053+ if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) {
10541054 hdlr_type = "vide";
10551055 descr = "VideoHandler";
1056− } else if (track->enc->codec_type == CODEC_TYPE_AUDIO) {
1056+ } else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO) {
10571057 hdlr_type = "soun";
10581058 descr = "SoundHandler";
1059− } else if (track->enc->codec_type == CODEC_TYPE_SUBTITLE) {
1059+ } else if (track->enc->codec_type == AVMEDIA_TYPE_SUBTITLE) {
10601060 if (track->tag == MKTAG('t','x','3','g')) hdlr_type = "sbtl";
10611061 else hdlr_type = "text";
10621062 descr = "SubtitleHandler";
@@ -1084,11 +1084,11 @@ static int mov_write_minf_tag(ByteIOContext *pb, MOVTrack *track) · 21 unmodified lines
10841084 int64_t pos = url_ftell(pb);
10851085 put_be32(pb, 0); /* size */
10861086 put_tag(pb, "minf");
1087− if(track->enc->codec_type == CODEC_TYPE_VIDEO)
1087+ if(track->enc->codec_type == AVMEDIA_TYPE_VIDEO)
10881088 mov_write_vmhd_tag(pb);
1089− else if (track->enc->codec_type == CODEC_TYPE_AUDIO)
1089+ else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO)
10901090 mov_write_smhd_tag(pb);
1091− else if (track->enc->codec_type == CODEC_TYPE_SUBTITLE) {
1091+ else if (track->enc->codec_type == AVMEDIA_TYPE_SUBTITLE) {
10921092 if (track->tag == MKTAG('t','e','x','t')) mov_write_gmhd_tag(pb);
10931093 else mov_write_nmhd_tag(pb);
10941094 }
@@ -1165,7 +1165,7 @@ static int mov_write_tkhd_tag(ByteIOContext *pb, MOVTrack *track, AVStream *st) · 70 unmodified lines
11651165 put_be32(pb, 0); /* reserved */
11661166 put_be32(pb, 0x0); /* reserved (Layer & Alternate group) */
11671167 /* Volume, only for audio */
1168− if(track->enc->codec_type == CODEC_TYPE_AUDIO)
1168+ if(track->enc->codec_type == AVMEDIA_TYPE_AUDIO)
11691169 put_be16(pb, 0x0100);
11701170 else
11711171 put_be16(pb, 0);
@@ -1183,8 +1183,8 @@ static int mov_write_tkhd_tag(ByteIOContext *pb, MOVTrack *track, AVStream *st) · 11 unmodified lines
11831183 put_be32(pb, 0x40000000); /* reserved */
11841184
11851185 /* Track width and height, for visual only */
1186− if(track->enc->codec_type == CODEC_TYPE_VIDEO ||
1187− track->enc->codec_type == CODEC_TYPE_SUBTITLE) {
1186+ if(track->enc->codec_type == AVMEDIA_TYPE_VIDEO ||
1187+ track->enc->codec_type == AVMEDIA_TYPE_SUBTITLE) {
11881188 double sample_aspect_ratio = av_q2d(st->sample_aspect_ratio);
11891189 if(!sample_aspect_ratio || track->height != track->enc->height)
11901190 sample_aspect_ratio = 1;
@@ -1671,7 +1671,7 @@ static int mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s) · 480 unmodified lines
16711671
16721672 for (i = 0; i < s->nb_streams; i++) {
16731673 AVStream *st = s->streams[i];
1674− if (st->codec->codec_type == CODEC_TYPE_VIDEO)
1674+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
16751675 has_video = 1;
16761676 if (st->codec->codec_id == CODEC_ID_H264)
16771677 has_h264 = 1;
@@ -1829,7 +1829,7 @@ static int mov_write_header(AVFormatContext *s) · 151 unmodified lines
18291829 "codec not currently supported in container\n", i);
18301830 goto error;
18311831 }
1832− if(st->codec->codec_type == CODEC_TYPE_VIDEO){
1832+ if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO){
18331833 if (track->tag == MKTAG('m','x','3','p') || track->tag == MKTAG('m','x','3','n') ||
18341834 track->tag == MKTAG('m','x','4','p') || track->tag == MKTAG('m','x','4','n') ||
18351835 track->tag == MKTAG('m','x','5','p') || track->tag == MKTAG('m','x','5','n')) {
@@ -1845,7 +1845,7 @@ static int mov_write_header(AVFormatContext *s) · 9 unmodified lines
18451845 "WARNING codec timebase is very high. If duration is too long,\n"
18461846 "file may not be playable by quicktime. Specify a shorter timebase\n"
18471847 "or choose different container.\n");
1848− }else if(st->codec->codec_type == CODEC_TYPE_AUDIO){
1848+ }else if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO){
18491849 track->timescale = st->codec->sample_rate;
18501850 if(!st->codec->frame_size && !av_get_bits_per_sample(st->codec->codec_id)) {
18511851 av_log(s, AV_LOG_ERROR, "track %d: codec frame size is not set\n", i);
@@ -1868,7 +1868,7 @@ static int mov_write_header(AVFormatContext *s) · 16 unmodified lines
18681868 goto error;
18691869 }
18701870 }
1871− }else if(st->codec->codec_type == CODEC_TYPE_SUBTITLE){
1871+ }else if(st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE){
18721872 track->timescale = st->codec->time_base.den;
18731873 }
18741874 if (!track->height)
libavformat/mp3.c+1−1
@@ -140,7 +140,7 @@ static int mp3_read_header(AVFormatContext *s, · 139 unmodified lines
140140 if (!st)
141141 return AVERROR(ENOMEM);
142142
143− st->codec->codec_type = CODEC_TYPE_AUDIO;
143+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
144144 st->codec->codec_id = CODEC_ID_MP3;
145145 st->need_parsing = AVSTREAM_PARSE_FULL;
146146 st->start_time = 0;
libavformat/mpc.c+1−1
@@ -104,7 +104,7 @@ static int mpc_read_header(AVFormatContext *s, AVFormatParameters *ap) · 103 unmodified lines
104104 st = av_new_stream(s, 0);
105105 if (!st)
106106 return AVERROR(ENOMEM);
107− st->codec->codec_type = CODEC_TYPE_AUDIO;
107+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
108108 st->codec->codec_id = CODEC_ID_MUSEPACK7;
109109 st->codec->channels = 2;
110110 st->codec->bits_per_coded_sample = 16;
libavformat/mpc8.c+1−1
@@ -224,7 +224,7 @@ static int mpc8_read_header(AVFormatContext *s, AVFormatParameters *ap) · 223 unmodified lines
224224 st = av_new_stream(s, 0);
225225 if (!st)
226226 return AVERROR(ENOMEM);
227− st->codec->codec_type = CODEC_TYPE_AUDIO;
227+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
228228 st->codec->codec_id = CODEC_ID_MUSEPACK8;
229229 st->codec->bits_per_coded_sample = 16;
230230
libavformat/mpeg.c+18−18
@@ -417,7 +417,7 @@ static int mpegps_read_packet(AVFormatContext *s, · 416 unmodified lines
417417 AVStream *st;
418418 int len, startcode, i, es_type;
419419 enum CodecID codec_id = CODEC_ID_NONE;
420− enum CodecType type;
420+ enum AVMediaType type;
421421 int64_t pts, dts, dummy_pos; //dummy_pos is needed for the index building to work
422422 uint8_t av_uninit(dvdaudio_substream_type);
423423
@@ -443,26 +443,26 @@ static int mpegps_read_packet(AVFormatContext *s, · 19 unmodified lines
443443 if(es_type > 0 && es_type != STREAM_TYPE_PRIVATE_DATA){
444444 if(es_type == STREAM_TYPE_VIDEO_MPEG1){
445445 codec_id = CODEC_ID_MPEG2VIDEO;
446− type = CODEC_TYPE_VIDEO;
446+ type = AVMEDIA_TYPE_VIDEO;
447447 } else if(es_type == STREAM_TYPE_VIDEO_MPEG2){
448448 codec_id = CODEC_ID_MPEG2VIDEO;
449− type = CODEC_TYPE_VIDEO;
449+ type = AVMEDIA_TYPE_VIDEO;
450450 } else if(es_type == STREAM_TYPE_AUDIO_MPEG1 ||
451451 es_type == STREAM_TYPE_AUDIO_MPEG2){
452452 codec_id = CODEC_ID_MP3;
453− type = CODEC_TYPE_AUDIO;
453+ type = AVMEDIA_TYPE_AUDIO;
454454 } else if(es_type == STREAM_TYPE_AUDIO_AAC){
455455 codec_id = CODEC_ID_AAC;
456− type = CODEC_TYPE_AUDIO;
456+ type = AVMEDIA_TYPE_AUDIO;
457457 } else if(es_type == STREAM_TYPE_VIDEO_MPEG4){
458458 codec_id = CODEC_ID_MPEG4;
459− type = CODEC_TYPE_VIDEO;
459+ type = AVMEDIA_TYPE_VIDEO;
460460 } else if(es_type == STREAM_TYPE_VIDEO_H264){
461461 codec_id = CODEC_ID_H264;
462− type = CODEC_TYPE_VIDEO;
462+ type = AVMEDIA_TYPE_VIDEO;
463463 } else if(es_type == STREAM_TYPE_AUDIO_AC3){
464464 codec_id = CODEC_ID_AC3;
465− type = CODEC_TYPE_AUDIO;
465+ type = AVMEDIA_TYPE_AUDIO;
466466 } else {
467467 goto skip;
468468 }
@@ -475,38 +475,38 @@ static int mpegps_read_packet(AVFormatContext *s, · 6 unmodified lines
475475 codec_id = CODEC_ID_CAVS;
476476 else
477477 codec_id = CODEC_ID_PROBE;
478− type = CODEC_TYPE_VIDEO;
478+ type = AVMEDIA_TYPE_VIDEO;
479479 } else if (startcode >= 0x1c0 && startcode <= 0x1df) {
480− type = CODEC_TYPE_AUDIO;
480+ type = AVMEDIA_TYPE_AUDIO;
481481 codec_id = m->sofdec > 0 ? CODEC_ID_ADPCM_ADX : CODEC_ID_MP2;
482482 } else if (startcode >= 0x80 && startcode <= 0x87) {
483− type = CODEC_TYPE_AUDIO;
483+ type = AVMEDIA_TYPE_AUDIO;
484484 codec_id = CODEC_ID_AC3;
485485 } else if ( ( startcode >= 0x88 && startcode <= 0x8f)
486486 ||( startcode >= 0x98 && startcode <= 0x9f)) {
487487 /* 0x90 - 0x97 is reserved for SDDS in DVD specs */
488− type = CODEC_TYPE_AUDIO;
488+ type = AVMEDIA_TYPE_AUDIO;
489489 codec_id = CODEC_ID_DTS;
490490 } else if (startcode >= 0xa0 && startcode <= 0xaf) {
491− type = CODEC_TYPE_AUDIO;
491+ type = AVMEDIA_TYPE_AUDIO;
492492 /* 16 bit form will be handled as CODEC_ID_PCM_S16BE */
493493 codec_id = CODEC_ID_PCM_DVD;
494494 } else if (startcode >= 0xb0 && startcode <= 0xbf) {
495− type = CODEC_TYPE_AUDIO;
495+ type = AVMEDIA_TYPE_AUDIO;
496496 codec_id = CODEC_ID_TRUEHD;
497497 } else if (startcode >= 0xc0 && startcode <= 0xcf) {
498498 /* Used for both AC-3 and E-AC-3 in EVOB files */
499− type = CODEC_TYPE_AUDIO;
499+ type = AVMEDIA_TYPE_AUDIO;
500500 codec_id = CODEC_ID_AC3;
501501 } else if (startcode >= 0x20 && startcode <= 0x3f) {
502− type = CODEC_TYPE_SUBTITLE;
502+ type = AVMEDIA_TYPE_SUBTITLE;
503503 codec_id = CODEC_ID_DVD_SUBTITLE;
504504 } else if (startcode >= 0xfd55 && startcode <= 0xfd5f) {
505− type = CODEC_TYPE_VIDEO;
505+ type = AVMEDIA_TYPE_VIDEO;
506506 codec_id = CODEC_ID_VC1;
507507 } else if (startcode == 0x1bd) {
508508 // check dvd audio substream type
509− type = CODEC_TYPE_AUDIO;
509+ type = AVMEDIA_TYPE_AUDIO;
510510 switch(dvdaudio_substream_type & 0xe0) {
511511 case 0xa0: codec_id = CODEC_ID_PCM_DVD;
512512 break;
libavformat/mpegenc.c+5−5
@@ -335,7 +335,7 @@ static int mpeg_mux_init(AVFormatContext *ctx) · 334 unmodified lines
335335 av_set_pts_info(st, 64, 1, 90000);
336336
337337 switch(st->codec->codec_type) {
338− case CODEC_TYPE_AUDIO:
338+ case AVMEDIA_TYPE_AUDIO:
339339 if (st->codec->codec_id == CODEC_ID_AC3) {
340340 stream->id = ac3_id++;
341341 } else if (st->codec->codec_id == CODEC_ID_DTS) {
@@ -363,7 +363,7 @@ static int mpeg_mux_init(AVFormatContext *ctx) · 21 unmodified lines
363363 stream->max_buffer_size = 4 * 1024;
364364 s->audio_bound++;
365365 break;
366− case CODEC_TYPE_VIDEO:
366+ case AVMEDIA_TYPE_VIDEO:
367367 stream->id = mpv_id++;
368368 if (st->codec->rc_buffer_size)
369369 stream->max_buffer_size = 6*1024 + st->codec->rc_buffer_size/8;
@@ -379,7 +379,7 @@ static int mpeg_mux_init(AVFormatContext *ctx) · 9 unmodified lines
379379 #endif
380380 s->video_bound++;
381381 break;
382− case CODEC_TYPE_SUBTITLE:
382+ case AVMEDIA_TYPE_SUBTITLE:
383383 stream->id = mps_id++;
384384 stream->max_buffer_size = 16 * 1024;
385385 break;
@@ -1046,7 +1046,7 @@ retry: · 660 unmodified lines
10461046 /* for subtitle, a single PES packet must be generated,
10471047 so we flush after every single subtitle packet */
10481048 if(s->packet_size > avail_data && !flush
1049− && st->codec->codec_type != CODEC_TYPE_SUBTITLE)
1049+ && st->codec->codec_type != AVMEDIA_TYPE_SUBTITLE)
10501050 return 0;
10511051 if(avail_data==0)
10521052 continue;
@@ -1156,7 +1156,7 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt) · 103 unmodified lines
11561156 int64_t pts, dts;
11571157 PacketDesc *pkt_desc;
11581158 const int preload= av_rescale(ctx->preload, 90000, AV_TIME_BASE);
1159− const int is_iframe = st->codec->codec_type == CODEC_TYPE_VIDEO && (pkt->flags & PKT_FLAG_KEY);
1159+ const int is_iframe = st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (pkt->flags & PKT_FLAG_KEY);
11601160
11611161 pts= pkt->pts;
11621162 dts= pkt->dts;
libavformat/mpegts.c+29−29
@@ -486,54 +486,54 @@ static int parse_section_header(SectionHeader *h, · 485 unmodified lines
486486
487487 typedef struct {
488488 uint32_t stream_type;
489− enum CodecType codec_type;
489+ enum AVMediaType codec_type;
490490 enum CodecID codec_id;
491491 } StreamType;
492492
493493 static const StreamType ISO_types[] = {
494− { 0x01, CODEC_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO },
495− { 0x02, CODEC_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO },
496− { 0x03, CODEC_TYPE_AUDIO, CODEC_ID_MP3 },
497− { 0x04, CODEC_TYPE_AUDIO, CODEC_ID_MP3 },
498− { 0x0f, CODEC_TYPE_AUDIO, CODEC_ID_AAC },
499− { 0x10, CODEC_TYPE_VIDEO, CODEC_ID_MPEG4 },
500− { 0x11, CODEC_TYPE_AUDIO, CODEC_ID_AAC }, /* LATM syntax */
501− { 0x1b, CODEC_TYPE_VIDEO, CODEC_ID_H264 },
502− { 0xd1, CODEC_TYPE_VIDEO, CODEC_ID_DIRAC },
503− { 0xea, CODEC_TYPE_VIDEO, CODEC_ID_VC1 },
494+ { 0x01, AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO },
495+ { 0x02, AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO },
496+ { 0x03, AVMEDIA_TYPE_AUDIO, CODEC_ID_MP3 },
497+ { 0x04, AVMEDIA_TYPE_AUDIO, CODEC_ID_MP3 },
498+ { 0x0f, AVMEDIA_TYPE_AUDIO, CODEC_ID_AAC },
499+ { 0x10, AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG4 },
500+ { 0x11, AVMEDIA_TYPE_AUDIO, CODEC_ID_AAC }, /* LATM syntax */
501+ { 0x1b, AVMEDIA_TYPE_VIDEO, CODEC_ID_H264 },
502+ { 0xd1, AVMEDIA_TYPE_VIDEO, CODEC_ID_DIRAC },
503+ { 0xea, AVMEDIA_TYPE_VIDEO, CODEC_ID_VC1 },
504504 { 0 },
505505 };
506506
507507 static const StreamType HDMV_types[] = {
508− { 0x80, CODEC_TYPE_AUDIO, CODEC_ID_PCM_BLURAY },
509− { 0x81, CODEC_TYPE_AUDIO, CODEC_ID_AC3 },
510− { 0x82, CODEC_TYPE_AUDIO, CODEC_ID_DTS },
511− { 0x83, CODEC_TYPE_AUDIO, CODEC_ID_TRUEHD },
512− { 0x84, CODEC_TYPE_AUDIO, CODEC_ID_EAC3 },
513− { 0x90, CODEC_TYPE_SUBTITLE, CODEC_ID_HDMV_PGS_SUBTITLE },
508+ { 0x80, AVMEDIA_TYPE_AUDIO, CODEC_ID_PCM_BLURAY },
509+ { 0x81, AVMEDIA_TYPE_AUDIO, CODEC_ID_AC3 },
510+ { 0x82, AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS },
511+ { 0x83, AVMEDIA_TYPE_AUDIO, CODEC_ID_TRUEHD },
512+ { 0x84, AVMEDIA_TYPE_AUDIO, CODEC_ID_EAC3 },
513+ { 0x90, AVMEDIA_TYPE_SUBTITLE, CODEC_ID_HDMV_PGS_SUBTITLE },
514514 { 0 },
515515 };
516516
517517 /* ATSC ? */
518518 static const StreamType MISC_types[] = {
519− { 0x81, CODEC_TYPE_AUDIO, CODEC_ID_AC3 },
520− { 0x8a, CODEC_TYPE_AUDIO, CODEC_ID_DTS },
519+ { 0x81, AVMEDIA_TYPE_AUDIO, CODEC_ID_AC3 },
520+ { 0x8a, AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS },
521521 { 0 },
522522 };
523523
524524 static const StreamType REGD_types[] = {
525− { MKTAG('d','r','a','c'), CODEC_TYPE_VIDEO, CODEC_ID_DIRAC },
526− { MKTAG('A','C','-','3'), CODEC_TYPE_AUDIO, CODEC_ID_AC3 },
525+ { MKTAG('d','r','a','c'), AVMEDIA_TYPE_VIDEO, CODEC_ID_DIRAC },
526+ { MKTAG('A','C','-','3'), AVMEDIA_TYPE_AUDIO, CODEC_ID_AC3 },
527527 { 0 },
528528 };
529529
530530 /* descriptor present */
531531 static const StreamType DESC_types[] = {
532− { 0x6a, CODEC_TYPE_AUDIO, CODEC_ID_AC3 }, /* AC-3 descriptor */
533− { 0x7a, CODEC_TYPE_AUDIO, CODEC_ID_EAC3 }, /* E-AC-3 descriptor */
534− { 0x7b, CODEC_TYPE_AUDIO, CODEC_ID_DTS },
535− { 0x56, CODEC_TYPE_SUBTITLE, CODEC_ID_DVB_TELETEXT },
536− { 0x59, CODEC_TYPE_SUBTITLE, CODEC_ID_DVB_SUBTITLE }, /* subtitling descriptor */
532+ { 0x6a, AVMEDIA_TYPE_AUDIO, CODEC_ID_AC3 }, /* AC-3 descriptor */
533+ { 0x7a, AVMEDIA_TYPE_AUDIO, CODEC_ID_EAC3 }, /* E-AC-3 descriptor */
534+ { 0x7b, AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS },
535+ { 0x56, AVMEDIA_TYPE_SUBTITLE, CODEC_ID_DVB_TELETEXT },
536+ { 0x59, AVMEDIA_TYPE_SUBTITLE, CODEC_ID_DVB_SUBTITLE }, /* subtitling descriptor */
537537 { 0 },
538538 };
539539
@@ -554,7 +554,7 @@ static int mpegts_set_stream_info(AVStream *st, PESContext *pes, · 14 unmodified lines
554554 {
555555 av_set_pts_info(st, 33, 1, 90000);
556556 st->priv_data = pes;
557− st->codec->codec_type = CODEC_TYPE_DATA;
557+ st->codec->codec_type = AVMEDIA_TYPE_DATA;
558558 st->codec->codec_id = CODEC_ID_NONE;
559559 st->need_parsing = AVSTREAM_PARSE_FULL;
560560 pes->st = st;
@@ -588,7 +588,7 @@ static int mpegts_set_stream_info(AVStream *st, PESContext *pes, · 27 unmodified lines
588588
589589 av_set_pts_info(sub_st, 33, 1, 90000);
590590 sub_st->priv_data = sub_pes;
591− sub_st->codec->codec_type = CODEC_TYPE_AUDIO;
591+ sub_st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
592592 sub_st->codec->codec_id = CODEC_ID_AC3;
593593 sub_st->need_parsing = AVSTREAM_PARSE_FULL;
594594 sub_pes->sub_st = pes->sub_st = sub_st;
@@ -1394,7 +1394,7 @@ static int mpegts_read_header(AVFormatContext *s, · 799 unmodified lines
13941394 if (!st)
13951395 goto fail;
13961396 av_set_pts_info(st, 60, 1, 27000000);
1397− st->codec->codec_type = CODEC_TYPE_DATA;
1397+ st->codec->codec_type = AVMEDIA_TYPE_DATA;
13981398 st->codec->codec_id = CODEC_ID_MPEG2TS;
13991399
14001400 /* we iterate until we find two PCRs to estimate the bitrate */
libavformat/mpegtsenc.c+11−11
@@ -255,7 +255,7 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service) · 254 unmodified lines
255255
256256 /* write optional descriptors here */
257257 switch(st->codec->codec_type) {
258− case CODEC_TYPE_AUDIO:
258+ case AVMEDIA_TYPE_AUDIO:
259259 if (lang && strlen(lang->value) == 3) {
260260 *q++ = 0x0a; /* ISO 639 language descriptor */
261261 *q++ = 4;
@@ -265,7 +265,7 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service) · 3 unmodified lines
265265 *q++ = 0; /* undefined type */
266266 }
267267 break;
268− case CODEC_TYPE_SUBTITLE:
268+ case AVMEDIA_TYPE_SUBTITLE:
269269 {
270270 const char *language;
271271 language = lang && strlen(lang->value)==3 ? lang->value : "eng";
@@ -279,7 +279,7 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service) · 7 unmodified lines
279279 put16(&q, 1); /* ancillary page id */
280280 }
281281 break;
282− case CODEC_TYPE_VIDEO:
282+ case AVMEDIA_TYPE_VIDEO:
283283 if (stream_type == STREAM_TYPE_VIDEO_DIRAC) {
284284 *q++ = 0x05; /*MPEG-2 registration descriptor*/
285285 *q++ = 4;
@@ -424,7 +424,7 @@ static int mpegts_write_header(AVFormatContext *s) · 138 unmodified lines
424424 ts_st->first_pts_check = 1;
425425 ts_st->cc = 15;
426426 /* update PCR pid by using the first video stream */
427− if (st->codec->codec_type == CODEC_TYPE_VIDEO &&
427+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO &&
428428 service->pcr_pid == 0x1fff) {
429429 service->pcr_pid = ts_st->pid;
430430 pcr_st = st;
@@ -462,7 +462,7 @@ static int mpegts_write_header(AVFormatContext *s) · 31 unmodified lines
462462 /* Arbitrary values, PAT/PMT could be written on key frames */
463463 ts->sdt_packet_period = 200;
464464 ts->pat_packet_period = 40;
465− if (pcr_st->codec->codec_type == CODEC_TYPE_AUDIO) {
465+ if (pcr_st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
466466 if (!pcr_st->codec->frame_size) {
467467 av_log(s, AV_LOG_WARNING, "frame size not set\n");
468468 service->pcr_packet_period =
@@ -661,18 +661,18 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st, · 192 unmodified lines
661661 *q++ = 0x00;
662662 *q++ = 0x01;
663663 private_code = 0;
664− if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
664+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
665665 if (st->codec->codec_id == CODEC_ID_DIRAC) {
666666 *q++ = 0xfd;
667667 } else
668668 *q++ = 0xe0;
669− } else if (st->codec->codec_type == CODEC_TYPE_AUDIO &&
669+ } else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
670670 (st->codec->codec_id == CODEC_ID_MP2 ||
671671 st->codec->codec_id == CODEC_ID_MP3)) {
672672 *q++ = 0xc0;
673673 } else {
674674 *q++ = 0xbd;
675− if (st->codec->codec_type == CODEC_TYPE_SUBTITLE) {
675+ if (st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) {
676676 private_code = 0x20;
677677 }
678678 }
@@ -686,7 +686,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st, · 7 unmodified lines
686686 header_len += 5;
687687 flags |= 0x40;
688688 }
689− if (st->codec->codec_type == CODEC_TYPE_VIDEO &&
689+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO &&
690690 st->codec->codec_id == CODEC_ID_DIRAC) {
691691 /* set PES_extension_flag */
692692 pes_extension = 1;
@@ -708,7 +708,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st, · 15 unmodified lines
708708 *q++ = len;
709709 val = 0x80;
710710 /* data alignment indicator is required for subtitle data */
711− if (st->codec->codec_type == CODEC_TYPE_SUBTITLE)
711+ if (st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE)
712712 val |= 0x04;
713713 *q++ = val;
714714 *q++ = flags;
@@ -848,7 +848,7 @@ static int mpegts_write_packet(AVFormatContext *s, AVPacket *pkt) · 133 unmodified lines
848848 }
849849 }
850850
851− if (st->codec->codec_type != CODEC_TYPE_AUDIO) {
851+ if (st->codec->codec_type != AVMEDIA_TYPE_AUDIO) {
852852 // for video and subtitle, write a single pes packet
853853 mpegts_write_pes(s, st, buf, size, pts, dts);
854854 av_free(data);
libavformat/msnwc_tcp.c+1−1
@@ -80,7 +80,7 @@ static int msnwc_tcp_read_header(AVFormatContext *ctx, AVFormatParameters *ap) · 79 unmodified lines
8080 return AVERROR_NOMEM;
8181
8282 codec = st->codec;
83− codec->codec_type = CODEC_TYPE_VIDEO;
83+ codec->codec_type = AVMEDIA_TYPE_VIDEO;
8484 codec->codec_id = CODEC_ID_MIMIC;
8585 codec->codec_tag = MKTAG('M', 'L', '2', '0');
8686
libavformat/mtv.c+2−2
@@ -123,7 +123,7 @@ static int mtv_read_header(AVFormatContext *s, AVFormatParameters *ap) · 122 unmodified lines
123123 return AVERROR(ENOMEM);
124124
125125 av_set_pts_info(st, 64, 1, mtv->video_fps);
126− st->codec->codec_type = CODEC_TYPE_VIDEO;
126+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
127127 st->codec->codec_id = CODEC_ID_RAWVIDEO;
128128 st->codec->codec_tag = MKTAG('R', 'G', 'B', mtv->img_bpp);
129129 st->codec->width = mtv->img_width;
@@ -140,7 +140,7 @@ static int mtv_read_header(AVFormatContext *s, AVFormatParameters *ap) · 10 unmodified lines
140140 return AVERROR(ENOMEM);
141141
142142 av_set_pts_info(st, 64, 1, AUDIO_SAMPLING_RATE);
143− st->codec->codec_type = CODEC_TYPE_AUDIO;
143+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
144144 st->codec->codec_id = CODEC_ID_MP3;
145145 st->codec->bit_rate = mtv->audio_br;
146146 st->need_parsing = AVSTREAM_PARSE_FULL;
libavformat/mvi.c+2−2
@@ -77,14 +77,14 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) · 76 unmodified lines
7777 }
7878
7979 av_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
80− ast->codec->codec_type = CODEC_TYPE_AUDIO;
80+ ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
8181 ast->codec->codec_id = CODEC_ID_PCM_U8;
8282 ast->codec->channels = 1;
8383 ast->codec->bits_per_coded_sample = 8;
8484 ast->codec->bit_rate = ast->codec->sample_rate * 8;
8585
8686 av_set_pts_info(vst, 64, msecs_per_frame, 1000000);
87− vst->codec->codec_type = CODEC_TYPE_VIDEO;
87+ vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
8888 vst->codec->codec_id = CODEC_ID_MOTIONPIXELS;
8989
9090 mvi->get_int = (vst->codec->width * vst->codec->height < (1 << 16)) ? get_le16 : get_le24;
libavformat/mxf.c+3−3
@@ -25,9 +25,9 @@ · 24 unmodified lines
2525 * SMPTE RP224 http://www.smpte-ra.org/mdd/index.html
2626 */
2727 const MXFCodecUL ff_mxf_data_definition_uls[] = {
28− { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x01,0x03,0x02,0x02,0x01,0x00,0x00,0x00 }, 13, CODEC_TYPE_VIDEO },
29− { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x01,0x03,0x02,0x02,0x02,0x00,0x00,0x00 }, 13, CODEC_TYPE_AUDIO },
30− { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, CODEC_TYPE_DATA },
28+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x01,0x03,0x02,0x02,0x01,0x00,0x00,0x00 }, 13, AVMEDIA_TYPE_VIDEO },
29+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x01,0x03,0x02,0x02,0x02,0x00,0x00,0x00 }, 13, AVMEDIA_TYPE_AUDIO },
30+ { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AVMEDIA_TYPE_DATA },
3131 };
3232
3333 const MXFCodecUL ff_mxf_codec_uls[] = {
libavformat/mxfdec.c+3−3
@@ -795,7 +795,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) · 794 unmodified lines
795795 st->codec->extradata = descriptor->extradata;
796796 st->codec->extradata_size = descriptor->extradata_size;
797797 }
798− if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
798+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
799799 container_ul = mxf_get_codec_ul(mxf_essence_container_uls, essence_container_ul);
800800 if (st->codec->codec_id == CODEC_ID_NONE)
801801 st->codec->codec_id = container_ul->id;
@@ -803,7 +803,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) · 1 unmodified line
803803 st->codec->height = descriptor->height;
804804 st->codec->bits_per_coded_sample = descriptor->bits_per_sample; /* Uncompressed */
805805 st->need_parsing = AVSTREAM_PARSE_HEADERS;
806− } else if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
806+ } else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
807807 container_ul = mxf_get_codec_ul(mxf_essence_container_uls, essence_container_ul);
808808 if (st->codec->codec_id == CODEC_ID_NONE)
809809 st->codec->codec_id = container_ul->id;
@@ -825,7 +825,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) · 15 unmodified lines
825825 st->need_parsing = AVSTREAM_PARSE_FULL;
826826 }
827827 }
828− if (st->codec->codec_type != CODEC_TYPE_DATA && (*essence_container_ul)[15] > 0x01) {
828+ if (st->codec->codec_type != AVMEDIA_TYPE_DATA && (*essence_container_ul)[15] > 0x01) {
829829 av_log(mxf->fc, AV_LOG_WARNING, "only frame wrapped mappings are correctly supported\n");
830830 st->need_parsing = AVSTREAM_PARSE_FULL;
831831 }
libavformat/mxfenc.c+3−3
@@ -1415,7 +1415,7 @@ static int mxf_write_header(AVFormatContext *s) · 1414 unmodified lines
14151415 return AVERROR(ENOMEM);
14161416 st->priv_data = sc;
14171417
1418− if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
1418+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
14191419 if (i != 0) {
14201420 av_log(s, AV_LOG_ERROR, "video stream must be first track\n");
14211421 return -1;
@@ -1455,7 +1455,7 @@ static int mxf_write_header(AVFormatContext *s) · 33 unmodified lines
14551455 mxf->edit_unit_byte_count += 16 + 4 + 4 + samples_per_frame[0]*8*4;
14561456 mxf->edit_unit_byte_count += klv_fill_size(mxf->edit_unit_byte_count);
14571457 }
1458− } else if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
1458+ } else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
14591459 if (st->codec->sample_rate != 48000) {
14601460 av_log(s, AV_LOG_ERROR, "only 48khz is implemented\n");
14611461 return -1;
@@ -1717,7 +1717,7 @@ static int mxf_write_packet(AVFormatContext *s, AVPacket *pkt) · 255 unmodified lines
17171717 mxf_write_klv_fill(s);
17181718 put_buffer(pb, sc->track_essence_element_key, 16); // write key
17191719 if (s->oformat == &mxf_d10_muxer) {
1720− if (st->codec->codec_type == CODEC_TYPE_VIDEO)
1720+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
17211721 mxf_write_d10_video_packet(s, st, pkt);
17221722 else
17231723 mxf_write_d10_audio_packet(s, st, pkt);
libavformat/ncdec.c+1−1
@@ -50,7 +50,7 @@ static int nc_read_header(AVFormatContext *s, AVFormatParameters *ap) · 49 unmodified lines
5050 if (!st)
5151 return AVERROR(ENOMEM);
5252
53− st->codec->codec_type = CODEC_TYPE_VIDEO;
53+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
5454 st->codec->codec_id = CODEC_ID_MPEG4;
5555 st->need_parsing = AVSTREAM_PARSE_FULL;
5656
libavformat/nsvdec.c+2−2
@@ -456,7 +456,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s, AVFormatParameters *ap) · 455 unmodified lines
456456 if (!nst)
457457 goto fail;
458458 st->priv_data = nst;
459− st->codec->codec_type = CODEC_TYPE_VIDEO;
459+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
460460 st->codec->codec_tag = vtag;
461461 st->codec->codec_id = ff_codec_get_id(nsv_codec_video_tags, vtag);
462462 st->codec->width = vwidth;
@@ -487,7 +487,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s, AVFormatParameters *ap) · 24 unmodified lines
487487 if (!nst)
488488 goto fail;
489489 st->priv_data = nst;
490− st->codec->codec_type = CODEC_TYPE_AUDIO;
490+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
491491 st->codec->codec_tag = atag;
492492 st->codec->codec_id = ff_codec_get_id(nsv_codec_audio_tags, atag);
493493
libavformat/nutdec.c+6−6
@@ -315,19 +315,19 @@ static int decode_stream_header(NUTContext *nut){ · 314 unmodified lines
315315 switch(class)
316316 {
317317 case 0:
318− st->codec->codec_type = CODEC_TYPE_VIDEO;
318+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
319319 st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tmp);
320320 break;
321321 case 1:
322− st->codec->codec_type = CODEC_TYPE_AUDIO;
322+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
323323 st->codec->codec_id = ff_codec_get_id(ff_codec_wav_tags, tmp);
324324 break;
325325 case 2:
326− st->codec->codec_type = CODEC_TYPE_SUBTITLE;
326+ st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
327327 st->codec->codec_id = ff_codec_get_id(ff_nut_subtitle_tags, tmp);
328328 break;
329329 case 3:
330− st->codec->codec_type = CODEC_TYPE_DATA;
330+ st->codec->codec_type = AVMEDIA_TYPE_DATA;
331331 break;
332332 default:
333333 av_log(s, AV_LOG_ERROR, "unknown stream class (%d)\n", class);
@@ -349,7 +349,7 @@ static int decode_stream_header(NUTContext *nut){ · 15 unmodified lines
349349 get_buffer(bc, st->codec->extradata, st->codec->extradata_size);
350350 }
351351
352− if (st->codec->codec_type == CODEC_TYPE_VIDEO){
352+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO){
353353 GET_V(st->codec->width , tmp > 0)
354354 GET_V(st->codec->height, tmp > 0)
355355 st->sample_aspect_ratio.num= ff_get_v(bc);
@@ -359,7 +359,7 @@ static int decode_stream_header(NUTContext *nut){ · 3 unmodified lines
359359 return -1;
360360 }
361361 ff_get_v(bc); /* csp type */
362− }else if (st->codec->codec_type == CODEC_TYPE_AUDIO){
362+ }else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO){
363363 GET_V(st->codec->sample_rate , tmp > 0)
364364 ff_get_v(bc); // samplerate_den
365365 GET_V(st->codec->channels, tmp > 0)
libavformat/nutenc.c+6−6
@@ -152,7 +152,7 @@ static void build_frame_code(AVFormatContext *s){ · 151 unmodified lines
152152 int start2= start + (end-start)*stream_id / s->nb_streams;
153153 int end2 = start + (end-start)*(stream_id+1) / s->nb_streams;
154154 AVCodecContext *codec = s->streams[stream_id]->codec;
155− int is_audio= codec->codec_type == CODEC_TYPE_AUDIO;
155+ int is_audio= codec->codec_type == AVMEDIA_TYPE_AUDIO;
156156 int intra_only= /*codec->intra_only || */is_audio;
157157 int pred_count;
158158
@@ -394,9 +394,9 @@ static int write_streamheader(NUTContext *nut, ByteIOContext *bc, AVStream *st, · 235 unmodified lines
394394 AVCodecContext *codec = st->codec;
395395 put_v(bc, i);
396396 switch(codec->codec_type){
397− case CODEC_TYPE_VIDEO: put_v(bc, 0); break;
398− case CODEC_TYPE_AUDIO: put_v(bc, 1); break;
399− case CODEC_TYPE_SUBTITLE: put_v(bc, 2); break;
397+ case AVMEDIA_TYPE_VIDEO: put_v(bc, 0); break;
398+ case AVMEDIA_TYPE_AUDIO: put_v(bc, 1); break;
399+ case AVMEDIA_TYPE_SUBTITLE: put_v(bc, 2); break;
400400 default : put_v(bc, 3); break;
401401 }
402402 put_v(bc, 4);
@@ -415,12 +415,12 @@ static int write_streamheader(NUTContext *nut, ByteIOContext *bc, AVStream *st, · 12 unmodified lines
415415 put_buffer(bc, codec->extradata, codec->extradata_size);
416416
417417 switch(codec->codec_type){
418− case CODEC_TYPE_AUDIO:
418+ case AVMEDIA_TYPE_AUDIO:
419419 put_v(bc, codec->sample_rate);
420420 put_v(bc, 1);
421421 put_v(bc, codec->channels);
422422 break;
423− case CODEC_TYPE_VIDEO:
423+ case AVMEDIA_TYPE_VIDEO:
424424 put_v(bc, codec->width);
425425 put_v(bc, codec->height);
426426
libavformat/nuv.c+2−2
@@ -155,7 +155,7 @@ static int nuv_header(AVFormatContext *s, AVFormatParameters *ap) { · 154 unmodified lines
155155 vst = av_new_stream(s, ctx->v_id);
156156 if (!vst)
157157 return AVERROR(ENOMEM);
158− vst->codec->codec_type = CODEC_TYPE_VIDEO;
158+ vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
159159 vst->codec->codec_id = CODEC_ID_NUV;
160160 vst->codec->width = width;
161161 vst->codec->height = height;
@@ -171,7 +171,7 @@ static int nuv_header(AVFormatContext *s, AVFormatParameters *ap) { · 9 unmodified lines
171171 ast = av_new_stream(s, ctx->a_id);
172172 if (!ast)
173173 return AVERROR(ENOMEM);
174− ast->codec->codec_type = CODEC_TYPE_AUDIO;
174+ ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
175175 ast->codec->codec_id = CODEC_ID_PCM_S16LE;
176176 ast->codec->channels = 2;
177177 ast->codec->sample_rate = 44100;
libavformat/oggdec.c+1−1
@@ -612,7 +612,7 @@ static int ogg_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp · 611 unmodified lines
612612
613613 // Try seeking to a keyframe first. If this fails (very possible),
614614 // av_seek_frame will fall back to ignoring keyframes
615− if (s->streams[stream_index]->codec->codec_type == CODEC_TYPE_VIDEO
615+ if (s->streams[stream_index]->codec->codec_type == AVMEDIA_TYPE_VIDEO
616616 && !(flags & AVSEEK_FLAG_ANY))
617617 os->keyframe_seek = 1;
618618
libavformat/oggenc.c+2−2
@@ -178,9 +178,9 @@ static int ogg_write_header(AVFormatContext *s) · 177 unmodified lines
178178 int i, j;
179179 for (i = 0; i < s->nb_streams; i++) {
180180 AVStream *st = s->streams[i];
181− if (st->codec->codec_type == CODEC_TYPE_AUDIO)
181+ if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
182182 av_set_pts_info(st, 64, 1, st->codec->sample_rate);
183− else if (st->codec->codec_type == CODEC_TYPE_VIDEO)
183+ else if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
184184 av_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den);
185185 if (st->codec->codec_id != CODEC_ID_VORBIS &&
186186 st->codec->codec_id != CODEC_ID_THEORA &&
libavformat/oggparsedirac.c+2−2
@@ -39,7 +39,7 @@ static int dirac_header(AVFormatContext *s, int idx) · 38 unmodified lines
3939 if (ff_dirac_parse_sequence_header(st->codec, &gb, &source) < 0)
4040 return -1;
4141
42− st->codec->codec_type = CODEC_TYPE_VIDEO;
42+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
4343 st->codec->codec_id = CODEC_ID_DIRAC;
4444 // dirac in ogg always stores timestamps as though the video were interlaced
4545 st->time_base = (AVRational){st->codec->time_base.num, 2*st->codec->time_base.den};
@@ -77,7 +77,7 @@ static int old_dirac_header(AVFormatContext *s, int idx) · 31 unmodified lines
7777 if (buf[0] != 'K')
7878 return 0;
7979
80− st->codec->codec_type = CODEC_TYPE_VIDEO;
80+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
8181 st->codec->codec_id = CODEC_ID_DIRAC;
8282 st->time_base.den = AV_RB32(buf+8);
8383 st->time_base.num = AV_RB32(buf+12);
libavformat/oggparseflac.c+2−2
@@ -57,7 +57,7 @@ flac_header (AVFormatContext * s, int idx) · 56 unmodified lines
5757
5858 ff_flac_parse_streaminfo(st->codec, &si, streaminfo_start);
5959
60− st->codec->codec_type = CODEC_TYPE_AUDIO;
60+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
6161 st->codec->codec_id = CODEC_ID_FLAC;
6262
6363 st->codec->extradata =
@@ -78,7 +78,7 @@ static int · 14 unmodified lines
7878 old_flac_header (AVFormatContext * s, int idx)
7979 {
8080 AVStream *st = s->streams[idx];
81− st->codec->codec_type = CODEC_TYPE_AUDIO;
81+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
8282 st->codec->codec_id = CODEC_ID_FLAC;
8383
8484 return 0;
libavformat/oggparseogm.c+6−6
@@ -49,19 +49,19 @@ ogm_header(AVFormatContext *s, int idx) · 48 unmodified lines
4949
5050 if(*p == 'v'){
5151 int tag;
52− st->codec->codec_type = CODEC_TYPE_VIDEO;
52+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
5353 p += 8;
5454 tag = bytestream_get_le32(&p);
5555 st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tag);
5656 st->codec->codec_tag = tag;
5757 } else if (*p == 't') {
58− st->codec->codec_type = CODEC_TYPE_SUBTITLE;
58+ st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
5959 st->codec->codec_id = CODEC_ID_TEXT;
6060 p += 12;
6161 } else {
6262 uint8_t acid[5];
6363 int cid;
64− st->codec->codec_type = CODEC_TYPE_AUDIO;
64+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
6565 p += 8;
6666 bytestream_get_buffer(&p, acid, 4);
6767 acid[4] = 0;
@@ -78,7 +78,7 @@ ogm_header(AVFormatContext *s, int idx) · 10 unmodified lines
7878
7979 p += 8; /* buffersize + bits_per_sample */
8080
81− if(st->codec->codec_type == CODEC_TYPE_VIDEO){
81+ if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO){
8282 st->codec->width = bytestream_get_le32(&p);
8383 st->codec->height = bytestream_get_le32(&p);
8484 st->codec->time_base.den = spu * 10000000;
@@ -117,14 +117,14 @@ ogm_dshow_header(AVFormatContext *s, int idx) · 32 unmodified lines
117117 t = AV_RL32(p + 96);
118118
119119 if(t == 0x05589f80){
120− st->codec->codec_type = CODEC_TYPE_VIDEO;
120+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
121121 st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, AV_RL32(p + 68));
122122 st->codec->time_base.den = 10000000;
123123 st->codec->time_base.num = AV_RL64(p + 164);
124124 st->codec->width = AV_RL32(p + 176);
125125 st->codec->height = AV_RL32(p + 180);
126126 } else if(t == 0x05589f81){
127− st->codec->codec_type = CODEC_TYPE_AUDIO;
127+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
128128 st->codec->codec_id = ff_codec_get_id(ff_codec_wav_tags, AV_RL16(p + 124));
129129 st->codec->channels = AV_RL16(p + 126);
130130 st->codec->sample_rate = AV_RL32(p + 128);
libavformat/oggparseskeleton.c+1−1
@@ -33,7 +33,7 @@ static int skeleton_header(AVFormatContext *s, int idx) · 32 unmodified lines
3333 int target_idx, start_time;
3434
3535 strcpy(st->codec->codec_name, "skeleton");
36− st->codec->codec_type = CODEC_TYPE_DATA;
36+ st->codec->codec_type = AVMEDIA_TYPE_DATA;
3737
3838 if (os->psize < 8)
3939 return -1;
libavformat/oggparsespeex.c+1−1
@@ -52,7 +52,7 @@ static int speex_header(AVFormatContext *s, int idx) { · 51 unmodified lines
5252
5353 if (spxp->seq == 0) {
5454 int frames_per_packet;
55− st->codec->codec_type = CODEC_TYPE_AUDIO;
55+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
5656 st->codec->codec_id = CODEC_ID_SPEEX;
5757
5858 st->codec->sample_rate = AV_RL32(p + 36);
libavformat/oggparsetheora.c+1−1
@@ -104,7 +104,7 @@ theora_header (AVFormatContext * s, int idx) · 103 unmodified lines
104104 thp->gpshift = get_bits(&gb, 5);
105105 thp->gpmask = (1 << thp->gpshift) - 1;
106106
107− st->codec->codec_type = CODEC_TYPE_VIDEO;
107+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
108108 st->codec->codec_id = CODEC_ID_THEORA;
109109 st->need_parsing = AVSTREAM_PARSE_HEADERS;
110110
libavformat/oggparsevorbis.c+1−1
@@ -237,7 +237,7 @@ vorbis_header (AVFormatContext * s, int idx) · 236 unmodified lines
237237 if (bytestream_get_byte(&p) != 1) /* framing_flag */
238238 return -1;
239239
240− st->codec->codec_type = CODEC_TYPE_AUDIO;
240+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
241241 st->codec->codec_id = CODEC_ID_VORBIS;
242242
243243 st->time_base.num = 1;
libavformat/oma.c+1−1
@@ -112,7 +112,7 @@ static int oma_read_header(AVFormatContext *s, · 111 unmodified lines
112112 return AVERROR(ENOMEM);
113113
114114 st->start_time = 0;
115− st->codec->codec_type = CODEC_TYPE_AUDIO;
115+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
116116 st->codec->codec_tag = buf[32];
117117 st->codec->codec_id = ff_codec_get_id(codec_oma_tags, st->codec->codec_tag);
118118
libavformat/output-example.c+2−2
@@ -65,7 +65,7 @@ static AVStream *add_audio_stream(AVFormatContext *oc, enum CodecID codec_id) · 64 unmodified lines
6565
6666 c = st->codec;
6767 c->codec_id = codec_id;
68− c->codec_type = CODEC_TYPE_AUDIO;
68+ c->codec_type = AVMEDIA_TYPE_AUDIO;
6969
7070 /* put sample parameters */
7171 c->bit_rate = 64000;
@@ -199,7 +199,7 @@ static AVStream *add_video_stream(AVFormatContext *oc, enum CodecID codec_id) · 127 unmodified lines
199199
200200 c = st->codec;
201201 c->codec_id = codec_id;
202− c->codec_type = CODEC_TYPE_VIDEO;
202+ c->codec_type = AVMEDIA_TYPE_VIDEO;
203203
204204 /* put sample parameters */
205205 c->bit_rate = 400000;
libavformat/psxstr.c+2−2
@@ -169,7 +169,7 @@ static int str_read_packet(AVFormatContext *s, · 168 unmodified lines
169169
170170 str->channels[channel].video_stream_index = st->index;
171171
172− st->codec->codec_type = CODEC_TYPE_VIDEO;
172+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
173173 st->codec->codec_id = CODEC_ID_MDEC;
174174 st->codec->codec_tag = 0; /* no fourcc */
175175 st->codec->width = AV_RL16(&sector[0x28]);
@@ -216,7 +216,7 @@ static int str_read_packet(AVFormatContext *s, · 40 unmodified lines
216216
217217 str->channels[channel].audio_stream_index = st->index;
218218
219− st->codec->codec_type = CODEC_TYPE_AUDIO;
219+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
220220 st->codec->codec_id = CODEC_ID_ADPCM_XA;
221221 st->codec->codec_tag = 0; /* no fourcc */
222222 st->codec->channels = (fmt&1)?2:1;
libavformat/pva.c+2−2
@@ -45,7 +45,7 @@ static int pva_read_header(AVFormatContext *s, AVFormatParameters *ap) { · 44 unmodified lines
4545
4646 if (!(st = av_new_stream(s, 0)))
4747 return AVERROR(ENOMEM);
48− st->codec->codec_type = CODEC_TYPE_VIDEO;
48+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
4949 st->codec->codec_id = CODEC_ID_MPEG2VIDEO;
5050 st->need_parsing = AVSTREAM_PARSE_FULL;
5151 av_set_pts_info(st, 32, 1, 90000);
@@ -53,7 +53,7 @@ static int pva_read_header(AVFormatContext *s, AVFormatParameters *ap) { · 1 unmodified line
5353
5454 if (!(st = av_new_stream(s, 1)))
5555 return AVERROR(ENOMEM);
56− st->codec->codec_type = CODEC_TYPE_AUDIO;
56+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
5757 st->codec->codec_id = CODEC_ID_MP2;
5858 st->need_parsing = AVSTREAM_PARSE_FULL;
5959 av_set_pts_info(st, 33, 1, 90000);
libavformat/qcp.c+1−1
@@ -95,7 +95,7 @@ static int qcp_read_header(AVFormatContext *s, AVFormatParameters *ap) · 94 unmodified lines
9595 s->file_size = get_le32(pb) + 8;
9696 url_fskip(pb, 8 + 4 + 1 + 1); // "QLCMfmt " + chunk-size + major-version + minor-version
9797
98− st->codec->codec_type = CODEC_TYPE_AUDIO;
98+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
9999 st->codec->channels = 1;
100100 get_buffer(pb, buf, 16);
101101 if (is_qcelp_13k_guid(buf)) {
libavformat/r3d.c+2−2
@@ -56,7 +56,7 @@ static int r3d_read_red1(AVFormatContext *s) · 55 unmodified lines
5656
5757 if (!st)
5858 return AVERROR(ENOMEM);
59− st->codec->codec_type = CODEC_TYPE_VIDEO;
59+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
6060 st->codec->codec_id = CODEC_ID_JPEG2000;
6161
6262 tmp = get_byte(s->pb); // major version
@@ -89,7 +89,7 @@ static int r3d_read_red1(AVFormatContext *s) · 26 unmodified lines
8989 AVStream *ast = av_new_stream(s, 1);
9090 if (!ast)
9191 return AVERROR(ENOMEM);
92− ast->codec->codec_type = CODEC_TYPE_AUDIO;
92+ ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
9393 ast->codec->codec_id = CODEC_ID_PCM_S32BE;
9494 ast->codec->channels = tmp;
9595 av_set_pts_info(ast, 32, 1, st->time_base.den);
libavformat/raw.c+7−7
@@ -74,14 +74,14 @@ static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap) · 73 unmodified lines
7474
7575 id = s->iformat->value;
7676 if (id == CODEC_ID_RAWVIDEO) {
77− st->codec->codec_type = CODEC_TYPE_VIDEO;
77+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
7878 } else {
79− st->codec->codec_type = CODEC_TYPE_AUDIO;
79+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
8080 }
8181 st->codec->codec_id = id;
8282
8383 switch(st->codec->codec_type) {
84− case CODEC_TYPE_AUDIO:
84+ case AVMEDIA_TYPE_AUDIO:
8585 st->codec->sample_rate = ap->sample_rate;
8686 if(ap->channels) st->codec->channels = ap->channels;
8787 else st->codec->channels = 1;
@@ -90,7 +90,7 @@ static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap) · 2 unmodified lines
9090 st->codec->block_align = st->codec->bits_per_coded_sample*st->codec->channels/8;
9191 av_set_pts_info(st, 64, 1, st->codec->sample_rate);
9292 break;
93− case CODEC_TYPE_VIDEO:
93+ case AVMEDIA_TYPE_VIDEO:
9494 if(ap->time_base.num)
9595 av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den);
9696 else
@@ -253,7 +253,7 @@ static int audio_read_header(AVFormatContext *s, · 156 unmodified lines
253253 AVStream *st = av_new_stream(s, 0);
254254 if (!st)
255255 return AVERROR(ENOMEM);
256− st->codec->codec_type = CODEC_TYPE_AUDIO;
256+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
257257 st->codec->codec_id = s->iformat->value;
258258 st->need_parsing = AVSTREAM_PARSE_FULL;
259259 /* the parameters will be extracted from the compressed bitstream */
@@ -271,7 +271,7 @@ static int video_read_header(AVFormatContext *s, · 11 unmodified lines
271271 if (!st)
272272 return AVERROR(ENOMEM);
273273
274− st->codec->codec_type = CODEC_TYPE_VIDEO;
274+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
275275 st->codec->codec_id = s->iformat->value;
276276 st->need_parsing = AVSTREAM_PARSE_FULL;
277277
@@ -700,7 +700,7 @@ static int adts_aac_read_header(AVFormatContext *s, · 422 unmodified lines
700700 if (!st)
701701 return AVERROR(ENOMEM);
702702
703− st->codec->codec_type = CODEC_TYPE_AUDIO;
703+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
704704 st->codec->codec_id = s->iformat->value;
705705 st->need_parsing = AVSTREAM_PARSE_FULL;
706706
libavformat/rdt.c+4−4
@@ -546,10 +546,10 @@ static RTPDynamicProtocolHandler ff_rdt_ ## n ## _handler = { \ · 545 unmodified lines
546546 .parse_packet = rdt_parse_packet \
547547 };
548548
549−RDT_HANDLER(live_video, "x-pn-multirate-realvideo-live", CODEC_TYPE_VIDEO);
550−RDT_HANDLER(live_audio, "x-pn-multirate-realaudio-live", CODEC_TYPE_AUDIO);
551−RDT_HANDLER(video, "x-pn-realvideo", CODEC_TYPE_VIDEO);
552−RDT_HANDLER(audio, "x-pn-realaudio", CODEC_TYPE_AUDIO);
549+RDT_HANDLER(live_video, "x-pn-multirate-realvideo-live", AVMEDIA_TYPE_VIDEO);
550+RDT_HANDLER(live_audio, "x-pn-multirate-realaudio-live", AVMEDIA_TYPE_AUDIO);
551+RDT_HANDLER(video, "x-pn-realvideo", AVMEDIA_TYPE_VIDEO);
552+RDT_HANDLER(audio, "x-pn-realaudio", AVMEDIA_TYPE_AUDIO);
553553
554554 void av_register_rdt_dynamic_payload_handlers(void)
555555 {
libavformat/riff.c+3−3
@@ -461,7 +461,7 @@ void ff_get_wav_header(ByteIOContext *pb, AVCodecContext *codec, int size) · 460 unmodified lines
461461 int id;
462462
463463 id = get_le16(pb);
464− codec->codec_type = CODEC_TYPE_AUDIO;
464+ codec->codec_type = AVMEDIA_TYPE_AUDIO;
465465 codec->codec_tag = id;
466466 codec->channels = get_le16(pb);
467467 codec->sample_rate = get_le32(pb);
@@ -527,8 +527,8 @@ void ff_parse_specific_params(AVCodecContext *stream, int *au_rate, int *au_ssiz · 59 unmodified lines
527527 if(stream->frame_size && stream->sample_rate){
528528 *au_scale=stream->frame_size;
529529 *au_rate= stream->sample_rate;
530− }else if(stream->codec_type == CODEC_TYPE_VIDEO ||
531− stream->codec_type == CODEC_TYPE_SUBTITLE){
530+ }else if(stream->codec_type == AVMEDIA_TYPE_VIDEO ||
531+ stream->codec_type == AVMEDIA_TYPE_SUBTITLE){
532532 *au_scale= stream->time_base.num;
533533 *au_rate = stream->time_base.den;
534534 }else{
libavformat/rl2.c+2−2
@@ -116,7 +116,7 @@ static av_cold int rl2_read_header(AVFormatContext *s, · 115 unmodified lines
116116 if(!st)
117117 return AVERROR(ENOMEM);
118118
119− st->codec->codec_type = CODEC_TYPE_VIDEO;
119+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
120120 st->codec->codec_id = CODEC_ID_RL2;
121121 st->codec->codec_tag = 0; /* no fourcc */
122122 st->codec->width = 320;
@@ -145,7 +145,7 @@ static av_cold int rl2_read_header(AVFormatContext *s, · 22 unmodified lines
145145 st = av_new_stream(s, 0);
146146 if (!st)
147147 return AVERROR(ENOMEM);
148− st->codec->codec_type = CODEC_TYPE_AUDIO;
148+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
149149 st->codec->codec_id = CODEC_ID_PCM_U8;
150150 st->codec->codec_tag = 1;
151151 st->codec->channels = channels;
libavformat/rmdec.c+9−9
@@ -161,7 +161,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, ByteIOContext *pb, · 160 unmodified lines
161161 url_fskip(pb, header_size + startpos - url_ftell(pb));
162162 st->codec->sample_rate = 8000;
163163 st->codec->channels = 1;
164− st->codec->codec_type = CODEC_TYPE_AUDIO;
164+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
165165 st->codec->codec_id = CODEC_ID_RA_144;
166166 } else {
167167 int flavor, sub_packet_h, coded_framesize, sub_packet_size;
@@ -195,7 +195,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, ByteIOContext *pb, · 27 unmodified lines
195195 get_str8(pb, buf, sizeof(buf)); /* desc */
196196 get_str8(pb, buf, sizeof(buf)); /* desc */
197197 }
198− st->codec->codec_type = CODEC_TYPE_AUDIO;
198+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
199199 st->codec->codec_tag = AV_RL32(buf);
200200 st->codec->codec_id = ff_codec_get_id(rm_codec_tags, st->codec->codec_tag);
201201 switch (st->codec->codec_id) {
@@ -316,7 +316,7 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, ByteIOContext *pb, · 114 unmodified lines
316316 st->codec->height = get_be16(pb);
317317 st->codec->time_base.num= 1;
318318 fps= get_be16(pb);
319− st->codec->codec_type = CODEC_TYPE_VIDEO;
319+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
320320 get_be32(pb);
321321 fps2= get_be16(pb);
322322 get_be16(pb);
@@ -479,7 +479,7 @@ static int rm_read_header(AVFormatContext *s, AVFormatParameters *ap) · 156 unmodified lines
479479 st->duration = duration;
480480 get_str8(pb, buf, sizeof(buf)); /* desc */
481481 get_str8(pb, buf, sizeof(buf)); /* mimetype */
482− st->codec->codec_type = CODEC_TYPE_DATA;
482+ st->codec->codec_type = AVMEDIA_TYPE_DATA;
483483 st->priv_data = ff_rm_alloc_rmstream();
484484 if (ff_rm_read_mdpr_codecdata(s, s->pb, st, st->priv_data,
485485 get_be32(pb)) < 0)
@@ -725,11 +725,11 @@ ff_rm_parse_packet (AVFormatContext *s, ByteIOContext *pb, · 239 unmodified lines
725725 {
726726 RMDemuxContext *rm = s->priv_data;
727727
728− if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
728+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
729729 rm->current_stream= st->id;
730730 if(rm_assemble_video_frame(s, pb, rm, ast, pkt, len, seq))
731731 return -1; //got partial frame
732− } else if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
732+ } else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
733733 if ((st->codec->codec_id == CODEC_ID_RA_288) ||
734734 (st->codec->codec_id == CODEC_ID_COOK) ||
735735 (st->codec->codec_id == CODEC_ID_ATRAC3) ||
@@ -790,7 +790,7 @@ ff_rm_parse_packet (AVFormatContext *s, ByteIOContext *pb, · 54 unmodified lines
790790 pkt->stream_index = st->index;
791791
792792 #if 0
793− if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
793+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
794794 if(st->codec->codec_id == CODEC_ID_RV20){
795795 int seq= 128*(pkt->data[2]&0x7F) + (pkt->data[3]>>1);
796796 av_log(s, AV_LOG_DEBUG, "%d %"PRId64" %d\n", *timestamp, *timestamp*512LL/25, seq);
@@ -806,7 +806,7 @@ ff_rm_parse_packet (AVFormatContext *s, ByteIOContext *pb, · 9 unmodified lines
806806 if (flags & 2)
807807 pkt->flags |= PKT_FLAG_KEY;
808808
809− return st->codec->codec_type == CODEC_TYPE_AUDIO ? rm->audio_pkt_cnt : 0;
809+ return st->codec->codec_type == AVMEDIA_TYPE_AUDIO ? rm->audio_pkt_cnt : 0;
810810 }
811811
812812 int
@@ -932,7 +932,7 @@ static int64_t rm_read_dts(AVFormatContext *s, int stream_index, · 119 unmodified lines
932932 return AV_NOPTS_VALUE;
933933
934934 st = s->streams[stream_index2];
935− if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
935+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
936936 h= get_byte(s->pb); len--;
937937 if(!(h & 0x40)){
938938 seq = get_byte(s->pb); len--;
libavformat/rmenc.c+5−5
@@ -141,7 +141,7 @@ static void rv10_write_header(AVFormatContext *ctx, · 140 unmodified lines
141141
142142 stream = &rm->streams[i];
143143
144− if (stream->enc->codec_type == CODEC_TYPE_AUDIO) {
144+ if (stream->enc->codec_type == AVMEDIA_TYPE_AUDIO) {
145145 desc = "The Audio Stream";
146146 mimetype = "audio/x-pn-realaudio";
147147 codec_data_size = 73;
@@ -177,7 +177,7 @@ static void rv10_write_header(AVFormatContext *ctx, · 29 unmodified lines
177177 put_str8(s, mimetype);
178178 put_be32(s, codec_data_size);
179179
180− if (stream->enc->codec_type == CODEC_TYPE_AUDIO) {
180+ if (stream->enc->codec_type == AVMEDIA_TYPE_AUDIO) {
181181 int coded_frame_size, fscode, sample_rate;
182182 sample_rate = stream->enc->sample_rate;
183183 coded_frame_size = (stream->enc->bit_rate *
@@ -309,7 +309,7 @@ static int rm_write_header(AVFormatContext *s) · 125 unmodified lines
309309 stream->enc = codec;
310310
311311 switch(codec->codec_type) {
312− case CODEC_TYPE_AUDIO:
312+ case AVMEDIA_TYPE_AUDIO:
313313 rm->audio_stream = stream;
314314 stream->frame_rate = (float)codec->sample_rate / (float)codec->frame_size;
315315 /* XXX: dummy values */
@@ -317,7 +317,7 @@ static int rm_write_header(AVFormatContext *s) · 1 unmodified line
317317 stream->nb_packets = 0;
318318 stream->total_frames = stream->nb_packets;
319319 break;
320− case CODEC_TYPE_VIDEO:
320+ case AVMEDIA_TYPE_VIDEO:
321321 rm->video_stream = stream;
322322 stream->frame_rate = (float)codec->time_base.den / (float)codec->time_base.num;
323323 /* XXX: dummy values */
@@ -408,7 +408,7 @@ static int rm_write_video(AVFormatContext *s, const uint8_t *buf, int size, int · 84 unmodified lines
408408 static int rm_write_packet(AVFormatContext *s, AVPacket *pkt)
409409 {
410410 if (s->streams[pkt->stream_index]->codec->codec_type ==
411− CODEC_TYPE_AUDIO)
411+ AVMEDIA_TYPE_AUDIO)
412412 return rm_write_audio(s, pkt->data, pkt->size, pkt->flags);
413413 else
414414 return rm_write_video(s, pkt->data, pkt->size, pkt->flags);
libavformat/rpl.c+4−4
@@ -141,7 +141,7 @@ static int rpl_read_header(AVFormatContext *s, AVFormatParameters *ap) · 140 unmodified lines
141141 vst = av_new_stream(s, 0);
142142 if (!vst)
143143 return AVERROR(ENOMEM);
144− vst->codec->codec_type = CODEC_TYPE_VIDEO;
144+ vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
145145 vst->codec->codec_tag = read_line_and_int(pb, &error); // video format
146146 vst->codec->width = read_line_and_int(pb, &error); // video width
147147 vst->codec->height = read_line_and_int(pb, &error); // video height
@@ -183,7 +183,7 @@ static int rpl_read_header(AVFormatContext *s, AVFormatParameters *ap) · 35 unmodified lines
183183 ast = av_new_stream(s, 0);
184184 if (!ast)
185185 return AVERROR(ENOMEM);
186− ast->codec->codec_type = CODEC_TYPE_AUDIO;
186+ ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
187187 ast->codec->codec_tag = audio_format;
188188 ast->codec->sample_rate = read_line_and_int(pb, &error); // audio bitrate
189189 ast->codec->channels = read_line_and_int(pb, &error); // number of audio channels
@@ -295,7 +295,7 @@ static int rpl_read_packet(AVFormatContext *s, AVPacket *pkt) · 105 unmodified lines
295295 if (url_fseek(pb, index_entry->pos, SEEK_SET) < 0)
296296 return AVERROR(EIO);
297297
298− if (stream->codec->codec_type == CODEC_TYPE_VIDEO &&
298+ if (stream->codec->codec_type == AVMEDIA_TYPE_VIDEO &&
299299 stream->codec->codec_tag == 124) {
300300 // We have to split Escape 124 frames because there are
301301 // multiple frames per chunk in Escape 124 samples.
@@ -327,7 +327,7 @@ static int rpl_read_packet(AVFormatContext *s, AVPacket *pkt) · 25 unmodified lines
327327 return AVERROR(EIO);
328328 }
329329
330− if (stream->codec->codec_type == CODEC_TYPE_VIDEO) {
330+ if (stream->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
331331 // frames_per_chunk should always be one here; the header
332332 // parsing will warn if it isn't.
333333 pkt->duration = rpl->frames_per_chunk;
libavformat/rtp.c+29−29
@@ -35,39 +35,39 @@ static const struct · 34 unmodified lines
3535 {
3636 int pt;
3737 const char enc_name[6];
38− enum CodecType codec_type;
38+ enum AVMediaType codec_type;
3939 enum CodecID codec_id;
4040 int clock_rate;
4141 int audio_channels;
4242 } AVRtpPayloadTypes[]=
4343 {
44− {0, "PCMU", CODEC_TYPE_AUDIO, CODEC_ID_PCM_MULAW, 8000, 1},
45− {3, "GSM", CODEC_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},
46− {4, "G723", CODEC_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},
47− {5, "DVI4", CODEC_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},
48− {6, "DVI4", CODEC_TYPE_AUDIO, CODEC_ID_NONE, 16000, 1},
49− {7, "LPC", CODEC_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},
50− {8, "PCMA", CODEC_TYPE_AUDIO, CODEC_ID_PCM_ALAW, 8000, 1},
51− {9, "G722", CODEC_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},
52− {10, "L16", CODEC_TYPE_AUDIO, CODEC_ID_PCM_S16BE, 44100, 2},
53− {11, "L16", CODEC_TYPE_AUDIO, CODEC_ID_PCM_S16BE, 44100, 1},
54− {12, "QCELP", CODEC_TYPE_AUDIO, CODEC_ID_QCELP, 8000, 1},
55− {13, "CN", CODEC_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},
56− {14, "MPA", CODEC_TYPE_AUDIO, CODEC_ID_MP2, -1, -1},
57− {14, "MPA", CODEC_TYPE_AUDIO, CODEC_ID_MP3, -1, -1},
58− {15, "G728", CODEC_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},
59− {16, "DVI4", CODEC_TYPE_AUDIO, CODEC_ID_NONE, 11025, 1},
60− {17, "DVI4", CODEC_TYPE_AUDIO, CODEC_ID_NONE, 22050, 1},
61− {18, "G729", CODEC_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},
62− {25, "CelB", CODEC_TYPE_VIDEO, CODEC_ID_NONE, 90000, -1},
63− {26, "JPEG", CODEC_TYPE_VIDEO, CODEC_ID_MJPEG, 90000, -1},
64− {28, "nv", CODEC_TYPE_VIDEO, CODEC_ID_NONE, 90000, -1},
65− {31, "H261", CODEC_TYPE_VIDEO, CODEC_ID_H261, 90000, -1},
66− {32, "MPV", CODEC_TYPE_VIDEO, CODEC_ID_MPEG1VIDEO, 90000, -1},
67− {32, "MPV", CODEC_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO, 90000, -1},
68− {33, "MP2T", CODEC_TYPE_DATA, CODEC_ID_MPEG2TS, 90000, -1},
69− {34, "H263", CODEC_TYPE_VIDEO, CODEC_ID_H263, 90000, -1},
70− {-1, "", CODEC_TYPE_UNKNOWN, CODEC_ID_NONE, -1, -1}
44+ {0, "PCMU", AVMEDIA_TYPE_AUDIO, CODEC_ID_PCM_MULAW, 8000, 1},
45+ {3, "GSM", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},
46+ {4, "G723", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},
47+ {5, "DVI4", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},
48+ {6, "DVI4", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 16000, 1},
49+ {7, "LPC", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},
50+ {8, "PCMA", AVMEDIA_TYPE_AUDIO, CODEC_ID_PCM_ALAW, 8000, 1},
51+ {9, "G722", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},
52+ {10, "L16", AVMEDIA_TYPE_AUDIO, CODEC_ID_PCM_S16BE, 44100, 2},
53+ {11, "L16", AVMEDIA_TYPE_AUDIO, CODEC_ID_PCM_S16BE, 44100, 1},
54+ {12, "QCELP", AVMEDIA_TYPE_AUDIO, CODEC_ID_QCELP, 8000, 1},
55+ {13, "CN", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},
56+ {14, "MPA", AVMEDIA_TYPE_AUDIO, CODEC_ID_MP2, -1, -1},
57+ {14, "MPA", AVMEDIA_TYPE_AUDIO, CODEC_ID_MP3, -1, -1},
58+ {15, "G728", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},
59+ {16, "DVI4", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 11025, 1},
60+ {17, "DVI4", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 22050, 1},
61+ {18, "G729", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},
62+ {25, "CelB", AVMEDIA_TYPE_VIDEO, CODEC_ID_NONE, 90000, -1},
63+ {26, "JPEG", AVMEDIA_TYPE_VIDEO, CODEC_ID_MJPEG, 90000, -1},
64+ {28, "nv", AVMEDIA_TYPE_VIDEO, CODEC_ID_NONE, 90000, -1},
65+ {31, "H261", AVMEDIA_TYPE_VIDEO, CODEC_ID_H261, 90000, -1},
66+ {32, "MPV", AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG1VIDEO, 90000, -1},
67+ {32, "MPV", AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO, 90000, -1},
68+ {33, "MP2T", AVMEDIA_TYPE_DATA, CODEC_ID_MPEG2TS, 90000, -1},
69+ {34, "H263", AVMEDIA_TYPE_VIDEO, CODEC_ID_H263, 90000, -1},
70+ {-1, "", AVMEDIA_TYPE_UNKNOWN, CODEC_ID_NONE, -1, -1}
7171 };
7272
7373 int ff_rtp_get_codec_info(AVCodecContext *codec, int payload_type)
@@ -118,7 +118,7 @@ const char *ff_rtp_enc_name(int payload_type) · 44 unmodified lines
118118 return "";
119119 }
120120
121−enum CodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type)
121+enum CodecID ff_rtp_codec_id(const char *buf, enum AVMediaType codec_type)
122122 {
123123 int i;
124124
libavformat/rtp.h+1−1
@@ -66,7 +66,7 @@ const char *ff_rtp_enc_name(int payload_type); · 65 unmodified lines
6666 * @return In case of unknown encoding name, CODEC_ID_NONE is returned;
6767 * otherwise, the codec id is returned
6868 */
69−enum CodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type);
69+enum CodecID ff_rtp_codec_id(const char *buf, enum AVMediaType codec_type);
7070
7171 #define RTP_PT_PRIVATE 96
7272 #define RTP_VERSION 2
libavformat/rtpdec.c+3−3
@@ -51,8 +51,8 @@ · 50 unmodified lines
5151 /* statistics functions */
5252 RTPDynamicProtocolHandler *RTPFirstDynamicPayloadHandler= NULL;
5353
54−static RTPDynamicProtocolHandler mp4v_es_handler= {"MP4V-ES", CODEC_TYPE_VIDEO, CODEC_ID_MPEG4};
55−static RTPDynamicProtocolHandler mpeg4_generic_handler= {"mpeg4-generic", CODEC_TYPE_AUDIO, CODEC_ID_AAC};
54+static RTPDynamicProtocolHandler mp4v_es_handler= {"MP4V-ES", AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG4};
55+static RTPDynamicProtocolHandler mpeg4_generic_handler= {"mpeg4-generic", AVMEDIA_TYPE_AUDIO, CODEC_ID_AAC};
5656
5757 void ff_register_dynamic_payload_handler(RTPDynamicProtocolHandler *handler)
5858 {
@@ -350,7 +350,7 @@ RTPDemuxContext *rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *r · 291 unmodified lines
350350 st->need_parsing = AVSTREAM_PARSE_FULL;
351351 break;
352352 default:
353− if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
353+ if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
354354 av_set_pts_info(st, 32, 1, st->codec->sample_rate);
355355 }
356356 break;
libavformat/rtpdec.h+1−1
@@ -132,7 +132,7 @@ typedef int (*DynamicPayloadPacketHandlerProc) (AVFormatContext *ctx, · 131 unmodified lines
132132 struct RTPDynamicProtocolHandler_s {
133133 // fields from AVRtpDynamicPayloadType_s
134134 const char enc_name[50]; /* XXX: still why 50 ? ;-) */
135− enum CodecType codec_type;
135+ enum AVMediaType codec_type;
136136 enum CodecID codec_id;
137137
138138 // may be null
libavformat/rtpdec_amr.c+2−2
@@ -170,7 +170,7 @@ static int amr_parse_sdp_line(AVFormatContext *s, int st_index, · 169 unmodified lines
170170
171171 RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler = {
172172 .enc_name = "AMR",
173− .codec_type = CODEC_TYPE_AUDIO,
173+ .codec_type = AVMEDIA_TYPE_AUDIO,
174174 .codec_id = CODEC_ID_AMR_NB,
175175 .parse_sdp_a_line = amr_parse_sdp_line,
176176 .parse_packet = amr_handle_packet,
@@ -178,7 +178,7 @@ RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler = { · 1 unmodified line
178178
179179 RTPDynamicProtocolHandler ff_amr_wb_dynamic_handler = {
180180 .enc_name = "AMR-WB",
181− .codec_type = CODEC_TYPE_AUDIO,
181+ .codec_type = AVMEDIA_TYPE_AUDIO,
182182 .codec_id = CODEC_ID_AMR_WB,
183183 .parse_sdp_a_line = amr_parse_sdp_line,
184184 .parse_packet = amr_handle_packet,
libavformat/rtpdec_asf.c+2−2
@@ -277,5 +277,5 @@ RTPDynamicProtocolHandler ff_ms_rtp_ ## n ## _handler = { \ · 276 unmodified lines
277277 .parse_packet = asfrtp_parse_packet, \
278278 };
279279
280−RTP_ASF_HANDLER(asf_pfv, "x-asf-pf", CODEC_TYPE_VIDEO);
281−RTP_ASF_HANDLER(asf_pfa, "x-asf-pf", CODEC_TYPE_AUDIO);
280+RTP_ASF_HANDLER(asf_pfv, "x-asf-pf", AVMEDIA_TYPE_VIDEO);
281+RTP_ASF_HANDLER(asf_pfa, "x-asf-pf", AVMEDIA_TYPE_AUDIO);
libavformat/rtpdec_h263.c+2−2
@@ -94,14 +94,14 @@ static int h263_handle_packet(AVFormatContext *ctx, · 93 unmodified lines
9494
9595 RTPDynamicProtocolHandler ff_h263_1998_dynamic_handler = {
9696 .enc_name = "H263-1998",
97− .codec_type = CODEC_TYPE_VIDEO,
97+ .codec_type = AVMEDIA_TYPE_VIDEO,
9898 .codec_id = CODEC_ID_H263,
9999 .parse_packet = h263_handle_packet,
100100 };
101101
102102 RTPDynamicProtocolHandler ff_h263_2000_dynamic_handler = {
103103 .enc_name = "H263-2000",
104− .codec_type = CODEC_TYPE_VIDEO,
104+ .codec_type = AVMEDIA_TYPE_VIDEO,
105105 .codec_id = CODEC_ID_H263,
106106 .parse_packet = h263_handle_packet,
107107 };
libavformat/rtpdec_h264.c+1−1
@@ -411,7 +411,7 @@ This is the structure for expanding on the dynamic rtp protocols (makes everythi · 410 unmodified lines
411411 */
412412 RTPDynamicProtocolHandler ff_h264_dynamic_handler = {
413413 .enc_name = "H264",
414− .codec_type = CODEC_TYPE_VIDEO,
414+ .codec_type = AVMEDIA_TYPE_VIDEO,
415415 .codec_id = CODEC_ID_H264,
416416 .parse_sdp_a_line = parse_h264_sdp_line,
417417 .open = h264_new_context,
libavformat/rtpdec_theora.c+1−1
@@ -378,7 +378,7 @@ static int theora_parse_sdp_line(AVFormatContext *s, int st_index, · 377 unmodified lines
378378
379379 RTPDynamicProtocolHandler ff_theora_dynamic_handler = {
380380 .enc_name = "theora",
381− .codec_type = CODEC_TYPE_VIDEO,
381+ .codec_type = AVMEDIA_TYPE_VIDEO,
382382 .codec_id = CODEC_ID_THEORA,
383383 .parse_sdp_a_line = theora_parse_sdp_line,
384384 .open = theora_new_context,
libavformat/rtpdec_vorbis.c+1−1
@@ -209,7 +209,7 @@ vorbis_handle_packet(AVFormatContext * ctx, · 208 unmodified lines
209209
210210 RTPDynamicProtocolHandler ff_vorbis_dynamic_handler = {
211211 .enc_name = "vorbis",
212− .codec_type = CODEC_TYPE_AUDIO,
212+ .codec_type = AVMEDIA_TYPE_AUDIO,
213213 .codec_id = CODEC_ID_VORBIS,
214214 .parse_sdp_a_line = NULL,
215215 .open = vorbis_new_context,
libavformat/rtpenc.c+4−4
@@ -78,7 +78,7 @@ static int rtp_write_header(AVFormatContext *s1) · 77 unmodified lines
7878
7979 s->payload_type = ff_rtp_get_payload_type(st->codec);
8080 if (s->payload_type < 0)
81− s->payload_type = RTP_PT_PRIVATE + (st->codec->codec_type == CODEC_TYPE_AUDIO);
81+ s->payload_type = RTP_PT_PRIVATE + (st->codec->codec_type == AVMEDIA_TYPE_AUDIO);
8282
8383 s->base_timestamp = ff_random_get_seed();
8484 s->timestamp = s->base_timestamp;
@@ -102,14 +102,14 @@ static int rtp_write_header(AVFormatContext *s1) · 17 unmodified lines
102102
103103 s->max_frames_per_packet = 0;
104104 if (s1->max_delay) {
105− if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
105+ if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
106106 if (st->codec->frame_size == 0) {
107107 av_log(s1, AV_LOG_ERROR, "Cannot respect max delay: frame size = 0\n");
108108 } else {
109109 s->max_frames_per_packet = av_rescale_rnd(s1->max_delay, st->codec->sample_rate, AV_TIME_BASE * st->codec->frame_size, AV_ROUND_DOWN);
110110 }
111111 }
112− if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
112+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
113113 /* FIXME: We should round down here... */
114114 s->max_frames_per_packet = av_rescale_q(s1->max_delay, (AVRational){1, 1000000}, st->codec->time_base);
115115 }
@@ -151,7 +151,7 @@ static int rtp_write_header(AVFormatContext *s1) · 35 unmodified lines
151151 case CODEC_ID_AAC:
152152 s->num_frames = 0;
153153 default:
154− if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
154+ if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
155155 av_set_pts_info(st, 32, 1, st->codec->sample_rate);
156156 }
157157 s->buf_ptr = s->buf;
libavformat/rtsp.c+7−7
@@ -141,7 +141,7 @@ static int sdp_parse_rtpmap(AVFormatContext *s, · 140 unmodified lines
141141 get_word_sep(buf, sizeof(buf), "/", &p);
142142 i = atoi(buf);
143143 switch (codec->codec_type) {
144− case CODEC_TYPE_AUDIO:
144+ case AVMEDIA_TYPE_AUDIO:
145145 av_log(s, AV_LOG_DEBUG, "audio codec set to: %s\n", c_name);
146146 codec->sample_rate = RTSP_DEFAULT_AUDIO_SAMPLERATE;
147147 codec->channels = RTSP_DEFAULT_NB_AUDIO_CHANNELS;
@@ -161,7 +161,7 @@ static int sdp_parse_rtpmap(AVFormatContext *s, · 13 unmodified lines
161161 av_log(s, AV_LOG_DEBUG, "audio channels set to: %i\n",
162162 codec->channels);
163163 break;
164− case CODEC_TYPE_VIDEO:
164+ case AVMEDIA_TYPE_VIDEO:
165165 av_log(s, AV_LOG_DEBUG, "video codec set to: %s\n", c_name);
166166 break;
167167 default:
@@ -343,7 +343,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1, · 175 unmodified lines
343343 RTSPState *rt = s->priv_data;
344344 char buf1[64], st_type[64];
345345 const char *p;
346− enum CodecType codec_type;
346+ enum AVMediaType codec_type;
347347 int payload_type, i;
348348 AVStream *st;
349349 RTSPStream *rtsp_st;
@@ -396,11 +396,11 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1, · 46 unmodified lines
396396 s1->skip_media = 0;
397397 get_word(st_type, sizeof(st_type), &p);
398398 if (!strcmp(st_type, "audio")) {
399− codec_type = CODEC_TYPE_AUDIO;
399+ codec_type = AVMEDIA_TYPE_AUDIO;
400400 } else if (!strcmp(st_type, "video")) {
401− codec_type = CODEC_TYPE_VIDEO;
401+ codec_type = AVMEDIA_TYPE_VIDEO;
402402 } else if (!strcmp(st_type, "application")) {
403− codec_type = CODEC_TYPE_DATA;
403+ codec_type = AVMEDIA_TYPE_DATA;
404404 } else {
405405 s1->skip_media = 1;
406406 return;
@@ -1181,7 +1181,7 @@ static int make_setup_request(AVFormatContext *s, const char *host, int port, · 774 unmodified lines
11811181 * will return an error. Therefore, we skip those streams. */
11821182 if (rt->server_type == RTSP_SERVER_WMS &&
11831183 s->streams[rtsp_st->stream_index]->codec->codec_type ==
1184− CODEC_TYPE_DATA)
1184+ AVMEDIA_TYPE_DATA)
11851185 continue;
11861186 snprintf(transport, sizeof(transport) - 1,
11871187 "%s/TCP;", trans_pref);
libavformat/sdp.c+4−4
@@ -301,13 +301,13 @@ static void sdp_write_media(char *buff, int size, AVCodecContext *c, const char · 300 unmodified lines
301301
302302 payload_type = ff_rtp_get_payload_type(c);
303303 if (payload_type < 0) {
304− payload_type = RTP_PT_PRIVATE + (c->codec_type == CODEC_TYPE_AUDIO);
304+ payload_type = RTP_PT_PRIVATE + (c->codec_type == AVMEDIA_TYPE_AUDIO);
305305 }
306306
307307 switch (c->codec_type) {
308− case CODEC_TYPE_VIDEO : type = "video" ; break;
309− case CODEC_TYPE_AUDIO : type = "audio" ; break;
310− case CODEC_TYPE_SUBTITLE: type = "text" ; break;
308+ case AVMEDIA_TYPE_VIDEO : type = "video" ; break;
309+ case AVMEDIA_TYPE_AUDIO : type = "audio" ; break;
310+ case AVMEDIA_TYPE_SUBTITLE: type = "text" ; break;
311311 default : type = "application"; break;
312312 }
313313
libavformat/segafilm.c+2−2
@@ -133,7 +133,7 @@ static int film_read_header(AVFormatContext *s, · 132 unmodified lines
133133 if (!st)
134134 return AVERROR(ENOMEM);
135135 film->video_stream_index = st->index;
136− st->codec->codec_type = CODEC_TYPE_VIDEO;
136+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
137137 st->codec->codec_id = film->video_type;
138138 st->codec->codec_tag = 0; /* no fourcc */
139139 st->codec->width = AV_RB32(&scratch[16]);
@@ -145,7 +145,7 @@ static int film_read_header(AVFormatContext *s, · 5 unmodified lines
145145 if (!st)
146146 return AVERROR(ENOMEM);
147147 film->audio_stream_index = st->index;
148− st->codec->codec_type = CODEC_TYPE_AUDIO;
148+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
149149 st->codec->codec_id = film->audio_type;
150150 st->codec->codec_tag = 1;
151151 st->codec->channels = film->audio_channels;
libavformat/sierravmd.c+2−2
@@ -109,7 +109,7 @@ static int vmd_read_header(AVFormatContext *s, · 108 unmodified lines
109109 return AVERROR(ENOMEM);
110110 av_set_pts_info(vst, 33, 1, 10);
111111 vmd->video_stream_index = vst->index;
112− vst->codec->codec_type = CODEC_TYPE_VIDEO;
112+ vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
113113 vst->codec->codec_id = vmd->is_indeo3 ? CODEC_ID_INDEO3 : CODEC_ID_VMDVIDEO;
114114 vst->codec->codec_tag = 0; /* no fourcc */
115115 vst->codec->width = AV_RL16(&vmd->vmd_header[12]);
@@ -129,7 +129,7 @@ static int vmd_read_header(AVFormatContext *s, · 13 unmodified lines
129129 if (!st)
130130 return AVERROR(ENOMEM);
131131 vmd->audio_stream_index = st->index;
132− st->codec->codec_type = CODEC_TYPE_AUDIO;
132+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
133133 st->codec->codec_id = CODEC_ID_VMDAUDIO;
134134 st->codec->codec_tag = 0; /* no fourcc */
135135 st->codec->channels = (vmd->vmd_header[811] & 0x80) ? 2 : 1;
libavformat/siff.c+2−2
@@ -74,7 +74,7 @@ static int create_audio_stream(AVFormatContext *s, SIFFContext *c) · 73 unmodified lines
7474 ast = av_new_stream(s, 0);
7575 if (!ast)
7676 return -1;
77− ast->codec->codec_type = CODEC_TYPE_AUDIO;
77+ ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
7878 ast->codec->codec_id = CODEC_ID_PCM_U8;
7979 ast->codec->channels = 1;
8080 ast->codec->bits_per_coded_sample = c->bits;
@@ -118,7 +118,7 @@ static int siff_parse_vbv1(AVFormatContext *s, SIFFContext *c, ByteIOContext *pb · 37 unmodified lines
118118 st = av_new_stream(s, 0);
119119 if (!st)
120120 return -1;
121− st->codec->codec_type = CODEC_TYPE_VIDEO;
121+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
122122 st->codec->codec_id = CODEC_ID_VB;
123123 st->codec->codec_tag = MKTAG('V', 'B', 'V', '1');
124124 st->codec->width = width;
libavformat/smacker.c+2−2
@@ -158,7 +158,7 @@ static int smacker_read_header(AVFormatContext *s, AVFormatParameters *ap) · 157 unmodified lines
158158 st->codec->width = smk->width;
159159 st->codec->height = smk->height;
160160 st->codec->pix_fmt = PIX_FMT_PAL8;
161− st->codec->codec_type = CODEC_TYPE_VIDEO;
161+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
162162 st->codec->codec_id = CODEC_ID_SMACKVIDEO;
163163 st->codec->codec_tag = smk->magic;
164164 /* Smacker uses 100000 as internal timebase */
@@ -176,7 +176,7 @@ static int smacker_read_header(AVFormatContext *s, AVFormatParameters *ap) · 11 unmodified lines
176176 if(smk->rates[i] & 0xFFFFFF){
177177 ast[i] = av_new_stream(s, 0);
178178 smk->indexes[i] = ast[i]->index;
179− ast[i]->codec->codec_type = CODEC_TYPE_AUDIO;
179+ ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO;
180180 if (smk->rates[i] & SMK_AUD_BINKAUD) {
181181 ast[i]->codec->codec_id = CODEC_ID_BINKAUDIO_RDFT;
182182 } else if (smk->rates[i] & SMK_AUD_USEDCT) {
libavformat/sol.c+1−1
@@ -114,7 +114,7 @@ static int sol_read_header(AVFormatContext *s, · 113 unmodified lines
114114 st = av_new_stream(s, 0);
115115 if (!st)
116116 return -1;
117− st->codec->codec_type = CODEC_TYPE_AUDIO;
117+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
118118 st->codec->codec_tag = id;
119119 st->codec->codec_id = codec;
120120 st->codec->channels = channels;
libavformat/soxdec.c+1−1
@@ -53,7 +53,7 @@ static int sox_read_header(AVFormatContext *s, · 52 unmodified lines
5353 if (!st)
5454 return AVERROR(ENOMEM);
5555
56− st->codec->codec_type = CODEC_TYPE_AUDIO;
56+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
5757
5858 if (get_le32(pb) == SOX_TAG) {
5959 st->codec->codec_id = CODEC_ID_PCM_S32LE;
libavformat/swfdec.c+7−7
@@ -97,7 +97,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) · 96 unmodified lines
9797
9898 for (i=0; i<s->nb_streams; i++) {
9999 st = s->streams[i];
100− if (st->codec->codec_type == CODEC_TYPE_VIDEO && st->id == ch_id)
100+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && st->id == ch_id)
101101 goto skip;
102102 }
103103
@@ -109,7 +109,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) · 5 unmodified lines
109109 vst = av_new_stream(s, ch_id);
110110 if (!vst)
111111 return -1;
112− vst->codec->codec_type = CODEC_TYPE_VIDEO;
112+ vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
113113 vst->codec->codec_id = ff_codec_get_id(swf_codec_tags, get_byte(pb));
114114 av_set_pts_info(vst, 16, 256, swf->frame_rate);
115115 vst->codec->time_base = (AVRational){ 256, swf->frame_rate };
@@ -120,7 +120,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) · 4 unmodified lines
120120
121121 for (i=0; i<s->nb_streams; i++) {
122122 st = s->streams[i];
123− if (st->codec->codec_type == CODEC_TYPE_AUDIO && st->id == -1)
123+ if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->id == -1)
124124 goto skip;
125125 }
126126
@@ -131,7 +131,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) · 4 unmodified lines
131131 if (!ast)
132132 return -1;
133133 ast->codec->channels = 1 + (v&1);
134− ast->codec->codec_type = CODEC_TYPE_AUDIO;
134+ ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
135135 ast->codec->codec_id = ff_codec_get_id(swf_audio_codec_tags, (v>>4) & 15);
136136 ast->need_parsing = AVSTREAM_PARSE_FULL;
137137 sample_rate_code= (v>>2) & 3;
@@ -145,7 +145,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) · 7 unmodified lines
145145 len -= 2;
146146 for(i=0; i<s->nb_streams; i++) {
147147 st = s->streams[i];
148− if (st->codec->codec_type == CODEC_TYPE_VIDEO && st->id == ch_id) {
148+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && st->id == ch_id) {
149149 frame = get_le16(pb);
150150 av_get_packet(pb, pkt, len-2);
151151 pkt->pos = pos;
@@ -157,7 +157,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) · 5 unmodified lines
157157 } else if (tag == TAG_STREAMBLOCK) {
158158 for (i = 0; i < s->nb_streams; i++) {
159159 st = s->streams[i];
160− if (st->codec->codec_type == CODEC_TYPE_AUDIO && st->id == -1) {
160+ if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->id == -1) {
161161 if (st->codec->codec_id == CODEC_ID_MP3) {
162162 url_fskip(pb, 4);
163163 av_get_packet(pb, pkt, len-4);
@@ -179,7 +179,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt) · 15 unmodified lines
179179 vst = av_new_stream(s, -2); /* -2 to avoid clash with video stream and audio stream */
180180 if (!vst)
181181 return -1;
182− vst->codec->codec_type = CODEC_TYPE_VIDEO;
182+ vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
183183 vst->codec->codec_id = CODEC_ID_MJPEG;
184184 av_set_pts_info(vst, 64, 256, swf->frame_rate);
185185 vst->codec->time_base = (AVRational){ 256, swf->frame_rate };
libavformat/swfenc.c+3−3
@@ -185,7 +185,7 @@ static int swf_write_header(AVFormatContext *s) · 184 unmodified lines
185185
186186 for(i=0;i<s->nb_streams;i++) {
187187 AVCodecContext *enc = s->streams[i]->codec;
188− if (enc->codec_type == CODEC_TYPE_AUDIO) {
188+ if (enc->codec_type == AVMEDIA_TYPE_AUDIO) {
189189 if (enc->codec_id == CODEC_ID_MP3) {
190190 if (!enc->frame_size) {
191191 av_log(s, AV_LOG_ERROR, "audio frame size not set\n");
@@ -464,7 +464,7 @@ static int swf_write_audio(AVFormatContext *s, · 272 unmodified lines
464464 static int swf_write_packet(AVFormatContext *s, AVPacket *pkt)
465465 {
466466 AVCodecContext *codec = s->streams[pkt->stream_index]->codec;
467− if (codec->codec_type == CODEC_TYPE_AUDIO)
467+ if (codec->codec_type == AVMEDIA_TYPE_AUDIO)
468468 return swf_write_audio(s, codec, pkt->data, pkt->size);
469469 else
470470 return swf_write_video(s, codec, pkt->data, pkt->size);
@@ -480,7 +480,7 @@ static int swf_write_trailer(AVFormatContext *s) · 9 unmodified lines
480480 video_enc = NULL;
481481 for(i=0;i<s->nb_streams;i++) {
482482 enc = s->streams[i]->codec;
483− if (enc->codec_type == CODEC_TYPE_VIDEO)
483+ if (enc->codec_type == AVMEDIA_TYPE_VIDEO)
484484 video_enc = enc;
485485 else
486486 av_fifo_free(swf->audio_fifo);
libavformat/thp.c+2−2
@@ -100,7 +100,7 @@ static int thp_read_header(AVFormatContext *s, · 99 unmodified lines
100100 /* The denominator and numerator are switched because 1/fps
101101 is required. */
102102 av_set_pts_info(st, 64, thp->fps.den, thp->fps.num);
103− st->codec->codec_type = CODEC_TYPE_VIDEO;
103+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
104104 st->codec->codec_id = CODEC_ID_THP;
105105 st->codec->codec_tag = 0; /* no fourcc */
106106 st->codec->width = get_be32(pb);
@@ -120,7 +120,7 @@ static int thp_read_header(AVFormatContext *s, · 13 unmodified lines
120120 if (!st)
121121 return AVERROR(ENOMEM);
122122
123− st->codec->codec_type = CODEC_TYPE_AUDIO;
123+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
124124 st->codec->codec_id = CODEC_ID_ADPCM_THP;
125125 st->codec->codec_tag = 0; /* no fourcc */
126126 st->codec->channels = get_be32(pb); /* numChannels. */
libavformat/tiertexseq.c+2−2
@@ -212,7 +212,7 @@ static int seq_read_header(AVFormatContext *s, AVFormatParameters *ap) · 211 unmodified lines
212212
213213 av_set_pts_info(st, 32, 1, SEQ_FRAME_RATE);
214214 seq->video_stream_index = st->index;
215− st->codec->codec_type = CODEC_TYPE_VIDEO;
215+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
216216 st->codec->codec_id = CODEC_ID_TIERTEXSEQVIDEO;
217217 st->codec->codec_tag = 0; /* no fourcc */
218218 st->codec->width = SEQ_FRAME_W;
@@ -225,7 +225,7 @@ static int seq_read_header(AVFormatContext *s, AVFormatParameters *ap) · 6 unmodified lines
225225
226226 av_set_pts_info(st, 32, 1, SEQ_SAMPLE_RATE);
227227 seq->audio_stream_index = st->index;
228− st->codec->codec_type = CODEC_TYPE_AUDIO;
228+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
229229 st->codec->codec_id = CODEC_ID_PCM_S16BE;
230230 st->codec->codec_tag = 0; /* no tag */
231231 st->codec->channels = 1;
libavformat/tmv.c+2−2
@@ -109,7 +109,7 @@ static int tmv_read_header(AVFormatContext *s, AVFormatParameters *ap) · 108 unmodified lines
109109 return -1;
110110 }
111111
112− ast->codec->codec_type = CODEC_TYPE_AUDIO;
112+ ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
113113 ast->codec->codec_id = CODEC_ID_PCM_U8;
114114 ast->codec->channels = features & TMV_STEREO ? 2 : 1;
115115 ast->codec->bits_per_coded_sample = 8;
@@ -121,7 +121,7 @@ static int tmv_read_header(AVFormatContext *s, AVFormatParameters *ap) · 5 unmodified lines
121121 fps.den = tmv->audio_chunk_size;
122122 av_reduce(&fps.num, &fps.den, fps.num, fps.den, 0xFFFFFFFFLL);
123123
124− vst->codec->codec_type = CODEC_TYPE_VIDEO;
124+ vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
125125 vst->codec->codec_id = CODEC_ID_TMV;
126126 vst->codec->pix_fmt = PIX_FMT_PAL8;
127127 vst->codec->width = char_cols * 8;
libavformat/tta.c+1−1
@@ -101,7 +101,7 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap) · 100 unmodified lines
101101 }
102102 url_fskip(s->pb, 4); // seektable crc
103103
104− st->codec->codec_type = CODEC_TYPE_AUDIO;
104+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
105105 st->codec->codec_id = CODEC_ID_TTA;
106106 st->codec->channels = channels;
107107 st->codec->sample_rate = samplerate;
libavformat/txd.c+1−1
@@ -43,7 +43,7 @@ static int txd_read_header(AVFormatContext *s, AVFormatParameters *ap) { · 42 unmodified lines
4343 st = av_new_stream(s, 0);
4444 if (!st)
4545 return AVERROR(ENOMEM);
46− st->codec->codec_type = CODEC_TYPE_VIDEO;
46+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
4747 st->codec->codec_id = CODEC_ID_TXD;
4848 st->codec->time_base.den = 5;
4949 st->codec->time_base.num = 1;
libavformat/utils.c+38−38
@@ -254,8 +254,8 @@ AVOutputFormat *guess_stream_format(const char *short_name, const char *filename · 253 unmodified lines
254254 #endif
255255
256256 enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
257− const char *filename, const char *mime_type, enum CodecType type){
258− if(type == CODEC_TYPE_VIDEO){
257+ const char *filename, const char *mime_type, enum AVMediaType type){
258+ if(type == AVMEDIA_TYPE_VIDEO){
259259 enum CodecID codec_id= CODEC_ID_NONE;
260260
261261 #if CONFIG_IMAGE2_MUXER
@@ -266,7 +266,7 @@ enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name, · 4 unmodified lines
266266 if(codec_id == CODEC_ID_NONE)
267267 codec_id= fmt->video_codec;
268268 return codec_id;
269− }else if(type == CODEC_TYPE_AUDIO)
269+ }else if(type == AVMEDIA_TYPE_AUDIO)
270270 return fmt->audio_codec;
271271 else
272272 return CODEC_ID_NONE;
@@ -351,25 +351,25 @@ static int set_codec_from_probe_data(AVFormatContext *s, AVStream *st, AVProbeDa · 78 unmodified lines
351351 pd->buf_size, MAX_PROBE_PACKETS - st->probe_packets, fmt->name, score);
352352 if (!strcmp(fmt->name, "mp3")) {
353353 st->codec->codec_id = CODEC_ID_MP3;
354− st->codec->codec_type = CODEC_TYPE_AUDIO;
354+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
355355 } else if (!strcmp(fmt->name, "ac3")) {
356356 st->codec->codec_id = CODEC_ID_AC3;
357− st->codec->codec_type = CODEC_TYPE_AUDIO;
357+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
358358 } else if (!strcmp(fmt->name, "eac3")) {
359359 st->codec->codec_id = CODEC_ID_EAC3;
360− st->codec->codec_type = CODEC_TYPE_AUDIO;
360+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
361361 } else if (!strcmp(fmt->name, "mpegvideo")) {
362362 st->codec->codec_id = CODEC_ID_MPEG2VIDEO;
363− st->codec->codec_type = CODEC_TYPE_VIDEO;
363+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
364364 } else if (!strcmp(fmt->name, "m4v")) {
365365 st->codec->codec_id = CODEC_ID_MPEG4;
366− st->codec->codec_type = CODEC_TYPE_VIDEO;
366+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
367367 } else if (!strcmp(fmt->name, "h264")) {
368368 st->codec->codec_id = CODEC_ID_H264;
369− st->codec->codec_type = CODEC_TYPE_VIDEO;
369+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
370370 } else if (!strcmp(fmt->name, "dts")) {
371371 st->codec->codec_id = CODEC_ID_DTS;
372− st->codec->codec_type = CODEC_TYPE_AUDIO;
372+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
373373 }
374374 }
375375 return !!fmt;
@@ -646,13 +646,13 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt) · 270 unmodified lines
646646 st= s->streams[pkt->stream_index];
647647
648648 switch(st->codec->codec_type){
649− case CODEC_TYPE_VIDEO:
649+ case AVMEDIA_TYPE_VIDEO:
650650 if(s->video_codec_id) st->codec->codec_id= s->video_codec_id;
651651 break;
652− case CODEC_TYPE_AUDIO:
652+ case AVMEDIA_TYPE_AUDIO:
653653 if(s->audio_codec_id) st->codec->codec_id= s->audio_codec_id;
654654 break;
655− case CODEC_TYPE_SUBTITLE:
655+ case AVMEDIA_TYPE_SUBTITLE:
656656 if(s->subtitle_codec_id)st->codec->codec_id= s->subtitle_codec_id;
657657 break;
658658 }
@@ -729,7 +729,7 @@ static void compute_frame_duration(int *pnum, int *pden, AVStream *st, · 70 unmodified lines
729729 *pnum = 0;
730730 *pden = 0;
731731 switch(st->codec->codec_type) {
732− case CODEC_TYPE_VIDEO:
732+ case AVMEDIA_TYPE_VIDEO:
733733 if(st->time_base.num*1000LL > st->time_base.den){
734734 *pnum = st->time_base.num;
735735 *pden = st->time_base.den;
@@ -741,7 +741,7 @@ static void compute_frame_duration(int *pnum, int *pden, AVStream *st, · 5 unmodified lines
741741 }
742742 }
743743 break;
744− case CODEC_TYPE_AUDIO:
744+ case AVMEDIA_TYPE_AUDIO:
745745 frame_size = get_audio_frame_size(st->codec, pkt->size);
746746 if (frame_size < 0)
747747 break;
@@ -754,9 +754,9 @@ static void compute_frame_duration(int *pnum, int *pden, AVStream *st, · 6 unmodified lines
754754 }
755755
756756 static int is_intra_only(AVCodecContext *enc){
757− if(enc->codec_type == CODEC_TYPE_AUDIO){
757+ if(enc->codec_type == AVMEDIA_TYPE_AUDIO){
758758 return 1;
759− }else if(enc->codec_type == CODEC_TYPE_VIDEO){
759+ }else if(enc->codec_type == AVMEDIA_TYPE_VIDEO){
760760 switch(enc->codec_id){
761761 case CODEC_ID_MJPEG:
762762 case CODEC_ID_MJPEGB:
@@ -1223,10 +1223,10 @@ int av_find_default_stream_index(AVFormatContext *s) · 460 unmodified lines
12231223 return -1;
12241224 for(i = 0; i < s->nb_streams; i++) {
12251225 st = s->streams[i];
1226− if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
1226+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
12271227 return i;
12281228 }
1229− if (first_audio_index < 0 && st->codec->codec_type == CODEC_TYPE_AUDIO)
1229+ if (first_audio_index < 0 && st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
12301230 first_audio_index = i;
12311231 }
12321232 return first_audio_index >= 0 ? first_audio_index : 0;
@@ -1953,7 +1953,7 @@ static int has_codec_parameters(AVCodecContext *enc) · 720 unmodified lines
19531953 {
19541954 int val;
19551955 switch(enc->codec_type) {
1956− case CODEC_TYPE_AUDIO:
1956+ case AVMEDIA_TYPE_AUDIO:
19571957 val = enc->sample_rate && enc->channels && enc->sample_fmt != SAMPLE_FMT_NONE;
19581958 if(!enc->frame_size &&
19591959 (enc->codec_id == CODEC_ID_VORBIS ||
@@ -1964,7 +1964,7 @@ static int has_codec_parameters(AVCodecContext *enc) · 4 unmodified lines
19641964 enc->codec_id == CODEC_ID_SPEEX))
19651965 return 0;
19661966 break;
1967− case CODEC_TYPE_VIDEO:
1967+ case AVMEDIA_TYPE_VIDEO:
19681968 val = enc->width && enc->pix_fmt != PIX_FMT_NONE;
19691969 break;
19701970 default:
@@ -1992,12 +1992,12 @@ static int try_decode_frame(AVStream *st, AVPacket *avpkt) · 21 unmodified lines
19921992
19931993 if(!has_codec_parameters(st->codec)){
19941994 switch(st->codec->codec_type) {
1995− case CODEC_TYPE_VIDEO:
1995+ case AVMEDIA_TYPE_VIDEO:
19961996 avcodec_get_frame_defaults(&picture);
19971997 ret = avcodec_decode_video2(st->codec, &picture,
19981998 &got_picture, avpkt);
19991999 break;
2000− case CODEC_TYPE_AUDIO:
2000+ case AVMEDIA_TYPE_AUDIO:
20012001 data_size = FFMAX(avpkt->size, AVCODEC_MAX_AUDIO_FRAME_SIZE);
20022002 samples = av_malloc(data_size);
20032003 if (!samples)
@@ -2129,7 +2129,7 @@ int av_find_stream_info(AVFormatContext *ic) · 125 unmodified lines
21292129 st->codec->frame_size = 0;
21302130 st->codec->channels = 0;
21312131 }
2132− if(st->codec->codec_type == CODEC_TYPE_VIDEO){
2132+ if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO){
21332133 /* if(!st->time_base.num)
21342134 st->time_base= */
21352135 if(!st->codec->time_base.num)
@@ -2171,7 +2171,7 @@ int av_find_stream_info(AVFormatContext *ic) · 35 unmodified lines
21712171 break;
21722172 /* variable fps and no guess at the real fps */
21732173 if( tb_unreliable(st->codec) && !(st->r_frame_rate.num && st->avg_frame_rate.num)
2174− && duration_count[i]<20 && st->codec->codec_type == CODEC_TYPE_VIDEO)
2174+ && duration_count[i]<20 && st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
21752175 break;
21762176 if(st->parser && st->parser->parser->split && !st->codec->extradata)
21772177 break;
@@ -2243,7 +2243,7 @@ int av_find_stream_info(AVFormatContext *ic) · 65 unmodified lines
22432243 if(pkt->dts != AV_NOPTS_VALUE && last != AV_NOPTS_VALUE && duration>0){
22442244 double dur= duration * av_q2d(st->time_base);
22452245
2246−// if(st->codec->codec_type == CODEC_TYPE_VIDEO)
2246+// if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
22472247 // av_log(NULL, AV_LOG_ERROR, "%f\n", dur);
22482248 if(duration_count[index] < 2)
22492249 memset(duration_error[index], 0, sizeof(*duration_error));
@@ -2293,7 +2293,7 @@ int av_find_stream_info(AVFormatContext *ic) · 43 unmodified lines
22932293 av_reduce(&st->avg_frame_rate.num, &st->avg_frame_rate.den,
22942294 (st->codec_info_nb_frames-2)*(int64_t)st->time_base.den,
22952295 codec_info_duration[i] *(int64_t)st->time_base.num, 60000);
2296− if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
2296+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
22972297 if(st->codec->codec_id == CODEC_ID_RAWVIDEO && !st->codec->codec_tag && !st->codec->bits_per_coded_sample)
22982298 st->codec->codec_tag= avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt);
22992299
@@ -2312,7 +2312,7 @@ int av_find_stream_info(AVFormatContext *ic) · 12 unmodified lines
23122312
23132313 for(j=1; j<MAX_STD_TIMEBASES; j++){
23142314 double error= duration_error[i][j] * get_std_framerate(j);
2315−// if(st->codec->codec_type == CODEC_TYPE_VIDEO)
2315+// if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
23162316 // av_log(NULL, AV_LOG_ERROR, "%f %f\n", get_std_framerate(j) / 12.0/1001, error);
23172317 if(error < best_error){
23182318 best_error= error;
@@ -2334,7 +2334,7 @@ int av_find_stream_info(AVFormatContext *ic) · 15 unmodified lines
23342334 st->r_frame_rate.den = st->time_base.num;
23352335 }
23362336 }
2337− }else if(st->codec->codec_type == CODEC_TYPE_AUDIO) {
2337+ }else if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
23382338 if(!st->codec->bits_per_coded_sample)
23392339 st->codec->bits_per_coded_sample= av_get_bits_per_sample(st->codec->codec_id);
23402340 }
@@ -2348,7 +2348,7 @@ int av_find_stream_info(AVFormatContext *ic) · 7 unmodified lines
23482348 /* correct DTS for B-frame streams with no timestamps */
23492349 for(i=0;i<ic->nb_streams;i++) {
23502350 st = ic->streams[i];
2351− if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
2351+ if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
23522352 if(b-frames){
23532353 ppktl = &ic->packet_buffer;
23542354 while(ppkt1){
@@ -2581,7 +2581,7 @@ int av_write_header(AVFormatContext *s) · 226 unmodified lines
25812581 st = s->streams[i];
25822582
25832583 switch (st->codec->codec_type) {
2584− case CODEC_TYPE_AUDIO:
2584+ case AVMEDIA_TYPE_AUDIO:
25852585 if(st->codec->sample_rate<=0){
25862586 av_log(s, AV_LOG_ERROR, "sample rate not set\n");
25872587 return -1;
@@ -2590,7 +2590,7 @@ int av_write_header(AVFormatContext *s) · 2 unmodified lines
25902590 st->codec->block_align = st->codec->channels *
25912591 av_get_bits_per_sample(st->codec->codec_id) >> 3;
25922592 break;
2593− case CODEC_TYPE_VIDEO:
2593+ case AVMEDIA_TYPE_VIDEO:
25942594 if(st->codec->time_base.num<=0 || st->codec->time_base.den<=0){ //FIXME audio too?
25952595 av_log(s, AV_LOG_ERROR, "time base not set\n");
25962596 return -1;
@@ -2658,10 +2658,10 @@ int av_write_header(AVFormatContext *s) · 61 unmodified lines
26582658 st = s->streams[i];
26592659
26602660 switch (st->codec->codec_type) {
2661− case CODEC_TYPE_AUDIO:
2661+ case AVMEDIA_TYPE_AUDIO:
26622662 den = (int64_t)st->time_base.num * st->codec->sample_rate;
26632663 break;
2664− case CODEC_TYPE_VIDEO:
2664+ case AVMEDIA_TYPE_VIDEO:
26652665 den = (int64_t)st->time_base.num * st->codec->time_base.den;
26662666 break;
26672667 default:
@@ -2732,7 +2732,7 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt){ · 64 unmodified lines
27322732
27332733 /* update pts */
27342734 switch (st->codec->codec_type) {
2735− case CODEC_TYPE_AUDIO:
2735+ case AVMEDIA_TYPE_AUDIO:
27362736 frame_size = get_audio_frame_size(st->codec, pkt->size);
27372737
27382738 /* HACK/FIXME, we skip the initial 0 size packets as they are most
@@ -2742,7 +2742,7 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt){ · 3 unmodified lines
27422742 av_frac_add(&st->pts, (int64_t)st->time_base.den * frame_size);
27432743 }
27442744 break;
2745− case CODEC_TYPE_VIDEO:
2745+ case AVMEDIA_TYPE_VIDEO:
27462746 av_frac_add(&st->pts, (int64_t)st->time_base.den * st->codec->time_base.num);
27472747 break;
27482748 default:
@@ -2859,7 +2859,7 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt){ · 110 unmodified lines
28592859 AVStream *st= s->streams[ pkt->stream_index];
28602860
28612861 //FIXME/XXX/HACK drop zero sized packets
2862− if(st->codec->codec_type == CODEC_TYPE_AUDIO && pkt->size==0)
2862+ if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO && pkt->size==0)
28632863 return 0;
28642864
28652865 //av_log(NULL, AV_LOG_DEBUG, "av_interleaved_write_frame %d %"PRId64" %"PRId64"\n", pkt->size, pkt->dts, pkt->pts);
@@ -2999,7 +2999,7 @@ static void dump_stream_format(AVFormatContext *ic, int i, int index, int is_out · 133 unmodified lines
29992999 st->sample_aspect_ratio.num, st->sample_aspect_ratio.den,
30003000 display_aspect_ratio.num, display_aspect_ratio.den);
30013001 }
3002− if(st->codec->codec_type == CODEC_TYPE_VIDEO){
3002+ if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO){
30033003 if(st->avg_frame_rate.den && st->avg_frame_rate.num)
30043004 print_fps(av_q2d(st->avg_frame_rate), "fps");
30053005 if(st->r_frame_rate.den && st->r_frame_rate.num)
libavformat/vc1test.c+1−1
@@ -58,7 +58,7 @@ static int vc1t_read_header(AVFormatContext *s, · 57 unmodified lines
5858 if (!st)
5959 return -1;
6060
61− st->codec->codec_type = CODEC_TYPE_VIDEO;
61+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
6262 st->codec->codec_id = CODEC_ID_WMV3;
6363
6464 st->codec->extradata = av_malloc(VC1_EXTRADATA_SIZE);
libavformat/vocdec.c+1−1
@@ -54,7 +54,7 @@ static int voc_read_header(AVFormatContext *s, AVFormatParameters *ap) · 53 unmodified lines
5454 st = av_new_stream(s, 0);
5555 if (!st)
5656 return AVERROR(ENOMEM);
57− st->codec->codec_type = CODEC_TYPE_AUDIO;
57+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
5858
5959 voc->remaining_size = 0;
6060 return 0;
libavformat/vocenc.c+1−1
@@ -33,7 +33,7 @@ static int voc_write_header(AVFormatContext *s) · 32 unmodified lines
3333 const int version = 0x0114;
3434
3535 if (s->nb_streams != 1
36− || s->streams[0]->codec->codec_type != CODEC_TYPE_AUDIO)
36+ || s->streams[0]->codec->codec_type != AVMEDIA_TYPE_AUDIO)
3737 return AVERROR_PATCHWELCOME;
3838
3939 put_buffer(pb, ff_voc_magic, sizeof(ff_voc_magic) - 1);
libavformat/vqf.c+1−1
@@ -76,7 +76,7 @@ static int vqf_read_header(AVFormatContext *s, AVFormatParameters *ap) · 75 unmodified lines
7676
7777 header_size = get_be32(s->pb);
7878
79− st->codec->codec_type = CODEC_TYPE_AUDIO;
79+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
8080 st->codec->codec_id = CODEC_ID_TWINVQ;
8181 st->start_time = 0;
8282
libavformat/wc3movie.c+2−2
@@ -243,7 +243,7 @@ static int wc3_read_header(AVFormatContext *s, · 242 unmodified lines
243243 return AVERROR(ENOMEM);
244244 av_set_pts_info(st, 33, 1, WC3_FRAME_FPS);
245245 wc3->video_stream_index = st->index;
246− st->codec->codec_type = CODEC_TYPE_VIDEO;
246+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
247247 st->codec->codec_id = CODEC_ID_XAN_WC3;
248248 st->codec->codec_tag = 0; /* no fourcc */
249249 st->codec->width = wc3->width;
@@ -257,7 +257,7 @@ static int wc3_read_header(AVFormatContext *s, · 7 unmodified lines
257257 return AVERROR(ENOMEM);
258258 av_set_pts_info(st, 33, 1, WC3_FRAME_FPS);
259259 wc3->audio_stream_index = st->index;
260− st->codec->codec_type = CODEC_TYPE_AUDIO;
260+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
261261 st->codec->codec_id = CODEC_ID_PCM_S16LE;
262262 st->codec->codec_tag = 1;
263263 st->codec->channels = WC3_AUDIO_CHANNELS;
libavformat/westwood.c+3−3
@@ -148,7 +148,7 @@ static int wsaud_read_header(AVFormatContext *s, · 147 unmodified lines
148148 if (!st)
149149 return AVERROR(ENOMEM);
150150 av_set_pts_info(st, 33, 1, wsaud->audio_samplerate);
151− st->codec->codec_type = CODEC_TYPE_AUDIO;
151+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
152152 st->codec->codec_id = wsaud->audio_type;
153153 st->codec->codec_tag = 0; /* no tag */
154154 st->codec->channels = wsaud->audio_channels;
@@ -226,7 +226,7 @@ static int wsvqa_read_header(AVFormatContext *s, · 71 unmodified lines
226226 return AVERROR(ENOMEM);
227227 av_set_pts_info(st, 33, 1, VQA_FRAMERATE);
228228 wsvqa->video_stream_index = st->index;
229− st->codec->codec_type = CODEC_TYPE_VIDEO;
229+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
230230 st->codec->codec_id = CODEC_ID_WS_VQA;
231231 st->codec->codec_tag = 0; /* no fourcc */
232232
@@ -251,7 +251,7 @@ static int wsvqa_read_header(AVFormatContext *s, · 18 unmodified lines
251251 if (!st)
252252 return AVERROR(ENOMEM);
253253 av_set_pts_info(st, 33, 1, VQA_FRAMERATE);
254− st->codec->codec_type = CODEC_TYPE_AUDIO;
254+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
255255 if (AV_RL16(&header[0]) == 1)
256256 st->codec->codec_id = CODEC_ID_WESTWOOD_SND1;
257257 else
libavformat/wv.c+1−1
@@ -162,7 +162,7 @@ static int wv_read_header(AVFormatContext *s, · 161 unmodified lines
162162 st = av_new_stream(s, 0);
163163 if (!st)
164164 return -1;
165− st->codec->codec_type = CODEC_TYPE_AUDIO;
165+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
166166 st->codec->codec_id = CODEC_ID_WAVPACK;
167167 st->codec->channels = wc->chan;
168168 st->codec->sample_rate = wc->rate;
libavformat/xa.c+1−1
@@ -74,7 +74,7 @@ static int xa_read_header(AVFormatContext *s, · 73 unmodified lines
7474 if (!st)
7575 return AVERROR(ENOMEM);
7676
77− st->codec->codec_type = CODEC_TYPE_AUDIO;
77+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
7878 st->codec->codec_id = CODEC_ID_ADPCM_EA_MAXIS_XA;
7979 url_fskip(pb, 4); /* Skip the XA ID */
8080 xa->out_size = get_le32(pb);
libavformat/yop.c+2−2
@@ -71,14 +71,14 @@ static int yop_read_header(AVFormatContext *s, AVFormatParameters *ap) · 70 unmodified lines
7171
7272 // Audio
7373 audio_dec = audio_stream->codec;
74− audio_dec->codec_type = CODEC_TYPE_AUDIO;
74+ audio_dec->codec_type = AVMEDIA_TYPE_AUDIO;
7575 audio_dec->codec_id = CODEC_ID_ADPCM_IMA_WS;
7676 audio_dec->channels = 1;
7777 audio_dec->sample_rate = 22050;
7878
7979 // Video
8080 video_dec = video_stream->codec;
81− video_dec->codec_type = CODEC_TYPE_VIDEO;
81+ video_dec->codec_type = AVMEDIA_TYPE_VIDEO;
8282 video_dec->codec_id = CODEC_ID_YOP;
8383
8484 url_fskip(pb, 6);
libavformat/yuv4mpeg.c+1−1
@@ -335,7 +335,7 @@ static int yuv4_read_header(AVFormatContext *s, AVFormatParameters *ap) · 334 unmodified lines
335335 av_reduce(&raten, &rated, raten, rated, (1UL<<31)-1);
336336 av_set_pts_info(st, 64, rated, raten);
337337 st->codec->pix_fmt = pix_fmt;
338− st->codec->codec_type = CODEC_TYPE_VIDEO;
338+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
339339 st->codec->codec_id = CODEC_ID_RAWVIDEO;
340340 st->sample_aspect_ratio= (AVRational){aspectn, aspectd};
341341 st->codec->chroma_sample_location = chroma_sample_location;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t