diff -Nru libmediainfo-18.08.1/debian/changelog libmediainfo-18.12/debian/changelog --- libmediainfo-18.08.1/debian/changelog 2018-10-15 14:20:30.000000000 +0000 +++ libmediainfo-18.12/debian/changelog 2018-12-24 18:40:36.000000000 +0000 @@ -1,3 +1,9 @@ +libmediainfo (18.12-1) unstable; urgency=medium + + * [92aabc0] New upstream version 18.12 + + -- Chow Loong Jin Tue, 25 Dec 2018 02:40:36 +0800 + libmediainfo (18.08.1-1) unstable; urgency=medium * [3fcbfb4] New upstream version 18.08.1 diff -Nru libmediainfo-18.08.1/History_DLL.txt libmediainfo-18.12/History_DLL.txt --- libmediainfo-18.08.1/History_DLL.txt 2018-09-09 21:34:36.000000000 +0000 +++ libmediainfo-18.12/History_DLL.txt 2018-12-10 23:27:18.000000000 +0000 @@ -7,6 +7,25 @@ bug reports and feature request are here: https://sourceforge.net/p/mediainfo/_list/tickets +Version 18.12, 2018-12-10 +-------------- ++ DCP: support of multi-reel packages ++ EBUCore: added some FFV1 related metadata ++ JPEG: better info display of CYMK files ++ Provide source of the color related metadata (container or stream) (hidden by default) ++ MXF: display more information when wrapper/essence values are detected as not same ++ MXF: ProRes profiles ++ MPEG-4: ProRes RAW support ++ MPEG-TS: add support of parsing some ETSI TS 103-433 messages +x MPEG-2 Video: variable GOP detection fix +x MPEG-7 export: some fields were missing due to the removal of some legacy fields +x ADTS: Fix display of channel count for 8-channel streams +x ID3v2: fix some date related issues +x I298, ID3v2: fix wrong read of recording date in some cases +x I1032, PBCore2: fix essenceFrameSize with non Video tracks +x I1096, JPEG: fix crash with one file +x Several other crash and memory leak fixes + Version 18.08.1, 2018-09-10 -------------- x Fix XML/MPEG-7/PBCore2 output discarding non ANSI characters diff -Nru libmediainfo-18.08.1/Project/CMake/CMakeLists.txt libmediainfo-18.12/Project/CMake/CMakeLists.txt --- libmediainfo-18.08.1/Project/CMake/CMakeLists.txt 2018-09-09 21:34:38.000000000 +0000 +++ libmediainfo-18.12/Project/CMake/CMakeLists.txt 2018-12-10 23:27:20.000000000 +0000 @@ -5,8 +5,8 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") set(MediaInfoLib_MAJOR_VERSION 18) -set(MediaInfoLib_MINOR_VERSION 08) -set(MediaInfoLib_PATCH_VERSION 1) +set(MediaInfoLib_MINOR_VERSION 12) +set(MediaInfoLib_PATCH_VERSION 0) set(MediaInfoLib_VERSION ${MediaInfoLib_MAJOR_VERSION}.${MediaInfoLib_MINOR_VERSION}) if (MediaInfoLib_PATCH_VERSION) @@ -67,7 +67,7 @@ if(UNIX AND BUILD_SHARED_LIBS) target_compile_options(zlibstatic PRIVATE -fPIC) endif() - set(ZLIB_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../../../zlib) + set(ZLIB_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../../../zlib ${CMAKE_CURRENT_BINARY_DIR}/zlib) endif() if(NOT MSVC) diff -Nru libmediainfo-18.08.1/Project/GNU/libmediainfo.dsc libmediainfo-18.12/Project/GNU/libmediainfo.dsc --- libmediainfo-18.08.1/Project/GNU/libmediainfo.dsc 2018-09-09 21:34:38.000000000 +0000 +++ libmediainfo-18.12/Project/GNU/libmediainfo.dsc 2018-12-10 23:27:20.000000000 +0000 @@ -2,7 +2,7 @@ Source: libmediainfo Binary: libmediainfo-dev, libmediainfo0, python-mediainfodll, python3-mediainfodll, libmediainfo-doc libmediainfo0-dbg Architecture: any all -Version: 18.08.1-1 +Version: 18.12-1 Maintainer: MediaArea.net SARL Homepage: http://MediaArea.net/MediaInfo Standards-Version: 3.9.6 @@ -16,11 +16,11 @@ python-mediainfodll deb python optional arch=all python3-mediainfodll deb python optional arch=all Checksums-Sha1: - 0000000000000000000000000000000000000000 000000 libmediainfo_18.08.1.orig.tar.xz - 0000000000000000000000000000000000000000 000000 libmediainfo_18.08.1-1.debian.tar.xz + 0000000000000000000000000000000000000000 000000 libmediainfo_18.12.orig.tar.xz + 0000000000000000000000000000000000000000 000000 libmediainfo_18.12-1.debian.tar.xz Checksums-Sha256: - 0000000000000000000000000000000000000000000000000000000000000000 000000 libmediainfo_18.08.1.orig.tar.xz - 0000000000000000000000000000000000000000000000000000000000000000 000000 libmediainfo_18.08.1-1.debian.tar.xz + 0000000000000000000000000000000000000000000000000000000000000000 000000 libmediainfo_18.12.orig.tar.xz + 0000000000000000000000000000000000000000000000000000000000000000 000000 libmediainfo_18.12-1.debian.tar.xz Files: - 00000000000000000000000000000000 000000 libmediainfo_18.08.1.orig.tar.xz - 00000000000000000000000000000000 000000 libmediainfo_18.08.1-1.debian.tar.xz + 00000000000000000000000000000000 000000 libmediainfo_18.12.orig.tar.xz + 00000000000000000000000000000000 000000 libmediainfo_18.12-1.debian.tar.xz diff -Nru libmediainfo-18.08.1/Project/GNU/libmediainfo.spec libmediainfo-18.12/Project/GNU/libmediainfo.spec --- libmediainfo-18.08.1/Project/GNU/libmediainfo.spec 2018-09-09 21:34:38.000000000 +0000 +++ libmediainfo-18.12/Project/GNU/libmediainfo.spec 2018-12-10 23:27:20.000000000 +0000 @@ -1,6 +1,6 @@ -%global libmediainfo_version 18.08.1 +%global libmediainfo_version 18.12 %global libmediainfo_version_major 18 -%global libmediainfo_version_minor 08 +%global libmediainfo_version_minor 12 %global libzen_version 0.4.37 %global libzen_version_major 0 %global libzen_version_minor 4 @@ -308,7 +308,7 @@ %endif %changelog -* Sun Jan 01 2012 MediaArea.net SARL - 18.08.1-0 +* Sun Jan 01 2012 MediaArea.net SARL - 18.12-0 - See History.txt for more info and real dates - Previous packages made by Toni Graffy - Fedora style made by Vasiliy N. Glazov diff -Nru libmediainfo-18.08.1/Project/GNU/Library/configure.ac libmediainfo-18.12/Project/GNU/Library/configure.ac --- libmediainfo-18.08.1/Project/GNU/Library/configure.ac 2018-09-09 21:34:38.000000000 +0000 +++ libmediainfo-18.12/Project/GNU/Library/configure.ac 2018-12-10 23:27:20.000000000 +0000 @@ -5,7 +5,7 @@ dnl ------------------------------------------------------------------------- dnl Name and version dnl -AC_INIT([libmediainfo], [18.08.1]) +AC_INIT([libmediainfo], [18.12]) dnl ------------------------------------------------------------------------- dnl Test if we are at the good place diff -Nru libmediainfo-18.08.1/Project/GNU/PKGBUILD libmediainfo-18.12/Project/GNU/PKGBUILD --- libmediainfo-18.08.1/Project/GNU/PKGBUILD 2018-09-09 21:34:38.000000000 +0000 +++ libmediainfo-18.12/Project/GNU/PKGBUILD 2018-12-10 23:27:20.000000000 +0000 @@ -3,7 +3,7 @@ # Contributor: hydro pkgname=libmediainfo -pkgver=18.08.1 +pkgver=18.12 pkgrel=1 pkgdesc="shared library for mediainfo" arch=('i686' 'x86_64') diff -Nru libmediainfo-18.08.1/Project/MSVC2013/Dll/MediaInfo.rc libmediainfo-18.12/Project/MSVC2013/Dll/MediaInfo.rc --- libmediainfo-18.08.1/Project/MSVC2013/Dll/MediaInfo.rc 2018-09-09 21:34:38.000000000 +0000 +++ libmediainfo-18.12/Project/MSVC2013/Dll/MediaInfo.rc 2018-12-10 23:27:20.000000000 +0000 @@ -1,8 +1,8 @@ #include VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,08,1,0 - PRODUCTVERSION 18,08,1,0 + FILEVERSION 18,12,0,0 + PRODUCTVERSION 18,12,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -19,10 +19,10 @@ BEGIN VALUE "CompanyName", "MediaArea.net" VALUE "FileDescription", "Most relevant technical and tag data for video and audio files" - VALUE "FileVersion", "18.08.1.0" + VALUE "FileVersion", "18.12.0.0" VALUE "LegalCopyright", "Copyright (C) 2002-2015 MediaArea.net SARL" VALUE "ProductName", "MediaInfo" - VALUE "ProductVersion", "18.08.1.0" + VALUE "ProductVersion", "18.12.0.0" END END BLOCK "VarFileInfo" diff -Nru libmediainfo-18.08.1/Project/MSVC2013/Example/HowToUse.rc libmediainfo-18.12/Project/MSVC2013/Example/HowToUse.rc --- libmediainfo-18.08.1/Project/MSVC2013/Example/HowToUse.rc 2018-09-09 21:34:38.000000000 +0000 +++ libmediainfo-18.12/Project/MSVC2013/Example/HowToUse.rc 2018-12-10 23:27:20.000000000 +0000 @@ -1,8 +1,8 @@ #include VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,08,1,0 - PRODUCTVERSION 18,08,1,0 + FILEVERSION 18,12,0,0 + PRODUCTVERSION 18,12,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -19,10 +19,10 @@ BEGIN VALUE "CompanyName", "MediaArea.net" VALUE "FileDescription", "Most relevant technical and tag data for video and audio files" - VALUE "FileVersion", "18.08.1.0" + VALUE "FileVersion", "18.12.0.0" VALUE "LegalCopyright", "Copyright (C) 2002-2015 MediaArea.net SARL" VALUE "ProductName", "MediaInfo" - VALUE "ProductVersion", "18.08.1.0" + VALUE "ProductVersion", "18.12.0.0" END END BLOCK "VarFileInfo" diff -Nru libmediainfo-18.08.1/Project/MSVC2013/ShellExtension/MediaInfoShellExt.rc libmediainfo-18.12/Project/MSVC2013/ShellExtension/MediaInfoShellExt.rc --- libmediainfo-18.08.1/Project/MSVC2013/ShellExtension/MediaInfoShellExt.rc 2018-09-09 21:34:38.000000000 +0000 +++ libmediainfo-18.12/Project/MSVC2013/ShellExtension/MediaInfoShellExt.rc 2018-12-10 23:27:20.000000000 +0000 @@ -1,8 +1,8 @@ #include VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,08,1,0 - PRODUCTVERSION 18,08,1,0 + FILEVERSION 18,12,0,0 + PRODUCTVERSION 18,12,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -19,10 +19,10 @@ BEGIN VALUE "CompanyName", "MediaArea.net" VALUE "FileDescription", "Most relevant technical and tag data for video and audio files" - VALUE "FileVersion", "18.08.1.0" + VALUE "FileVersion", "18.12.0.0" VALUE "LegalCopyright", "Copyright (C) 2002-2015 MediaArea.net SARL" VALUE "ProductName", "MediaInfo" - VALUE "ProductVersion", "18.08.1.0" + VALUE "ProductVersion", "18.12.0.0" END END BLOCK "VarFileInfo" diff -Nru libmediainfo-18.08.1/Project/MSVC2015/Dll/MediaInfo.rc libmediainfo-18.12/Project/MSVC2015/Dll/MediaInfo.rc --- libmediainfo-18.08.1/Project/MSVC2015/Dll/MediaInfo.rc 2018-09-09 21:34:38.000000000 +0000 +++ libmediainfo-18.12/Project/MSVC2015/Dll/MediaInfo.rc 2018-12-10 23:27:20.000000000 +0000 @@ -1,8 +1,8 @@ #include VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,08,1,0 - PRODUCTVERSION 18,08,1,0 + FILEVERSION 18,12,0,0 + PRODUCTVERSION 18,12,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -19,10 +19,10 @@ BEGIN VALUE "CompanyName", "MediaArea.net" VALUE "FileDescription", "Most relevant technical and tag data for video and audio files" - VALUE "FileVersion", "18.08.1.0" + VALUE "FileVersion", "18.12.0.0" VALUE "LegalCopyright", "Copyright (C) 2002-2015 MediaArea.net SARL" VALUE "ProductName", "MediaInfo" - VALUE "ProductVersion", "18.08.1.0" + VALUE "ProductVersion", "18.12.0.0" END END BLOCK "VarFileInfo" diff -Nru libmediainfo-18.08.1/Project/MSVC2015/Example/HowToUse.rc libmediainfo-18.12/Project/MSVC2015/Example/HowToUse.rc --- libmediainfo-18.08.1/Project/MSVC2015/Example/HowToUse.rc 2018-09-09 21:34:38.000000000 +0000 +++ libmediainfo-18.12/Project/MSVC2015/Example/HowToUse.rc 2018-12-10 23:27:20.000000000 +0000 @@ -1,8 +1,8 @@ #include VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,08,1,0 - PRODUCTVERSION 18,08,1,0 + FILEVERSION 18,12,0,0 + PRODUCTVERSION 18,12,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -19,10 +19,10 @@ BEGIN VALUE "CompanyName", "MediaArea.net" VALUE "FileDescription", "Most relevant technical and tag data for video and audio files" - VALUE "FileVersion", "18.08.1.0" + VALUE "FileVersion", "18.12.0.0" VALUE "LegalCopyright", "Copyright (C) 2002-2015 MediaArea.net SARL" VALUE "ProductName", "MediaInfo" - VALUE "ProductVersion", "18.08.1.0" + VALUE "ProductVersion", "18.12.0.0" END END BLOCK "VarFileInfo" diff -Nru libmediainfo-18.08.1/Project/MSVC2015/ShellExtension/MediaInfoShellExt.rc libmediainfo-18.12/Project/MSVC2015/ShellExtension/MediaInfoShellExt.rc --- libmediainfo-18.08.1/Project/MSVC2015/ShellExtension/MediaInfoShellExt.rc 2018-09-09 21:34:38.000000000 +0000 +++ libmediainfo-18.12/Project/MSVC2015/ShellExtension/MediaInfoShellExt.rc 2018-12-10 23:27:20.000000000 +0000 @@ -1,8 +1,8 @@ #include VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,08,1,0 - PRODUCTVERSION 18,08,1,0 + FILEVERSION 18,12,0,0 + PRODUCTVERSION 18,12,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -19,10 +19,10 @@ BEGIN VALUE "CompanyName", "MediaArea.net" VALUE "FileDescription", "Most relevant technical and tag data for video and audio files" - VALUE "FileVersion", "18.08.1.0" + VALUE "FileVersion", "18.12.0.0" VALUE "LegalCopyright", "Copyright (C) 2002-2015 MediaArea.net SARL" VALUE "ProductName", "MediaInfo" - VALUE "ProductVersion", "18.08.1.0" + VALUE "ProductVersion", "18.12.0.0" END END BLOCK "VarFileInfo" diff -Nru libmediainfo-18.08.1/Project/MSVC2017/Dll/MediaInfo.rc libmediainfo-18.12/Project/MSVC2017/Dll/MediaInfo.rc --- libmediainfo-18.08.1/Project/MSVC2017/Dll/MediaInfo.rc 2018-09-09 21:34:38.000000000 +0000 +++ libmediainfo-18.12/Project/MSVC2017/Dll/MediaInfo.rc 2018-12-10 23:27:20.000000000 +0000 @@ -1,8 +1,8 @@ #include VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,08,1,0 - PRODUCTVERSION 18,08,1,0 + FILEVERSION 18,12,0,0 + PRODUCTVERSION 18,12,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -19,10 +19,10 @@ BEGIN VALUE "CompanyName", "MediaArea.net" VALUE "FileDescription", "Most relevant technical and tag data for video and audio files" - VALUE "FileVersion", "18.08.1.0" + VALUE "FileVersion", "18.12.0.0" VALUE "LegalCopyright", "Copyright (C) 2002-2015 MediaArea.net SARL" VALUE "ProductName", "MediaInfo" - VALUE "ProductVersion", "18.08.1.0" + VALUE "ProductVersion", "18.12.0.0" END END BLOCK "VarFileInfo" diff -Nru libmediainfo-18.08.1/Project/MSVC2017/Example/HowToUse.rc libmediainfo-18.12/Project/MSVC2017/Example/HowToUse.rc --- libmediainfo-18.08.1/Project/MSVC2017/Example/HowToUse.rc 2018-09-09 21:34:38.000000000 +0000 +++ libmediainfo-18.12/Project/MSVC2017/Example/HowToUse.rc 2018-12-10 23:27:20.000000000 +0000 @@ -1,8 +1,8 @@ #include VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,08,1,0 - PRODUCTVERSION 18,08,1,0 + FILEVERSION 18,12,0,0 + PRODUCTVERSION 18,12,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -19,10 +19,10 @@ BEGIN VALUE "CompanyName", "MediaArea.net" VALUE "FileDescription", "Most relevant technical and tag data for video and audio files" - VALUE "FileVersion", "18.08.1.0" + VALUE "FileVersion", "18.12.0.0" VALUE "LegalCopyright", "Copyright (C) 2002-2015 MediaArea.net SARL" VALUE "ProductName", "MediaInfo" - VALUE "ProductVersion", "18.08.1.0" + VALUE "ProductVersion", "18.12.0.0" END END BLOCK "VarFileInfo" diff -Nru libmediainfo-18.08.1/Project/MSVC2017/ShellExtension/MediaInfoShellExt.rc libmediainfo-18.12/Project/MSVC2017/ShellExtension/MediaInfoShellExt.rc --- libmediainfo-18.08.1/Project/MSVC2017/ShellExtension/MediaInfoShellExt.rc 2018-09-09 21:34:38.000000000 +0000 +++ libmediainfo-18.12/Project/MSVC2017/ShellExtension/MediaInfoShellExt.rc 2018-12-10 23:27:20.000000000 +0000 @@ -1,8 +1,8 @@ #include VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,08,1,0 - PRODUCTVERSION 18,08,1,0 + FILEVERSION 18,12,0,0 + PRODUCTVERSION 18,12,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -19,10 +19,10 @@ BEGIN VALUE "CompanyName", "MediaArea.net" VALUE "FileDescription", "Most relevant technical and tag data for video and audio files" - VALUE "FileVersion", "18.08.1.0" + VALUE "FileVersion", "18.12.0.0" VALUE "LegalCopyright", "Copyright (C) 2002-2015 MediaArea.net SARL" VALUE "ProductName", "MediaInfo" - VALUE "ProductVersion", "18.08.1.0" + VALUE "ProductVersion", "18.12.0.0" END END BLOCK "VarFileInfo" diff -Nru libmediainfo-18.08.1/Project/OBS/deb9.debian/changelog libmediainfo-18.12/Project/OBS/deb9.debian/changelog --- libmediainfo-18.08.1/Project/OBS/deb9.debian/changelog 2018-09-09 21:34:38.000000000 +0000 +++ libmediainfo-18.12/Project/OBS/deb9.debian/changelog 2018-12-10 23:27:20.000000000 +0000 @@ -1,6 +1,6 @@ -libmediainfo (18.08.1-1) experimental; urgency=medium +libmediainfo (18.12-1) experimental; urgency=medium - * Upstream version 18.08.1 + * Upstream version 18.12 For details, see https://github.com/MediaArea/MediaInfoLib/blob/master/History_DLL.txt -- MediaArea Mon, 02 Nov 2015 10:30:00 +0100 diff -Nru libmediainfo-18.08.1/Project/OBS/deb9.dsc libmediainfo-18.12/Project/OBS/deb9.dsc --- libmediainfo-18.08.1/Project/OBS/deb9.dsc 2018-09-09 21:34:38.000000000 +0000 +++ libmediainfo-18.12/Project/OBS/deb9.dsc 2018-12-10 23:27:20.000000000 +0000 @@ -2,7 +2,7 @@ Source: libmediainfo Binary: libmediainfo-dev, libmediainfo0v5, python-mediainfodll, python3-mediainfodll, libmediainfo-doc libmediainfo0v5-dbg Architecture: any all -Version: 18.08.1-1deb9 +Version: 18.12-1deb9 Maintainer: MediaArea.net SARL Homepage: http://MediaArea.net/MediaInfo Standards-Version: 3.9.6 @@ -16,11 +16,11 @@ python-mediainfodll deb python optional arch=all python3-mediainfodll deb python optional arch=all Checksums-Sha1: - 0000000000000000000000000000000000000000 000000 libmediainfo_18.08.1.orig.tar.xz - 0000000000000000000000000000000000000000 000000 libmediainfo_18.08.1-1deb9.debian.tar.xz + 0000000000000000000000000000000000000000 000000 libmediainfo_18.12.orig.tar.xz + 0000000000000000000000000000000000000000 000000 libmediainfo_18.12-1deb9.debian.tar.xz Checksums-Sha256: - 0000000000000000000000000000000000000000000000000000000000000000 000000 libmediainfo_18.08.1.orig.tar.xz - 0000000000000000000000000000000000000000000000000000000000000000 000000 libmediainfo_18.08.1-1deb9.debian.tar.xz + 0000000000000000000000000000000000000000000000000000000000000000 000000 libmediainfo_18.12.orig.tar.xz + 0000000000000000000000000000000000000000000000000000000000000000 000000 libmediainfo_18.12-1deb9.debian.tar.xz Files: - 00000000000000000000000000000000 000000 libmediainfo_18.08.1.orig.tar.xz - 00000000000000000000000000000000 000000 libmediainfo_18.08.1-1deb9.debian.tar.xz + 00000000000000000000000000000000 000000 libmediainfo_18.12.orig.tar.xz + 00000000000000000000000000000000 000000 libmediainfo_18.12-1deb9.debian.tar.xz diff -Nru libmediainfo-18.08.1/Project/Solaris/mkpkg libmediainfo-18.12/Project/Solaris/mkpkg --- libmediainfo-18.08.1/Project/Solaris/mkpkg 2018-09-09 21:34:38.000000000 +0000 +++ libmediainfo-18.12/Project/Solaris/mkpkg 2018-12-10 23:27:20.000000000 +0000 @@ -9,7 +9,7 @@ #Creation of known directories and filenames name="libmediainfo0" -version="18.08.1" +version="18.12" Home=`pwd` install_prefix=${Home}/mk_package packagecreation_prefix=${Home}/create_package diff -Nru libmediainfo-18.08.1/Project/version.txt libmediainfo-18.12/Project/version.txt --- libmediainfo-18.08.1/Project/version.txt 2018-09-09 21:34:37.000000000 +0000 +++ libmediainfo-18.12/Project/version.txt 2018-12-10 23:27:20.000000000 +0000 @@ -1 +1 @@ -18.08.1 +18.12 diff -Nru libmediainfo-18.08.1/Source/Install/MediaInfo_DLL_Windows_i386.nsi libmediainfo-18.12/Source/Install/MediaInfo_DLL_Windows_i386.nsi --- libmediainfo-18.08.1/Source/Install/MediaInfo_DLL_Windows_i386.nsi 2018-09-09 21:34:38.000000000 +0000 +++ libmediainfo-18.12/Source/Install/MediaInfo_DLL_Windows_i386.nsi 2018-12-10 23:27:20.000000000 +0000 @@ -4,8 +4,8 @@ ; Some defines !define PRODUCT_NAME "MediaInfo" !define PRODUCT_PUBLISHER "MediaArea.net" -!define PRODUCT_VERSION "18.08" -!define PRODUCT_VERSION4 "${PRODUCT_VERSION}.1.0" +!define PRODUCT_VERSION "18.12" +!define PRODUCT_VERSION4 "${PRODUCT_VERSION}.0.0" !define PRODUCT_WEB_SITE "http://MediaArea.net/MediaInfo" !define COMPANY_REGISTRY "Software\MediaArea.net" !define PRODUCT_REGISTRY "Software\MediaArea.net\MediaInfo.dll" diff -Nru libmediainfo-18.08.1/Source/Install/MediaInfo_DLL_Windows_x64.nsi libmediainfo-18.12/Source/Install/MediaInfo_DLL_Windows_x64.nsi --- libmediainfo-18.08.1/Source/Install/MediaInfo_DLL_Windows_x64.nsi 2018-09-09 21:34:38.000000000 +0000 +++ libmediainfo-18.12/Source/Install/MediaInfo_DLL_Windows_x64.nsi 2018-12-10 23:27:20.000000000 +0000 @@ -4,8 +4,8 @@ ; Some defines !define PRODUCT_NAME "MediaInfo" !define PRODUCT_PUBLISHER "MediaArea.net" -!define PRODUCT_VERSION "18.08" -!define PRODUCT_VERSION4 "${PRODUCT_VERSION}.1.0" +!define PRODUCT_VERSION "18.12" +!define PRODUCT_VERSION4 "${PRODUCT_VERSION}.0.0" !define PRODUCT_WEB_SITE "http://MediaArea.net/MediaInfo" !define COMPANY_REGISTRY "Software\MediaArea.net" !define PRODUCT_REGISTRY "Software\MediaArea.net\MediaInfo.dll" diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Archive/File_Tar.cpp libmediainfo-18.12/Source/MediaInfo/Archive/File_Tar.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Archive/File_Tar.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Archive/File_Tar.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -44,15 +44,15 @@ //Parsing Ztring ChecksumO; - Skip_Local(100, "File name"); - Skip_Local( 8, "File mode"); - Skip_Local( 8, "Owner's numeric user ID"); - Skip_Local( 12, "Group's numeric user ID"); - Skip_Local( 12, "File size in bytes"); - Skip_Local( 8, "Last modification time in numeric Unix time format"); - Get_Local ( 8, ChecksumO, "Checksum for header block"); + Skip_UTF8(100, "File name"); + Skip_UTF8( 8, "File mode"); + Skip_UTF8( 8, "Owner's numeric user ID"); + Skip_UTF8( 12, "Group's numeric user ID"); + Skip_UTF8( 12, "File size in bytes"); + Skip_UTF8( 8, "Last modification time in numeric Unix time format"); + Get_UTF8 ( 8, ChecksumO, "Checksum for header block"); Skip_B1( "Link indicator (file type)"); - Skip_Local(100, "Name of linked file"); + Skip_UTF8(100, "Name of linked file"); Skip_XX(File_Size-257, "Data"); FILLING_BEGIN(); diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Audio/File_Aac.cpp libmediainfo-18.12/Source/MediaInfo/Audio/File_Aac.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Audio/File_Aac.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Audio/File_Aac.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -151,7 +151,7 @@ if (Frame_Count) { if (Mode==Mode_ADTS) - Infos["BitRate_Mode"].From_Local(adts_buffer_fullness_Is7FF?"VBR":"CBR"); + Infos["BitRate_Mode"].From_UTF8(adts_buffer_fullness_Is7FF?"VBR":"CBR"); #if MEDIAINFO_ADVANCED switch(Mode) diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Audio/File_Aac_GeneralAudio.cpp libmediainfo-18.12/Source/MediaInfo/Audio/File_Aac_GeneralAudio.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Audio/File_Aac_GeneralAudio.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Audio/File_Aac_GeneralAudio.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -219,7 +219,7 @@ BS_End(); //Byte align Get_B1 (comment_field_bytes, "comment_field_bytes"); if (comment_field_bytes) - Get_Local(comment_field_bytes, comment_field_data, "comment_field_data"); + Get_UTF8(comment_field_bytes, comment_field_data, "comment_field_data"); BS_Begin(); //The stream needs continuity in the bitstream Element_End0(); @@ -279,9 +279,9 @@ Infos_General["Comment"]=comment_field_data; Infos["CodecID"].From_Number(audioObjectType); - Infos["Format"].From_Local("AAC"); - Infos["Format_Profile"].From_Local(Aac_Format_Profile(audioObjectType)); - Infos["Codec"].From_Local(Aac_audioObjectType(audioObjectType)); + Infos["Format"].From_UTF8("AAC"); + Infos["Format_Profile"].From_UTF8(Aac_Format_Profile(audioObjectType)); + Infos["Codec"].From_UTF8(Aac_audioObjectType(audioObjectType)); Infos["SamplingRate"].From_Number(Aac_sampling_frequency[sampling_frequency_index]); Infos["Channel(s)"].From_Number(Channels); Infos["ChannelPositions"]=Channels_Positions; @@ -300,7 +300,7 @@ } Infos["Format_Settings"]=__T("NBC"); // "Not Backward Compatible" Infos["Format_Settings_SBR"]=__T("Yes (NBC)"); // "Not Backward Compatible" - Infos["Codec"]=Ztring().From_Local(Aac_audioObjectType(audioObjectType))+__T("-SBR"); + Infos["Codec"]=Ztring().From_UTF8(Aac_audioObjectType(audioObjectType))+__T("-SBR"); } if (!Infos["Format_Settings_PS"].empty()) @@ -1435,7 +1435,7 @@ Infos["Format_Settings"].insert(0, Format_Settings); } Infos["Format_Settings_PS"] = __T("Yes (") + Format_Settings + __T(")"); - Infos["Codec"] = Ztring().From_Local(Aac_audioObjectType(audioObjectType)) + __T("-SBR-PS"); + Infos["Codec"] = Ztring().From_UTF8(Aac_audioObjectType(audioObjectType)) + __T("-SBR-PS"); } //*************************************************************************** diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Audio/File_Aac_GeneralAudio_Sbr.cpp libmediainfo-18.12/Source/MediaInfo/Audio/File_Aac_GeneralAudio_Sbr.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Audio/File_Aac_GeneralAudio_Sbr.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Audio/File_Aac_GeneralAudio_Sbr.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -334,7 +334,7 @@ } Infos["Format_Settings"]=__T("Implicit"); Infos["Format_Settings_SBR"]=__T("Yes (Implicit)"); - Infos["Codec"]=Ztring().From_Local(Aac_audioObjectType(audioObjectType))+__T("-SBR"); + Infos["Codec"]=Ztring().From_UTF8(Aac_audioObjectType(audioObjectType))+__T("-SBR"); if (Frame_Count_Valid<32) Frame_Count_Valid=32; //We need to find the SBR header diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Audio/File_Aac_Main.cpp libmediainfo-18.12/Source/MediaInfo/Audio/File_Aac_Main.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Audio/File_Aac_Main.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Audio/File_Aac_Main.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -517,15 +517,15 @@ if (Frequency_b) Infos["SamplingRate"].From_Number(Frequency_b); - Infos["Format"].From_Local(Aac_Format(audioObjectType)); - Infos["Format_Profile"].From_Local(Aac_Format_Profile(audioObjectType)); - Infos["Codec"].From_Local(Aac_audioObjectType(audioObjectType)); + Infos["Format"].From_UTF8(Aac_Format(audioObjectType)); + Infos["Format_Profile"].From_UTF8(Aac_Format_Profile(audioObjectType)); + Infos["Codec"].From_UTF8(Aac_audioObjectType(audioObjectType)); if (channelConfiguration && channelConfiguration<8) { Infos["Channel(s)"].From_Number(Aac_Channels[channelConfiguration]); - Infos["ChannelPositions"].From_Local(Aac_ChannelConfiguration[channelConfiguration]); - Infos["ChannelPositions/String2"].From_Local(Aac_ChannelConfiguration2[channelConfiguration]); - Infos["ChannelLayout"].From_Local(Aac_ChannelLayout[channelConfiguration]); + Infos["ChannelPositions"].From_UTF8(Aac_ChannelConfiguration[channelConfiguration]); + Infos["ChannelPositions/String2"].From_UTF8(Aac_ChannelConfiguration2[channelConfiguration]); + Infos["ChannelLayout"].From_UTF8(Aac_ChannelLayout[channelConfiguration]); } if (sbrPresentFlag || !Infos["Format_Settings_SBR"].empty()) @@ -544,7 +544,7 @@ } Infos["Format_Settings"]=sbrData?__T("Explicit"):__T("NBC"); // "Not Backward Compatible" Infos["Format_Settings_SBR"]=sbrData?__T("Yes (Explicit)"):__T("Yes (NBC)"); // "Not Backward Compatible" - Infos["Codec"]=Ztring().From_Local(Aac_audioObjectType(audioObjectType))+__T("-SBR"); + Infos["Codec"]=Ztring().From_UTF8(Aac_audioObjectType(audioObjectType))+__T("-SBR"); } else if (sbrData) Infos["Format_Settings_SBR"]=__T("No (Explicit)"); @@ -994,7 +994,7 @@ Fill(Stream_Audio, StreamPos, Audio_MuxingMode, "ADIF"); if (num_program_config_elements==0) //Easy to fill only if 1 audio stream { - Infos["BitRate_Mode"].From_Local(bitstream_type?"VBR":"CBR"); + Infos["BitRate_Mode"].From_UTF8(bitstream_type?"VBR":"CBR"); if (bitrate>0) Infos[bitstream_type?"BitRate_Maximum":"BitRate"].From_Number(bitrate); } @@ -1068,8 +1068,12 @@ Skip_BS( 2, "layer"); Get_SB ( protection_absent, "protection_absent"); Get_S1 ( 2, audioObjectType, "profile_ObjectType"); audioObjectType++; Param_Info1(Aac_audioObjectType(audioObjectType)); - Get_S1 ( 4, sampling_frequency_index, "sampling_frequency_index"); Param_Info2(Aac_sampling_frequency[sampling_frequency_index], " Hz"); - Frequency_b=Aac_sampling_frequency[sampling_frequency_index]; + Get_S1 ( 4, sampling_frequency_index, "sampling_frequency_index"); + if(sampling_frequency_indexBuffer_Size) + return false; //Need more data + if (BigEndian) Size=((Buffer[Buffer_Offset+5]&0x03)<<12) | ( Buffer[Buffer_Offset+6] << 4) @@ -1615,6 +1618,9 @@ } else { + if (Buffer_Offset+10>Buffer_Size) + return false; //Need more data + if (BigEndian) Size=((Buffer[Buffer_Offset+6]&0x03)<<12) | ( Buffer[Buffer_Offset+7] << 4) @@ -1627,7 +1633,7 @@ Original_Size=Size*16/14; } } - if (Buffer_Offset+Size>Buffer_Size) + if (Buffer_Offset+Original_Size>Buffer_Size) return false; //Need more data if (!Word || !BigEndian) diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Audio/File_Flac.cpp libmediainfo-18.12/Source/MediaInfo/Audio/File_Flac.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Audio/File_Flac.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Audio/File_Flac.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -255,7 +255,7 @@ Ztring MimeType, Description; Get_B4 (PictureType, "Picture type"); Element_Info1(Id3v2_PictureType((int8u)PictureType)); Get_B4 (MimeType_Size, "MIME type size"); - Get_Local(MimeType_Size, MimeType, "MIME type"); + Get_UTF8(MimeType_Size, MimeType, "MIME type"); Get_B4 (Description_Size, "Description size"); Get_UTF8(Description_Size, Description, "Description"); Skip_B4( "Width"); diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Audio/File_Mpega.cpp libmediainfo-18.12/Source/MediaInfo/Audio/File_Mpega.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Audio/File_Mpega.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Audio/File_Mpega.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -495,12 +495,18 @@ Fill(Stream_Audio, 0, Audio_BitRate_Mode, BitRate_Mode, true); //Encoding library - if (!Encoded_Library.empty()) - Fill(Stream_General, 0, General_Encoded_Library, Encoded_Library, true); if (Encoded_Library.empty()) Encoded_Library_Guess(); - Fill(Stream_Audio, 0, Audio_Encoded_Library, Encoded_Library, true); - Fill(Stream_Audio, 0, Audio_Encoded_Library_Settings, Encoded_Library_Settings, true); + if (!Encoded_Library.empty()) + { + Ztring Encoded_LibraryZ; + Encoded_LibraryZ.From_UTF8(Encoded_Library.c_str()); + if (Encoded_LibraryZ.empty()) + Encoded_LibraryZ.From_ISO_8859_1(Encoded_Library.c_str()); + Fill(Stream_General, 0, General_Encoded_Library, Encoded_LibraryZ, true); + Fill(Stream_Audio, 0, Audio_Encoded_Library, Encoded_LibraryZ, true); + Fill(Stream_Audio, 0, Audio_Encoded_Library_Settings, Encoded_Library_Settings, true); + } //Surround if (Surround_Frames>=Frame_Count*0.9) @@ -1285,10 +1291,10 @@ Skip_XX(100, "TOC"); if (Scale) Get_B4 (Xing_Scale, "Scale"); - Ztring Lib; + string Lib; Element_End0(); - Peek_Local(4, Lib); - if (Lame || Lib==__T("LAME") || Lib==__T("GOGO") || Lib==__T("L3.9")) + Peek_String(4, Lib); + if (Lame || Lib=="LAME" || Lib=="GOGO" || Lib=="L3.9") Header_Encoders_Lame(); if (CC4(Xing_Header)==CC4("Info")) @@ -1370,12 +1376,10 @@ Element_Info1("With tag (Lame)"); Element_Offset=Buffer_Pos; if (Element_Offset+20<=Element_Size) - Get_Local(20, Encoded_Library, "Encoded_Library"); + Get_String (20, Encoded_Library, "Encoded_Library"); else - Get_Local( 8, Encoded_Library, "Encoded_Library"); - Encoded_Library.Trim(__T('A')); - Encoded_Library.Trim(__T('U')); - Encoded_Library.Trim(__T('\xAA')); + Get_String ( 8, Encoded_Library, "Encoded_Library"); + Encoded_Library.erase(Encoded_Library.find_last_not_of("AU\xAA")+1); Element_Offset=0; //Reseting it return true; } @@ -1386,7 +1390,7 @@ { Element_Info1("With tag (RCA)"); Encoded_Library="RCA "; - Encoded_Library+=Ztring((const char*)(Buffer+Buffer_Offset+18), 5); + Encoded_Library+=string((const char*)(Buffer+Buffer_Offset+18), 5); return true; } @@ -1396,7 +1400,7 @@ { Element_Info1("With tag (Thomson)"); Encoded_Library="Thomson "; - Encoded_Library+=Ztring((const char*)(Buffer+Buffer_Offset+22), 6); + Encoded_Library+=string((const char*)(Buffer+Buffer_Offset+22), 6); return true; } @@ -1446,7 +1450,7 @@ int8u Flags, lowpass, EncodingFlags, BitRate, StereoMode; Param_Info1(Ztring(__T("V "))+Ztring::ToZtring((100-Xing_Scale)/10)); Param_Info1(Ztring(__T("q "))+Ztring::ToZtring((100-Xing_Scale)%10)); - Get_Local(9, Encoded_Library, "Encoded_Library"); + Get_String (9, Encoded_Library, "Encoded_Library"); Get_B1 (Flags, "Flags"); if ((Flags&0xF0)<=0x20) //Rev. 0 or 1, http://gabriel.mp3-tech.org/mp3infotag.html and Rev. 2 was seen. { @@ -1536,7 +1540,7 @@ FILLING_END(); } else - Get_Local(20, Encoded_Library, "Encoded_Library"); + Get_String (20, Encoded_Library, "Encoded_Library"); } void File_Mpega::Encoded_Library_Guess() diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Audio/File_Mpega.h libmediainfo-18.12/Source/MediaInfo/Audio/File_Mpega.h --- libmediainfo-18.08.1/Source/MediaInfo/Audio/File_Mpega.h 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Audio/File_Mpega.h 2018-12-10 23:27:17.000000000 +0000 @@ -63,7 +63,7 @@ Ztring BitRate_Mode; Ztring BitRate_Nominal; Ztring BitRate_Minimum; - Ztring Encoded_Library; + string Encoded_Library; Ztring Encoded_Library_Settings; std::map BitRate_Count; std::map sampling_frequency_Count; diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Audio/File_Opus.cpp libmediainfo-18.12/Source/MediaInfo/Audio/File_Opus.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Audio/File_Opus.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Audio/File_Opus.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -125,7 +125,7 @@ int8u Opus_version_id, ch_count, ch_map; int16u preskip; int32u sample_rate; - Get_Local(8,opus_version, "opus_codec_id"); + Get_UTF8(8,opus_version, "opus_codec_id"); Get_L1 (Opus_version_id, "opus_version_id"); Get_L1 (ch_count, "channel_count"); Get_L2 (preskip, "preskip"); @@ -164,9 +164,9 @@ // else it is as Vorbis specs, no break case 1 : // Vorbis order { - Ztring ChannelPositions; ChannelPositions.From_Local(Opus_ChannelPositions[ch_count]); - Ztring ChannelPositions2; ChannelPositions2.From_Local(Opus_ChannelPositions2[ch_count]); - Ztring ChannelLayout2; ChannelLayout2.From_Local(Opus_ChannelLayout[ch_count]); + Ztring ChannelPositions; ChannelPositions.From_UTF8(Opus_ChannelPositions[ch_count]); + Ztring ChannelPositions2; ChannelPositions2.From_UTF8(Opus_ChannelPositions2[ch_count]); + Ztring ChannelLayout2; ChannelLayout2.From_UTF8(Opus_ChannelLayout[ch_count]); if (ChannelPositions!=Retrieve(Stream_Audio, 0, Audio_ChannelPositions)) Fill(Stream_Audio, 0, Audio_ChannelPositions, ChannelPositions); if (ChannelPositions2!=Retrieve(Stream_Audio, 0, Audio_ChannelPositions_String2)) diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Audio/File_SmpteSt0302.cpp libmediainfo-18.12/Source/MediaInfo/Audio/File_SmpteSt0302.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Audio/File_SmpteSt0302.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Audio/File_SmpteSt0302.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -91,7 +91,7 @@ // Raw PCM { File_Pcm* Pcm=new File_Pcm(); - Pcm->Codec.From_Local("SMPTE ST 302"); + Pcm->Codec.From_UTF8("SMPTE ST 302"); Pcm->BitDepth=(4+bits_per_sample)*4; Pcm->Channels=(1+number_channels)*2; Pcm->SamplingRate=48000; diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Audio/File_Speex.cpp libmediainfo-18.12/Source/MediaInfo/Audio/File_Speex.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Audio/File_Speex.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Audio/File_Speex.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -81,7 +81,7 @@ Ztring speex_version; int32u Speex_version_id, header_size, rate, nb_channels, bitrate, vbr; Skip_Local(8, "speex_string"); - Get_Local(20, speex_version, "speex_version"); + Get_UTF8(20, speex_version, "speex_version"); Get_L4 (Speex_version_id, "Speex_version_id"); if (Speex_version_id==1) { @@ -133,7 +133,7 @@ int32u size; Get_L4(size, "size"); if (size) - Get_Local(size, value, "value"); + Get_UTF8(size, value, "value"); //Filling if (!value.empty()) diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Export/Export_EbuCore.cpp libmediainfo-18.12/Source/MediaInfo/Export/Export_EbuCore.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Export/Export_EbuCore.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Export/Export_EbuCore.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -609,7 +609,12 @@ //if (!MI.Get(Stream_Video, StreamPos, Video_ID).empty()) // ToReturn+=__T(" videoFormatId=\"")+MI.Get(Stream_Video, StreamPos, Video_ID)+__T("\""); Child->Add_Attribute_IfNotEmpty(MI, Stream_Video, StreamPos, Video_Format, "videoFormatName"); - Child->Add_Attribute_IfNotEmpty(MI, Stream_Video, StreamPos, Video_Format_Version, "videoFormatVersionId"); + Ztring Format_Version=MI.Get(Stream_Video, StreamPos, Video_Format_Version); + if (!Format_Version.empty()) + { + Format_Version.FindAndReplace(__T("Version "), Ztring()); + Child->Add_Attribute("videoFormatVersionId", Format_Version); + } //width if (!MI.Get(Stream_Video, StreamPos, Video_Width).empty()) @@ -679,9 +684,14 @@ } else typeLabel=MI.Get(Stream_Video, StreamPos, Video_Format_Profile); - Node* Child2=Child->Add_Child("ebucore:videoEncoding", "", "typeLabel", typeLabel, true); - if (!TermID_String.empty()) - Child2->Add_Attribute("typeLink", __T("http://www.ebu.ch/metadata/cs/ebu_VideoCompressionCodeCS.xml#")+TermID_String); + if (!typeLabel.empty() || !TermID_String.empty()) + { + Node* Child2=Child->Add_Child("ebucore:videoEncoding", string(), true); + if (!typeLabel.empty()) + Child2->Add_Attribute("typeLabel", typeLabel); + if (!TermID_String.empty()) + Child2->Add_Attribute("typeLink", __T("http://www.ebu.ch/metadata/cs/ebu_VideoCompressionCodeCS.xml#")+TermID_String); + } } //codec @@ -772,6 +782,9 @@ //technicalAttributeString - StreamSize Add_TechnicalAttributeInteger_IfNotEmpty(MI, Stream_Video, StreamPos, Video_StreamSize, Child, "StreamSize", Export_EbuCore::Version_Max, Version>=Export_EbuCore::Version_1_6?"byte":NULL); + //technicalAttributeString - Compression_Mode + Add_TechnicalAttributeInteger_IfNotEmpty(MI, Stream_Video, StreamPos, Video_Compression_Mode, Child, "Compression_Mode"); + //technicalAttributeString - BitDepth Add_TechnicalAttributeInteger_IfNotEmpty(MI, Stream_Video, StreamPos, Video_BitDepth, Child, "BitDepth", Export_EbuCore::Version_Max, Version>=Export_EbuCore::Version_1_6?"bit":NULL); @@ -781,6 +794,9 @@ //technicalAttributeString Add_TechnicalAttributeString_IfNotEmpty(MI, Stream_Other, As11_UkDpp_Pos, "FpaVersion", Child, "FPAVersion"); + //technicalAttributeString - Format_Settings_GOP + Add_TechnicalAttributeString_IfNotEmpty(MI, Stream_Video, StreamPos, Video_Format_Settings_GOP, Child, "GOP"); + //technicalAttributeBoolean - Format_Settings_CABAC if (MI.Get(Stream_Video, StreamPos, Video_Format)==__T("AVC")) Add_TechnicalAttributeBoolean_IfNotEmpty(MI, Stream_Video, StreamPos, Video_Format_Settings_CABAC, Child, "CABAC"); @@ -794,6 +810,24 @@ //technicalAttributeString Child->Add_Child_IfNotEmpty(MI, Stream_Other, As11_UkDpp_Pos, "VideoComments", "ebucore:comment", "typeLabel", std::string("VideoComments"), true); + + //technicalAttributeString - Encoded_Library + Add_TechnicalAttributeString_IfNotEmpty(MI, Stream_Video, StreamPos, "Encoded_Library/String", Child, "WritingLibrary"); + + //technicalAttributeString - Default + Add_TechnicalAttributeString_IfNotEmpty(MI, Stream_Video, StreamPos, "Default", Child, "Default"); + + //technicalAttributeString - Forced + Add_TechnicalAttributeString_IfNotEmpty(MI, Stream_Video, StreamPos, "Forced", Child, "Forced"); + + //technicalAttributeString - coder_type + Add_TechnicalAttributeString_IfNotEmpty(MI, Stream_Video, StreamPos, "coder_type", Child, "coder_type"); + + //technicalAttributeString - ErrorDetectionType + Add_TechnicalAttributeString_IfNotEmpty(MI, Stream_Video, StreamPos, "ErrorDetectionType", Child, "ErrorDetectionType"); + + //technicalAttributeString - MaxSlicesCount + Add_TechnicalAttributeString_IfNotEmpty(MI, Stream_Video, StreamPos, "MaxSlicesCount", Child, "MaxSlicesCount"); } //--------------------------------------------------------------------------- @@ -812,7 +846,12 @@ Node* Child=Parent->Add_Child("ebucore:audioFormat", true); Child->Add_Attribute_IfNotEmpty(MI, Stream_Audio, StreamPos, Audio_Format, "audioFormatName"); - Child->Add_Attribute_IfNotEmpty(MI, Stream_Audio, StreamPos, Audio_Format_Version, "audioFormatVersionId"); + Ztring Format_Version=MI.Get(Stream_Audio, StreamPos, Audio_Format_Version); + if (!Format_Version.empty()) + { + Format_Version.FindAndReplace(__T("Version "), Ztring()); + Child->Add_Attribute("audioFormatVersionId", Format_Version); + } //audioEncoding //if (!MI.Get(Stream_Audio, StreamPos, Audio_Format_Profile).empty()) @@ -922,7 +961,12 @@ //if (!MI.Get(Stream_Text, StreamPos, Text_ID).empty()) // ToReturn+=__T(" dataFormatId=\"")+MI.Get(Stream_Text, StreamPos, Text_ID)+__T("\""); - Child->Add_Attribute_IfNotEmpty(MI, Stream_Text, StreamPos, Text_Format_Version, "dataFormatVersionId"); + Ztring Format_Version=MI.Get(Stream_Text, StreamPos, Text_Format_Version); + if (!Format_Version.empty()) + { + Format_Version.FindAndReplace(__T("Version "), Ztring()); + Child->Add_Attribute("dataFormatVersionId", Format_Version); + } Child->Add_Attribute_IfNotEmpty(MI, Stream_Text, StreamPos, Text_Format, "dataFormatName"); Child->Add_Attribute_IfNotEmpty(MI, Stream_Text, StreamPos, Text_ID, "dataTrackId"); @@ -1560,9 +1604,15 @@ //format - containerFormat Node* Node_Format_ContainerFormat=Node_Format->Add_Child("ebucore:containerFormat", true); Node_Format_ContainerFormat->Add_Attribute_IfNotEmpty(MI, Stream_General, 0, General_Format, Version>=Version_1_6?"containerFormatName":"formatLabel"); - Node_Format_ContainerFormat->Add_Attribute_IfNotEmpty(MI, Stream_General, 0, General_ID, "containerFormatId"); if (Version >= Version_1_6) { + Ztring Version=MI.Get(Stream_General, 0, General_Format_Version); + if (!Version.empty()) + { + Version.FindAndReplace(__T("Version "), Ztring()); + Node_Format_ContainerFormat->Add_Attribute("containerFormatVersionId", Version); + } + Node_Format_ContainerFormat->Add_Attribute_IfNotEmpty(MI, Stream_General, 0, MI.Get(Stream_General, 0, General_UniqueID).empty()?General_ID:General_UniqueID, "containerFormatId"); Node* Node_Format_ContainerFormat_ContainerEncoding=Node_Format_ContainerFormat->Add_Child("ebucore:containerEncoding", true); Node_Format_ContainerFormat_ContainerEncoding->Add_Attribute_IfNotEmpty(MI, Stream_General, 0, General_Format, "formatLabel"); //if (Version>=Version_1_6 && !MI.Get(Stream_General, 0, General_Format_Profile).empty()) @@ -1572,7 +1622,7 @@ { Node* Child=Node_Format_ContainerFormat->Add_Child("ebucore:codec", true); if (!MI.Get(Stream_General, 0, General_CodecID).empty()) - { + { Node* Child2=Child->Add_Child("ebucore:codecIdentifier", true); Child2->Add_Child("dc:identifier", MI.Get(Stream_General, 0, General_CodecID), true); } @@ -1597,6 +1647,12 @@ //format - containerFormat - technicalAttributeString - Encoded_Library Add_TechnicalAttributeString_IfNotEmpty(MI, Stream_General, 0, "Encoded_Library/String", Node_Format_ContainerFormat, "WritingLibrary", Version); + //format - containerFormat - technicalAttributeString - ErrorDetectionType + Add_TechnicalAttributeString_IfNotEmpty(MI, Stream_General, 0, "ErrorDetectionType", Node_Format_ContainerFormat, "ErrorDetectionType", Version); + + //format - containerFormat - technicalAttributeString - Attachments + Add_TechnicalAttributeString_IfNotEmpty(MI, Stream_General, 0, "Attachments", Node_Format_ContainerFormat, "Attachments", Version); + //format - SigningPresent if (As11_UkDpp_Pos!=(size_t)-1 && !MI.Get(Stream_Other, As11_UkDpp_Pos, __T("SigningPresent")).empty()) { diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Export/Export_Mpeg7.cpp libmediainfo-18.12/Source/MediaInfo/Export/Export_Mpeg7.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Export/Export_Mpeg7.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Export/Export_Mpeg7.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -659,10 +659,10 @@ //--------------------------------------------------------------------------- Ztring Mpeg7_Visual_colorDomain(MediaInfo_Internal &MI, size_t StreamPos) { - const Ztring &Colorimetry=MI.Get(Stream_Video, StreamPos, Video_ChromaSubsampling); - if (Colorimetry.find(__T("4:"))!=string::npos) + const Ztring &ChromaSubsampling=MI.Get(Stream_Video, StreamPos, Video_ChromaSubsampling); + if (ChromaSubsampling.find(__T("4:"))!=string::npos) return __T("color"); - if (Colorimetry==__T("Gray")) + if (ChromaSubsampling==__T("Gray")) return __T("graylevel"); return __T(""); } @@ -1117,11 +1117,11 @@ //Pixel if (!MI.Get(Stream_Video, 0, Video_PixelAspectRatio).empty() - || !MI.Get(Stream_Video, 0, Video_Resolution).empty()) + || !MI.Get(Stream_Video, 0, Video_BitDepth).empty()) { Node* Node_Pixel=Node_VisualCoding->Add_Child("mpeg7:Pixel"); Node_Pixel->Add_Attribute_IfNotEmpty(MI, Stream_Video, 0, Video_PixelAspectRatio, "aspectRatio"); - Ztring bitsPer=Mpeg7_StripExtraValues(MI.Get(Stream_Video, 0, Video_Resolution)); + Ztring bitsPer=Mpeg7_StripExtraValues(MI.Get(Stream_Video, 0, Video_BitDepth)); if (!bitsPer.empty()) Node_Pixel->Add_Attribute("bitsPer", bitsPer); } @@ -1156,10 +1156,11 @@ } } - //Colorimetry - if (MI.Get(Stream_Video, StreamPos, Video_Colorimetry).find(__T("4:2:0"))!=string::npos) + //ChromaSubsampling + if (MI.Get(Stream_Video, StreamPos, Video_ChromaSubsampling).find(__T("4:2:0"))!=string::npos) { Node* Node_ColorSampling=Node_VisualCoding->Add_Child("mpeg7:ColorSampling"); + Node_ColorSampling->XmlComment="YUV 4:2:0 Interlaced"; Node* Node_Lattice=Node_ColorSampling->Add_Child("mpeg7:Lattice"); Node_Lattice->Add_Attribute("height", "720"); Node_Lattice->Add_Attribute("width", "486"); diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Export/Export_Niso.cpp libmediainfo-18.12/Source/MediaInfo/Export/Export_Niso.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Export/Export_Niso.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Export/Export_Niso.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -136,7 +136,7 @@ Ztring Date=DateTime.substr(0, 10); Ztring Time=DateTime.substr(11); - Node* Node_CoreMain=Node_Extension->Add_Child("ebucore:ebuCoreMain"); + Node_CoreMain=Node_Extension->Add_Child("ebucore:ebuCoreMain"); Node_CoreMain->Add_Attribute("xmlns:dc", "http://purl.org/dc/elements/1.1/"); { Node_CoreMain->Add_Attribute("xmlns:ebucore", "urn:ebu:metadata-schema:ebucore"); diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Export/Export_PBCore2.cpp libmediainfo-18.12/Source/MediaInfo/Export/Export_PBCore2.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Export/Export_PBCore2.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Export/Export_PBCore2.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -210,9 +210,7 @@ Node_EssenceTrack->Add_Child_IfNotEmpty(MI, StreamKind, StreamPos, "BitDepth", "essenceTrackBitDepth"); //essenceTrackFrameSize - if (!MI.Get(StreamKind, StreamPos, Video_Width).empty()) - Node_EssenceTrack->Add_Child("essenceTrackFrameSize", MI.Get(StreamKind, StreamPos, Video_Width)+__T("x")+MI.Get(StreamKind, StreamPos, Video_Height)); - else if (!MI.Get(StreamKind, StreamPos, __T("Width")).empty()) + if (!MI.Get(StreamKind, StreamPos, __T("Width")).empty()) { Ztring framesize; framesize=MI.Get(StreamKind, StreamPos, __T("Width")); diff -Nru libmediainfo-18.08.1/Source/MediaInfo/File__Analyse_Automatic.h libmediainfo-18.12/Source/MediaInfo/File__Analyse_Automatic.h --- libmediainfo-18.08.1/Source/MediaInfo/File__Analyse_Automatic.h 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/File__Analyse_Automatic.h 2018-12-10 23:27:17.000000000 +0000 @@ -829,15 +829,42 @@ Video_Tagged_Date, Video_Encryption, Video_BufferSize, - Video_colour_range, Video_colour_description_present, - Video_colour_primaries, - Video_transfer_characteristics, - Video_matrix_coefficients, + Video_colour_description_present_Source, Video_colour_description_present_Original, + Video_colour_description_present_Original_Source, + Video_colour_range, + Video_colour_range_Source, + Video_colour_range_Original, + Video_colour_range_Original_Source, + Video_colour_primaries, + Video_colour_primaries_Source, Video_colour_primaries_Original, + Video_colour_primaries_Original_Source, + Video_transfer_characteristics, + Video_transfer_characteristics_Source, Video_transfer_characteristics_Original, + Video_transfer_characteristics_Original_Source, + Video_matrix_coefficients, + Video_matrix_coefficients_Source, Video_matrix_coefficients_Original, + Video_matrix_coefficients_Original_Source, + Video_MasteringDisplay_ColorPrimaries, + Video_MasteringDisplay_ColorPrimaries_Source, + Video_MasteringDisplay_ColorPrimaries_Original, + Video_MasteringDisplay_ColorPrimaries_Original_Source, + Video_MasteringDisplay_Luminance, + Video_MasteringDisplay_Luminance_Source, + Video_MasteringDisplay_Luminance_Original, + Video_MasteringDisplay_Luminance_Original_Source, + Video_MaxCLL, + Video_MaxCLL_Source, + Video_MaxCLL_Original, + Video_MaxCLL_Original_Source, + Video_MaxFALL, + Video_MaxFALL_Source, + Video_MaxFALL_Original, + Video_MaxFALL_Original_Source, }; //--------------------------------------------------------------------------- diff -Nru libmediainfo-18.08.1/Source/MediaInfo/File__Analyze_Buffer.cpp libmediainfo-18.12/Source/MediaInfo/File__Analyze_Buffer.cpp --- libmediainfo-18.08.1/Source/MediaInfo/File__Analyze_Buffer.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/File__Analyze_Buffer.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -1543,7 +1543,7 @@ { INTEGRITY_SIZE_ATLEAST_INT(1); Info=CC1(Buffer+Buffer_Offset+(size_t)Element_Offset); - if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 1); + if (Trace_Activated) Param_CC(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 1); Element_Offset+=1; } @@ -1552,7 +1552,7 @@ { INTEGRITY_SIZE_ATLEAST_INT(2); Info=CC2(Buffer+Buffer_Offset+(size_t)Element_Offset); - if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 2); + if (Trace_Activated) Param_CC(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 2); Element_Offset+=2; } @@ -1561,7 +1561,7 @@ { INTEGRITY_SIZE_ATLEAST_INT(3); Info=CC3(Buffer+Buffer_Offset+(size_t)Element_Offset); - if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 3); + if (Trace_Activated) Param_CC(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 3); Element_Offset+=3; } @@ -1570,7 +1570,7 @@ { INTEGRITY_SIZE_ATLEAST_INT(4); Info=CC4(Buffer+Buffer_Offset+(size_t)Element_Offset); - if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 4, false); + if (Trace_Activated) Param_CC(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 4); Element_Offset+=4; } @@ -1579,7 +1579,7 @@ { INTEGRITY_SIZE_ATLEAST_INT(5); Info=CC5(Buffer+Buffer_Offset+(size_t)Element_Offset); - if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 5); + if (Trace_Activated) Param_CC(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 5); Element_Offset+=5; } @@ -1588,7 +1588,7 @@ { INTEGRITY_SIZE_ATLEAST_INT(6); Info=CC6(Buffer+Buffer_Offset+(size_t)Element_Offset); - if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 6); + if (Trace_Activated) Param_CC(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 6); Element_Offset+=6; } @@ -1597,7 +1597,7 @@ { INTEGRITY_SIZE_ATLEAST_INT(7); Info=CC7(Buffer+Buffer_Offset+(size_t)Element_Offset); - if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 7); + if (Trace_Activated) Param_CC(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 7); Element_Offset+=7; } @@ -1606,7 +1606,7 @@ { INTEGRITY_SIZE_ATLEAST_INT(8); Info=CC8(Buffer+Buffer_Offset+(size_t)Element_Offset); - if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 8); + if (Trace_Activated) Param_CC(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 8); Element_Offset+=8; } @@ -1614,7 +1614,7 @@ void File__Analyze::Skip_C1(const char* Name) { INTEGRITY_SIZE_ATLEAST(1); - if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 1); + if (Trace_Activated) Param_CC(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 1); Element_Offset+=1; } @@ -1622,7 +1622,7 @@ void File__Analyze::Skip_C2(const char* Name) { INTEGRITY_SIZE_ATLEAST(2); - if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 2); + if (Trace_Activated) Param_CC(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 2); Element_Offset+=2; } @@ -1630,7 +1630,7 @@ void File__Analyze::Skip_C3(const char* Name) { INTEGRITY_SIZE_ATLEAST(3); - if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 3); + if (Trace_Activated) Param_CC(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 3); Element_Offset+=3; } @@ -1638,7 +1638,7 @@ void File__Analyze::Skip_C4(const char* Name) { INTEGRITY_SIZE_ATLEAST(4); - if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 4); + if (Trace_Activated) Param_CC(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 4); Element_Offset+=4; } @@ -1646,7 +1646,7 @@ void File__Analyze::Skip_C5(const char* Name) { INTEGRITY_SIZE_ATLEAST(5); - if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 5); + if (Trace_Activated) Param_CC(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 5); Element_Offset+=5; } @@ -1654,7 +1654,7 @@ void File__Analyze::Skip_C6(const char* Name) { INTEGRITY_SIZE_ATLEAST(6); - if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 6); + if (Trace_Activated) Param_CC(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 6); Element_Offset+=6; } @@ -1662,7 +1662,7 @@ void File__Analyze::Skip_C7(const char* Name) { INTEGRITY_SIZE_ATLEAST(7); - if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 7); + if (Trace_Activated) Param_CC(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 7); Element_Offset+=7; } @@ -1670,7 +1670,7 @@ void File__Analyze::Skip_C8(const char* Name) { INTEGRITY_SIZE_ATLEAST(8); - if (Trace_Activated) Param(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 8); + if (Trace_Activated) Param_CC(Name, Buffer+Buffer_Offset+(size_t)Element_Offset, 8); Element_Offset+=8; } @@ -1682,7 +1682,11 @@ void File__Analyze::Get_Local(int64u Bytes, Ztring &Info, const char* Name) { INTEGRITY_SIZE_ATLEAST_STRING(Bytes); + #ifdef WINDOWS Info.From_Local((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes); + #else //WINDOWS + Info.From_ISO_8859_1((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes); //Trying with the most commonly used charset before UTF8 + #endif //WINDOWS if (Trace_Activated && Bytes) Param(Name, Info); Element_Offset+=Bytes; } @@ -1855,7 +1859,11 @@ void File__Analyze::Peek_Local(int64u Bytes, Ztring &Info) { INTEGRITY_SIZE_ATLEAST_STRING(Bytes); + #ifdef WINDOWS Info.From_Local((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes); + #else //WINDOWS + Info.From_ISO_8859_1((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes); //Trying with the most commonly used charset before UTF8 + #endif //WINDOWS } //--------------------------------------------------------------------------- @@ -1905,7 +1913,11 @@ void File__Analyze::Skip_Local(int64u Bytes, const char* Name) { INTEGRITY_SIZE_ATLEAST(Bytes); + #ifdef WINDOWS if (Trace_Activated && Bytes) Param(Name, Ztring().From_Local((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes)); + #else //WINDOWS + if (Trace_Activated && Bytes) Param(Name, Ztring().From_ISO_8859_1((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes)); //Trying with the most commonly used charset before UTF8 + #endif //WINDOWS Element_Offset+=Bytes; } @@ -1926,7 +1938,11 @@ void File__Analyze::Skip_String(int64u Bytes, const char* Name) { INTEGRITY_SIZE_ATLEAST(Bytes); + #ifdef WINDOWS if (Trace_Activated && Bytes) Param(Name, Ztring().From_Local((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes)); + #else //WINDOWS + if (Trace_Activated && Bytes) Param(Name, Ztring().From_ISO_8859_1((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes)); //Trying with the most commonly used charset before UTF8 + #endif //WINDOWS Element_Offset+=Bytes; } @@ -1964,7 +1980,11 @@ INTEGRITY_SIZE_ATLEAST(1); int8u Size=Buffer[Buffer_Offset+(size_t)Element_Offset]; INTEGRITY_SIZE_ATLEAST(1+Size); + #ifdef WINDOWS if (Trace_Activated && Size) Param(Name, Ztring().From_Local((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset+1), (size_t)Size)); + #else //WINDOWS + if (Trace_Activated && Size) Param(Name, Ztring().From_ISO_8859_1((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset+1), (size_t)Size)); //Trying with the most commonly used charset before UTF8 + #endif //WINDOWS Element_Offset+=1+Size; } diff -Nru libmediainfo-18.08.1/Source/MediaInfo/File__Analyze_Buffer_MinimizeSize.cpp libmediainfo-18.12/Source/MediaInfo/File__Analyze_Buffer_MinimizeSize.cpp --- libmediainfo-18.08.1/Source/MediaInfo/File__Analyze_Buffer_MinimizeSize.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/File__Analyze_Buffer_MinimizeSize.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -1238,7 +1238,11 @@ void File__Analyze::Get_Local(int64u Bytes, Ztring &Info) { INTEGRITY_SIZE_ATLEAST_STRING(Bytes); + #ifdef WINDOWS Info.From_Local((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes); + #else //WINDOWS + Info.From_ISO_8859_1((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes); //Trying with the most commonly used charset before UTF8 + #endif //WINDOWS Element_Offset+=Bytes; } @@ -1405,7 +1409,11 @@ void File__Analyze::Peek_Local(int64u Bytes, Ztring &Info) { INTEGRITY_SIZE_ATLEAST_STRING(Bytes); + #ifdef WINDOWS Info.From_Local((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes); + #else //WINDOWS + Info.From_ISO_8859_1((const char*)(Buffer+Buffer_Offset+(size_t)Element_Offset), (size_t)Bytes); //Trying with the most commonly used charset before UTF8 + #endif //WINDOWS } //--------------------------------------------------------------------------- diff -Nru libmediainfo-18.08.1/Source/MediaInfo/File__Analyze.h libmediainfo-18.12/Source/MediaInfo/File__Analyze.h --- libmediainfo-18.08.1/Source/MediaInfo/File__Analyze.h 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/File__Analyze.h 2018-12-10 23:27:17.000000000 +0000 @@ -479,6 +479,7 @@ inline void Param (const char* Parameter, const int8u* Value, size_t Value_Size, bool Utf8=true) {Param(Parameter, (const char*)Value, Value_Size, Utf8);} inline void Param_GUID (const char* Parameter, int128u Value){Param(Parameter, Ztring().From_GUID(Value));} inline void Param_UUID (const char* Parameter, int128u Value){Param(Parameter, Ztring().From_UUID(Value));} + inline void Param_CC (const char* Parameter, const int8u* Value, int8u Value_Size){Ztring Name2; for (int8s i=0; i ShowSource_List; if (StreamKind==Stream_Video) { Width_Temp=Retrieve(Stream_Video, StreamPos_To, Video_Width); @@ -1389,17 +1415,6 @@ FrameRate_Mode_Temp=Retrieve(Stream_Video, StreamPos_To, Video_FrameRate_Mode); //We want to keep the FrameRate_Mode of AVI 120 fps ScanType_Temp=Retrieve(Stream_Video, StreamPos_To, Video_ScanType); ScanOrder_Temp=Retrieve(Stream_Video, StreamPos_To, Video_ScanOrder); - colour_description_present_Temp=Retrieve(Stream_Video, StreamPos_To, Video_colour_description_present); - if (!colour_description_present_Temp.empty()) - { - colour_primaries_Temp=Retrieve(Stream_Video, StreamPos_To, Video_colour_primaries); - transfer_characteristics_Temp=Retrieve(Stream_Video, StreamPos_To, Video_transfer_characteristics); - matrix_coefficients_Temp=Retrieve(Stream_Video, StreamPos_To, Video_matrix_coefficients); - } - Clear(Stream_Video, StreamPos_To, Video_colour_description_present); - Clear(Stream_Video, StreamPos_To, Video_colour_primaries); - Clear(Stream_Video, StreamPos_To, Video_transfer_characteristics); - Clear(Stream_Video, StreamPos_To, Video_matrix_coefficients); } if (StreamKind==Stream_Audio) { @@ -1437,7 +1452,36 @@ for (size_t Pos=General_Inform; Pos3 && (SamplingFactors[3].Hi!=SamplingFactors[0].Hi || SamplingFactors[3].Vi!=SamplingFactors[0].Vi)) + ChromaSubsampling+=":?"; Fill(StreamKind_Last, 0, "ChromaSubsampling", ChromaSubsampling); } } @@ -1232,10 +1232,18 @@ //Parsing if (Element_Size>=12 && Buffer[Buffer_Offset+11]==0 && string((const char*)Buffer+Buffer_Offset)=="ICC_PROFILE") { + Element_Info1("ICC profile"); + int8u Pos; Skip_Local(12, "Signature"); - Skip_B2( "?"); - APP2_ICC_PROFILE(); + Get_B1 (Pos, "Chunk position?"); //1-based? + Skip_B1( "Chunk Max?"); //1-based? + if (Pos<=1) //Multi-chunk ICC is not supported so we test it is order to skip the extra ICC blocks + APP2_ICC_PROFILE(); + else + Skip_XX(Element_Size-Element_Offset, "(Multi-chunk ICC is not supported)"); } + else + Skip_XX(Element_Size, "Data"); } //--------------------------------------------------------------------------- @@ -1247,7 +1255,6 @@ }; void File_Jpeg::APP2_ICC_PROFILE() { - Element_Info1("ICC profile"); Element_Begin1("ICC profile"); //Parsing @@ -1327,6 +1334,8 @@ vector TagTables; Element_Begin1("Tag table"); Get_B4(Count, "Count"); + if (Count*12>Element_Size-Element_Offset) + Count=(Element_Size-Element_Offset)/12; for (int32u i=0; isecond.Read().To_int32u())); + ColorSpace+=Ztring().From_UTF8(Tiff_ExtraSamples_ColorSpace(Info->second.Read().To_int32u())); Fill(Stream_Image, StreamPos_Last, Image_ColorSpace, ColorSpace, true); } } diff -Nru libmediainfo-18.08.1/Source/MediaInfo/MediaInfo_Config_Automatic.cpp libmediainfo-18.12/Source/MediaInfo/MediaInfo_Config_Automatic.cpp --- libmediainfo-18.08.1/Source/MediaInfo/MediaInfo_Config_Automatic.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/MediaInfo_Config_Automatic.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -359,6 +359,7 @@ "EPG_Positions;EPG positions (internal)\n" "EpisodeTitleNumber;Episode Title Number\n" "Error_File;Error while reading file\n" + "EtsiTS103433;ETSI TS 103 433\n" "ExecutiveProducer;Executive producer\n" "Exit;Exit\n" "Exit_Hint;Quit the program\n" @@ -1203,7 +1204,7 @@ "Matroska;;;M;Mk;;mkv mk3d mka mks;;https://matroska.org/downloads/windows.html\n" "MPEG-PS;;;M;MpegPs;;mpeg mpg m2p vob vro pss evo;video/MP2P;\n" "MPEG-TS;;;M;MpegTs;;ts m2t m2s m4t m4s tmf ts tp trp ty;video/MP2T;\n" - "MPEG-4;;;M;Mpeg4;;mov mp4 m4v m4a m4b m4p 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v;video/mp4;\n" + "MPEG-4;;;M;Mpeg4;;mov mp4 m4v m4a m4b m4p m4r 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v;video/mp4;\n" "MTV;;;M;Other;Chinese hack of MPEG-1 layer 3;mtv;;http://en.wikipedia.org/wiki/Chinese_MP4/MTV_Player\n" "MXF;;;M;Mxf;;mxf;application/mxf;\n" "NSV;;;M;Nsv;Nullsoft Streaming Video;nsv;;http://winamp.com\n" @@ -1217,7 +1218,7 @@ "ShockWave;;;M;Swf;;swf;application/x-shockwave;http://www.macromedia.com/go/getflashplayer\n" "SKM;;;M;Skm;Sky Korean Mobilephone;skm;;http://www.isky.co.kr/html/cs/download.jsp\n" "WebM;;;M;Mkv;;webm;video/webm;http://www.webmproject.org/\n" - "Windows Media;;;M;Wm;;asf wmv wma;video/x-ms-wmv;\n" + "Windows Media;;;M;Wm;;asf dvr-ms wma wmv;video/x-ms-wmv;\n" "WTV;;;M;Wtv;;wtv;;\n" "AV1;;;V;Av1;AOMedia Video 1;;;http://aomedia.org/\n" "AVC;;;V;Avc;Advanced Video Codec;avc h264 264;video/H264;http://developers.videolan.org/x264.html\n" @@ -1466,6 +1467,11 @@ "ap4c;ProRes;;;http://www.apple.com/quicktime/download/standalone.html;4444;;;4:4:4\n" "ap4h;ProRes;;;http://www.apple.com/quicktime/download/standalone.html;4444;;;4:4:4\n" "ap4x;ProRes;;;http://www.apple.com/quicktime/download/standalone.html;4444 XQ;;;4:4:4\n" + "aprh;ProRes;;;http://www.apple.com/quicktime/download/standalone.html;RAW HQ;;\n" + "aprn;ProRes;;;http://www.apple.com/quicktime/download/standalone.html;RAW;;\n" + "apro;ProRes;;;http://www.apple.com/quicktime/download/standalone.html;;;\n" + "aprs;ProRes;;;http://www.apple.com/quicktime/download/standalone.html;;;\n" + "aprx;ProRes;;;http://www.apple.com/quicktime/download/standalone.html;;;\n" "ai12;AVC;;Advanced Video Coding;;;\n" "ai13;AVC;;Advanced Video Coding;;;\n" "ai15;AVC;;Advanced Video Coding;;;\n" @@ -4745,15 +4751,42 @@ "Tagged_Date;;;Y YTY;;;UTC time that the tags were done for this item.;;Temporal\n" "Encryption;;;Y YTY;;;;\n" "BufferSize;;;N YTY;;;Defines the size of the buffer needed to decode the sequence.\n" - "colour_range;;;Y YTY;;;Colour range for YUV colour space\n" "colour_description_present;;;N YTY;;;Presence of colour description\n" + "colour_description_present_Source;;;N YTY;;;Presence of colour description (source)\n" + "colour_description_present_Original;;;N YTY;;;Presence of colour description (if incoherencies)\n" + "colour_description_present_Original_Source;;;N YTY;;;Presence of colour description (source if incoherencies)\n" + "colour_range;;;Y YTY;;;Colour range for YUV colour space\n" + "colour_range_Source;;;N YTY;;;Colour range for YUV colour space (source)\n" + "colour_range_Original;;;Y YTY;;;Colour range for YUV colour space (if incoherencies)\n" + "colour_range_Original_Source;;;N YTY;;;Colour range for YUV colour space (source if incoherencies)\n" "colour_primaries;;;Y YTY;;;Chromaticity coordinates of the source primaries\n" + "colour_primaries_Source;;;N YTY;;;Chromaticity coordinates of the source primaries (source)\n" + "colour_primaries_Original;;;Y YTY;;;Chromaticity coordinates of the source primaries (if incoherencies)\n" + "colour_primaries_Original_Source;;;N YTY;;;Chromaticity coordinates of the source primaries (source if incoherencies)\n" "transfer_characteristics;;;Y YTY;;;Opto-electronic transfer characteristic of the source picture\n" + "transfer_characteristics_Source;;;N YTY;;;Opto-electronic transfer characteristic of the source picture (source)\n" + "transfer_characteristics_Original;;;Y YTY;;;Opto-electronic transfer characteristic of the source picture (if incoherencies)\n" + "transfer_characteristics_Original_Source;;;N YTY;;;Opto-electronic transfer characteristic of the source picture (source if incoherencies)\n" "matrix_coefficients;;;Y YTY;;;Matrix coefficients used in deriving luma and chroma signals from the green, blue, and red primaries\n" - "colour_description_present_Original;;;N YTY;;;Presence of colour description\n" - "colour_primaries_Original;;;Y YTY;;;Chromaticity coordinates of the source primaries\n" - "transfer_characteristics_Original;;;Y YTY;;;Opto-electronic transfer characteristic of the source picture\n" - "matrix_coefficients_Original;;;Y YTY;;;Matrix coefficients used in deriving luma and chroma signals from the green, blue, and red primaries\n" + "matrix_coefficients_Source;;;N YTY;;;Matrix coefficients used in deriving luma and chroma signals from the green, blue, and red primaries (source)\n" + "matrix_coefficients_Original;;;Y YTY;;;Matrix coefficients used in deriving luma and chroma signals from the green, blue, and red primaries (if incoherencies)\n" + "matrix_coefficients_Original_Source;;;N YTY;;;Matrix coefficients used in deriving luma and chroma signals from the green, blue, and red primaries (source if incoherencies)\n" + "MasteringDisplay_ColorPrimaries;;;Y YTY;;;Chromaticity coordinates of the source primaries of the mastering display\n" + "MasteringDisplay_ColorPrimaries_Source;;;N YTY;;;Chromaticity coordinates of the source primaries of the mastering display (source)\n" + "MasteringDisplay_ColorPrimaries_Original;;;Y YTY;;;Chromaticity coordinates of the source primaries of the mastering display (if incoherencies)\n" + "MasteringDisplay_ColorPrimaries_Original_Source;;;N YTY;;;Chromaticity coordinates of the source primaries of the mastering display (source if incoherencies)\n" + "MasteringDisplay_Luminance;;;Y YTY;;;Luminance of the mastering display\n" + "MasteringDisplay_Luminance_Source;;;N YTY;;;Luminance of the mastering display (source)\n" + "MasteringDisplay_Luminance_Original;;;Y YTY;;;Luminance of the mastering display (if incoherencies)\n" + "MasteringDisplay_Luminance_Original_Source;;;N YTY;;;Luminance of the mastering display (source if incoherencies)\n" + "MaxCLL;;;Y YTY;;;Maximum content light level\n" + "MaxCLL_Source;;;N YTY;;;Maximum content light level (source)\n" + "MaxCLL_Original;;;Y YTY;;;Maximum content light level (if incoherencies)\n" + "MaxCLL_Original_Source;;;N YTY;;;Maximum content light level (source if incoherencies)\n" + "MaxFALL;;;Y YTY;;;Maximum frame average light level\n" + "MaxFALL_Source;;;N YTY;;;Maximum frame average light level (source)\n" + "MaxFALL_Original;;;Y YTY;;;Maximum frame average light level (if incoherencies)\n" + "MaxFALL_Original_Source;;;N YTY;;;Maximum frame average light level (source if incoherencies)\n" )); Info.Separator_Set(0, ZenLib::EOL); } diff -Nru libmediainfo-18.08.1/Source/MediaInfo/MediaInfo_Config.cpp libmediainfo-18.12/Source/MediaInfo/MediaInfo_Config.cpp --- libmediainfo-18.08.1/Source/MediaInfo/MediaInfo_Config.cpp 2018-09-09 21:34:37.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/MediaInfo_Config.cpp 2018-12-10 23:27:20.000000000 +0000 @@ -133,7 +133,7 @@ { //--------------------------------------------------------------------------- -const Char* MediaInfo_Version=__T("MediaInfoLib - v18.08.1"); +const Char* MediaInfo_Version=__T("MediaInfoLib - v18.12"); const Char* MediaInfo_Url=__T("http://MediaArea.net/MediaInfo"); 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 @@ -476,7 +476,7 @@ Buffer[Pos]='\0'; Ztring FromFile; FromFile.From_UTF8((char*)Buffer); if (FromFile.empty()) - FromFile.From_Local((char*)Buffer); + FromFile.From_UTF8((char*)Buffer); delete[] Buffer; //Buffer=NULL; //Merge @@ -2207,7 +2207,7 @@ size_t F_Offset=F.Read(Buffer, (size_t)Size); F.Close(); Buffer[F_Offset]='\0'; - Ztring FromFile; FromFile.From_Local((char*)Buffer); + Ztring FromFile; FromFile.From_UTF8((char*)Buffer); delete[] Buffer; //Buffer=NULL; //Merge diff -Nru libmediainfo-18.08.1/Source/MediaInfo/MediaInfo_Inform.cpp libmediainfo-18.12/Source/MediaInfo/MediaInfo_Inform.cpp --- libmediainfo-18.08.1/Source/MediaInfo/MediaInfo_Inform.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/MediaInfo_Inform.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -410,11 +410,19 @@ #if defined(MEDIAINFO_XML_YES) if (XML || XML_0_7_78_MA || XML_0_7_78_MI) + { Retour=Ztring().From_UTF8(To_XML(*Node_Main, 0, false, false)); + delete Node_Main; + delete Node_MI; + } #endif //MEDIAINFO_XML_YES #if defined(MEDIAINFO_JSON_YES) if (JSON) + { Retour=__T("{\n")+Ztring().From_UTF8(To_JSON(*Node_Main, 0, false, false))+__T("\n}"); + delete Node_Main; + delete Node_MI; + } #endif //MEDIAINFO_JSON_YES Retour.FindAndReplace(__T("\\"), __T("|SC1|"), 0, Ztring_Recursive); @@ -718,6 +726,7 @@ Retour+=Ztring().From_UTF8(To_XML(*(Fields[Field]), 1, false, false)); else if (JSON) Retour+=Ztring().From_UTF8(To_JSON(*(Fields[Field]), 1, false, false)+(Field +#include using namespace tinyxml2; using namespace std; //--------------------------------------------------------------------------- @@ -127,6 +128,8 @@ ReferenceFiles_Accept(this, Config); + vector AssetCountPerReel; + //Parsing main elements for (XMLElement* CompositionPlaylist_Item=Root->FirstChildElement(); CompositionPlaylist_Item; CompositionPlaylist_Item=CompositionPlaylist_Item->NextSiblingElement()) { @@ -275,6 +278,8 @@ //Reel if (MatchQName(ReelList_Item, IsDcp?"Reel":"Segment", NameSpace)) { + size_t AssetCount=0; + for (XMLElement* Reel_Item=ReelList_Item->FirstChildElement(); Reel_Item; Reel_Item=Reel_Item->NextSiblingElement()) { //AssetList @@ -299,6 +304,8 @@ Sequence->StreamKind=Stream_Video; else if (!strcmp(AlItemName, "MainSound")) Sequence->StreamKind=Stream_Audio; + else if (!strcmp(AlItemName, "MainSubtitle")) + Sequence->StreamKind=Stream_Text; } else if (IsImf && IsSmpteSt2067_2(AlItemNs)) { @@ -390,15 +397,21 @@ } Sequence->StreamID=ReferenceFiles->Sequences_Size()+1; ReferenceFiles->AddSequence(Sequence); + + AssetCount++; } } } } + + AssetCountPerReel.push_back(AssetCount); } } } } + ReferenceFiles->DetectSameReels(AssetCountPerReel); + //Getting files names FileName Directory(File_Name); Ztring DirPath = Directory.Path_Get(); diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_DvDif.cpp libmediainfo-18.12/Source/MediaInfo/Multiple/File_DvDif.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_DvDif.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Multiple/File_DvDif.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -369,8 +369,8 @@ } else { - Fill(Stream_Video, 0, Video_ScanType, Interlaced?"Interlaced":"Progressive"); - Fill(Stream_Video, 0, Video_Interlacement, Interlaced?"Interlaced":"PFF"); + Fill(Stream_Video, 0, Video_ScanType, "Progressive"); + Fill(Stream_Video, 0, Video_Interlacement, "PFF"); } switch (aspect) { diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_Dvdv.cpp libmediainfo-18.12/Source/MediaInfo/Multiple/File_Dvdv.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_Dvdv.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Multiple/File_Dvdv.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -618,7 +618,7 @@ Get_BS (2, SamplingRate, "Sampling rate"); Param_Info1(Ztring::ToZtring(IFO_SamplingRate[SamplingRate])); Get_BS (4, Channels, "Channels"); Param_Info2(Channels+1, " channels"); BS_End(); - Get_Local(3, Language, "Language code"); + Get_UTF8(3, Language, "Language code"); if (!Language.empty() && Language[0]>=0x80) Language.clear(); //this is 0xFF... if (Language==__T("iw")) @@ -697,7 +697,7 @@ Get_BS (2, LanguageType, "Language type"); Param_Info1(LanguageType==1?"2CC":"Unknown"); BS_End(); Skip_B1( "Reserved"); - Get_Local(3, Language, "Language code"); + Get_UTF8(3, Language, "Language code"); if (!Language.empty() && Language[0]>=0x80) Language.clear(); //this is 0xFF... if (Language==__T("iw")) diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_Flv.cpp libmediainfo-18.12/Source/MediaInfo/Multiple/File_Flv.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_Flv.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Multiple/File_Flv.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -1637,7 +1637,7 @@ if (Value_Size) { Ztring Value; - Get_Local(Value_Size, Value, "Value"); + Get_UTF8(Value_Size, Value, "Value"); if (Value==__T("unknown")) Value.clear(); Element_Info1C((!Value.empty()), Value); Fill(Stream_General, 0, StringData.c_str(), Value, true); diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_Gxf.cpp libmediainfo-18.12/Source/MediaInfo/Multiple/File_Gxf.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_Gxf.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Multiple/File_Gxf.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -850,7 +850,7 @@ case 0x40 : //Media file name of material { Ztring MediaFileName; - Get_Local(DataLength, MediaFileName, "Content"); + Get_UTF8(DataLength, MediaFileName, "Content"); Fill(Stream_General, 0, General_Title, MediaFileName, true); } break; @@ -1155,7 +1155,7 @@ { case 0x4C : //Media name { - Get_Local(DataLength, Streams[TrackID].MediaName, "Content"); + Get_UTF8(DataLength, Streams[TrackID].MediaName, "Content"); } break; case 0x4D : //Auxiliary Information diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_Ibi.cpp libmediainfo-18.12/Source/MediaInfo/Multiple/File_Ibi.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_Ibi.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Multiple/File_Ibi.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -349,7 +349,7 @@ //Parsing Ztring Data; - Get_Local(Element_Size, Data, "Data"); Element_Info1(Data); + Get_UTF8(Element_Size, Data, "Data"); Element_Info1(Data); //Filling FILLING_BEGIN(); diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_Mk.cpp libmediainfo-18.12/Source/MediaInfo/Multiple/File_Mk.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_Mk.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Multiple/File_Mk.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -816,7 +816,7 @@ Utc=Item2->second; Item->second.erase(Item2); } - if (Utc<=Hutc) + if (Utc>=Hutc) Tags_Verified=true; else Fill(StreamKind_Last, StreamPos_Last, "Statistics Tags Issue", App + __T(' ') + Utc + __T(" / ") + Retrieve(Stream_General, 0, "Encoded_Application") + __T(' ') + Hutc); @@ -2958,8 +2958,8 @@ FILLING_BEGIN(); if (Segment_Info_Count>1) return; //First element has the priority - Fill(Stream_General, 0, General_UniqueID, Ztring().From_Local(Data.toString(10))); - Fill(Stream_General, 0, General_UniqueID_String, Ztring().From_Local(Data.toString(10))+__T(" (0x")+Ztring().From_Local(Data.toString(16))+__T(')')); + Fill(Stream_General, 0, General_UniqueID, Ztring().From_UTF8(Data.toString(10))); + Fill(Stream_General, 0, General_UniqueID_String, Ztring().From_UTF8(Data.toString(10))+__T(" (0x")+Ztring().From_UTF8(Data.toString(16))+__T(')')); FILLING_END(); } diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_Mpeg4.cpp libmediainfo-18.12/Source/MediaInfo/Multiple/File_Mpeg4.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_Mpeg4.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Multiple/File_Mpeg4.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -391,7 +391,7 @@ } if (TempString.size()) { - Fill(StreamKind_Last, StreamPos_Last, "Subtitles For", TempString.To_Local().c_str()); + Fill(StreamKind_Last, StreamPos_Last, "Subtitles For", TempString.To_UTF8().c_str()); TempString.clear(); } } @@ -424,7 +424,7 @@ TempString.append(Ztring().From_Number(*TrackID)); } } - Fill(StreamKind_Last, StreamPos_Last, "Default", TempString.size()?TempString.To_Local().c_str():"No"); + Fill(StreamKind_Last, StreamPos_Last, "Default", TempString.size()?TempString.To_UTF8().c_str():"No"); TempString.clear(); } } @@ -443,7 +443,7 @@ if (TempString.size()) TempString.append(__T(",")); TempString.append(Ztring().From_Number(*TrackID)); } - Fill(StreamKind_Last, StreamPos_Last, "Full Alternative", TempString.To_Local().c_str()); + Fill(StreamKind_Last, StreamPos_Last, "Full Alternative", TempString.To_UTF8().c_str()); TempString.clear(); } } @@ -456,7 +456,7 @@ if (TempString.size()) TempString.append(__T(",")); TempString.append(Ztring().From_Number(*TrackID)); } - if (TempString.size()) Fill(StreamKind_Last, StreamPos_Last, "Forced Alternative", TempString.To_Local().c_str()); + if (TempString.size()) Fill(StreamKind_Last, StreamPos_Last, "Forced Alternative", TempString.To_UTF8().c_str()); TempString.clear(); } } @@ -471,7 +471,7 @@ } if (TempString.size()) { - Fill(StreamKind_Last, StreamPos_Last, "Fallback To", TempString.To_Local().c_str()); + Fill(StreamKind_Last, StreamPos_Last, "Fallback To", TempString.To_UTF8().c_str()); TempString.clear(); } } @@ -484,7 +484,7 @@ } if (TempString.size()) { - Fill(StreamKind_Last, StreamPos_Last, "Fallback From", TempString.To_Local().c_str()); + Fill(StreamKind_Last, StreamPos_Last, "Fallback From", TempString.To_UTF8().c_str()); TempString.clear(); } } @@ -512,7 +512,7 @@ } if (TempString.size()) { - Fill(StreamKind_Last, StreamPos_Last, "Subtitles", TempString.To_Local().c_str()); + Fill(StreamKind_Last, StreamPos_Last, "Subtitles", TempString.To_UTF8().c_str()); TempString.clear(); } } @@ -526,7 +526,7 @@ } if (TempString.size()) { - Fill(StreamKind_Last, StreamPos_Last, "Closed Captions", TempString.To_Local().c_str()); + Fill(StreamKind_Last, StreamPos_Last, "Closed Captions", TempString.To_UTF8().c_str()); TempString.clear(); } } @@ -539,7 +539,7 @@ } if (TempString.size()) { - Fill(StreamKind_Last, StreamPos_Last, "Closed Captions For", TempString.To_Local().c_str()); + Fill(StreamKind_Last, StreamPos_Last, "Closed Captions For", TempString.To_UTF8().c_str()); TempString.clear(); } } @@ -552,7 +552,7 @@ } if (TempString.size()) { - Fill(StreamKind_Last, StreamPos_Last, "Menus", TempString.To_Local().c_str()); + Fill(StreamKind_Last, StreamPos_Last, "Menus", TempString.To_UTF8().c_str()); TempString.clear(); } } @@ -569,7 +569,7 @@ } if (TempString.size()) { - Fill(StreamKind_Last, StreamPos_Last, "Menu For", TempString.To_Local().c_str()); + Fill(StreamKind_Last, StreamPos_Last, "Menu For", TempString.To_UTF8().c_str()); TempString.clear(); } } @@ -859,7 +859,7 @@ if (Retrieve(StreamKind_Last, StreamPos_Last, Pos).empty()) Fill(StreamKind_Last, StreamPos_Last, Pos, StreamSave[Pos]); for (size_t Pos=0; Possecond.Parsers[0]->Retrieve(Stream_General, 0, General_LawRating); if (!LawRating.empty()) @@ -911,7 +911,7 @@ if (Retrieve(StreamKind_Last, StreamPos_Last, Pos).empty()) Fill(StreamKind_Last, StreamPos_Last, Pos, StreamSave[Pos]); for (size_t Pos=0; Pos> 8)); Value.append(1, (Char)((Meta&0x000000FF)>> 0)); if (MediaInfoLib::Config.CustomMapping_IsPresent(__T("MP4"), Value)) - Parameter=MediaInfoLib::Config.CustomMapping_Get(__T("MP4"), Value).To_Local(); + Parameter=MediaInfoLib::Config.CustomMapping_Get(__T("MP4"), Value).To_UTF8(); //Cleanup of the parameter, removing anything not ANSI 7-bit for (size_t i=0; i27) volume_name_string_length=27; - Get_Local(volume_name_string_length, volume_name_string, "volume name string"); + Get_UTF8(volume_name_string_length, volume_name_string, "volume name string"); if (volume_name_string_length<27) Skip_XX(27-volume_name_string_length, "volume name string padding"); Skip_B4( "volume created mac local date"); //seconds since beginning 1904 to 2040 @@ -3433,7 +3436,7 @@ Get_B1 (file_name_string_length, "file name string length"); if (file_name_string_length>99) file_name_string_length=99; - Get_Local(file_name_string_length, file_name_string, "file name string"); + Get_UTF8(file_name_string_length, file_name_string, "file name string"); if (file_name_string_length<63) Skip_XX(63-file_name_string_length, "file name string padding"); if (file_name_string_length<=63) @@ -3494,7 +3497,7 @@ switch (type) { case 0x0000 : - Get_Local(size, Directory_Name, "Data"); + Get_UTF8(size, Directory_Name, "Data"); break; case 0x000E : { @@ -3507,7 +3510,7 @@ } else { - Info_Local(size, Data, "Data"); //We try, for info... + Info_UTF8(size, Data, "Data"); //We try, for info... Element_Info1(Data); } } @@ -3523,14 +3526,14 @@ } else { - Info_Local(size, Data, "Data"); //We try, for info... + Info_UTF8(size, Data, "Data"); //We try, for info... Element_Info1(Data); } } break; default : { - Info_Local(size, Data, "Data"); //We try, for info... + Info_UTF8(size, Data, "Data"); //We try, for info... Element_Info1(Data); } } @@ -3626,7 +3629,7 @@ Skip_B2( "Background color (green)"); Skip_B2( "Background color (blue)"); Get_B1 (FontNameSize, "Font name size"); - Skip_Local(FontNameSize, "Font name"); + Skip_UTF8(FontNameSize, "Font name"); FILLING_BEGIN(); Streams[moov_trak_tkhd_TrackID].TimeCode_IsVisual=IsVisual; @@ -3982,7 +3985,7 @@ break; Pos++; } - Skip_Local(Pos+1-Element_Offset, "schema_location"); + Skip_UTF8(Pos+1-Element_Offset, "schema_location"); Pos=(size_t)Element_Offset; while (Pos>24)); - Codec.append(1, (char)((Element_Code&0x00FF0000)>>16)); - if (Codec!="ms") //Normal + Ztring Codec; + if ((Element_Code&0xFFFF0000)!=0x6D730000) //Not starting with "ms", Normal { - Codec.append(1, (char)((Element_Code&0x0000FF00)>> 8)); - Codec.append(1, (char)((Element_Code&0x000000FF)>> 0)); + Codec.From_CC4((int32u)Element_Code); //if (Codec!="mp4a") //mp4a is for Mpeg4 system - CodecID_Fill(Ztring(Codec.c_str()), Stream_Audio, StreamPos_Last, InfoCodecID_Format_Mpeg4); - if (Codec!="raw ") - Fill(Stream_Audio, StreamPos_Last, Audio_Codec, Codec, false, true); + CodecID_Fill(Codec, Stream_Audio, StreamPos_Last, InfoCodecID_Format_Mpeg4); + if (Codec!=__T("raw ")) + Fill(Stream_Audio, StreamPos_Last, Audio_Codec, Codec); else - Fill(Stream_Audio, StreamPos_Last, Audio_Codec, "PCM", Error, false, true); - Fill(Stream_Audio, StreamPos_Last, Audio_Codec_CC, Codec, false, true); - if (Codec=="drms") + Fill(Stream_Audio, StreamPos_Last, Audio_Codec, "PCM", Unlimited, true, true); + Fill(Stream_Audio, StreamPos_Last, Audio_Codec_CC, Codec, true); + if (Codec==__T("drms")) Fill(Stream_Audio, StreamPos_Last, Audio_Encryption, "iTunes"); - if (Codec=="enca") + if (Codec==__T("enca")) Fill(Stream_Audio, StreamPos_Last, Audio_Encryption, "Encrypted"); } else //Microsoft 2CC { int64u CodecI= ((Element_Code&0x0000FF00ULL)>> 8) + ((Element_Code&0x000000FFULL)>> 0); //FormatTag - Codec=Ztring().From_Number(CodecI, 16).To_Local(); - CodecID_Fill(Ztring::ToZtring(CodecI, 16), Stream_Audio, StreamPos_Last, InfoCodecID_Format_Riff); + Codec.From_Number(CodecI, 16); + CodecID_Fill(Codec, Stream_Audio, StreamPos_Last, InfoCodecID_Format_Riff); Fill(Stream_Audio, StreamPos_Last, Audio_Codec, Codec, true); Fill(Stream_Audio, StreamPos_Last, Audio_Codec_CC, Codec, true); } @@ -4484,11 +4484,11 @@ } #endif #if defined(MEDIAINFO_AMR_YES) - if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Mpeg4, Ztring(Codec.c_str()), InfoCodecID_Format)==__T("AMR")) + if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Mpeg4, Codec, InfoCodecID_Format)==__T("AMR")) { //Creating the parser File_Amr MI; - MI.Codec=Ztring().From_Local(Codec.c_str()); + MI.Codec=Codec; Open_Buffer_Init(&MI); //Parsing @@ -4500,11 +4500,11 @@ } #endif #if defined(MEDIAINFO_ADPCM_YES) - if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Mpeg4, Ztring(Codec.c_str()), InfoCodecID_Format)==__T("ADPCM")) + if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Mpeg4, Codec, InfoCodecID_Format)==__T("ADPCM")) { //Creating the parser File_Adpcm MI; - MI.Codec=Ztring().From_Local(Codec.c_str()); + MI.Codec=Codec; Open_Buffer_Init(&MI); //Parsing @@ -4518,7 +4518,7 @@ } #endif #if defined(MEDIAINFO_PCM_YES) - if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Mpeg4, Ztring(Codec.c_str()), InfoCodecID_Format)==__T("PCM")) + if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Mpeg4, Codec, InfoCodecID_Format)==__T("PCM")) { //Info of stream size Streams[moov_trak_tkhd_TrackID].stsz_Sample_Multiplier=Channels*SampleSize/8; @@ -4593,7 +4593,7 @@ Parser->Sign=(Flags&0x04)?'S':'U'; } } - Parser->Codec=Ztring().From_Local(Codec.c_str()); + Parser->Codec=Codec; Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser); //Warning: PCM parser must be the last one (for detection "by default" and this property is used when e.g. "Demux_SplitAudioBlocks" is used) Streams[moov_trak_tkhd_TrackID].IsPcm=true; @@ -4603,7 +4603,7 @@ } #endif #if defined(MEDIAINFO_MPEGA_YES) - if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Mpeg4, Ztring(Codec.c_str()), InfoCodecID_Format)==__T("MPEG Audio")) + if (MediaInfoLib::Config.CodecID_Get(Stream_Audio, InfoCodecID_Format_Mpeg4, Codec, InfoCodecID_Format)==__T("MPEG Audio")) { //Creating the parser File_Mpega* Parser=new File_Mpega; @@ -4811,12 +4811,12 @@ { //This is pascal string Skip_B1( "Compressor name size"); - Skip_Local(CompressorName_Size, "Compressor name"); + Skip_UTF8(CompressorName_Size, "Compressor name"); Skip_XX(32-1-CompressorName_Size, "Padding"); } else //this is hard-coded 32-byte string - Skip_Local(32, "Compressor name"); + Skip_UTF8(32, "Compressor name"); Get_B2 (Depth, "Depth"); if (Depth>0x20 && Depth<0x40) { @@ -4848,18 +4848,15 @@ return; //Handling only the first description FILLING_BEGIN(); - std::string Codec; - Codec.append(1, (char)((Element_Code&0xFF000000)>>24)); - Codec.append(1, (char)((Element_Code&0x00FF0000)>>16)); - Codec.append(1, (char)((Element_Code&0x0000FF00)>> 8)); - Codec.append(1, (char)((Element_Code&0x000000FF)>> 0)); + Ztring Codec; + Codec.From_CC4((int32u)Element_Code); //if (Codec!="mp4v") //mp4v is for Mpeg4 system - CodecID_Fill(Ztring(Codec.c_str()), Stream_Video, StreamPos_Last, InfoCodecID_Format_Mpeg4); - Fill(Stream_Video, StreamPos_Last, Video_Codec, Codec, false, true); - Fill(Stream_Video, StreamPos_Last, Video_Codec_CC, Codec, false, true); - if (Codec=="drms") + CodecID_Fill(Codec, Stream_Video, StreamPos_Last, InfoCodecID_Format_Mpeg4); + Fill(Stream_Video, StreamPos_Last, Video_Codec, Codec, true); + Fill(Stream_Video, StreamPos_Last, Video_Codec_CC, Codec, true); + if (Codec==__T("drms")) Fill(Stream_Video, StreamPos_Last, Video_Encryption, "iTunes"); - if (Codec=="encv") + if (Codec==__T("encv")) Fill(Stream_Video, StreamPos_Last, Video_Encryption, "Encrypted"); if (Width) Fill(Stream_Video, StreamPos_Last, Video_Width, Width, 10, true); @@ -4878,7 +4875,7 @@ if (Streams[moov_trak_tkhd_TrackID].Parsers.empty()) { #if defined(MEDIAINFO_DVDIF_YES) - if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Mpeg4, Ztring(Codec.c_str()), InfoCodecID_Format)==__T("DV")) + if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Mpeg4, Codec, InfoCodecID_Format)==__T("DV")) { File_DvDif* Parser=new File_DvDif; Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser); @@ -5040,7 +5037,7 @@ } #endif #if defined(MEDIAINFO_JPEG_YES) - if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Mpeg4, Ztring(Codec.c_str()), InfoCodecID_Format)==__T("JPEG")) + if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Mpeg4, Codec, InfoCodecID_Format)==__T("JPEG")) { File_Jpeg* Parser=new File_Jpeg; Parser->StreamKind=Stream_Video; @@ -5048,7 +5045,7 @@ } #endif #if defined(MEDIAINFO_MPEG4_YES) - if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Mpeg4, Ztring(Codec.c_str()), InfoCodecID_Format)==__T("JPEG 2000")) + if (MediaInfoLib::Config.CodecID_Get(Stream_Video, InfoCodecID_Format_Mpeg4, Codec, InfoCodecID_Format)==__T("JPEG 2000")) { File_Mpeg4* Parser=new File_Mpeg4; Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser); @@ -5078,7 +5075,7 @@ } //RGB(A) - if (Codec=="raw " || Codec=="rle ") + if (Codec==__T("raw ") || Codec==__T("rle ")) { if (IsGreyscale) { @@ -5093,7 +5090,7 @@ else Fill(Stream_Video, StreamPos_Last, Video_BitDepth, Depth/3); } - else if (Codec=="AVrp") + else if (Codec==__T("AVrp")) Fill(Stream_Video, StreamPos_Last, Video_BitDepth, 10); //Descriptors or a list (we can see both!) @@ -6217,11 +6214,11 @@ Element_Name("Original format box"); //Parsing - std::string Codec; - Get_String(4, Codec, "data_format"); + int32u Codec; + Get_C4 (Codec, "data_format"); FILLING_BEGIN(); - CodecID_Fill(Ztring(Codec.c_str()), Stream_Video, StreamPos_Last, InfoCodecID_Format_Mpeg4); + CodecID_Fill(Ztring().From_CC4(Codec), Stream_Video, StreamPos_Last, InfoCodecID_Format_Mpeg4); FILLING_END(); } @@ -7063,10 +7060,10 @@ Get_String(Size, ValueS, "Value"); Value.From_UTF8(ValueS.c_str()); if (Value.empty()) - Value.From_Local(ValueS.c_str()); //Trying Local... + Value.From_ISO_8859_1(ValueS.c_str()); //Trying ISO 8859-1... FILLING_BEGIN(); - Fill(Stream_Menu, StreamPos_Last, Ztring().Duration_From_Milliseconds(Time/10000).To_Local().c_str(), Value); + Fill(Stream_Menu, StreamPos_Last, Ztring().Duration_From_Milliseconds(Time/10000).To_UTF8().c_str(), Value); FILLING_END(); //Next @@ -7187,7 +7184,7 @@ Element_Name("Hint Version"); //Parsing - Skip_Local(Element_Size, "Data"); + Skip_UTF8(Element_Size, "Data"); } //--------------------------------------------------------------------------- @@ -7202,7 +7199,7 @@ Element_Name("Real Time"); //Parsing - Skip_Local(Element_Size, "Value"); + Skip_UTF8(Element_Size, "Value"); } //--------------------------------------------------------------------------- @@ -7275,7 +7272,7 @@ //Parsing Ztring Encoder; - Get_Local(Element_Size, Encoder, "Value"); + Get_UTF8(Element_Size, Encoder, "Value"); //Filling //Fill(Stream_General, 0, General_Encoded_Library, Encoder); @@ -7551,16 +7548,23 @@ while(Element_OffsetStreams[elementary_PID]->Infos["ChromaSubsampling"]=Mpegv_chroma_format[chroma_format]; if (profile_and_level_indication_profile) { - Complete_Stream->Streams[elementary_PID]->Infos["Format_Profile"]=Ztring().From_Local(Mpegv_profile_and_level_indication_profile[profile_and_level_indication_profile])+__T("@")+Ztring().From_Local(Mpegv_profile_and_level_indication_level[profile_and_level_indication_level]); - Complete_Stream->Streams[elementary_PID]->Infos["Codec_Profile"]=Ztring().From_Local(Mpegv_profile_and_level_indication_profile[profile_and_level_indication_profile])+__T("@")+Ztring().From_Local(Mpegv_profile_and_level_indication_level[profile_and_level_indication_level]); + Complete_Stream->Streams[elementary_PID]->Infos["Format_Profile"]=Ztring().From_UTF8(Mpegv_profile_and_level_indication_profile[profile_and_level_indication_profile])+__T("@")+Ztring().From_UTF8(Mpegv_profile_and_level_indication_level[profile_and_level_indication_level]); + Complete_Stream->Streams[elementary_PID]->Infos["Codec_Profile"]=Ztring().From_UTF8(Mpegv_profile_and_level_indication_profile[profile_and_level_indication_profile])+__T("@")+Ztring().From_UTF8(Mpegv_profile_and_level_indication_level[profile_and_level_indication_level]); } } break; @@ -1987,7 +1987,7 @@ if (elementary_PID_IsValid) { Complete_Stream->Streams[elementary_PID]->Infos["Format"]=__T("AVC"); - Complete_Stream->Streams[elementary_PID]->Infos["Format_Profile"]=Ztring().From_Local(Avc_profile_idc(profile_idc))+__T("@L")+Ztring().From_Number(((float)level_idc)/10, (level_idc%10)?1:0); + Complete_Stream->Streams[elementary_PID]->Infos["Format_Profile"]=Ztring().From_UTF8(Avc_profile_idc(profile_idc))+__T("@L")+Ztring().From_Number(((float)level_idc)/10, (level_idc%10)?1:0); } break; default : ; @@ -2070,14 +2070,14 @@ if (profile_space==0) { if (profile_idc) - Profile=Ztring().From_Local(Hevc_profile_idc(profile_idc)); + Profile=Ztring().From_UTF8(Hevc_profile_idc(profile_idc)); if (level_idc) { if (profile_idc) Profile+=__T('@'); Profile+=__T('L')+Ztring().From_Number(((float)level_idc)/30, (level_idc%10)?1:0); Profile+=__T('@'); - Profile+=Ztring().From_Local(Hevc_tier_flag(tier_flag)); + Profile+=Ztring().From_UTF8(Hevc_tier_flag(tier_flag)); } } @@ -2597,7 +2597,7 @@ Skip_XX(selector_length, "selector_bytes"); Get_Local(3, ISO_639_language_code, "ISO_639_language_code"); Get_B1 (text_length, "text_length"); - Skip_Local(text_length, "text_chars"); + Skip_UTF8(text_length, "text_chars"); } //--------------------------------------------------------------------------- @@ -2632,7 +2632,7 @@ if (elementary_PID_IsValid) { Complete_Stream->Streams[elementary_PID]->descriptor_tag=0x6A; - Complete_Stream->Streams[elementary_PID]->Infos["Channel(s)"]=Ztring().From_Local(Mpeg_Descriptors_AC3_Channels[number_of_channels]); + Complete_Stream->Streams[elementary_PID]->Infos["Channel(s)"]=Ztring().From_UTF8(Mpeg_Descriptors_AC3_Channels[number_of_channels]); } break; default : ; @@ -2703,7 +2703,7 @@ if (elementary_PID_IsValid) { Complete_Stream->Streams[elementary_PID]->descriptor_tag=0x7A; - Complete_Stream->Streams[elementary_PID]->Infos["Channel(s)"]=Ztring().From_Local(Mpeg_Descriptors_AC3_Channels[number_of_channels]); + Complete_Stream->Streams[elementary_PID]->Infos["Channel(s)"]=Ztring().From_UTF8(Mpeg_Descriptors_AC3_Channels[number_of_channels]); } break; default : ; @@ -2864,12 +2864,12 @@ int8u sample_rate_code, bit_rate_code, surround_mode, bsmod, num_channels, langcod, textlen, text_code; bool language_flag, language_flag_2; BS_Begin(); - Get_S1 (3, sample_rate_code, "sample_rate_code"); if (sample_rate_code<4) {Param_Info2(AC3_SamplingRate[sample_rate_code], " Hz");} + Get_S1 (3, sample_rate_code, "sample_rate_code"); Param_Info2C(sample_rate_code<4,AC3_SamplingRate[sample_rate_code], " Hz"); Skip_S1(5, "bsid"); - Get_S1 (6, bit_rate_code, "bit_rate_code"); Param_Info2(AC3_BitRate[bit_rate_code]*1000, " Kbps"); - Get_S1 (2, surround_mode, "surround_mode"); Param_Info1(AC3_Surround[surround_mode]); + Get_S1 (6, bit_rate_code, "bit_rate_code"); Param_Info2C(bit_rate_code<19,AC3_BitRate[bit_rate_code]*1000, " Kbps"); + Get_S1 (2, surround_mode, "surround_mode"); Param_Info1C(surround_mode<4,AC3_Surround[surround_mode]); Get_S1 (3, bsmod, "bsmod"); - Get_S1 (4, num_channels, "num_channels"); if (num_channels<8) {Param_Info2(AC3_Channels[num_channels], " channels");} + Get_S1 (4, num_channels, "num_channels"); Param_Info2C(num_channels<8,AC3_Channels[num_channels], " channels"); Skip_SB( "full_svc"); BS_End(); @@ -2882,7 +2882,8 @@ Complete_Stream->Streams[elementary_PID]->descriptor_tag=0x81; if (sample_rate_code<4) Complete_Stream->Streams[elementary_PID]->Infos["SamplingRate"]=Ztring::ToZtring(AC3_SamplingRate[sample_rate_code]); - Complete_Stream->Streams[elementary_PID]->Infos["BitRate"]=Ztring::ToZtring(AC3_BitRate[bit_rate_code]*1000); + if (bit_rate_code<19) + Complete_Stream->Streams[elementary_PID]->Infos["BitRate"]=Ztring::ToZtring(AC3_BitRate[bit_rate_code]*1000); if (num_channels<8) Complete_Stream->Streams[elementary_PID]->Infos["Channel(s)"]=Ztring::ToZtring(AC3_Channels[num_channels]); } @@ -2931,12 +2932,12 @@ //Parsing if (Element_Offset==Element_Size) return; if (language_flag) - Get_Local(3, Language1, "language1"); + Get_UTF8(3, Language1, "language1"); //Parsing if (Element_Offset==Element_Size) return; if (language_flag_2) - Get_Local(3, Language2, "language2"); + Get_UTF8(3, Language2, "language2"); //Parsing if (Element_Offset==Element_Size) return; @@ -3145,7 +3146,7 @@ Skip_S1( 3, "reserved"); Get_S2 (13, elementary_PID, "elementary_PID"); BS_End(); - Get_Local(3, Language, "ISO_639_language_code"); + Get_UTF8(3, Language, "ISO_639_language_code"); Element_End1(Ztring().From_CC2(elementary_PID)); //Filling @@ -3553,7 +3554,6 @@ { if (Size<1) { - Get_Local(Size, Value, Info); return; } diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_Mpeg_Psi.cpp libmediainfo-18.12/Source/MediaInfo/Multiple/File_Mpeg_Psi.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_Mpeg_Psi.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Multiple/File_Mpeg_Psi.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -2325,7 +2325,7 @@ case 0x00 : switch (mode) { - case 0x00 : Get_Local(number_bytes, segment, "string"); break; + case 0x00 : Get_UTF8(number_bytes, segment, "string"); break; case 0x3F : Get_UTF16B(number_bytes, segment, "string"); break; default : Skip_XX(number_bytes, "Unknown"); segment=__T("(Encoded with mode=0x")+Ztring::ToZtring(mode, 16)+__T(')'); diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_MpegTs.cpp libmediainfo-18.12/Source/MediaInfo/Multiple/File_MpegTs.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_MpegTs.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Multiple/File_MpegTs.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -1061,7 +1061,7 @@ //Filling Fill(Stream_General, 0, General_EPG_Positions_Begin, Count_Get(Stream_General, 0), 10, true); for (std::map::iterator EPG=EPGs.begin(); EPG!=EPGs.end(); ++EPG) - Fill(Stream_General, 0, EPG->first.To_Local().c_str(), EPG->second, true); + Fill(Stream_General, 0, EPG->first.To_UTF8().c_str(), EPG->second, true); Fill(Stream_General, 0, General_EPG_Positions_End, Count_Get(Stream_General, 0), 10, true); } } diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_Mxf.cpp libmediainfo-18.12/Source/MediaInfo/Multiple/File_Mxf.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_Mxf.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Multiple/File_Mxf.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -1152,6 +1152,22 @@ } default : return ""; } + case 0x03 : //Individual Picure Coding Schemes + switch (Code6) + { + case 0x06 : //ProRes + switch (Code7) + { + case 0x01 : return "422 Proxy"; + case 0x02 : return "422 LT"; + case 0x03 : return "422"; + case 0x04 : return "422 HQ"; + case 0x05 : return "4444"; + case 0x06 : return "4444 XQ"; + default : return ""; + } + default : return ""; + } default : return ""; } default : return ""; @@ -1313,6 +1329,8 @@ case 0x04 : return "BT.2020"; case 0x05 : return "XYZ"; case 0x06 : return "Display P3"; + case 0x07 : return "ACES"; // SMPTE ST 2065-1 + case 0x08 : return "XYZ"; // SMPTE ST 2067-40 / ISO 11664-3 default : return ""; } } @@ -1334,6 +1352,8 @@ case 0x09 : return "BT.2020"; // ISO does a difference of value between 10 and 12 bit case 0x0A : return "PQ"; case 0x0B : return "HLG"; + case 0x0C : return "Gamma 2.6"; // SMPTE ST 2067-50 + case 0x0D : return "sRGB/sYCC"; // IEC 61966-2-1 default : return ""; } } @@ -1349,7 +1369,7 @@ case 0x03 : return "SMPTE 240M"; case 0x04 : return "YCgCo"; case 0x05 : return "Identity"; - case 0x06 : return "BT.2020"; // ISO does a difference between constant and non constant, not SMPTE? + case 0x06 : return "BT.2020 non-constant"; default : return ""; } } @@ -2156,6 +2176,32 @@ } //*************************************************************************** +// Config +//*************************************************************************** + +//--------------------------------------------------------------------------- +const char* ShowSource_List[] = +{ + "colour_description", + "colour_range", + "colour_primaries", + "matrix_coefficients", + "transfer_characteristics", + "MasteringDisplay_ColorPrimaries", + "MasteringDisplay_Luminance", + "MaxCLL", + "MaxFALL", + NULL +}; +bool ShowSource_IsInList(const string &Value) +{ + for (size_t i = 0; ShowSource_List[i]; i++) + if (ShowSource_List[i] == Value) + return true; + return false; +} + +//*************************************************************************** // Constructor/Destructor //*************************************************************************** @@ -2982,7 +3028,7 @@ } for (size_t Pos=0; Pos::iterator Info_MasteringDisplay_Primaries = Descriptor->second.Infos.find("MasteringDisplay_Primaries"); @@ -3497,7 +3545,7 @@ if (MasteringDisplay_ColorPrimaries==__T("R: x=0.708000 y=0.292000, G: x=0.170000 y=0.797000, B: x=0.131000 y=0.046000, White point: x=0.312700 y=0.329000")) MasteringDisplay_ColorPrimaries=__T("BT.2020"); if (MasteringDisplay_ColorPrimaries==__T("R: x=0.680000 y=0.320000, G: x=0.265000 y=0.690000, B: x=0.150000 y=0.060000, White point: x=0.312700 y=0.329000")) MasteringDisplay_ColorPrimaries=__T("Display P3"); - Fill(StreamKind_Last, StreamPos_Last, "MasteringDisplay_ColorPrimaries", MasteringDisplay_ColorPrimaries, true); + Descriptor->second.Infos["MasteringDisplay_ColorPrimaries"]=MasteringDisplay_ColorPrimaries; } if (MasteringDisplay_Luminance_Max!=Descriptor->second.Infos.end() || MasteringDisplay_Luminance_Min!=Descriptor->second.Infos.end()) { @@ -3510,28 +3558,70 @@ } else MasteringDisplay_Luminance=__T("max: ")+MasteringDisplay_Luminance_Max->second; - Fill(StreamKind_Last, StreamPos_Last, "MasteringDisplay_Luminance", MasteringDisplay_Luminance, true); + + Descriptor->second.Infos["MasteringDisplay_Luminance"]=MasteringDisplay_Luminance; } for (std::map::iterator Info=Descriptor->second.Infos.begin(); Info!=Descriptor->second.Infos.end(); ++Info) if (Info!=Info_MasteringDisplay_Primaries && Info!=Info_MasteringDisplay_WhitePointChromaticity && Info!=MasteringDisplay_Luminance_Max - && Info!=MasteringDisplay_Luminance_Min - && Retrieve(StreamKind_Last, StreamPos_Last, Info->first.c_str()).empty()) + && Info!=MasteringDisplay_Luminance_Min) { //Special case if (Info->first=="BitRate" && Retrieve(StreamKind_Last, StreamPos_Last, General_ID).find(__T(" / "))!=string::npos) { + if (!Retrieve(StreamKind_Last, StreamPos_Last, Info->first.c_str()).empty()) + continue; // Not always valid e.g. Dolby E or AC-3 in AES3. TODO: check in case of normal check if (Retrieve(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_BitRate)).empty() || Retrieve(StreamKind_Last, StreamPos_Last, General_ID).find(__T('-'))!=string::npos) Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_BitRate_Encoded), Info->second.To_int64u()*2, 10, true); else Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_BitRate), Info->second.To_int64u()*2, 10, true); } - else + else if (!Info->second.empty()) { + const Ztring FromEssence=Retrieve_Const(StreamKind_Last, StreamPos_Last, Info->first.c_str()); for (size_t Pos=0; Posfirst.c_str(), Info->second, true); + { + if (FromEssence.empty()) + { + Fill(StreamKind_Last, StreamPos_Last+Pos, Info->first.c_str(), Info->second); + } + else if (FromEssence!=Info->second) + { + // Special cases + if (Info->first=="ColorSpace" && ((Info->second==__T("RGB") && FromEssence==__T("XYZ")) || (Info->second==__T("RGBA") && FromEssence==__T("XYZA")))) + continue; // "RGB" is used by MXF for "XYZ" too + if (Info->first=="Format") + continue; // Too much important to show the essence format, ignoring for the moment. TODO: display something in such case + if (Info->first=="Duration") + continue; // Found 1 file with descriptor with wrong descriptor SampleRate. TODO: better display in such case (should not take precedence other other durations, how to display the issue between component duration and descriptor duration, both container metadata?). Must also take care about StereoscopicPictureSubDescriptor (SampleRate divided by 2 in that case) + if (Info->first=="DisplayAspectRatio") + continue; // Handled separately + if (Info->first=="Channel(s)") + continue; // Not always valid e.g. Dolby E. TODO: check in case of normal check + if (Info->first=="BitDepth") + continue; // Not always valid e.g. Dolby E. TODO: check in case of normal check + if (Info->first=="BitRate") + continue; // Not always valid e.g. Dolby E. TODO: check in case of normal check + if (Info->first=="StreamOrder") + continue; // Is not useful and has some issues with Dolby E + + // Filling both values + Fill(StreamKind_Last, StreamPos_Last+Pos, (Info->first+"_Original").c_str(), FromEssence); //TODO: use the generic engine by filling descriptor info before merging essence info + Fill(StreamKind_Last, StreamPos_Last+Pos, Info->first.c_str(), Info->second, true); //TODO: use the generic engine by filling descriptor info before merging essence info + if (ShowSource_IsInList(Info->first)) + { + Fill(StreamKind_Last, StreamPos_Last+Pos, (Info->first+"_Source").c_str(), "Container", Unlimited, true, true); + Fill(StreamKind_Last, StreamPos_Last+Pos, (Info->first+"_Original_Source").c_str(), "Stream"); + } + } + else + { + if (ShowSource_IsInList(Info->first)) + Fill(StreamKind_Last, StreamPos_Last+Pos, (Info->first+"_Source").c_str(), "Container / Stream", Unlimited, true, true); + } + } } } Ztring Format, CodecID; @@ -3540,7 +3630,7 @@ CodecID.From_Number(Descriptor->second.EssenceContainer.lo, 16); if (CodecID.size()<16) CodecID.insert(0, 16-CodecID.size(), __T('0')); - Format.From_Local(Mxf_EssenceContainer(Descriptor->second.EssenceContainer)); + Format.From_UTF8(Mxf_EssenceContainer(Descriptor->second.EssenceContainer)); } if (Descriptor->second.EssenceCompression.hi!=(int64u)-1) { @@ -3551,7 +3641,7 @@ if (EssenceCompression.size()<16) EssenceCompression.insert(0, 16-EssenceCompression.size(), __T('0')); CodecID+=EssenceCompression; - Ztring Format_FromCompression; Format_FromCompression.From_Local(Mxf_EssenceCompression(Descriptor->second.EssenceCompression)); + Ztring Format_FromCompression; Format_FromCompression.From_UTF8(Mxf_EssenceCompression(Descriptor->second.EssenceCompression)); if (!Format_FromCompression.empty()) Format=Format_FromCompression; //EssenceCompression has priority } @@ -4137,7 +4227,7 @@ } } Fill(Stream_Other, StreamPos_Last, "PrimaryAudioLanguage", AS11->second.PrimaryAudioLanguage); - //Fill_SetOptions(Stream_Other][StreamPos_Last](Ztring().From_Local("PrimaryAudioLanguage", "N NT"); + //Fill_SetOptions(Stream_Other][StreamPos_Last](Ztring().From_UTF8("PrimaryAudioLanguage", "N NT"); //if (MediaInfoLib::Config.Iso639_Find(AS11->second.PrimaryAudioLanguage).empty()) // Fill(Stream_Other, StreamPos_Last, "PrimaryAudioLanguage/String", MediaInfoLib::Config.Iso639_Translate(AS11->second.PrimaryAudioLanguage)); if (AS11->second.ClosedCaptionsPresent<2) @@ -6083,9 +6173,9 @@ if (i==Descriptor->second.Infos.end()) { Ztring Format; - Format.From_Local(Mxf_EssenceCompression(Descriptor->second.EssenceCompression)); + Format.From_UTF8(Mxf_EssenceCompression(Descriptor->second.EssenceCompression)); if (Format.empty()) - Format.From_Local(Mxf_EssenceContainer(Descriptor->second.EssenceContainer)); + Format.From_UTF8(Mxf_EssenceContainer(Descriptor->second.EssenceContainer)); if (Format.find(__T("PCM"))==0) Descriptor->second.Infos["Format_Settings_Endianness"]=__T("Little"); } @@ -6096,7 +6186,7 @@ ChooseParser__FromEssence(Essence, Descriptor); //Searching by the track identifier #ifdef MEDIAINFO_VC3_YES - if (Ztring().From_Local(Mxf_EssenceContainer(Descriptor->second.EssenceContainer))==__T("VC-3")) + if (Ztring().From_UTF8(Mxf_EssenceContainer(Descriptor->second.EssenceContainer))==__T("VC-3")) ((File_Vc3*)(*(Essence->second.Parsers.begin())))->FrameRate=Descriptor->second.SampleRate; #endif //MEDIAINFO_VC3_YES break; @@ -7271,6 +7361,8 @@ //--------------------------------------------------------------------------- void File_Mxf::RGBAEssenceDescriptor() { + Descriptors[InstanceUID].Type=descriptor::Type_RGBA; + if (Code2>=0x8000) { // Not a short code @@ -8699,7 +8791,7 @@ Get_BER(Length, "Length"); switch ((Tag.lo>>16)&0xFF) { - case 0x00 : Skip_Local(Length,"Data"); break; + case 0x00 : Skip_UTF8(Length,"Data"); break; case 0x01 : Skip_UTF16L(Length,"Data"); break; default : Skip_XX(Length, "Data"); } @@ -8889,7 +8981,8 @@ Get_B4 (Data, "Data"); Element_Info1(Data); FILLING_BEGIN(); - Descriptor_Fill("BitDepth", Ztring().From_Number(Data)); + if (Data) + Descriptor_Fill("BitDepth", Ztring().From_Number(Data)); FILLING_END(); } @@ -8920,7 +9013,14 @@ void File_Mxf::CDCIEssenceDescriptor_BlackRefLevel() { //Parsing - Info_B4(Data, "Data"); Element_Info1(Data); + int32u Data; + Get_B4 (Data, "Data"); Element_Info1(Data); + + FILLING_BEGIN(); + if (Descriptors[InstanceUID].MinRefLevel==(int32u)-1) + Descriptors[InstanceUID].MinRefLevel=Data; + ColorLevels_Compute(Descriptors.find(InstanceUID)); + FILLING_END(); } //--------------------------------------------------------------------------- @@ -8928,7 +9028,14 @@ void File_Mxf::CDCIEssenceDescriptor_WhiteReflevel() { //Parsing - Info_B4(Data, "Data"); Element_Info1(Data); + int32u Data; + Get_B4 (Data, "Data"); Element_Info1(Data); + + FILLING_BEGIN(); + if (Descriptors[InstanceUID].MaxRefLevel==(int32u)-1) + Descriptors[InstanceUID].MaxRefLevel=Data; + ColorLevels_Compute(Descriptors.find(InstanceUID)); + FILLING_END(); } //--------------------------------------------------------------------------- @@ -8936,7 +9043,14 @@ void File_Mxf::CDCIEssenceDescriptor_ColorRange() { //Parsing - Info_B4(Data, "Data"); Element_Info1(Data); + int32u Data; + Get_B4 (Data, "Data"); Element_Info1(Data); + + FILLING_BEGIN(); + if (Descriptors[InstanceUID].ColorRange==(int32u)-1) + Descriptors[InstanceUID].ColorRange=Data; + ColorLevels_Compute(Descriptors.find(InstanceUID)); + FILLING_END(); } //--------------------------------------------------------------------------- @@ -10423,7 +10537,7 @@ { //Parsing Ztring Data; - Get_Local (Length2, Data, "Data"); Element_Info1(Data); + Get_UTF8 (Length2, Data, "Data"); Element_Info1(Data); FILLING_BEGIN(); DMScheme1s[InstanceUID].PrimaryExtendedSpokenLanguage=Data; @@ -10435,7 +10549,7 @@ void File_Mxf::SecondaryExtendedSpokenLanguage() { //Parsing - Info_Local(Length2, Data, "Data"); Element_Info1(Data); + Info_UTF8(Length2, Data, "Data"); Element_Info1(Data); } //--------------------------------------------------------------------------- @@ -10443,7 +10557,7 @@ void File_Mxf::OriginalExtendedSpokenLanguage() { //Parsing - Info_Local(Length2, Data, "Data"); Element_Info1(Data); + Info_UTF8(Length2, Data, "Data"); Element_Info1(Data); } //--------------------------------------------------------------------------- @@ -10451,7 +10565,7 @@ void File_Mxf::SecondaryOriginalExtendedSpokenLanguage() { //Parsing - Info_Local(Length2, Data, "Data"); Element_Info1(Data); + Info_UTF8(Length2, Data, "Data"); Element_Info1(Data); } //--------------------------------------------------------------------------- @@ -10472,7 +10586,7 @@ //Parsing Ztring Value; - Get_Local (Length2-(SizeIsPresent?4:0), Value, "Value"); Element_Info1(Value); + Get_UTF8 (Length2-(SizeIsPresent?4:0), Value, "Value"); Element_Info1(Value); FILLING_BEGIN(); Descriptor_Fill("Language", Value); @@ -11071,7 +11185,14 @@ void File_Mxf::RGBAEssenceDescriptor_ComponentMaxRef() { //Parsing - Info_B4(Data, "Data"); Element_Info1(Data); + int32u Data; + Get_B4 (Data, "Data"); Element_Info1(Data); + + FILLING_BEGIN(); + if (Descriptors[InstanceUID].MaxRefLevel==(int32u)-1) + Descriptors[InstanceUID].MaxRefLevel=Data; + ColorLevels_Compute(Descriptors.find(InstanceUID)); + FILLING_END(); } //--------------------------------------------------------------------------- @@ -11079,7 +11200,14 @@ void File_Mxf::RGBAEssenceDescriptor_ComponentMinRef() { //Parsing - Info_B4(Data, "Data"); Element_Info1(Data); + int32u Data; + Get_B4 (Data, "Data"); Element_Info1(Data); + + FILLING_BEGIN(); + if (Descriptors[InstanceUID].MinRefLevel==(int32u)-1) + Descriptors[InstanceUID].MinRefLevel=Data; + ColorLevels_Compute(Descriptors.find(InstanceUID)); + FILLING_END(); } //--------------------------------------------------------------------------- @@ -13315,7 +13443,7 @@ void File_Mxf::Omneon_010201020100_8006() { //Parsing - Skip_Local(Length2, "Content"); + Skip_UTF8(Length2, "Content"); } //*************************************************************************** @@ -17314,6 +17442,54 @@ } } + +//--------------------------------------------------------------------------- +void File_Mxf::ColorLevels_Compute(descriptors::iterator Descriptor, bool Force, int32u BitDepth) +{ + // BitDepth check + std::map::iterator Info=Descriptor->second.Infos.find("BitDepth"); + if (Info!=Descriptor->second.Infos.end()) + { + if (BitDepth==0 || BitDepth==(int32u)-1) + BitDepth=Info->second.To_int32u(); + else if (Force && BitDepth!=Info->second.To_int32u()) + Fill(StreamKind_Last, StreamPos_Last, "BitDepth_Container", Info->second); + } + + // Known values + if (BitDepth>=8 && BitDepth<=16) + { + int32u Multiplier=1<<(BitDepth-8); + if (Descriptor->second.MinRefLevel==16*Multiplier && Descriptor->second.MaxRefLevel==235*Multiplier && (Descriptor->second.Type==descriptor::Type_RGBA || Descriptor->second.ColorRange==1+224*Multiplier)) + { + Descriptor->second.Infos["colour_range"]=__T("Limited"); + return; + } + if (Descriptor->second.MinRefLevel==0*Multiplier && Descriptor->second.MaxRefLevel==256*Multiplier-1 && (Descriptor->second.Type==descriptor::Type_RGBA || Descriptor->second.ColorRange==256*Multiplier)) + { + Descriptor->second.Infos["colour_range"]=__T("Full"); + return; + } + } + + if (Descriptor==Descriptors.end() || (!Force && (Descriptor->second.MinRefLevel==(int32u)-1 || Descriptor->second.MaxRefLevel==(int32u)-1) || (Descriptor->second.Type!=descriptor::Type_RGBA && Descriptor->second.ColorRange==(int32u)-1))) + return; + + // Listing values + ZtringList List; + if (Descriptor->second.MinRefLevel!=(int32u)-1) + List.push_back(__T("Min: ")+Ztring::ToZtring(Descriptor->second.MinRefLevel)); + if (Descriptor->second.MaxRefLevel!=(int32u)-1) + List.push_back(__T("Max: ")+Ztring::ToZtring(Descriptor->second.MaxRefLevel)); + if (Descriptor->second.ColorRange!=(int32u)-1) + List.push_back(__T("Chroma range: ")+Ztring::ToZtring(Descriptor->second.ColorRange)); + if (!List.empty()) + { + List.Separator_Set(0, __T(", ")); + Descriptor->second.Infos["colour_range"]=List.Read(); + } +} + //--------------------------------------------------------------------------- #if defined(MEDIAINFO_REFERENCES_YES) void File_Mxf::Locators_CleanUp() diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_Mxf.h libmediainfo-18.12/Source/MediaInfo/Multiple/File_Mxf.h --- libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_Mxf.h 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Multiple/File_Mxf.h 2018-12-10 23:27:17.000000000 +0000 @@ -800,6 +800,9 @@ int32u SubSampling_Horizontal; int32u SubSampling_Vertical; int32u ChannelCount; + int32u MinRefLevel; + int32u MaxRefLevel; + int32u ColorRange; int128u ChannelAssignment; std::map Infos; int16u BlockAlign; @@ -871,6 +874,9 @@ Height_Display_Offset=(int32u)-1; SubSampling_Horizontal=(int32u)-1; SubSampling_Vertical=(int32u)-1; + MinRefLevel=(int32u)-1; + MaxRefLevel=(int32u)-1; + ColorRange =(int32u)-1; ChannelCount=(int32u)-1; ChannelAssignment.hi=(int64u)-1; ChannelAssignment.lo=(int64u)-1; @@ -1153,6 +1159,7 @@ //Helpers int32u Vector(int32u ExpectedLength=(int32u)-1); void Subsampling_Compute(descriptors::iterator Descriptor); + void ColorLevels_Compute(descriptors::iterator Descriptor, bool Force=false, int32u BitDepth=(int32u)-1); #if defined(MEDIAINFO_REFERENCES_YES) void Locators_CleanUp(); void Locators_Test(); diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Multiple/File__ReferenceFilesHelper.cpp libmediainfo-18.12/Source/MediaInfo/Multiple/File__ReferenceFilesHelper.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Multiple/File__ReferenceFilesHelper.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Multiple/File__ReferenceFilesHelper.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -305,6 +305,71 @@ } //--------------------------------------------------------------------------- +void File__ReferenceFilesHelper::DetectSameReels(vector &ReelCount) +{ + if (ReelCount.size()<=1) + return; + + // Finding the max count of streams per stream kind + size_t StreamCounts_Max[Stream_Max+1]; + size_t StreamCounts[Stream_Max+1]; + vector Sequence_Pos_PerKind[Stream_Max+1]; + memset(StreamCounts_Max, 0x00, (Stream_Max+1)*sizeof(size_t)); + size_t Sequence_Pos=0; + for (size_t r=0; rStreamKind].size()<=StreamCounts[Sequences[Sequence_Pos]->StreamKind]) + Sequence_Pos_PerKind[Sequences[Sequence_Pos]->StreamKind].push_back(Sequence_Pos); + StreamCounts[Sequences[Sequence_Pos]->StreamKind]++; + Sequence_Pos++; + } + for (size_t i=0; i Sequence_Pos_toDelete; + for (size_t r=1; rStreamKind!=Stream_Max) + { + size_t Sequence_Pos_First=Sequence_Pos_PerKind[Sequences[Sequence_Pos]->StreamKind][StreamCounts[Sequences[Sequence_Pos]->StreamKind]]; + if (Sequence_Pos!=Sequence_Pos_First) + { + Sequences[Sequence_Pos_First]->Resources.insert(Sequences[Sequence_Pos_First]->Resources.end(), Sequences[Sequence_Pos]->Resources.begin(), Sequences[Sequence_Pos]->Resources.end()); + Sequence_Pos_toDelete.push_back(Sequence_Pos); + } + } + StreamCounts[Sequences[Sequence_Pos]->StreamKind]++; + Sequence_Pos++; + } + } + + // Remove other reels + for (size_t i=Sequence_Pos_toDelete.size()-1; i!=(size_t)-1; i--) + { + delete Sequences[Sequence_Pos_toDelete[i]]; + Sequences.erase(Sequences.begin()+Sequence_Pos_toDelete[i]); + } + + // Fake StreamIDs + for (size_t i=0; iStreamID=i+1; +} + +//--------------------------------------------------------------------------- void File__ReferenceFilesHelper::UpdateFileName(const Ztring& OldFileName, const Ztring& NewFileName) { size_t Sequences_Size=Sequences.size(); @@ -741,8 +806,7 @@ { if ((*ReferenceTemp)->State<10000) { - if ((*ReferenceTemp)->MI) - (*ReferenceTemp)->State=(*ReferenceTemp)->MI->State_Get(); + (*ReferenceTemp)->State=(*ReferenceTemp)->MI->State_Get(); if ((*ReferenceTemp)->State && (*ReferenceTemp)->MI->Config.File_Size!=(int64u)-1) FileSize_Parsed+=(int64u)((*ReferenceTemp)->MI->Config.File_Size*(((float)(*ReferenceTemp)->State)/10000)); } diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Multiple/File__ReferenceFilesHelper.h libmediainfo-18.12/Source/MediaInfo/Multiple/File__ReferenceFilesHelper.h --- libmediainfo-18.08.1/Source/MediaInfo/Multiple/File__ReferenceFilesHelper.h 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Multiple/File__ReferenceFilesHelper.h 2018-12-10 23:27:17.000000000 +0000 @@ -34,6 +34,7 @@ //In void AddSequence(sequence* NewSequence); + void DetectSameReels(vector &ReelCount); void UpdateFileName(const Ztring& OldFileName, const Ztring& NewFileName); void UpdateMetaDataFromSourceEncoding(const string& SourceEncoding, const string& Name, const string& Value); bool TestContinuousFileNames; diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_Riff_Elements.cpp libmediainfo-18.12/Source/MediaInfo/Multiple/File_Riff_Elements.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Multiple/File_Riff_Elements.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Multiple/File_Riff_Elements.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -939,7 +939,7 @@ Element_Name("Google specific"); //Filling - Fill(Stream_General, 0, General_Format, "Google Video", Unlimited, false, true); + Fill(Stream_General, 0, General_Format, "Google Video", Unlimited, true, true); } //--------------------------------------------------------------------------- @@ -956,7 +956,7 @@ Element_Name("Google Metadatas"); //Parsing - Ztring Value; Value.From_Local((const char*)(Buffer+Buffer_Offset+0), (size_t)Element_Size); + Ztring Value; Value.From_UTF8((const char*)(Buffer+Buffer_Offset+0), (size_t)Element_Size); ZtringListList List; List.Separator_Set(0, __T("\n")); List.Separator_Set(1, __T(":")); @@ -1797,8 +1797,8 @@ //Filling CodecID_Fill(Ztring().From_CC4(Compression), StreamKind_Last, StreamPos_Last, InfoCodecID_Format_Riff); - Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Codec), Ztring().From_CC4(Compression).To_Local().c_str()); //FormatTag, may be replaced by codec parser - Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Codec_CC), Ztring().From_CC4(Compression).To_Local().c_str()); //FormatTag + Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Codec), Ztring().From_CC4(Compression).To_UTF8().c_str()); //FormatTag, may be replaced by codec parser + Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_Codec_CC), Ztring().From_CC4(Compression).To_UTF8().c_str()); //FormatTag Fill(StreamKind_Last, StreamPos_Last, "Width", Width, 10, true); Fill(StreamKind_Last, StreamPos_Last, "Height", Height>=0x80000000?(-((int32s)Height)):Height, 10, true); // AVI can use negative height for raw to signal that it's coded top-down, not bottom-up if (Resolution==32 && Compression==0x74736363) //tscc @@ -2334,10 +2334,10 @@ case Elements::AVI__INFO_ICNM : Parameter=General_DirectorOfPhotography; break; case Elements::AVI__INFO_ICNT : Parameter=General_Movie_Country; break; case Elements::AVI__INFO_ICOP : Parameter=General_Copyright; break; - case Elements::AVI__INFO_ICRD : Parameter=General_Recorded_Date; Value.Date_From_String(Value.To_Local().c_str()); break; + case Elements::AVI__INFO_ICRD : Parameter=General_Recorded_Date; Value.Date_From_String(Value.To_UTF8().c_str()); break; case Elements::AVI__INFO_ICRP : Parameter=General_Cropped; break; case Elements::AVI__INFO_IDIM : Parameter=General_Dimensions; break; - case Elements::AVI__INFO_IDIT : Parameter=General_Mastered_Date; Value.Date_From_String(Value.To_Local().c_str()); break; + case Elements::AVI__INFO_IDIT : Parameter=General_Mastered_Date; Value.Date_From_String(Value.To_UTF8().c_str()); break; case Elements::AVI__INFO_IDPI : Parameter=General_DotsPerInch; break; case Elements::AVI__INFO_IDST : Parameter=General_DistributedBy; break; case Elements::AVI__INFO_IEDT : Parameter=General_EditedBy; break; @@ -2391,7 +2391,7 @@ if (Parameter!=(size_t)-1) Fill(StreamKind, StreamPos, Parameter, Value); else - Fill(StreamKind, StreamPos, Ztring().From_CC4((int32u)Element_Code).To_Local().c_str(), Value, true); + Fill(StreamKind, StreamPos, Ztring().From_CC4((int32u)Element_Code).To_UTF8().c_str(), Value, true); } } } @@ -2862,7 +2862,7 @@ //Parsing Ztring Value; - Get_Local(Element_Size, Value, "Unknown"); + Get_UTF8(Element_Size, Value, "Unknown"); if (Value.find_first_not_of(__T("0123456789:;"))==string::npos) Tdat_tc_A=Value; @@ -2875,7 +2875,7 @@ //Parsing Ztring Value; - Get_Local(Element_Size, Value, "Unknown"); + Get_UTF8(Element_Size, Value, "Unknown"); if (Value.find_first_not_of(__T("0123456789:;"))==string::npos) Tdat_tc_O=Value; @@ -2887,7 +2887,7 @@ Element_Name("rn_A"); //Parsing - Skip_Local(Element_Size, "Unknown"); + Skip_UTF8(Element_Size, "Unknown"); } //--------------------------------------------------------------------------- @@ -2896,7 +2896,7 @@ Element_Name("rn_O"); //Parsing - Skip_Local(Element_Size, "Unknown"); + Skip_UTF8(Element_Size, "Unknown"); } //--------------------------------------------------------------------------- @@ -3250,7 +3250,7 @@ Get_L1 (minor, "minor"); Get_GUID(codec_guid, "codec-guid"); Get_L2 (codec_version, "codec-version"); - Get_Local(80, codec_name, "codec-name"); + Get_UTF8(80, codec_name, "codec-name"); Get_L2 (average_bps, "average-bps"); Get_L2 (packet_size, "packet-size"); Get_L2 (block_size, "block-size"); @@ -3585,7 +3585,7 @@ //Parsing Ztring XML_Data; - Get_Local(Element_Size, XML_Data, "XML data"); + Get_UTF8(Element_Size, XML_Data, "XML data"); } //--------------------------------------------------------------------------- @@ -3594,7 +3594,7 @@ Element_Name("aXML"); //Parsing - Skip_Local(Element_Size, "XML data"); + Skip_UTF8(Element_Size, "XML data"); } //--------------------------------------------------------------------------- @@ -3883,7 +3883,7 @@ Element_Name("iXML"); //Parsing - Skip_Local(Element_Size, "XML data"); + Skip_UTF8(Element_Size, "XML data"); } //--------------------------------------------------------------------------- diff -Nru libmediainfo-18.08.1/Source/MediaInfo/OutputHelpers.h libmediainfo-18.12/Source/MediaInfo/OutputHelpers.h --- libmediainfo-18.08.1/Source/MediaInfo/OutputHelpers.h 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/OutputHelpers.h 2018-12-10 23:27:17.000000000 +0000 @@ -54,10 +54,14 @@ } Node(const std::string& _Name, const std::string& _Value, const std::string& _Atribute_Name, const std::string& _Atribute_Value=std::string()) : Name(_Name), Value(_Value), RawContent(std::string()), Multiple(false) { + if (_Atribute_Value.empty()) + return; Add_Attribute(_Atribute_Name, _Atribute_Value); } Node(const std::string& _Name, const std::string& _Value, const std::string& _Atribute_Name, const std::string& _Atribute_Value, bool _Multiple) : Name(_Name), Value(_Value), RawContent(std::string()), Multiple(_Multiple) { + if (_Atribute_Value.empty()) + return; Add_Attribute(_Atribute_Name, _Atribute_Value); } diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Reader/Reader_File.cpp libmediainfo-18.12/Source/MediaInfo/Reader/Reader_File.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Reader/Reader_File.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Reader/Reader_File.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -510,7 +510,10 @@ while (MI->Config.File_Buffer_Size_ToRead>MI->Config.File_Buffer_Size_Max) MI->Config.File_Buffer_Size_Max*=2; if (MI->Config.File_Buffer_Size_Max>=64*1024*1024) + { MI->Config.File_Buffer_Size_Max=64*1024*1024; //limitation of the buffer in order to avoid to big memory usage + MI->Config.File_Buffer_Size_ToRead=MI->Config.File_Buffer_Size_Max; + } MI->Config.File_Buffer=new int8u[MI->Config.File_Buffer_Size_Max]; } diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Tag/File_Id3v2.cpp libmediainfo-18.12/Source/MediaInfo/Tag/File_Id3v2.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Tag/File_Id3v2.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Tag/File_Id3v2.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -1209,8 +1209,8 @@ case Elements::TDA : case Elements::TDAT : if (Element_Value.size()==4) { - Month.assign(Element_Value.c_str(), 0, 2); - Day.assign (Element_Value.c_str(), 2, 2); + Day.assign (Element_Value.c_str(), 0, 2); + Month.assign(Element_Value.c_str(), 2, 2); } break; case Elements::TDEN : Normalize_Date(Element_Value); Fill(Stream_General, 0, "Encoded_Date", Element_Value); break; @@ -1412,9 +1412,9 @@ //--------------------------------------------------------------------------- void File_Id3v2::Normalize_Date(Ztring& Date) { - if (Date.size()<=8) - return; //Format unknown - Date[8]=__T(' '); //could be "T" + if (Date.size()<=11 || Date[4]!=__T('-') || Date[7]!=__T('-')) + return; //Format unknown or without time + Date[10]=__T(' '); //could be "T" Date=Ztring(__T("UTC "))+Date; //Id3v2 specify a UTC date } diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Tag/File_VorbisCom.cpp libmediainfo-18.12/Source/MediaInfo/Tag/File_VorbisCom.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Tag/File_VorbisCom.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Tag/File_VorbisCom.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -94,7 +94,7 @@ Ztring vendor_string; int32u vendor_length; Get_L4 (vendor_length, "vendor_length"); - Get_Local(vendor_length, vendor_string, "vendor_string"); + Get_UTF8(vendor_length, vendor_string, "vendor_string"); Get_L4 (user_comment_list_length, "user_comment_list_length"); FILLING_BEGIN(); @@ -203,7 +203,7 @@ if (Element_Size && comment.empty()) { Element_Offset=0; //Retry - Get_Local(Element_Size, comment, "comment"); + Get_ISO_8859_1(Element_Size, comment, "comment"); } Element_Name(comment); @@ -338,7 +338,7 @@ } Fill(Stream_Menu, StreamPos_Last, Menu_Chapters_Pos_End, Count_Get(Stream_Menu, StreamPos_Last), 10, true); } - else Fill(Stream_General, 0, comment.SubString(__T(""), __T("=")).To_Local().c_str(), Value); + else Fill(Stream_General, 0, comment.SubString(__T(""), __T("=")).To_UTF8().c_str(), Value); FILLING_END(); if (user_comment_list_length==0) diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Text/File_OtherText.cpp libmediainfo-18.12/Source/MediaInfo/Text/File_OtherText.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Text/File_OtherText.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Text/File_OtherText.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -48,7 +48,11 @@ //Feed File and Lines File.From_UTF8((const char*)Buffer, Buffer_Size>65536?65536:Buffer_Size); if (File.empty()) - File.From_Local((const char*)Buffer, Buffer_Size>65536?65536:Buffer_Size); // Trying from local code page + #ifdef WINDOWS + File.From_Local((const char*)Buffer, Buffer_Size>65536?65536:Buffer_Size); + #else //WINDOWS + File.From_ISO_8859_1((const char*)Buffer, Buffer_Size>65536?65536:Buffer_Size); + #endif //WINDOWS if (File.size()<0x100) { File.From_Unicode((wchar_t*)Buffer, 0, Buffer_Size/sizeof(wchar_t)); //Unicode with BOM diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Text/File_SubRip.cpp libmediainfo-18.12/Source/MediaInfo/Text/File_SubRip.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Text/File_SubRip.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Text/File_SubRip.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -133,7 +133,11 @@ Temp.From_UTF8((const char*)Buffer+(HasBOM?3:0), (Buffer_Size>65536?65536:Buffer_Size)-(HasBOM?3:0)); if (Temp.empty()) { + #ifdef WINDOWS Temp.From_Local((const char*)Buffer+(HasBOM?3:0), (Buffer_Size>65536?65536:Buffer_Size)-(HasBOM?3:0)); // Trying from local code page + #else //WINDOWS + Temp.From_ISO_8859_1((const char*)Buffer+(HasBOM?3:0), (Buffer_Size>65536?65536:Buffer_Size)-(HasBOM?3:0)); + #endif //WINDOWS IsLocal=true; } Temp.FindAndReplace(__T("\r\n"), __T("\n"), 0, Ztring_Recursive); @@ -183,7 +187,11 @@ } if (IsLocal) + #ifdef WINDOWS Temp.From_Local((const char*)Buffer+(HasBOM?3:0), Buffer_Size-(HasBOM?3:0)); + #else //WINDOWS + Temp.From_ISO_8859_1((const char*)Buffer+(HasBOM?3:0), Buffer_Size-(HasBOM?3:0)); + #endif //WINDOWS else Temp.From_UTF8((const char*)Buffer+(HasBOM?3:0), Buffer_Size-(HasBOM?3:0)); Temp.FindAndReplace(__T("\r\n"), __T("\n"), 0, Ztring_Recursive); @@ -248,7 +256,8 @@ void File_SubRip::Read_Buffer_Continue() { #if MEDIAINFO_DEMUX - Demux(Buffer+(HasBOM?3:0), Buffer_Size-((HasBOM && Buffer_Size>=3)?3:0), ContentType_MainStream); + if (Buffer) + Demux(Buffer+((HasBOM && Buffer_Size>=3)?3:0), Buffer_Size-((HasBOM && Buffer_Size>=3)?3:0), ContentType_MainStream); #endif //MEDIAINFO_DEMUX // Output diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Text/File_Teletext.cpp libmediainfo-18.12/Source/MediaInfo/Text/File_Teletext.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Text/File_Teletext.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Text/File_Teletext.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -613,7 +613,7 @@ byte&=0x7F; if (byte<0x20) byte=0x20; - Param_Info1(Ztring().From_Local((const char*)&byte, 1)); + Param_Info1(Ztring().From_UTF8((const char*)&byte, 1)); if (byte!=Stream.CC_Displayed_Values[Y][PosX] && (!C[7] || Y)) // C[7] is "Suppress Header", to be tested when Y==0 { Char Uni; diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Video/File_Av1.cpp libmediainfo-18.12/Source/MediaInfo/Video/File_Av1.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Video/File_Av1.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Video/File_Av1.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -230,7 +230,7 @@ //Parsing int32u max_frame_width_minus_1, max_frame_height_minus_1; int8u seq_profile, seq_level_idx[33], operating_points_cnt_minus_1, buffer_delay_length_minus_1, frame_width_bits_minus_1, frame_height_bits_minus_1, seq_force_screen_content_tools, BitDepth, color_primaries, transfer_characteristics, matrix_coefficients; - bool reduced_still_picture_header, seq_tier[33], decoder_model_info_present_flag, seq_choose_screen_content_tools, mono_chrome, color_range, color_description_present_flag, subsampling_x, subsampling_y; + bool reduced_still_picture_header, seq_tier[33], timing_info_present_flag, decoder_model_info_present_flag, seq_choose_screen_content_tools, mono_chrome, color_range, color_description_present_flag, subsampling_x, subsampling_y; BS_Begin(); Get_S1 ( 3, seq_profile, "seq_profile"); Param_Info1(Av1_seq_profile(seq_profile)); Skip_SB( "still_picture"); @@ -243,7 +243,7 @@ } else { - TEST_SB_SKIP( "timing_info_present_flag"); + TEST_SB_GET(timing_info_present_flag, "timing_info_present_flag"); bool equal_picture_interval; Skip_S4(32, "num_units_in_tick"); Skip_S4(32, "time_scale"); @@ -266,7 +266,7 @@ Get_S1(5, seq_level_idx[i], "seq_level_idx[i]"); if (seq_level_idx[i]>7) Get_SB(seq_tier[i], "seq_tier[i]"); - if (decoder_model_info_present_flag) + if (timing_info_present_flag && decoder_model_info_present_flag) { TEST_SB_SKIP( "decoder_model_present_for_this_op[i]"); Skip_S5(buffer_delay_length_minus_1+1, "decoder_buffer_delay[op]"); @@ -548,7 +548,7 @@ //Finding the longest string ZtringList List; List.Separator_Set(0, __T(" ")); - List.Write(Ztring().From_Local(PictureTypes)); + List.Write(Ztring().From_UTF8(PictureTypes)); size_t MaxLength=0; size_t MaxLength_Pos=0; for (size_t Pos=0; Posprofile_idc)); + Ztring Profile=Ztring().From_UTF8(Avc_profile_idc((*seq_parameter_set_Item)->profile_idc)); switch ((*seq_parameter_set_Item)->profile_idc) { case 44 : // CAVLC 4:4:4 Intra @@ -795,7 +795,8 @@ if ((*seq_parameter_set_Item)->frame_crop_top_offset || (*seq_parameter_set_Item)->frame_crop_bottom_offset) Fill(Stream_Video, StreamPos_Last, Video_Stored_Height, ((*seq_parameter_set_Item)->pic_height_in_map_units_minus1+1)*16*(2-(*seq_parameter_set_Item)->frame_mbs_only_flag)); Fill(Stream_Video, 0, Video_PixelAspectRatio, PixelAspectRatio, 3, true); - Fill(Stream_Video, 0, Video_DisplayAspectRatio, Width*PixelAspectRatio/Height, 3, true); //More precise + if(Height) + Fill(Stream_Video, 0, Video_DisplayAspectRatio, Width*PixelAspectRatio/Height, 3, true); //More precise if (FrameRate_Divider==2) { Fill(Stream_Video, StreamPos_Last, Video_Format_Settings_FrameMode, "Frame doubling"); @@ -932,7 +933,7 @@ //--------------------------------------------------------------------------- void File_Avc::Streams_Fill_subset(const std::vector::iterator seq_parameter_set_Item) { - Ztring Profile=Ztring().From_Local(Avc_profile_idc((*seq_parameter_set_Item)->profile_idc))+__T("@L")+Ztring().From_Number(((float)(*seq_parameter_set_Item)->level_idc)/10, 1); + Ztring Profile=Ztring().From_UTF8(Avc_profile_idc((*seq_parameter_set_Item)->profile_idc))+__T("@L")+Ztring().From_Number(((float)(*seq_parameter_set_Item)->level_idc)/10, 1); Ztring Profile_Base=Retrieve(Stream_Video, 0, Video_Format_Profile); Fill(Stream_Video, 0, Video_Format_Profile, Profile, true); if (!Profile_Base.empty()) @@ -2419,7 +2420,7 @@ Element_Info1(TemporalReferences_Offset_pic_order_cnt_lsb_Last); Element_Info1((((*seq_parameter_set_Item)->frame_mbs_only_flag || !field_pic_flag)?__T("Frame "):(bottom_field_flag?__T("Field (Bottom) "):__T("Field (Top) ")))+Ztring::ToZtring(Frame_Count)); if (slice_type<9) - Element_Info1(__T("slice_type ")+Ztring().From_Local(Avc_slice_type[slice_type])); + Element_Info1(__T("slice_type ")+Ztring().From_UTF8(Avc_slice_type[slice_type])); Element_Info1(__T("frame_num ")+Ztring::ToZtring(frame_num)); if ((*seq_parameter_set_Item)->vui_parameters && (*seq_parameter_set_Item)->vui_parameters->fixed_frame_rate_flag) { @@ -2968,9 +2969,10 @@ else if ((*seq_parameter_set_Item)->vui_parameters->aspect_ratio_idc==0xFF && (*seq_parameter_set_Item)->vui_parameters->sar_height) PixelAspectRatio=((float64)(*seq_parameter_set_Item)->vui_parameters->sar_width)/(*seq_parameter_set_Item)->vui_parameters->sar_height; } - int32u Width =((*seq_parameter_set_Item)->pic_width_in_mbs_minus1 +1)*16; - int32u Height=((*seq_parameter_set_Item)->pic_height_in_map_units_minus1+1)*16*(2-(*seq_parameter_set_Item)->frame_mbs_only_flag); - ((File_DtvccTransport*)GA94_03_Parser)->AspectRatio=Width*PixelAspectRatio/Height; + const int32u Width =((*seq_parameter_set_Item)->pic_width_in_mbs_minus1 +1)*16; + const int32u Height=((*seq_parameter_set_Item)->pic_height_in_map_units_minus1+1)*16*(2-(*seq_parameter_set_Item)->frame_mbs_only_flag); + if(Height) + ((File_DtvccTransport*)GA94_03_Parser)->AspectRatio=Width*PixelAspectRatio/Height; } } if (GA94_03_Parser->PTS_DTS_Needed) @@ -3089,8 +3091,8 @@ void File_Avc::sei_message_user_data_unregistered_x264(int32u payloadSize) { //Parsing - Ztring Data; - Peek_Local(payloadSize, Data); + string Data; + Peek_String(payloadSize, Data); if (Data.size()!=payloadSize && Data.size()+1!=payloadSize) { Skip_XX(payloadSize, "Unknown"); @@ -3100,10 +3102,10 @@ size_t Loop=0; do { - size_t Data_Pos=Data.find(__T(" - "), Data_Pos_Before); + size_t Data_Pos=Data.find(" - ", Data_Pos_Before); if (Data_Pos==std::string::npos) Data_Pos=Data.size(); - if (Data.find(__T("options: "), Data_Pos_Before)==Data_Pos_Before) + if (Data.find("options: ", Data_Pos_Before)==Data_Pos_Before) { Element_Begin1("options"); size_t Options_Pos_Before=Data_Pos_Before; @@ -3113,16 +3115,16 @@ size_t Options_Pos=Data.find(__T(' '), Options_Pos_Before); if (Options_Pos==std::string::npos) Options_Pos=Data.size(); - Ztring option; - Get_Local (Options_Pos-Options_Pos_Before, option, "option"); + string option; + Get_String (Options_Pos-Options_Pos_Before, option, "option"); Options_Pos_Before=Options_Pos; do { - Ztring Separator; - Peek_Local(1, Separator); - if (Separator==__T(" ")) + string Separator; + Peek_String(1, Separator); + if (Separator==" ") { - Skip_Local(1, "separator"); + Skip_UTF8(1, "separator"); Options_Pos_Before+=1; } else @@ -3131,13 +3133,13 @@ while (Options_Pos_Before!=Data.size()); //Filling - if (option!=__T("options:")) + if (option!="options:") { if (!Encoded_Library_Settings.empty()) Encoded_Library_Settings+=__T(" / "); - Encoded_Library_Settings+=option; - if (option.find(__T("bitrate="))==0) - BitRate_Nominal=option.substr(8)+__T("000"); //After "bitrate=" + Encoded_Library_Settings+=Ztring().From_UTF8(option.c_str()); + if (option.find("bitrate=")==0) + BitRate_Nominal.From_UTF8(option.substr(8)+"000"); //After "bitrate=" } } while (Options_Pos_Before!=Data.size()); @@ -3145,8 +3147,8 @@ } else { - Ztring Value; - Get_Local(Data_Pos-Data_Pos_Before, Value, "data"); + string Value; + Get_String(Data_Pos-Data_Pos_Before, Value, "data"); //Saving if (Loop==0) @@ -3156,18 +3158,18 @@ Value.erase(Value.begin()); while (!Value.empty() && Value[Value.size()-1]<0x30) Value.erase(Value.end()-1); - Encoded_Library=Value; + Encoded_Library.From_UTF8(Value.c_str()); } if (Loop==1 && Encoded_Library.find(__T("x264"))==0) { Encoded_Library+=__T(" - "); - Encoded_Library+=Value; + Encoded_Library+=Ztring().From_UTF8(Value.c_str()); } } Data_Pos_Before=Data_Pos; if (Data_Pos_Before+3<=Data.size()) { - Skip_Local(3, "separator"); + Skip_UTF8(3, "separator"); Data_Pos_Before+=3; } @@ -3428,14 +3430,14 @@ Element_Info1("MainConcept text"); //Parsing - Ztring Text; - Get_Local(payloadSize, Text, "text"); + string Text; + Get_String(payloadSize, Text, "text"); - if (Text.find(__T("produced by MainConcept H.264/AVC Codec v"))!=std::string::npos) + if (Text.find("produced by MainConcept H.264/AVC Codec v")!=std::string::npos) { - Encoded_Library=Text.SubString(__T("produced by "), __T(" MainConcept AG")); + Encoded_Library=Ztring().From_UTF8(Text).SubString(__T("produced by "), __T(" MainConcept AG")); Encoded_Library_Name=__T("MainConcept H.264/AVC Codec"); - Encoded_Library_Version=Text.SubString(__T("produced by MainConcept H.264/AVC Codec v"), __T(" (c) ")); + Encoded_Library_Version= Ztring().From_UTF8(Text).SubString(__T("produced by MainConcept H.264/AVC Codec v"), __T(" (c) ")); Encoded_Library_Date=MediaInfoLib::Config.Library_Get(InfoLibrary_Format_MainConcept_Avc, Encoded_Library_Version, InfoLibrary_Date); } } @@ -4328,7 +4330,7 @@ FILLING_BEGIN_PRECISE(); //Detection of some bugs in the file if (!seq_parameter_sets.empty() && seq_parameter_sets[0] && (Profile!=seq_parameter_sets[0]->profile_idc || Level!=seq_parameter_sets[0]->level_idc)) - MuxingMode=Ztring("Container profile=")+Ztring().From_Local(Avc_profile_idc(Profile))+__T("@")+Ztring().From_Number(((float)Level)/10, 1); + MuxingMode=Ztring("Container profile=")+Ztring().From_UTF8(Avc_profile_idc(Profile))+__T("@")+Ztring().From_Number(((float)Level)/10, 1); MustParse_SPS_PPS=false; if (!Status[IsAccepted]) @@ -4362,7 +4364,7 @@ //Finding the longest string ZtringList List; List.Separator_Set(0, __T(" ")); - List.Write(Ztring().From_Local(PictureTypes)); + List.Write(Ztring().From_UTF8(PictureTypes)); size_t MaxLength=0; size_t MaxLength_Pos=0; for (size_t Pos=0; Pos0) Skip_XX(Library_Start_Offset, "junk"); if (Library_End_Offset-Library_Start_Offset) - Get_Local(Library_End_Offset-Library_Start_Offset, Temp,"data"); + Get_UTF8(Library_End_Offset-Library_Start_Offset, Temp, "data"); if (Element_Offsetprofile_space==0) { if ((*seq_parameter_set_Item)->profile_idc) - Profile=Ztring().From_Local(Hevc_profile_idc((*seq_parameter_set_Item)->profile_idc)); + Profile=Ztring().From_UTF8(Hevc_profile_idc((*seq_parameter_set_Item)->profile_idc)); if ((*seq_parameter_set_Item)->level_idc) { if ((*seq_parameter_set_Item)->profile_idc) Profile+=__T('@'); Profile+=__T('L')+Ztring().From_Number(((float)(*seq_parameter_set_Item)->level_idc)/30, ((*seq_parameter_set_Item)->level_idc%10)?1:0); Profile+=__T('@'); - Profile+=Ztring().From_Local(Hevc_tier_flag((*seq_parameter_set_Item)->tier_flag)); + Profile+=Ztring().From_UTF8(Hevc_tier_flag((*seq_parameter_set_Item)->tier_flag)); } } Fill(Stream_Video, 0, Video_Format_Profile, Profile); @@ -318,7 +320,8 @@ PixelAspectRatio = ((float64) (*seq_parameter_set_Item)->vui_parameters->sar_width) / (*seq_parameter_set_Item)->vui_parameters->sar_height; Fill(Stream_Video, 0, Video_PixelAspectRatio, PixelAspectRatio, 3, true); - Fill(Stream_Video, 0, Video_DisplayAspectRatio, Width*PixelAspectRatio/Height, 3, true); //More precise + if(Height) + Fill(Stream_Video, 0, Video_DisplayAspectRatio, Width*PixelAspectRatio/Height, 3, true); //More precise } //Colour description @@ -1893,7 +1896,7 @@ { case 0 : sei_message_buffering_period(seq_parameter_set_id, payloadSize); break; case 1 : sei_message_pic_timing(seq_parameter_set_id, payloadSize); break; - //case 4 : sei_message_user_data_registered_itu_t_t35(); break; + case 4 : sei_message_user_data_registered_itu_t_t35(); break; case 5 : sei_message_user_data_unregistered(payloadSize); break; case 6 : sei_message_recovery_point(); break; //case 32 : sei_message_mainconcept(payloadSize); break; @@ -2022,6 +2025,101 @@ } //--------------------------------------------------------------------------- +// SEI - 4 +void File_Hevc::sei_message_user_data_registered_itu_t_t35() +{ + Element_Info1("user_data_registered_itu_t_t35"); + + int8u itu_t_t35_country_code; + Get_B1(itu_t_t35_country_code, "itu_t_t35_country_code"); + int16u terminal_provider_code; + Get_B2(terminal_provider_code, "terminal_provider_code"); + int8u terminal_provider_oriented_code_message_idc; + Get_B1(terminal_provider_oriented_code_message_idc, "terminal_provider_oriented_code_message_idc"); + if (itu_t_t35_country_code == 0xB5 && terminal_provider_code == 0x3A) + { + if (!terminal_provider_oriented_code_message_idc) + { + BS_Begin(); + int8u sl_hdr_mode_value_minus1; + Get_S1(4, sl_hdr_mode_value_minus1, "sl_hdr_mode_value_minus1"); + int8u sl_hdr_spec_major_version_idc; + Get_S1(4, sl_hdr_spec_major_version_idc, "sl_hdr_spec_major_version_idc"); + int8u sl_hdr_spec_minor_version_idc; + Get_S1(7, sl_hdr_spec_minor_version_idc, "sl_hdr_spec_minor_version_idc"); + bool sl_hdr_cancel_flag; + Get_SB(sl_hdr_cancel_flag, "sl_hdr_cancel_flag"); + BS_End(); + int8u sl_hdr_payload_mode; + int8u k_coefficient_value[3]; + if (!sl_hdr_cancel_flag) + { + BS_Begin(); + Skip_SB("sl_hdr_persistence_flag"); + bool coded_picture_info_present_flag; + Get_SB(coded_picture_info_present_flag, "coded_picture_info_present_flag"); + bool target_picture_info_present_flag; + Get_SB(target_picture_info_present_flag, "target_picture_info_present_flag"); + bool src_mdcv_info_present_flag; + Get_SB(src_mdcv_info_present_flag, "src_mdcv_info_present_flag"); + Skip_SB("sl_hdr_extension_present_flag"); + Get_S1(3, sl_hdr_payload_mode, "sl_hdr_payload_mode"); + BS_End(); + if (coded_picture_info_present_flag) + { + Skip_B1("coded_picture_primaries"); + Skip_B2("coded_picture_max_luminance"); + Skip_B2("coded_picture_min_luminance"); + } + if (target_picture_info_present_flag) + { + Skip_B1("target_picture_primaries"); + Skip_B2("target_picture_max_luminance"); + Skip_B2("target_picture_min_luminance"); + } + if (src_mdcv_info_present_flag) + { + for (int8u i = 0; i < 3; i++) + { + Skip_B2("src_mdcv_primaries_x"); + Skip_B2("src_mdcv_primaries_y"); + } + Skip_B2("src_mdcv_ref_white_x"); + Skip_B2("src_mdcv_ref_white_y"); + Skip_B2("src_mdcv_max_mastering_luminance"); + Skip_B2("src_mdcv_min_mastering_luminance"); + } + for (int8u i = 0; i < 4; i++) + Skip_B2("matrix_coefficient_value"); + for (int8u i = 0; i < 2; i++) + Skip_B2("chroma_to_luma_injection"); + for (int8u i = 0; i < 3; i++) + Get_B1(k_coefficient_value[i], "k_coefficient_value"); + } + EtsiTS103433 = __T("SL-HDR") + Ztring().From_Number(sl_hdr_mode_value_minus1 + 1); + if (!sl_hdr_mode_value_minus1) + { + EtsiTS103433 += k_coefficient_value[0] == 0 && k_coefficient_value[1] == 0 && k_coefficient_value[2] == 0 ? __T(" NCL") : __T(" CL"); + } + EtsiTS103433+= __T(" specVersion=") + Ztring().From_Number(sl_hdr_spec_major_version_idc) + __T(".") + Ztring().From_Number(sl_hdr_spec_minor_version_idc); + EtsiTS103433+= __T(" payloadMode=") + Ztring().From_Number(sl_hdr_payload_mode); + } + else if (terminal_provider_oriented_code_message_idc == 0x02) + { + BS_Begin(); + int8u ts_103_433_spec_version; + Get_S1(4, ts_103_433_spec_version, "ts_103_433_spec_version"); + int8u ts_103_433_payload_mode; + Get_S1(4, ts_103_433_payload_mode, "ts_103_433_payload_mode"); + BS_End(); + EtsiTS103433 = __T("SL-HDR1"); + EtsiTS103433+= __T(" specVersion=") + Ztring().From_Number(ts_103_433_spec_version); + EtsiTS103433+= __T(" payloadMode=") + Ztring().From_Number(ts_103_433_payload_mode); + } + } +} + +//--------------------------------------------------------------------------- // SEI - 5 void File_Hevc::sei_message_user_data_unregistered(int32u payloadSize) { @@ -2048,7 +2146,7 @@ void File_Hevc::sei_message_user_data_unregistered_Ateme(int32u payloadSize) { //Parsing - Get_Local(payloadSize, Encoded_Library, "Library name"); + Get_UTF8 (payloadSize, Encoded_Library, "Library name"); //Encoded_Library if (Encoded_Library.find(__T("ATEME "))==0) @@ -2067,8 +2165,8 @@ void File_Hevc::sei_message_user_data_unregistered_x265(int32u payloadSize) { //Parsing - Ztring Data; - Peek_Local(payloadSize, Data); + string Data; + Peek_String(payloadSize, Data); if (Data.size()!=payloadSize && Data.size()+1!=payloadSize) { Skip_XX(payloadSize, "Unknown"); @@ -2078,10 +2176,10 @@ size_t Loop=0; do { - size_t Data_Pos=Data.find(__T(" - "), Data_Pos_Before); + size_t Data_Pos=Data.find(" - ", Data_Pos_Before); if (Data_Pos==std::string::npos) Data_Pos=Data.size(); - if (Data.find(__T("options: "), Data_Pos_Before)==Data_Pos_Before) + if (Data.find("options: ", Data_Pos_Before)==Data_Pos_Before) { Element_Begin1("options"); size_t Options_Pos_Before=Data_Pos_Before; @@ -2091,16 +2189,16 @@ size_t Options_Pos=Data.find(__T(' '), Options_Pos_Before); if (Options_Pos==std::string::npos) Options_Pos=Data.size(); - Ztring option; - Get_Local (Options_Pos-Options_Pos_Before, option, "option"); + string option; + Get_String (Options_Pos-Options_Pos_Before, option, "option"); Options_Pos_Before=Options_Pos; while (Options_Pos_Before!=Data.size()) { - Ztring Separator; - Peek_Local(1, Separator); - if (Separator==__T(" ")) + string Separator; + Peek_String(1, Separator); + if (Separator==" ") { - Skip_Local(1, "separator"); + Skip_UTF8(1, "separator"); Options_Pos_Before+=1; } else @@ -2108,19 +2206,19 @@ } //Filling - if (option!=__T("options:") && !(!option.empty() && option[0]>=__T('0') && option[0]<=__T('9')) && option.find(__T("fps="))!=0 && option.find(__T("bitdepth="))!=0) //Ignoring redundant information e.g. width, height, frame rate, bit depth + if (option!="options:" && !(!option.empty() && option[0]>='0' && option[0]<='9') && option.find("fps=")!=0 && option.find("bitdepth=")!=0) //Ignoring redundant information e.g. width, height, frame rate, bit depth { if (!Encoded_Library_Settings.empty()) Encoded_Library_Settings+=__T(" / "); - Encoded_Library_Settings+=option; + Encoded_Library_Settings+=Ztring().From_UTF8(option.c_str()); } } Element_End0(); } else { - Ztring Value; - Get_Local(Data_Pos-Data_Pos_Before, Value, "data"); + string Value; + Get_String(Data_Pos-Data_Pos_Before, Value, "data"); //Saving if (Loop==0) @@ -2133,22 +2231,22 @@ size_t Value_Pos=Value.find(__T(' ')); if (Value_Pos!=string::npos) Value.resize(Value_Pos); - Encoded_Library=Value; + Encoded_Library.From_UTF8(Value.c_str()); } if (Loop==1 && Encoded_Library.find(__T("x265"))==0) { - size_t Value_Pos=Value.find(__T(" 8bpp")); + size_t Value_Pos=Value.find(" 8bpp"); if (Value_Pos!=string::npos) Value.resize(Value_Pos); Encoded_Library+=__T(" - "); - Encoded_Library+=Value; + Encoded_Library+=Ztring().From_UTF8(Value.c_str()); } } Data_Pos_Before=Data_Pos; if (Data_Pos_Before+3<=Data.size()) { - Skip_Local(3, "separator"); + Skip_UTF8(3, "separator"); Data_Pos_Before+=3; } diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Video/File_Hevc.h libmediainfo-18.12/Source/MediaInfo/Video/File_Hevc.h --- libmediainfo-18.08.1/Source/MediaInfo/Video/File_Hevc.h 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Video/File_Hevc.h 2018-12-10 23:27:17.000000000 +0000 @@ -356,6 +356,7 @@ void sei_message_buffering_period(int32u &seq_parameter_set_id, int32u payloadSize); void sei_message_buffering_period_xxl(seq_parameter_set_struct::vui_parameters_struct::xxl_common* xxL_Common, bool irap_cpb_params_present_flag, seq_parameter_set_struct::vui_parameters_struct::xxl* xxl); void sei_message_pic_timing(int32u &seq_parameter_set_id, int32u payloadSize); + void sei_message_user_data_registered_itu_t_t35(); void sei_message_user_data_unregistered(int32u payloadSize); void sei_message_user_data_unregistered_Ateme(int32u payloadSize); void sei_message_user_data_unregistered_x265(int32u payloadSize); @@ -417,6 +418,7 @@ Ztring Encoded_Library_Settings; Ztring MasteringDisplay_ColorPrimaries; Ztring MasteringDisplay_Luminance; + Ztring EtsiTS103433; int32u chroma_format_idc; int32u slice_pic_parameter_set_id; int32u slice_type; diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Video/File_Mpeg4v.cpp libmediainfo-18.12/Source/MediaInfo/Video/File_Mpeg4v.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Video/File_Mpeg4v.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Video/File_Mpeg4v.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -1354,11 +1354,11 @@ Library_End_Offset++; //Parsing - Ztring Temp; + string Temp; if (Library_Start_Offset>0) Skip_XX(Library_Start_Offset, "junk"); if (Library_End_Offset-Library_Start_Offset) - Get_Local(Library_End_Offset-Library_Start_Offset, Temp,"data"); + Get_String(Library_End_Offset-Library_Start_Offset, Temp,"data"); if (Element_Offset=4) { - if (Temp.find(__T("build"))==0) - Library+=Ztring(__T(" "))+Temp; + if (Temp.find("build")==0) + Library+=Ztring().From_UTF8(" "+Temp); else - Library=Temp; + Library.From_UTF8(Temp); //Library if (Library.find(__T("DivX50"))==0) @@ -1433,7 +1433,7 @@ //Parsing Ztring Value; - Get_Local(Element_Size, Value, "Value"); + Get_UTF8(Element_Size, Value, "Value"); ZtringListList List; List.Separator_Set(0, __T("\r\n")); List.Separator_Set(1, __T(": ")); diff -Nru libmediainfo-18.08.1/Source/MediaInfo/Video/File_Mpegv.cpp libmediainfo-18.12/Source/MediaInfo/Video/File_Mpegv.cpp --- libmediainfo-18.08.1/Source/MediaInfo/Video/File_Mpegv.cpp 2018-09-09 21:34:35.000000000 +0000 +++ libmediainfo-18.12/Source/MediaInfo/Video/File_Mpegv.cpp 2018-12-10 23:27:17.000000000 +0000 @@ -1375,13 +1375,13 @@ //Profile if (!profile_and_level_indication_escape && profile_and_level_indication_profile!=(int8u)-1 && profile_and_level_indication_level!=(int8u)-1) { - Fill(Stream_Video, 0, Video_Format_Profile, Ztring().From_Local(Mpegv_profile_and_level_indication_profile[profile_and_level_indication_profile])+__T("@")+Ztring().From_Local(Mpegv_profile_and_level_indication_level[profile_and_level_indication_level])); - Fill(Stream_Video, 0, Video_Codec_Profile, Ztring().From_Local(Mpegv_profile_and_level_indication_profile[profile_and_level_indication_profile])+__T("@")+Ztring().From_Local(Mpegv_profile_and_level_indication_level[profile_and_level_indication_level])); + Fill(Stream_Video, 0, Video_Format_Profile, Ztring().From_UTF8(Mpegv_profile_and_level_indication_profile[profile_and_level_indication_profile])+__T("@")+Ztring().From_UTF8(Mpegv_profile_and_level_indication_level[profile_and_level_indication_level])); + Fill(Stream_Video, 0, Video_Codec_Profile, Ztring().From_UTF8(Mpegv_profile_and_level_indication_profile[profile_and_level_indication_profile])+__T("@")+Ztring().From_UTF8(Mpegv_profile_and_level_indication_level[profile_and_level_indication_level])); } else if (profile_and_level_indication_escape) { - Fill(Stream_Video, 0, Video_Format_Profile, Ztring().From_Local(Mpegv_profile_and_level_indication(profile_and_level_indication))); - Fill(Stream_Video, 0, Video_Codec_Profile, Ztring().From_Local(Mpegv_profile_and_level_indication(profile_and_level_indication))); + Fill(Stream_Video, 0, Video_Format_Profile, Ztring().From_UTF8(Mpegv_profile_and_level_indication(profile_and_level_indication))); + Fill(Stream_Video, 0, Video_Codec_Profile, Ztring().From_UTF8(Mpegv_profile_and_level_indication(profile_and_level_indication))); } //Standard @@ -2380,7 +2380,7 @@ TemporalReference[TemporalReference_Offset+temporal_reference]->IsValid=true; //picture_coding_types - if (picture_coding_type==1) //I-Frame + if (picture_coding_type==1 && !FirstFieldFound) //I-Frame { if (!picture_coding_types_Current.empty()) { @@ -2409,7 +2409,7 @@ } picture_coding_types_Current='I'; } - else if (!picture_coding_types_Current.empty()) //If an I-Frame is already found + else if (!picture_coding_types_Current.empty() && !FirstFieldFound) //If an I-Frame is already found picture_coding_types_Current+=Mpegv_picture_coding_type[picture_coding_type]; //Detecting streams with only I-Frames @@ -2580,7 +2580,7 @@ Element_Info1(__T("Frame (decoding order) ")+Ztring::ToZtring(Frame_Count)); if (Frame_Count_LastIFrame!=(int64u)-1) Element_Info1(__T("Frame (presentation order) ")+Ztring::ToZtring(Frame_Count_LastIFrame+temporal_reference)); - Element_Info1(__T("picture_coding_type ")+Ztring().From_Local(Mpegv_picture_coding_type[picture_coding_type])); + Element_Info1(__T("picture_coding_type ")+Ztring().From_UTF8(Mpegv_picture_coding_type[picture_coding_type])); Element_Info1(__T("temporal_reference ")+Ztring::ToZtring(temporal_reference)); if (FrameInfo.PTS!=(int64u)-1) Element_Info1(__T("PTS ")+Ztring().Duration_From_Milliseconds(float64_int64s(((float64)FrameInfo.PTS)/1000000))); @@ -3193,7 +3193,7 @@ if (Library_Start_Offset>0) Skip_XX(Library_Start_Offset, "junk"); if (Library_End_Offset-Library_Start_Offset) - Get_Local(Library_End_Offset-Library_Start_Offset, Temp,"data"); + Get_UTF8(Library_End_Offset-Library_Start_Offset, Temp, "data"); if (Element_Offset