| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2009 Aurelien Jacobs <aurel@gnuage.org> | 2 * Copyright (c) 2009 Aurelien Jacobs <aurel@gnuage.org> |
| 3 * | 3 * |
| 4 * This file is part of FFmpeg. | 4 * This file is part of FFmpeg. |
| 5 * | 5 * |
| 6 * FFmpeg is free software; you can redistribute it and/or | 6 * FFmpeg is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Lesser General Public | 7 * modify it under the terms of the GNU Lesser General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2.1 of the License, or (at your option) any later version. | 9 * version 2.1 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| 11 * FFmpeg is distributed in the hope that it will be useful, | 11 * FFmpeg is distributed in the hope that it will be useful, |
| 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 * Lesser General Public License for more details. | 14 * Lesser General Public License for more details. |
| 15 * | 15 * |
| 16 * You should have received a copy of the GNU Lesser General Public | 16 * You should have received a copy of the GNU Lesser General Public |
| 17 * License along with FFmpeg; if not, write to the Free Software | 17 * License along with FFmpeg; if not, write to the Free Software |
| 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 */ | 19 */ |
| 20 | 20 |
| 21 #include <strings.h> | 21 #include <strings.h> |
| 22 #include "avformat.h" | 22 #include "avformat.h" |
| 23 #include "metadata.h" | 23 #include "metadata.h" |
| 24 #include "libavutil/avstring.h" | 24 #include "libavutil/avstring.h" |
| 25 | 25 |
| 26 #if LIBAVFORMAT_VERSION_MAJOR < 53 | 26 #if FF_API_OLD_METADATA |
| 27 | 27 |
| 28 #define SIZE_OFFSET(x) sizeof(((AVFormatContext*)0)->x),offsetof(AVFormatContext
,x) | 28 #define SIZE_OFFSET(x) sizeof(((AVFormatContext*)0)->x),offsetof(AVFormatContext
,x) |
| 29 | 29 |
| 30 static const struct { | 30 static const struct { |
| 31 const char name[16]; | 31 const char name[16]; |
| 32 int size; | 32 int size; |
| 33 int offset; | 33 int offset; |
| 34 } compat_tab[] = { | 34 } compat_tab[] = { |
| 35 { "title", SIZE_OFFSET(title) }, | 35 { "title", SIZE_OFFSET(title) }, |
| 36 { "author", SIZE_OFFSET(author) }, | 36 { "author", SIZE_OFFSET(author) }, |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 for (i=0; i<ctx->nb_programs; i++) { | 138 for (i=0; i<ctx->nb_programs; i++) { |
| 139 FILL_METADATA_STR(ctx->programs[i], name); | 139 FILL_METADATA_STR(ctx->programs[i], name); |
| 140 FILL_METADATA_STR(ctx->programs[i], provider_name); | 140 FILL_METADATA_STR(ctx->programs[i], provider_name); |
| 141 } | 141 } |
| 142 for (i=0; i<ctx->nb_streams; i++) { | 142 for (i=0; i<ctx->nb_streams; i++) { |
| 143 FILL_METADATA_STR(ctx->streams[i], language); | 143 FILL_METADATA_STR(ctx->streams[i], language); |
| 144 FILL_METADATA_STR(ctx->streams[i], filename); | 144 FILL_METADATA_STR(ctx->streams[i], filename); |
| 145 } | 145 } |
| 146 } | 146 } |
| 147 | 147 |
| 148 #endif /* LIBAVFORMAT_VERSION_MAJOR < 53 */ | 148 #endif /* FF_API_OLD_METADATA */ |
| OLD | NEW |