1 |
From b1b8da09cbb5a2b39ff087cbd740b2550857bd23 Mon Sep 17 00:00:00 2001 |
2 |
From: elupus <elupus@xbmc.org> |
3 |
Date: Sat, 10 Sep 2011 17:33:33 +0200 |
4 |
Subject: [PATCH 109/145] replace depreciated AVMetadata(Tag) with |
5 |
AVDictionary(Entry) (cherry picked from commit |
6 |
fb3b3a2e36aa88b312b5519295ee59040ebed986) |
7 |
|
8 |
--- |
9 |
lib/DllAvFormat.h | 18 +++++++++--------- |
10 |
xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp | 6 +++--- |
11 |
2 files changed, 12 insertions(+), 12 deletions(-) |
12 |
|
13 |
diff --git a/lib/DllAvFormat.h b/lib/DllAvFormat.h |
14 |
index dc036c7..9acdae7 100644 |
15 |
--- a/lib/DllAvFormat.h |
16 |
+++ b/lib/DllAvFormat.h |
17 |
@@ -63,7 +63,7 @@ public: |
18 |
virtual void av_register_all_dont_call(void)=0; |
19 |
virtual AVInputFormat *av_find_input_format(const char *short_name)=0; |
20 |
virtual int url_feof(AVIOContext *s)=0; |
21 |
- virtual AVMetadataTag *av_metadata_get(AVMetadata *m, const char *key, const AVMetadataTag *prev, int flags)=0; |
22 |
+ virtual AVDictionaryEntry *av_metadata_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)=0; |
23 |
virtual void av_close_input_file(AVFormatContext *s)=0; |
24 |
virtual void av_close_input_stream(AVFormatContext *s)=0; |
25 |
virtual int av_read_frame(AVFormatContext *s, AVPacket *pkt)=0; |
26 |
@@ -108,7 +108,7 @@ public: |
27 |
virtual int av_write_header (AVFormatContext *s)=0; |
28 |
virtual int av_write_trailer(AVFormatContext *s)=0; |
29 |
virtual int av_write_frame (AVFormatContext *s, AVPacket *pkt)=0; |
30 |
- virtual int av_metadata_set2(AVMetadata **pm, const char *key, const char *value, int flags)=0; |
31 |
+ virtual int av_metadata_set2(AVDictionary **pm, const char *key, const char *value, int flags)=0; |
32 |
}; |
33 |
|
34 |
#if (defined USE_EXTERNAL_FFMPEG) |
35 |
@@ -128,9 +128,9 @@ public: |
36 |
virtual int url_feof(AVIOContext *s) { return ::url_feof(s); } |
37 |
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52,31,0) |
38 |
// API added on: 2009-03-01 |
39 |
- virtual AVMetadataTag *av_metadata_get(AVMetadata *m, const char *key, const AVMetadataTag *prev, int flags){ return ::av_metadata_get(m, key, prev, flags); } |
40 |
+ virtual AVDictionaryEntry *av_metadata_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags){ return ::av_metadata_get(m, key, prev, flags); } |
41 |
#else |
42 |
- virtual AVMetadataTag *av_metadata_get(AVMetadata *m, const char *key, const AVMetadataTag *prev, int flags){ return NULL; } |
43 |
+ virtual AVDictionaryEntry *av_metadata_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags){ return NULL; } |
44 |
#endif |
45 |
virtual void av_close_input_file(AVFormatContext *s) { ::av_close_input_file(s); } |
46 |
virtual void av_close_input_stream(AVFormatContext *s) { ::av_close_input_stream(s); } |
47 |
@@ -190,12 +190,12 @@ public: |
48 |
virtual int av_write_frame (AVFormatContext *s, AVPacket *pkt) { return ::av_write_frame(s, pkt); } |
49 |
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52,43,0) |
50 |
// API added on: 2009-12-13 |
51 |
- virtual int av_metadata_set2(AVMetadata **pm, const char *key, const char *value, int flags) { return ::av_metadata_set2(pm, key, value, flags); } |
52 |
+ virtual int av_metadata_set2(AVDictionary **pm, const char *key, const char *value, int flags) { return ::av_metadata_set2(pm, key, value, flags); } |
53 |
#elif LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52,31,0) |
54 |
// API added on: 2009-03-01 |
55 |
- virtual int av_metadata_set2(AVMetadata **pm, const char *key, const char *value, int flags) { return ::av_metadata_set(pm, key, value); } |
56 |
+ virtual int av_metadata_set2(AVDictionary **pm, const char *key, const char *value, int flags) { return ::av_metadata_set(pm, key, value); } |
57 |
#else |
58 |
- virtual int av_metadata_set2(AVMetadata **pm, const char *key, const char *value, int flags) { return -1; } |
59 |
+ virtual int av_metadata_set2(AVDictionary **pm, const char *key, const char *value, int flags) { return -1; } |
60 |
#endif |
61 |
|
62 |
// DLL faking. |
63 |
@@ -218,7 +218,7 @@ class DllAvFormat : public DllDynamic, DllAvFormatInterface |
64 |
DEFINE_METHOD0(void, av_register_all_dont_call) |
65 |
DEFINE_METHOD1(AVInputFormat*, av_find_input_format, (const char *p1)) |
66 |
DEFINE_METHOD1(int, url_feof, (AVIOContext *p1)) |
67 |
- DEFINE_METHOD4(AVMetadataTag*, av_metadata_get, (AVMetadata *p1, const char *p2, const AVMetadataTag *p3, int p4)) |
68 |
+ DEFINE_METHOD4(AVDictionaryEntry*, av_metadata_get, (AVDictionary *p1, const char *p2, const AVDictionaryEntry *p3, int p4)) |
69 |
DEFINE_METHOD1(void, av_close_input_file, (AVFormatContext *p1)) |
70 |
DEFINE_METHOD1(void, av_close_input_stream, (AVFormatContext *p1)) |
71 |
DEFINE_METHOD1(int, av_read_play, (AVFormatContext *p1)) |
72 |
@@ -265,7 +265,7 @@ class DllAvFormat : public DllDynamic, DllAvFormatInterface |
73 |
DEFINE_METHOD1(int, av_write_header , (AVFormatContext *p1)) |
74 |
DEFINE_METHOD1(int, av_write_trailer, (AVFormatContext *p1)) |
75 |
DEFINE_METHOD2(int, av_write_frame , (AVFormatContext *p1, AVPacket *p2)) |
76 |
- DEFINE_METHOD4(int, av_metadata_set2, (AVMetadata **p1, const char *p2, const char *p3, int p4)); |
77 |
+ DEFINE_METHOD4(int, av_metadata_set2, (AVDictionary **p1, const char *p2, const char *p3, int p4)); |
78 |
BEGIN_METHOD_RESOLVE() |
79 |
RESOLVE_METHOD_RENAME(av_register_all, av_register_all_dont_call) |
80 |
RESOLVE_METHOD(av_find_input_format) |
81 |
diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp |
82 |
index f0ce468..489c85c 100644 |
83 |
--- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp |
84 |
+++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp |
85 |
@@ -1092,7 +1092,7 @@ void CDVDDemuxFFmpeg::AddStream(int iId) |
86 |
{ |
87 |
std::string fileName = "special://temp/fonts/"; |
88 |
XFILE::CDirectory::Create(fileName); |
89 |
- AVMetadataTag *nameTag = m_dllAvFormat.av_metadata_get(pStream->metadata, "filename", NULL, 0); |
90 |
+ AVDictionaryEntry *nameTag = m_dllAvFormat.av_metadata_get(pStream->metadata, "filename", NULL, 0); |
91 |
if (!nameTag) { |
92 |
CLog::Log(LOGERROR, "%s: TTF attachment has no name", __FUNCTION__); |
93 |
break; |
94 |
@@ -1141,7 +1141,7 @@ void CDVDDemuxFFmpeg::AddStream(int iId) |
95 |
// API added on: 2010-10-15 |
96 |
// (Note that while the function was available earlier, the generic |
97 |
// metadata tags were not populated by default) |
98 |
- AVMetadataTag *langTag = m_dllAvFormat.av_metadata_get(pStream->metadata, "language", NULL, 0); |
99 |
+ AVDictionaryEntry *langTag = m_dllAvFormat.av_metadata_get(pStream->metadata, "language", NULL, 0); |
100 |
if (langTag) |
101 |
strncpy(m_streams[iId]->language, langTag->value, 3); |
102 |
#else |
103 |
@@ -1251,7 +1251,7 @@ void CDVDDemuxFFmpeg::GetChapterName(std::string& strChapterName) |
104 |
// API added on: 2010-10-15 |
105 |
// (Note that while the function was available earlier, the generic |
106 |
// metadata tags were not populated by default) |
107 |
- AVMetadataTag *titleTag = m_dllAvFormat.av_metadata_get(m_pFormatContext->chapters[chapterIdx-1]->metadata, |
108 |
+ AVDictionaryEntry *titleTag = m_dllAvFormat.av_metadata_get(m_pFormatContext->chapters[chapterIdx-1]->metadata, |
109 |
"title", NULL, 0); |
110 |
if (titleTag) |
111 |
strChapterName = titleTag->value; |
112 |
-- |
113 |
1.7.10 |
114 |
|