Add some basic metadata conversion tables for matroska and asf.
Add missing const qualifiers for metadata_conv in AV{In|Out}putFormat.
Originally committed as revision 17671 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
f610a9f284
commit
719e721a14
8 changed files with 30 additions and 2 deletions
|
|
@ -111,3 +111,15 @@ const GUID ff_asf_metadata_header = {
|
||||||
const GUID ff_asf_my_guid = {
|
const GUID ff_asf_my_guid = {
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const AVMetadataConv ff_asf_metadata_conv[] = {
|
||||||
|
{ "AlbumArtist", "artist" },
|
||||||
|
{ "AlbumTitle" , "album" },
|
||||||
|
{ "Author" , "author" },
|
||||||
|
{ "Genre" , "genre" },
|
||||||
|
{ "Copyright" , "copyright" },
|
||||||
|
{ "TrackNumber", "track" },
|
||||||
|
{ "Year" , "year" },
|
||||||
|
{ 0 }
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "avformat.h"
|
#include "avformat.h"
|
||||||
|
#include "metadata.h"
|
||||||
|
|
||||||
#define PACKET_SIZE 3200
|
#define PACKET_SIZE 3200
|
||||||
|
|
||||||
|
|
@ -157,6 +158,8 @@ extern const GUID ff_asf_ext_stream_audio_stream;
|
||||||
extern const GUID ff_asf_metadata_header;
|
extern const GUID ff_asf_metadata_header;
|
||||||
extern const GUID ff_asf_my_guid;
|
extern const GUID ff_asf_my_guid;
|
||||||
|
|
||||||
|
extern const AVMetadataConv ff_asf_metadata_conv[];
|
||||||
|
|
||||||
#define ASF_PACKET_FLAG_ERROR_CORRECTION_PRESENT 0x80 //1000 0000
|
#define ASF_PACKET_FLAG_ERROR_CORRECTION_PRESENT 0x80 //1000 0000
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1087,4 +1087,5 @@ AVInputFormat asf_demuxer = {
|
||||||
asf_read_close,
|
asf_read_close,
|
||||||
asf_read_seek,
|
asf_read_seek,
|
||||||
asf_read_pts,
|
asf_read_pts,
|
||||||
|
.metadata_conv = ff_asf_metadata_conv,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -855,6 +855,7 @@ AVOutputFormat asf_muxer = {
|
||||||
asf_write_trailer,
|
asf_write_trailer,
|
||||||
.flags = AVFMT_GLOBALHEADER,
|
.flags = AVFMT_GLOBALHEADER,
|
||||||
.codec_tag= (const AVCodecTag* const []){codec_asf_bmp_tags, codec_bmp_tags, codec_wav_tags, 0},
|
.codec_tag= (const AVCodecTag* const []){codec_asf_bmp_tags, codec_bmp_tags, codec_wav_tags, 0},
|
||||||
|
.metadata_conv = ff_asf_metadata_conv,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -876,5 +877,6 @@ AVOutputFormat asf_stream_muxer = {
|
||||||
asf_write_trailer,
|
asf_write_trailer,
|
||||||
.flags = AVFMT_GLOBALHEADER,
|
.flags = AVFMT_GLOBALHEADER,
|
||||||
.codec_tag= (const AVCodecTag* const []){codec_asf_bmp_tags, codec_bmp_tags, codec_wav_tags, 0},
|
.codec_tag= (const AVCodecTag* const []){codec_asf_bmp_tags, codec_bmp_tags, codec_wav_tags, 0},
|
||||||
|
.metadata_conv = ff_asf_metadata_conv,
|
||||||
};
|
};
|
||||||
#endif //CONFIG_ASF_STREAM_MUXER
|
#endif //CONFIG_ASF_STREAM_MUXER
|
||||||
|
|
|
||||||
|
|
@ -309,7 +309,7 @@ typedef struct AVOutputFormat {
|
||||||
|
|
||||||
enum CodecID subtitle_codec; /**< default subtitle codec */
|
enum CodecID subtitle_codec; /**< default subtitle codec */
|
||||||
|
|
||||||
AVMetadataConv *metadata_conv;
|
const AVMetadataConv *metadata_conv;
|
||||||
|
|
||||||
/* private fields */
|
/* private fields */
|
||||||
struct AVOutputFormat *next;
|
struct AVOutputFormat *next;
|
||||||
|
|
@ -390,7 +390,7 @@ typedef struct AVInputFormat {
|
||||||
*/
|
*/
|
||||||
int (*read_seek2)(struct AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
|
int (*read_seek2)(struct AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
|
||||||
|
|
||||||
AVMetadataConv *metadata_conv;
|
const AVMetadataConv *metadata_conv;
|
||||||
|
|
||||||
/* private fields */
|
/* private fields */
|
||||||
struct AVInputFormat *next;
|
struct AVInputFormat *next;
|
||||||
|
|
|
||||||
|
|
@ -88,3 +88,10 @@ const CodecMime ff_mkv_mime_tags[] = {
|
||||||
|
|
||||||
{"" , CODEC_ID_NONE}
|
{"" , CODEC_ID_NONE}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const AVMetadataConv ff_mkv_metadata_conv[] = {
|
||||||
|
{ "ARTIST" , "artist" },
|
||||||
|
{ "LEAD_PERFORMER", "artist" },
|
||||||
|
{ "PART_NUMBER" , "track" },
|
||||||
|
{ 0 }
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
#define AVFORMAT_MATROSKA_H
|
#define AVFORMAT_MATROSKA_H
|
||||||
|
|
||||||
#include "libavcodec/avcodec.h"
|
#include "libavcodec/avcodec.h"
|
||||||
|
#include "metadata.h"
|
||||||
|
|
||||||
/* EBML version supported */
|
/* EBML version supported */
|
||||||
#define EBML_VERSION 1
|
#define EBML_VERSION 1
|
||||||
|
|
@ -235,5 +236,6 @@ typedef struct CodecMime{
|
||||||
|
|
||||||
extern const CodecTags ff_mkv_codec_tags[];
|
extern const CodecTags ff_mkv_codec_tags[];
|
||||||
extern const CodecMime ff_mkv_mime_tags[];
|
extern const CodecMime ff_mkv_mime_tags[];
|
||||||
|
extern const AVMetadataConv ff_mkv_metadata_conv[];
|
||||||
|
|
||||||
#endif /* AVFORMAT_MATROSKA_H */
|
#endif /* AVFORMAT_MATROSKA_H */
|
||||||
|
|
|
||||||
|
|
@ -1839,4 +1839,5 @@ AVInputFormat matroska_demuxer = {
|
||||||
matroska_read_packet,
|
matroska_read_packet,
|
||||||
matroska_read_close,
|
matroska_read_close,
|
||||||
matroska_read_seek,
|
matroska_read_seek,
|
||||||
|
.metadata_conv = ff_mkv_metadata_conv,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue