diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-10-25 02:55:30 +0400 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-10-25 02:55:30 +0400 |
commit | 8bfa494d64a7651544737bd37f0333942abf97af (patch) | |
tree | 44961f03ba4def333d1f5754b1cc92fc8e0b725d /src/thirdparty/MediaInfo | |
parent | e1943b9937141171e17e76c94b42d7680e14ede6 (diff) |
updated MediaInfoLib to v0.7.36
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@2696 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/thirdparty/MediaInfo')
20 files changed, 302 insertions, 8 deletions
diff --git a/src/thirdparty/MediaInfo/Image/File_Dpx.cpp b/src/thirdparty/MediaInfo/Image/File_Dpx.cpp new file mode 100644 index 000000000..a27253cda --- /dev/null +++ b/src/thirdparty/MediaInfo/Image/File_Dpx.cpp @@ -0,0 +1,112 @@ +// File_Dpx - Info for DPX (SMPTE 268M) files
+// Copyright (C) 2010-2010 MediaArea.net SARL, Info@MediaArea.net
+//
+// This library is free software: you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this library. If not, see <http://www.gnu.org/licenses/>.
+//
+//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+//---------------------------------------------------------------------------
+//
+// Examples:
+// http://samples.mplayerhq.hu/FLV/
+//
+// Reverse engineering
+// http://osflash.org/documentation/amf/astypes
+//
+//---------------------------------------------------------------------------
+
+//---------------------------------------------------------------------------
+// Compilation conditions
+#include "MediaInfo/Setup.h"
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+//---------------------------------------------------------------------------
+
+//---------------------------------------------------------------------------
+#if defined(MEDIAINFO_DPX_YES)
+//---------------------------------------------------------------------------
+
+//---------------------------------------------------------------------------
+#include "MediaInfo/Image/File_Dpx.h"
+//---------------------------------------------------------------------------
+
+namespace MediaInfoLib
+{
+
+//---------------------------------------------------------------------------
+//***************************************************************************
+// Constructor/Destructor
+//***************************************************************************
+
+//---------------------------------------------------------------------------
+File_Dpx::File_Dpx()
+:File__Analyze()
+{
+ //Configuration
+ ParserName=_T("DPX");
+}
+
+//***************************************************************************
+// Streams management
+//***************************************************************************
+
+//---------------------------------------------------------------------------
+void File_Dpx::Streams_Finish()
+{
+}
+
+//***************************************************************************
+// Buffer
+//***************************************************************************
+
+//---------------------------------------------------------------------------
+bool File_Dpx::FileHeader_Begin()
+{
+ //Element_Size
+ if (Buffer_Size<4)
+ return false; //Must wait for more data
+
+ if (CC4(Buffer)!=0x53445058) //"SPDX"
+ {
+ Reject();
+ return false;
+ }
+
+ //All should be OK...
+ return true;
+}
+
+//---------------------------------------------------------------------------
+void File_Dpx::Read_Buffer_Continue()
+{
+ //Parsing
+ Element_Begin("File information");
+ Skip_String(4, "Magic number");
+ Element_End();
+
+ FILLING_BEGIN();
+ //Filling
+ Accept();
+
+ Fill(Stream_General, 0, General_Format, "DPX");
+
+ Finish();
+ FILLING_END();
+}
+
+} //NameSpace
+
+#endif //MEDIAINFO_DPX_YES
diff --git a/src/thirdparty/MediaInfo/Image/File_Dpx.h b/src/thirdparty/MediaInfo/Image/File_Dpx.h new file mode 100644 index 000000000..e965ed2a5 --- /dev/null +++ b/src/thirdparty/MediaInfo/Image/File_Dpx.h @@ -0,0 +1,59 @@ +// File_Dpx - Info for DPX (SMPTE 268M) files
+// Copyright (C) 2010-2010 MediaArea.net SARL, Info@MediaArea.net
+//
+// This library is free software: you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this library. If not, see <http://www.gnu.org/licenses/>.
+//
+//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+//
+// Information about DPX files
+//
+//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+//---------------------------------------------------------------------------
+#ifndef MediaInfo_File_DpxH
+#define MediaInfo_File_DpxH
+//---------------------------------------------------------------------------
+
+//---------------------------------------------------------------------------
+#include "MediaInfo/File__Analyze.h"
+#include <map>
+//---------------------------------------------------------------------------
+
+namespace MediaInfoLib
+{
+
+//***************************************************************************
+// Class File_Dpx
+//***************************************************************************
+
+class File_Dpx : public File__Analyze
+{
+public :
+ File_Dpx();
+
+private :
+ //Streams management
+ void Streams_Finish();
+
+ //Buffer - File header
+ bool FileHeader_Begin();
+
+ //Buffer - Global
+ void Read_Buffer_Continue ();
+};
+
+} //NameSpace
+
+#endif
diff --git a/src/thirdparty/MediaInfo/MediaInfoLib.vcproj b/src/thirdparty/MediaInfo/MediaInfoLib.vcproj index c02532248..5006b0d05 100644 --- a/src/thirdparty/MediaInfo/MediaInfoLib.vcproj +++ b/src/thirdparty/MediaInfo/MediaInfoLib.vcproj @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="9.00"
+ Version="9,00"
Name="MediaInfoLib"
ProjectGUID="{20E0F8D6-213C-460B-B361-9C725CB375C7}"
RootNamespace="MediaInfoLib"
@@ -582,6 +582,10 @@ >
</File>
<File
+ RelativePath=".\Image\File_Dpx.cpp"
+ >
+ </File>
+ <File
RelativePath=".\Image\File_Gif.cpp"
>
</File>
@@ -1180,6 +1184,10 @@ >
</File>
<File
+ RelativePath=".\Image\File_Dpx.h"
+ >
+ </File>
+ <File
RelativePath=".\Image\File_Gif.h"
>
</File>
diff --git a/src/thirdparty/MediaInfo/MediaInfoLib.vcxproj b/src/thirdparty/MediaInfo/MediaInfoLib.vcxproj index d4cc97da1..b01b0faa4 100644 --- a/src/thirdparty/MediaInfo/MediaInfoLib.vcxproj +++ b/src/thirdparty/MediaInfo/MediaInfoLib.vcxproj @@ -216,6 +216,7 @@ <ClCompile Include="Video\File_Theora.cpp" />
<ClCompile Include="Video\File_Vc1.cpp" />
<ClCompile Include="Image\File_Bmp.cpp" />
+ <ClCompile Include="Image\File_Dpx.cpp" />
<ClCompile Include="Image\File_Gif.cpp" />
<ClCompile Include="Image\File_Ico.cpp" />
<ClCompile Include="Image\File_Jpeg.cpp" />
@@ -357,6 +358,7 @@ <ClInclude Include="Audio\File_Vorbis.h" />
<ClInclude Include="Audio\File_Wvpk.h" />
<ClInclude Include="Image\File_Bmp.h" />
+ <ClInclude Include="Image\File_Dpx.h" />
<ClInclude Include="Image\File_Gif.h" />
<ClInclude Include="Image\File_Ico.h" />
<ClInclude Include="Image\File_Jpeg.h" />
diff --git a/src/thirdparty/MediaInfo/MediaInfoLib.vcxproj.filters b/src/thirdparty/MediaInfo/MediaInfoLib.vcxproj.filters index f1437c232..00e8cac9d 100644 --- a/src/thirdparty/MediaInfo/MediaInfoLib.vcxproj.filters +++ b/src/thirdparty/MediaInfo/MediaInfoLib.vcxproj.filters @@ -300,6 +300,9 @@ <ClCompile Include="Image\File_Bmp.cpp">
<Filter>Source Files\Image</Filter>
</ClCompile>
+ <ClCompile Include="Image\File_Dpx.cpp">
+ <Filter>Source Files\Image</Filter>
+ </ClCompile>
<ClCompile Include="Image\File_Gif.cpp">
<Filter>Source Files\Image</Filter>
</ClCompile>
@@ -692,6 +695,9 @@ <ClInclude Include="Image\File_Bmp.h">
<Filter>Header Files\Image</Filter>
</ClInclude>
+ <ClInclude Include="Image\File_Dpx.h">
+ <Filter>Header Files\Image</Filter>
+ </ClInclude>
<ClInclude Include="Image\File_Gif.h">
<Filter>Header Files\Image</Filter>
</ClInclude>
diff --git a/src/thirdparty/MediaInfo/MediaInfo_Config.cpp b/src/thirdparty/MediaInfo/MediaInfo_Config.cpp index 6eb604bb1..e5bda4ed6 100644 --- a/src/thirdparty/MediaInfo/MediaInfo_Config.cpp +++ b/src/thirdparty/MediaInfo/MediaInfo_Config.cpp @@ -42,7 +42,7 @@ namespace MediaInfoLib {
//---------------------------------------------------------------------------
-const Char* MediaInfo_Version=_T("MediaInfoLib - v0.7.36BETA");
+const Char* MediaInfo_Version=_T("MediaInfoLib - v0.7.36");
const Char* MediaInfo_Url=_T("http://mediainfo.sourceforge.net");
Ztring EmptyZtring; //Use it when we can't return a reference to a true Ztring
const Ztring EmptyZtring_Const; //Use it when we can't return a reference to a true Ztring, const version
diff --git a/src/thirdparty/MediaInfo/MediaInfo_Config_Automatic.cpp b/src/thirdparty/MediaInfo/MediaInfo_Config_Automatic.cpp index b61cd60cc..199502283 100644 --- a/src/thirdparty/MediaInfo/MediaInfo_Config_Automatic.cpp +++ b/src/thirdparty/MediaInfo/MediaInfo_Config_Automatic.cpp @@ -1089,6 +1089,7 @@ void MediaInfo_Config_Format (InfoMap &Info) "Wave64;;;A;Riff;;w64\n"
"WavPack;;;A;Wvpk;;wv wvc;;http://www.wavpack.com\n"
"Bitmap;;;I;Bmp;;bmp;image/bmp\n"
+ "DPX;;;I;Dpx;;dpx\n"
"DIB;;;I;Riff;RIFF Device Independent Bitmap\n"
"GIF;;;I;Gif;Graphics Interchange Format;gif;image/gif\n"
"ICO;;;I;Ico;;ico;image/vnd.microsoft.icon\n"
@@ -1286,7 +1287,7 @@ void MediaInfo_Config_CodecID_Video_Mpeg4 (InfoMap &Info) "mx3p;MPEG Video\n"
"myuv;YUV;;;;;;YUV;4:2:0\n"
"ovc1;VC-1;;Smooth Streaming Media Video;http://alexzambelli.com/blog/2009/02/10/smooth-streaming-architecture/\n"
- "png ;M-PNG\n"
+ "png ;PNG\n"
"PNTG;MacPaint;;Apple MacPaint image format;http://www.apple.com/quicktime/download/standalone.html\n"
"rle ;RLE;;;http://www.apple.com/quicktime/download/standalone.html\n"
"rpza;Road Pizza;;;http://www.apple.com/quicktime/download/standalone.html\n"
@@ -1369,7 +1370,7 @@ void MediaInfo_Config_CodecID_Video_Riff (InfoMap &Info) "1978;RGB;A.M.Paredes predictor;;http://www.pegasusimaging.com/cgi-bin/download2.cgi?LVIDB;;;RGB\n"
" BIT;RGB;;;;;;RGB\n"
" JPG;JPEG;;;;;;YUV\n"
- " PNG;M-PNG;;;;;;RGB\n"
+ " PNG;PNG;;;;;;RGB\n"
" RAW;RGB;;;http://www.fourcc.org/indexrgb.htm;;;RGB\n"
" raw;RGB;;;http://www.fourcc.org/indexrgb.htm;;;RGB\n"
" RGB;RGB;;;http://www.fourcc.org/indexrgb.htm;;;RGB\n"
@@ -1718,7 +1719,7 @@ void MediaInfo_Config_CodecID_Video_Riff (InfoMap &Info) "MPG3;MPEG-4 Visual;FFmpeg DivX 3;(MPEG-4) MS MPEG-4 v3;;;;YUV;4:2:0\n"
"MPG4;MPEG-4 Visual;MS MPEG-4 v1;Microsoft MPEG-4 v1;;;;YUV;4:2:0\n"
"MPGI;MPEG Video;Sigma;Sigma Design MPEG-1 I-frame;;;;YUV;4:2:0\n"
- "MPNG;M-PNG;;Motion PNG\n"
+ "MPNG;PNG;;Motion PNG\n"
"MRCA;Mrcodec;;FAST Multimedia\n"
"MRLE;RLE;;Microsoft RLE;;;;RGB\n"
"MSS1;Screen Video;Windows;Windows Screen Video\n"
@@ -1793,8 +1794,8 @@ void MediaInfo_Config_CodecID_Video_Riff (InfoMap &Info) "PIM2;JPEG;Pegasus;Pegasus Imaging;http://mirror01.iptelecom.net.ua/~video/codecs/PICVideo.Lossless.JPEG.codec.v2.10.27.exe;;;YUV\n"
"PIMJ;JPEG;Pegasus;Pegasus Imaging PICvideo Lossless JPEG;http://mirror01.iptelecom.net.ua/~video/codecs/PICVideo.Lossless.JPEG.codec.v2.10.27.exe;;;YUV\n"
"PIXL;JPEG;Miro;MiroVideo XL (JPEG);;;;YUV\n"
- "PNG;M-PNG\n"
- "PNG1;M-PNG;;Corecodec.org CorePNG\n"
+ "PNG;PNG\n"
+ "PNG1;PNG;;Corecodec.org CorePNG\n"
"PVEZ;PowerEZ;;Horizons Technology PowerEZ\n"
"PVMM;MPEG-4 Visual;Pegasus;PacketVideo Corporation MPEG-4;;;;YUV;4:2:0\n"
"PVW2;Wavelet;Pegasus;Pegasus Imaging Wavelet 2000\n"
diff --git a/src/thirdparty/MediaInfo/MediaInfo_Config_MediaInfo.cpp b/src/thirdparty/MediaInfo/MediaInfo_Config_MediaInfo.cpp index eb15bb572..449b64d36 100644 --- a/src/thirdparty/MediaInfo/MediaInfo_Config_MediaInfo.cpp +++ b/src/thirdparty/MediaInfo/MediaInfo_Config_MediaInfo.cpp @@ -58,6 +58,8 @@ MediaInfo_Config_MediaInfo::MediaInfo_Config_MediaInfo() File_Bdmv_ParseTargetedFile=true;
File_DvDif_Analysis=false;
File_Mmsh_Describe_Only=false;
+ File_Eia608_DisplayEmptyStream=false;
+ File_Eia708_DisplayEmptyStream=false;
State=0;
Demux_ForceIds=false;
Demux_PCM_20bitTo16bit=false;
@@ -281,6 +283,24 @@ Ztring MediaInfo_Config_MediaInfo::Option (const String &Option, const String &V {
return File_Mmsh_Describe_Only_Get()?"1":"0";
}
+ else if (Option_Lower==_T("file_eia708_displayemptystream"))
+ {
+ File_Eia708_DisplayEmptyStream_Set(!(Value==_T("0") || Value.empty()));
+ return _T("");
+ }
+ else if (Option_Lower==_T("file_eia708_displayemptystream_get"))
+ {
+ return File_Eia708_DisplayEmptyStream_Get()?"1":"0";
+ }
+ else if (Option_Lower==_T("file_eia608_displayemptystream"))
+ {
+ File_Eia608_DisplayEmptyStream_Set(!(Value==_T("0") || Value.empty()));
+ return _T("");
+ }
+ else if (Option_Lower==_T("file_eia608_displayemptystream_get"))
+ {
+ return File_Eia608_DisplayEmptyStream_Get()?"1":"0";
+ }
else if (Option_Lower==_T("file_event_callbackfunction"))
{
#if MEDIAINFO_EVENTS
@@ -835,6 +855,34 @@ bool MediaInfo_Config_MediaInfo::File_Mmsh_Describe_Only_Get () return Temp;
}
+//---------------------------------------------------------------------------
+void MediaInfo_Config_MediaInfo::File_Eia608_DisplayEmptyStream_Set (bool NewValue)
+{
+ CriticalSectionLocker CSL(CS);
+ File_Eia608_DisplayEmptyStream=NewValue;
+}
+
+bool MediaInfo_Config_MediaInfo::File_Eia608_DisplayEmptyStream_Get ()
+{
+ CriticalSectionLocker CSL(CS);
+ bool Temp=File_Eia608_DisplayEmptyStream;
+ return Temp;
+}
+
+//---------------------------------------------------------------------------
+void MediaInfo_Config_MediaInfo::File_Eia708_DisplayEmptyStream_Set (bool NewValue)
+{
+ CriticalSectionLocker CSL(CS);
+ File_Eia708_DisplayEmptyStream=NewValue;
+}
+
+bool MediaInfo_Config_MediaInfo::File_Eia708_DisplayEmptyStream_Get ()
+{
+ CriticalSectionLocker CSL(CS);
+ bool Temp=File_Eia708_DisplayEmptyStream;
+ return Temp;
+}
+
//***************************************************************************
// Analysis internal
//***************************************************************************
diff --git a/src/thirdparty/MediaInfo/MediaInfo_Config_MediaInfo.h b/src/thirdparty/MediaInfo/MediaInfo_Config_MediaInfo.h index e790cb586..4b8292a07 100644 --- a/src/thirdparty/MediaInfo/MediaInfo_Config_MediaInfo.h +++ b/src/thirdparty/MediaInfo/MediaInfo_Config_MediaInfo.h @@ -132,6 +132,10 @@ public : Ztring File_Curl_Get (const Ztring &Field);
void File_Mmsh_Describe_Only_Set (bool NewValue);
bool File_Mmsh_Describe_Only_Get ();
+ void File_Eia608_DisplayEmptyStream_Set (bool NewValue);
+ bool File_Eia608_DisplayEmptyStream_Get ();
+ void File_Eia708_DisplayEmptyStream_Set (bool NewValue);
+ bool File_Eia708_DisplayEmptyStream_Get ();
//Analysis internal
void State_Set (float State);
@@ -177,6 +181,8 @@ private : bool File_Bdmv_ParseTargetedFile;
bool File_DvDif_Analysis;
bool File_Mmsh_Describe_Only;
+ bool File_Eia608_DisplayEmptyStream;
+ bool File_Eia708_DisplayEmptyStream;
//Analysis internal
float State;
diff --git a/src/thirdparty/MediaInfo/MediaInfo_File.cpp b/src/thirdparty/MediaInfo/MediaInfo_File.cpp index b3ed703ab..d4a112b5d 100644 --- a/src/thirdparty/MediaInfo/MediaInfo_File.cpp +++ b/src/thirdparty/MediaInfo/MediaInfo_File.cpp @@ -227,6 +227,9 @@ #if defined(MEDIAINFO_BMP_YES)
#include "MediaInfo/Image/File_Bmp.h"
#endif
+#if defined(MEDIAINFO_DPX_YES)
+ #include "MediaInfo/Image/File_Dpx.h"
+#endif
#if defined(MEDIAINFO_GIF_YES)
#include "MediaInfo/Image/File_Gif.h"
#endif
@@ -496,6 +499,9 @@ bool MediaInfo_Internal::SelectFromExtension (const String &Parser) #if defined(MEDIAINFO_BMP_YES)
else if (Parser==_T("Bmp")) Info=new File_Bmp();
#endif
+ #if defined(MEDIAINFO_DPX_YES)
+ else if (Parser==_T("Dpx")) Info=new File_Dpx();
+ #endif
#if defined(MEDIAINFO_ICO_YES)
else if (Parser==_T("Ico")) Info=new File_Ico();
#endif
@@ -752,6 +758,9 @@ int MediaInfo_Internal::ListFormats(const String &File_Name) #if defined(MEDIAINFO_BMP_YES)
delete Info; Info=new File_Bmp(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
#endif
+ #if defined(MEDIAINFO_DPX_YES)
+ delete Info; Info=new File_Dpx(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
+ #endif
#if defined(MEDIAINFO_GIF_YES)
delete Info; Info=new File_Gif(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1;
#endif
diff --git a/src/thirdparty/MediaInfo/Multiple/File_Mpeg4.cpp b/src/thirdparty/MediaInfo/Multiple/File_Mpeg4.cpp index 554d38d4d..2ec5dc265 100644 --- a/src/thirdparty/MediaInfo/Multiple/File_Mpeg4.cpp +++ b/src/thirdparty/MediaInfo/Multiple/File_Mpeg4.cpp @@ -199,7 +199,7 @@ void File_Mpeg4::Streams_Finish() else
{
//Hacks - Before
- Ztring FrameRate_Temp, FrameRate_Mode_Temp, Delay_Temp;
+ Ztring FrameRate_Temp, FrameRate_Mode_Temp, Duration_Temp, Delay_Temp;
if (StreamKind_Last==Stream_Video)
{
if (Temp->second.Parser && Retrieve(Stream_Video, 0, Video_CodecID_Hint)==_T("DVCPRO HD"))
@@ -213,6 +213,7 @@ void File_Mpeg4::Streams_Finish() FrameRate_Temp=Retrieve(Stream_Video, StreamPos_Last, Video_FrameRate);
FrameRate_Mode_Temp=Retrieve(Stream_Video, StreamPos_Last, Video_FrameRate_Mode);
+ Duration_Temp=Retrieve(Stream_Video, StreamPos_Last, Video_Duration);
Delay_Temp=Retrieve(Stream_Video, StreamPos_Last, Video_Delay);
//Special case: DV 1080i and MPEG-4 header is lying (saying this is 1920 pixel wide, but this is 1440 pixel wide)
@@ -224,6 +225,7 @@ void File_Mpeg4::Streams_Finish() Merge(*Temp->second.Parser, StreamKind_Last, 0, StreamPos_Last);
//Hacks - After
+ Fill(Stream_Video, StreamPos_Last, Video_Duration, Duration_Temp, true);
if (StreamKind_Last==Stream_Video)
{
if (!FrameRate_Temp.empty() && FrameRate_Temp!=Retrieve(Stream_Video, StreamPos_Last, Video_FrameRate))
diff --git a/src/thirdparty/MediaInfo/Setup.h b/src/thirdparty/MediaInfo/Setup.h index 23e3aafb6..fb5536091 100644 --- a/src/thirdparty/MediaInfo/Setup.h +++ b/src/thirdparty/MediaInfo/Setup.h @@ -476,6 +476,9 @@ #if !defined(MEDIAINFO_IMAGE_NO) && !defined(MEDIAINFO_BMP_NO) && !defined(MEDIAINFO_BMP_YES)
#define MEDIAINFO_BMP_YES
#endif
+#if !defined(MEDIAINFO_IMAGE_NO) && !defined(MEDIAINFO_DPX_NO) && !defined(MEDIAINFO_DPX_YES)
+ #define MEDIAINFO_DPX_YES
+#endif
#if !defined(MEDIAINFO_IMAGE_NO) && !defined(MEDIAINFO_GIF_NO) && !defined(MEDIAINFO_GIF_YES)
#define MEDIAINFO_GIF_YES
#endif
diff --git a/src/thirdparty/MediaInfo/Text/File_DtvccTransport.cpp b/src/thirdparty/MediaInfo/Text/File_DtvccTransport.cpp index b006f513e..ccd5392fd 100644 --- a/src/thirdparty/MediaInfo/Text/File_DtvccTransport.cpp +++ b/src/thirdparty/MediaInfo/Text/File_DtvccTransport.cpp @@ -108,6 +108,7 @@ void File_DtvccTransport::Streams_Fill() if (Streams[Pos] && Streams[Pos]->Parser && Streams[Pos]->Parser->Status[IsFilled])
{
Merge(*Streams[Pos]->Parser);
+ Streams[Pos]->StreamPos=StreamPos_Last;
if (Pos<2)
Fill(Stream_Text, StreamPos_Last, Text_ID, (Format==Format_DVD?_T("DVD-"):_T("608-"))+Ztring::ToZtring(Pos+1));
Fill(Stream_Text, StreamPos_Last, "MuxingMode", Format==Format_DVD?_T("DVD-Video"):_T("DTVCC Transport"));
@@ -120,7 +121,11 @@ void File_DtvccTransport::Streams_Finish() //Filling
for (size_t Pos=0; Pos<Streams.size(); Pos++)
if (Streams[Pos] && Streams[Pos]->Parser && Streams[Pos]->Parser->Status[IsFilled])
+ {
Finish(Streams[Pos]->Parser);
+ if (Streams[Pos]->StreamPos!=(size_t)-1)
+ Merge(*Streams[Pos]->Parser, Stream_Text, 0, Streams[Pos]->StreamPos);
+ }
}
//***************************************************************************
diff --git a/src/thirdparty/MediaInfo/Text/File_DtvccTransport.h b/src/thirdparty/MediaInfo/Text/File_DtvccTransport.h index 76199ca81..835b34cd6 100644 --- a/src/thirdparty/MediaInfo/Text/File_DtvccTransport.h +++ b/src/thirdparty/MediaInfo/Text/File_DtvccTransport.h @@ -70,11 +70,13 @@ private : struct stream
{
File__Analyze* Parser;
+ size_t StreamPos;
bool IsFilled;
stream()
{
Parser=NULL;
+ StreamPos=(size_t)-1;
IsFilled=false;
}
diff --git a/src/thirdparty/MediaInfo/Text/File_Eia608.cpp b/src/thirdparty/MediaInfo/Text/File_Eia608.cpp index e71a52b92..d894d72d3 100644 --- a/src/thirdparty/MediaInfo/Text/File_Eia608.cpp +++ b/src/thirdparty/MediaInfo/Text/File_Eia608.cpp @@ -31,6 +31,7 @@ //---------------------------------------------------------------------------
#include "MediaInfo/Text/File_Eia608.h"
+#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
using namespace std;
//---------------------------------------------------------------------------
@@ -96,6 +97,7 @@ File_Eia608::File_Eia608() RollUpLines=0;
cc_data_1_Old=0x00;
cc_data_2_Old=0x00;
+ HasContent=false;
}
//***************************************************************************
@@ -113,6 +115,8 @@ void File_Eia608::Streams_Fill() //---------------------------------------------------------------------------
void File_Eia608::Streams_Finish()
{
+ if (!HasContent)
+ Fill(Stream_Text, 0, "ContentInfo", "No content");
}
//***************************************************************************
@@ -134,8 +138,14 @@ void File_Eia608::Read_Buffer_Unsynched() void File_Eia608::Read_Buffer_Continue()
{
if (!Status[IsAccepted])
+ {
Accept("EIA-608");
+ //Forcing detection even if this is empty caption (option)
+ if (Config->File_Eia708_DisplayEmptyStream_Get()) //TODO: separate CC1/CC2/T1/T2
+ Fill("EIA-608");
+ }
+
int8u cc_data_1, cc_data_2;
Get_B1 (cc_data_1, "cc_data");
Get_B1 (cc_data_2, "cc_data");
@@ -795,6 +805,8 @@ void File_Eia608::Character_Fill(wchar_t Character) if (TextMode || !InBack)
HasChanged();
+ if (!HasContent)
+ HasContent=true;
if (!Status[IsFilled]) //TODO: separate CC1/CC2/T1/T2
{
Fill("EIA-608");
diff --git a/src/thirdparty/MediaInfo/Text/File_Eia608.h b/src/thirdparty/MediaInfo/Text/File_Eia608.h index 298ca9734..565c9d9ec 100644 --- a/src/thirdparty/MediaInfo/Text/File_Eia608.h +++ b/src/thirdparty/MediaInfo/Text/File_Eia608.h @@ -122,6 +122,7 @@ private : size_t RollUpLines;
int8u cc_data_1_Old;
int8u cc_data_2_Old;
+ bool HasContent;
};
} //NameSpace
diff --git a/src/thirdparty/MediaInfo/Text/File_Eia708.cpp b/src/thirdparty/MediaInfo/Text/File_Eia708.cpp index b25db2200..9d4f40cb1 100644 --- a/src/thirdparty/MediaInfo/Text/File_Eia708.cpp +++ b/src/thirdparty/MediaInfo/Text/File_Eia708.cpp @@ -31,6 +31,7 @@ //---------------------------------------------------------------------------
#include "MediaInfo/Text/File_Eia708.h"
+#include "MediaInfo/MediaInfo_Config_MediaInfo.h"
//---------------------------------------------------------------------------
namespace MediaInfoLib
@@ -53,6 +54,7 @@ File_Eia708::File_Eia708() //Temp
StandAloneCommand=false;
+ HasContent=false;
}
//---------------------------------------------------------------------------
@@ -78,6 +80,8 @@ void File_Eia708::Streams_Fill() //---------------------------------------------------------------------------
void File_Eia708::Streams_Finish()
{
+ if (!HasContent)
+ Fill(Stream_Text, 0, "ContentInfo", "No content");
}
//***************************************************************************
@@ -96,6 +100,10 @@ void File_Eia708::Read_Buffer_Continue() }
Accept("EIA-708");
+
+ //Forcing detection even if this is empty caption (option)
+ if (Config->File_Eia708_DisplayEmptyStream_Get()) //TODO: separate services
+ Fill("EIA-708");
}
}
@@ -1198,6 +1206,8 @@ void File_Eia708::Character_Fill(wchar_t Character) Window->Minimal.x=x;
}
+ if (!HasContent)
+ HasContent=true;
if (!Status[IsFilled]) //TODO: separate services
{
Fill("EIA-708");
diff --git a/src/thirdparty/MediaInfo/Text/File_Eia708.h b/src/thirdparty/MediaInfo/Text/File_Eia708.h index 18f24adad..8e5e2597a 100644 --- a/src/thirdparty/MediaInfo/Text/File_Eia708.h +++ b/src/thirdparty/MediaInfo/Text/File_Eia708.h @@ -145,6 +145,7 @@ private : std::vector<stream*> Streams;
int8u service_number;
int8u block_size;
+ bool HasContent;
//Elements
void NUL(); //NUL
diff --git a/src/thirdparty/MediaInfo/Text/File_Scte20.cpp b/src/thirdparty/MediaInfo/Text/File_Scte20.cpp index 76897c96f..2263b6579 100644 --- a/src/thirdparty/MediaInfo/Text/File_Scte20.cpp +++ b/src/thirdparty/MediaInfo/Text/File_Scte20.cpp @@ -111,6 +111,7 @@ void File_Scte20::Streams_Fill() if (Streams[Pos] && Streams[Pos]->Parser && Streams[Pos]->Parser->Status[IsFilled])
{
Merge(*Streams[Pos]->Parser);
+ Streams[Pos]->StreamPos=StreamPos_Last;
if (Pos<3)
Fill(Stream_Text, StreamPos_Last, Text_ID, _T("608-")+Ztring::ToZtring(Pos+1));
Fill(Stream_Text, StreamPos_Last, "MuxingMode", _T("SCTE 20"));
@@ -123,7 +124,11 @@ void File_Scte20::Streams_Finish() //Filling
for (size_t Pos=0; Pos<Streams.size(); Pos++)
if (Streams[Pos] && Streams[Pos]->Parser && Streams[Pos]->Parser->Status[IsFilled])
+ {
Finish(Streams[Pos]->Parser);
+ if (Streams[Pos]->StreamPos!=(size_t)-1)
+ Merge(*Streams[Pos]->Parser, Stream_Text, 0, Streams[Pos]->StreamPos);
+ }
}
//***************************************************************************
diff --git a/src/thirdparty/MediaInfo/Text/File_Scte20.h b/src/thirdparty/MediaInfo/Text/File_Scte20.h index 2dcf034f8..a069b45e6 100644 --- a/src/thirdparty/MediaInfo/Text/File_Scte20.h +++ b/src/thirdparty/MediaInfo/Text/File_Scte20.h @@ -67,11 +67,13 @@ private : struct stream
{
File__Analyze* Parser;
+ size_t StreamPos;
bool IsFilled;
stream()
{
Parser=NULL;
+ StreamPos=(size_t)-1;
IsFilled=false;
}
|