diff options
author | Sébastien Brochet <blinkseb@xbmc.org> | 2012-04-15 22:43:46 +0200 |
---|---|---|
committer | Sébastien Brochet <blinkseb@xbmc.org> | 2012-09-08 10:46:40 +0200 |
commit | 41400dcb5d2d076bc6ced425a3b3c4ed5d9a5425 (patch) | |
tree | 7fa2674ec26395ae8e61579b0aca68748305ad4a /lib/ffmpeg | |
parent | f949443c03fc06c76039e3c9c9c010ab9d390cbb (diff) |
added: support for OTF fonts
Diffstat (limited to 'lib/ffmpeg')
-rw-r--r-- | lib/ffmpeg/libavcodec/avcodec.h | 1 | ||||
-rw-r--r-- | lib/ffmpeg/libavformat/matroska.c | 1 | ||||
-rw-r--r-- | lib/ffmpeg/patches/0028-added-support-for-OTF-fonts.patch | 56 |
3 files changed, 58 insertions, 0 deletions
diff --git a/lib/ffmpeg/libavcodec/avcodec.h b/lib/ffmpeg/libavcodec/avcodec.h index 0b756d08e3..6996c9266b 100644 --- a/lib/ffmpeg/libavcodec/avcodec.h +++ b/lib/ffmpeg/libavcodec/avcodec.h @@ -435,6 +435,7 @@ enum CodecID { CODEC_ID_BINTEXT = MKBETAG('B','T','X','T'), CODEC_ID_XBIN = MKBETAG('X','B','I','N'), CODEC_ID_IDF = MKBETAG( 0 ,'I','D','F'), + CODEC_ID_OTF = MKBETAG( 0 ,'O','T','F'), CODEC_ID_PROBE = 0x19000, ///< codec_id is not known (like CODEC_ID_NONE) but lavf should attempt to identify it diff --git a/lib/ffmpeg/libavformat/matroska.c b/lib/ffmpeg/libavformat/matroska.c index 52481d7556..2f5b6178c2 100644 --- a/lib/ffmpeg/libavformat/matroska.c +++ b/lib/ffmpeg/libavformat/matroska.c @@ -90,6 +90,7 @@ const CodecMime ff_mkv_mime_tags[] = { {"image/tiff" , CODEC_ID_TIFF}, {"application/x-truetype-font", CODEC_ID_TTF}, {"application/x-font" , CODEC_ID_TTF}, + {"application/vnd.ms-opentype", CODEC_ID_OTF}, {"" , CODEC_ID_NONE} }; diff --git a/lib/ffmpeg/patches/0028-added-support-for-OTF-fonts.patch b/lib/ffmpeg/patches/0028-added-support-for-OTF-fonts.patch new file mode 100644 index 0000000000..2167d9fb8e --- /dev/null +++ b/lib/ffmpeg/patches/0028-added-support-for-OTF-fonts.patch @@ -0,0 +1,56 @@ +From 864acb01cc73762918794ddecf0fc2f7b6cf8529 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=A9bastien=20Brochet?= <blinkseb@xbmc.org> +Date: Sun, 15 Apr 2012 22:43:46 +0200 +Subject: [PATCH 1/3] added: support for OTF fonts +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + + +Signed-off-by: Sébastien Brochet <blinkseb@xbmc.org> +--- + lib/ffmpeg/libavcodec/avcodec.h | 1 + + lib/ffmpeg/libavformat/matroska.c | 1 + + xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp | 2 +- + 3 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/lib/ffmpeg/libavcodec/avcodec.h b/lib/ffmpeg/libavcodec/avcodec.h +index 0b756d0..6996c92 100644 +--- a/lib/ffmpeg/libavcodec/avcodec.h ++++ b/lib/ffmpeg/libavcodec/avcodec.h +@@ -435,6 +435,7 @@ enum CodecID { + CODEC_ID_BINTEXT = MKBETAG('B','T','X','T'), + CODEC_ID_XBIN = MKBETAG('X','B','I','N'), + CODEC_ID_IDF = MKBETAG( 0 ,'I','D','F'), ++ CODEC_ID_OTF = MKBETAG( 0 ,'O','T','F'), + + CODEC_ID_PROBE = 0x19000, ///< codec_id is not known (like CODEC_ID_NONE) but lavf should attempt to identify it + +diff --git a/lib/ffmpeg/libavformat/matroska.c b/lib/ffmpeg/libavformat/matroska.c +index 52481d7..2f5b617 100644 +--- a/lib/ffmpeg/libavformat/matroska.c ++++ b/lib/ffmpeg/libavformat/matroska.c +@@ -90,6 +90,7 @@ const CodecMime ff_mkv_mime_tags[] = { + {"image/tiff" , CODEC_ID_TIFF}, + {"application/x-truetype-font", CODEC_ID_TTF}, + {"application/x-font" , CODEC_ID_TTF}, ++ {"application/vnd.ms-opentype", CODEC_ID_OTF}, + + {"" , CODEC_ID_NONE} + }; +diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp +index 17cbd48..4524141 100644 +--- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp ++++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp +@@ -1062,7 +1062,7 @@ void CDVDDemuxFFmpeg::AddStream(int iId) + } + case AVMEDIA_TYPE_ATTACHMENT: + { //mkv attachments. Only bothering with fonts for now. +- if(pStream->codec->codec_id == CODEC_ID_TTF) ++ if(pStream->codec->codec_id == CODEC_ID_TTF || pStream->codec->codec_id == CODEC_ID_OTF) + { + std::string fileName = "special://temp/fonts/"; + XFILE::CDirectory::Create(fileName); +-- +1.7.10.msysgit.1 + |