- Timestamp:
- Dec 28, 2016 3:40:07 AM (8 years ago)
- Location:
- pjproject/branches/projects/uwp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/uwp
- Property svn:mergeinfo changed
/pjproject/trunk (added) merged: 5209,5212-5234,5237-5253,5255,5257-5292,5294-5297,5299-5332,5334-5394,5396-5438,5440-5469,5471-5496,5498-5510
- Property svn:mergeinfo changed
-
pjproject/branches/projects/uwp/pjmedia/src/pjmedia/ffmpeg_util.c
r5198 r5513 22 22 #include <pj/string.h> 23 23 24 #if PJMEDIA_HAS_LIBAVFORMAT && PJMEDIA_HAS_LIBAVUTIL 24 #if defined(PJMEDIA_HAS_VIDEO) && (PJMEDIA_HAS_VIDEO != 0) && \ 25 defined(PJMEDIA_HAS_LIBAVFORMAT) && (PJMEDIA_HAS_LIBAVFORMAT != 0) 25 26 26 27 #include "ffmpeg_util.h" … … 34 35 } ffmpeg_fmt_table[] = 35 36 { 36 { PJMEDIA_FORMAT_RGBA, AV _PIX_FMT_RGBA},37 { PJMEDIA_FORMAT_RGB24,AV _PIX_FMT_BGR24},38 { PJMEDIA_FORMAT_BGRA, AV _PIX_FMT_BGRA},39 { PJMEDIA_FORMAT_GBRP, AV _PIX_FMT_GBRP},37 { PJMEDIA_FORMAT_RGBA, AV(PIX_FMT_RGBA)}, 38 { PJMEDIA_FORMAT_RGB24,AV(PIX_FMT_BGR24)}, 39 { PJMEDIA_FORMAT_BGRA, AV(PIX_FMT_BGRA)}, 40 { PJMEDIA_FORMAT_GBRP, AV(PIX_FMT_GBRP)}, 40 41 41 { PJMEDIA_FORMAT_AYUV, AV _PIX_FMT_NONE},42 { PJMEDIA_FORMAT_YUY2, AV _PIX_FMT_YUYV422},43 { PJMEDIA_FORMAT_UYVY, AV _PIX_FMT_UYVY422},44 { PJMEDIA_FORMAT_I420, AV _PIX_FMT_YUV420P},45 //{ PJMEDIA_FORMAT_YV12, AV _PIX_FMT_YUV420P},46 { PJMEDIA_FORMAT_I422, AV _PIX_FMT_YUV422P},47 { PJMEDIA_FORMAT_I420JPEG, AV _PIX_FMT_YUVJ420P},48 { PJMEDIA_FORMAT_I422JPEG, AV _PIX_FMT_YUVJ422P},42 { PJMEDIA_FORMAT_AYUV, AV(PIX_FMT_NONE)}, 43 { PJMEDIA_FORMAT_YUY2, AV(PIX_FMT_YUYV422)}, 44 { PJMEDIA_FORMAT_UYVY, AV(PIX_FMT_UYVY422)}, 45 { PJMEDIA_FORMAT_I420, AV(PIX_FMT_YUV420P)}, 46 //{ PJMEDIA_FORMAT_YV12, AV(PIX_FMT_YUV420P)}, 47 { PJMEDIA_FORMAT_I422, AV(PIX_FMT_YUV422P)}, 48 { PJMEDIA_FORMAT_I420JPEG, AV(PIX_FMT_YUVJ420P)}, 49 { PJMEDIA_FORMAT_I422JPEG, AV(PIX_FMT_YUVJ422P)}, 49 50 }; 50 51 … … 56 57 } ffmpeg_codec_table[] = 57 58 { 58 {PJMEDIA_FORMAT_H261, AV _CODEC_ID_H261},59 {PJMEDIA_FORMAT_H263, AV _CODEC_ID_H263},60 {PJMEDIA_FORMAT_H263P, AV _CODEC_ID_H263P},61 {PJMEDIA_FORMAT_H264, AV _CODEC_ID_H264},62 {PJMEDIA_FORMAT_MPEG1VIDEO, AV _CODEC_ID_MPEG1VIDEO},63 {PJMEDIA_FORMAT_MPEG2VIDEO, AV _CODEC_ID_MPEG2VIDEO},64 {PJMEDIA_FORMAT_MPEG4, AV _CODEC_ID_MPEG4},65 {PJMEDIA_FORMAT_MJPEG, AV _CODEC_ID_MJPEG}59 {PJMEDIA_FORMAT_H261, AV(CODEC_ID_H261)}, 60 {PJMEDIA_FORMAT_H263, AV(CODEC_ID_H263)}, 61 {PJMEDIA_FORMAT_H263P, AV(CODEC_ID_H263P)}, 62 {PJMEDIA_FORMAT_H264, AV(CODEC_ID_H264)}, 63 {PJMEDIA_FORMAT_MPEG1VIDEO, AV(CODEC_ID_MPEG1VIDEO)}, 64 {PJMEDIA_FORMAT_MPEG2VIDEO, AV(CODEC_ID_MPEG2VIDEO)}, 65 {PJMEDIA_FORMAT_MPEG4, AV(CODEC_ID_MPEG4)}, 66 {PJMEDIA_FORMAT_MJPEG, AV(CODEC_ID_MJPEG)} 66 67 }; 67 68 … … 132 133 for (i=0; i<PJ_ARRAY_SIZE(ffmpeg_fmt_table); ++i) { 133 134 const struct ffmpeg_fmt_table_t *t = &ffmpeg_fmt_table[i]; 134 if (t->id==fmt_id && t->pf != AV _PIX_FMT_NONE) {135 if (t->id==fmt_id && t->pf != AV(PIX_FMT_NONE)) { 135 136 *pixel_format = t->pf; 136 137 return PJ_SUCCESS; … … 138 139 } 139 140 140 *pixel_format = AV _PIX_FMT_NONE;141 *pixel_format = AV(PIX_FMT_NONE); 141 142 return PJ_ENOTFOUND; 142 143 } … … 163 164 for (i=0; i<PJ_ARRAY_SIZE(ffmpeg_codec_table); ++i) { 164 165 const struct ffmpeg_codec_table_t *t = &ffmpeg_codec_table[i]; 165 if (t->id==fmt_id && t->codec_id != AV _PIX_FMT_NONE) {166 if (t->id==fmt_id && t->codec_id != AV(PIX_FMT_NONE)) { 166 167 *codec_id = t->codec_id; 167 168 return PJ_SUCCESS; … … 169 170 } 170 171 171 *codec_id = (unsigned)AV _PIX_FMT_NONE;172 *codec_id = (unsigned)AV(PIX_FMT_NONE); 172 173 return PJ_ENOTFOUND; 173 174 } … … 194 195 #endif 195 196 196 #endif /* #if PJMEDIA_HAS_LIBAVFORMAT && PJMEDIA_HAS_LIBAVUTIL*/197 #endif /* PJMEDIA_HAS_LIBAVFORMAT */
Note: See TracChangeset
for help on using the changeset viewer.