Projects
Multimedia
bento4
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 8
View file
bento4.changes
Changed
@@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Mon Oct 16 07:18:32 UTC 2017 - aloisio@gmx.com + +- Update to 1.5.1-621 +- Refreshed bento4-shared_library.patch + +------------------------------------------------------------------- Sat Oct 7 07:10:54 UTC 2017 - aloisio@gmx.com - Update to 1.5.1-620
View file
bento4.spec
Changed
@@ -16,10 +16,10 @@ # -%define _over 1.5.1-620 -%define _libver 1_5_1r620 +%define _over 1.5.1-621 +%define _libver 1_5_1r621 Name: bento4 -Version: 1.5.1r620 +Version: 1.5.1r621 Release: 0 Summary: C++ toolkit for all your MP4 and MPEG DASH media format needs License: GPL-2.0 @@ -87,11 +87,13 @@ %{_bindir}/bento4-mp4compact %{_bindir}/bento4-mp4dcfpackager %{_bindir}/bento4-mp4decrypt +%{_bindir}/bento4-mp4diff %{_bindir}/bento4-mp4dump %{_bindir}/bento4-mp4edit %{_bindir}/bento4-mp4encrypt %{_bindir}/bento4-mp4extract %{_bindir}/bento4-mp4fragment +%{_bindir}/bento4-mp4iframeindex %{_bindir}/bento4-mp4info %{_bindir}/bento4-mp4mux %{_bindir}/bento4-mp4split
View file
bento4-shared_library.patch
Changed
@@ -1,7 +1,7 @@ -Index: Bento4-1.5.0-614/CMakeLists.txt +Index: Bento4-1.5.1-621/CMakeLists.txt =================================================================== ---- Bento4-1.5.0-614.orig/CMakeLists.txt -+++ Bento4-1.5.0-614/CMakeLists.txt +--- Bento4-1.5.1-621.orig/CMakeLists.txt ++++ Bento4-1.5.1-621/CMakeLists.txt @@ -27,13 +27,21 @@ file(GLOB AP4_SOURCES ${SOURCE_SYSTEM}/StdC/*.cpp ) @@ -26,7 +26,7 @@ # Includes include_directories( @@ -47,6 +55,11 @@ include_directories( - set(BENTO4_APPS "Aac2Mp4;Mp42Aac;Mp42Ts;Mp42Hls;Mp4Compact;Mp4DcfPackager;Mp4Decrypt;Mp4Dump;Mp4Edit;Mp4Encrypt;Mp4Extract;Mp4Fragment;Mp4Info;Mp4Mux;Mp4Split;Mp4Tag") + set(BENTO4_APPS "Aac2Mp4;Mp42Aac;Mp42Ts;Mp42Hls;Mp4Compact;Mp4DcfPackager;Mp4Decrypt;Mp4Dump;Mp4Edit;Mp4Encrypt;Mp4Extract;Mp4Fragment;Mp4Info;Mp4Mux;Mp4Split;Mp4Tag;Mp4Diff;Mp4IframeIndex") foreach(app ${BENTO4_APPS}) string(TOLOWER ${app} binary_name) + string(CONCAT binary_name "bento4-" ${binary_name})
View file
bento4-1.5.1r620.tar.gz/.gitignore -> bento4-1.5.1r621.tar.gz/.gitignore
Changed
@@ -39,3 +39,4 @@ .suo *.db *.user +.vscode
View file
bento4-1.5.1r620.tar.gz/Build/Build.scons -> bento4-1.5.1r621.tar.gz/Build/Build.scons
Changed
@@ -156,7 +156,7 @@ build_source_files = env['AP4_SYSTEM_SOURCES'], included_modules = 'Config') -for name in ['Mp4Dump', 'Mp4Info', 'Mp4Edit', 'Mp4Encrypt', 'Mp4Decrypt', 'Mp4Tag', 'Mp4Extract', 'Mp4RtpHintInfo', 'Mp42Aac', 'Mp42Avc', 'Mp42Hevc', 'Mp42Ts', 'Mp42Hls', 'Mp4DcfPackager', 'Mp4Fragment', 'Mp4Compact', 'Mp4Split', 'Mp4AudioClip', 'Mp4Mux', 'AvcInfo', 'HevcInfo']: +for name in ['Mp4Dump', 'Mp4Info', 'Mp4Edit', 'Mp4Encrypt', 'Mp4Decrypt', 'Mp4Tag', 'Mp4Extract', 'Mp4RtpHintInfo', 'Mp42Aac', 'Mp42Avc', 'Mp42Hevc', 'Mp42Ts', 'Mp42Hls', 'Mp4DcfPackager', 'Mp4Fragment', 'Mp4Compact', 'Mp4Split', 'Mp4AudioClip', 'Mp4Mux', 'Mp4Diff', 'Mp4IframeIndex', 'AvcInfo', 'HevcInfo']: Executable(name, source_dir='C++/Apps/'+name) Executable('Aac2Mp4', source_dir='C++/Apps/Aac2Mp4')
View file
bento4-1.5.1r621.tar.gz/Build/Makefiles/Mp4IframeIndex.mak
Added
@@ -0,0 +1,35 @@ +########################################################################## +# +# Mp4Info Program +# +# (c) 2002-2008 Axiomatic Systems, LLC +# +########################################################################## +all: mp4iframeindex + +########################################################################## +# includes +########################################################################## +include $(BUILD_ROOT)/Makefiles/Lib.exp + +########################################################################## +# targets +########################################################################## +TARGET_SOURCES = Mp4IframeIndex.cpp + +########################################################################## +# make path +########################################################################## +VPATH += $(SOURCE_ROOT)/Apps/Mp4IframeIndex + +########################################################################## +# includes +########################################################################## +include $(BUILD_ROOT)/Makefiles/Rules.mak + +########################################################################## +# rules +########################################################################## +mp4iframeindex: $(TARGET_OBJECTS) $(TARGET_LIBRARY_FILES) + $(LINK) $(TARGET_OBJECTS) -o $@ $(LINK_LIBRARIES) +
View file
bento4-1.5.1r620.tar.gz/Build/Makefiles/TopLevel.mak -> bento4-1.5.1r621.tar.gz/Build/Makefiles/TopLevel.mak
Changed
@@ -153,6 +153,10 @@ $(TITLE) @$(INVOKE_SUBMAKE) -f $(BUILD_ROOT)/Makefiles/Mp42Hls.mak +mp4iframeindex: lib + $(TITLE) + @$(INVOKE_SUBMAKE) -f $(BUILD_ROOT)/Makefiles/Mp4IframeIndex.mak + ################################################################## # includes ##################################################################
View file
bento4-1.5.1r620.tar.gz/Build/Targets/universal-apple-macosx/Bento4.xcodeproj/project.pbxproj -> bento4-1.5.1r621.tar.gz/Build/Targets/universal-apple-macosx/Bento4.xcodeproj/project.pbxproj
Changed
@@ -13,6 +13,8 @@ buildPhases = ( ); dependencies = ( + CACAF6931F91C49400B75DC3 /* PBXTargetDependency */, + CACAF6911F91C48F00B75DC3 /* PBXTargetDependency */, CA640EA11B09AAEF00C93DCF /* PBXTargetDependency */, CA00A65E1A1C383E0064B4D3 /* PBXTargetDependency */, CA418B141948F0A300D202E0 /* PBXTargetDependency */, @@ -144,6 +146,8 @@ CA86EEE519A95E30008A3B00 /* FragmentCreatorTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA86EEE419A95E30008A3B00 /* FragmentCreatorTest.cpp */; }; CA87B94A1F81B0C4005F42D6 /* libBento4.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CAA7E6C914ACD763008AA54E /* libBento4.a */; }; CA87B94D1F81B130005F42D6 /* Mp4Diff.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA87B94C1F81B122005F42D6 /* Mp4Diff.cpp */; }; + CA87B95B1F895AD9005F42D6 /* libBento4.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CAA7E6C914ACD763008AA54E /* libBento4.a */; }; + CA87B95E1F895F90005F42D6 /* Mp4IframeIndex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA87B95D1F895B14005F42D6 /* Mp4IframeIndex.cpp */; }; CA8A94D91929A68700836179 /* libBento4.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CAA7E6C914ACD763008AA54E /* libBento4.a */; }; CA8A94DC1929A6C100836179 /* Mp4Mux.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA8A94DB1929A6C100836179 /* Mp4Mux.cpp */; }; CA8A94DD1929DD9100836179 /* Ap4AvcParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA3EDA960D7E14D3007AE943 /* Ap4AvcParser.cpp */; }; @@ -732,6 +736,13 @@ remoteGlobalIDString = CA86EED619A95DD3008A3B00; remoteInfo = FragmentCreatorTest; }; + CA87B9591F895ACE005F42D6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D2AAC045055464E500DB518D; + remoteInfo = Bento4; + }; CA8A94D71929A67500836179 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; @@ -816,6 +827,20 @@ remoteGlobalIDString = D2AAC045055464E500DB518D; remoteInfo = Bento4; }; + CACAF6901F91C48F00B75DC3 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = CA87B9511F895A84005F42D6; + remoteInfo = Mp4IframeIndex; + }; + CACAF6921F91C49400B75DC3 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = CA87B9411F81B08B005F42D6; + remoteInfo = Mp4Diff; + }; CAE1FBEE1AF8493E00607B3C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; @@ -981,6 +1006,15 @@ ); runOnlyForDeploymentPostprocessing = 1; }; + CA87B9501F895A84005F42D6 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; CAFE9C671D1B487700F9FF67 /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -1079,8 +1113,9 @@ CA86EED719A95DD3008A3B00 /* FragmentCreatorTest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = FragmentCreatorTest; sourceTree = BUILT_PRODUCTS_DIR; }; CA86EEE419A95E30008A3B00 /* FragmentCreatorTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FragmentCreatorTest.cpp; sourceTree = "<group>"; }; CA87B9421F81B08B005F42D6 /* mp4diff */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = mp4diff; sourceTree = BUILT_PRODUCTS_DIR; }; - CA87B9441F81B08B005F42D6 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; CA87B94C1F81B122005F42D6 /* Mp4Diff.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Mp4Diff.cpp; sourceTree = "<group>"; }; + CA87B9521F895A84005F42D6 /* Mp4IframeIndex */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = Mp4IframeIndex; path = mp4iframeindex; sourceTree = BUILT_PRODUCTS_DIR; }; + CA87B95D1F895B14005F42D6 /* Mp4IframeIndex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Mp4IframeIndex.cpp; sourceTree = "<group>"; }; CA8A94CE1929A65E00836179 /* mp4mux */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = mp4mux; sourceTree = BUILT_PRODUCTS_DIR; }; CA8A94DB1929A6C100836179 /* Mp4Mux.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Mp4Mux.cpp; sourceTree = "<group>"; }; CA8B6A600F66D20900720A07 /* Ap4MfhdAtom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Ap4MfhdAtom.cpp; sourceTree = "<group>"; }; @@ -1514,6 +1549,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + CA87B94F1F895A84005F42D6 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + CA87B95B1F895AD9005F42D6 /* libBento4.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; CA8A94CB1929A65E00836179 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -1665,7 +1708,6 @@ CA646A860CE97B2D009699D7 /* Apps */, CA646A9B0CE97B51009699D7 /* Test */, C6A0FF2B0290797F04C91782 /* Documentation */, - CA87B9431F81B08B005F42D6 /* Mp4Diff */, 1AB674ADFE9D54B511CA2CBB /* Products */, CA87B9491F81B0C4005F42D6 /* Frameworks */, ); @@ -1730,6 +1772,7 @@ CAE1FBF61AF8493E00607B3C /* mp42hls */, CAFE9C691D1B487700F9FF67 /* LargeFilesTest */, CA87B9421F81B08B005F42D6 /* mp4diff */, + CA87B9521F895A84005F42D6 /* Mp4IframeIndex */, ); name = Products; sourceTree = "<group>"; @@ -1821,6 +1864,7 @@ CA646A910CE97B2D009699D7 /* Mp4Encrypt */, CA646A930CE97B2D009699D7 /* Mp4Extract */, CA6103E2128599C20039C7E6 /* Mp4Fragment */, + CA87B95C1F895B14005F42D6 /* Mp4IframeIndex */, CA646A950CE97B2D009699D7 /* Mp4Info */, CA8A94DA1929A6C100836179 /* Mp4Mux */, CA00A65A1A1C38210064B4D3 /* Mp4Pssh */, @@ -1961,14 +2005,6 @@ path = FragmentCreator; sourceTree = "<group>"; }; - CA87B9431F81B08B005F42D6 /* Mp4Diff */ = { - isa = PBXGroup; - children = ( - CA87B9441F81B08B005F42D6 /* main.cpp */, - ); - path = Mp4Diff; - sourceTree = "<group>"; - }; CA87B9491F81B0C4005F42D6 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -1984,6 +2020,14 @@ path = Mp4Diff; sourceTree = "<group>"; }; + CA87B95C1F895B14005F42D6 /* Mp4IframeIndex */ = { + isa = PBXGroup; + children = ( + CA87B95D1F895B14005F42D6 /* Mp4IframeIndex.cpp */, + ); + path = Mp4IframeIndex; + sourceTree = "<group>"; + }; CA8A94DA1929A6C100836179 /* Mp4Mux */ = { isa = PBXGroup; children = ( @@ -2969,6 +3013,24 @@ productReference = CA87B9421F81B08B005F42D6 /* mp4diff */; productType = "com.apple.product-type.tool"; }; + CA87B9511F895A84005F42D6 /* Mp4IframeIndex */ = { + isa = PBXNativeTarget; + buildConfigurationList = CA87B9581F895A84005F42D6 /* Build configuration list for PBXNativeTarget "Mp4IframeIndex" */; + buildPhases = ( + CA87B94E1F895A84005F42D6 /* Sources */, + CA87B94F1F895A84005F42D6 /* Frameworks */, + CA87B9501F895A84005F42D6 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + CA87B95A1F895ACE005F42D6 /* PBXTargetDependency */, + ); + name = Mp4IframeIndex; + productName = Mp4IframeIndex; + productReference = CA87B9521F895A84005F42D6 /* Mp4IframeIndex */; + productType = "com.apple.product-type.tool"; + }; CA8A94CD1929A65E00836179 /* Mp4Mux */ = { isa = PBXNativeTarget; buildConfigurationList = CA8A94D61929A65E00836179 /* Build configuration list for PBXNativeTarget "Mp4Mux" */; @@ -3293,6 +3355,10 @@ CreatedOnToolsVersion = 9.0; ProvisioningStyle = Manual; }; + CA87B9511F895A84005F42D6 = { + CreatedOnToolsVersion = 9.0; + ProvisioningStyle = Automatic; + }; CAFE9C681D1B487700F9FF67 = { CreatedOnToolsVersion = 7.3; }; @@ -3355,6 +3421,7 @@ CAFC31B80FEB3DDD00EF80A0 /* FragmentParserTest */, CA86EED619A95DD3008A3B00 /* FragmentCreatorTest */, CAFE9C681D1B487700F9FF67 /* LargeFilesTest */, + CA87B9511F895A84005F42D6 /* Mp4IframeIndex */, ); }; /* End PBXProject section */ @@ -3536,6 +3603,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + CA87B94E1F895A84005F42D6 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647;
View file
bento4-1.5.1r620.tar.gz/Build/Targets/x86-microsoft-win32-vs2010/Bento4.sln -> bento4-1.5.1r621.tar.gz/Build/Targets/x86-microsoft-win32-vs2010/Bento4.sln
Changed
@@ -103,6 +103,8 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mp42Hevc", "Mp42Hevc\Mp42Hevc.vcxproj", "{2ED2DF44-488D-470A-9C52-88D9D10518F7}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mp4IframeIndex", "Mp4IframeIndex\Mp4IframeIndex.vcxproj", "{FD311CE7-C059-457C-BEEC-86CEB1E7014D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -213,6 +215,10 @@ {2ED2DF44-488D-470A-9C52-88D9D10518F7}.Debug|Win32.Build.0 = Debug|Win32 {2ED2DF44-488D-470A-9C52-88D9D10518F7}.Release|Win32.ActiveCfg = Release|Win32 {2ED2DF44-488D-470A-9C52-88D9D10518F7}.Release|Win32.Build.0 = Release|Win32 + {FD311CE7-C059-457C-BEEC-86CEB1E7014D}.Debug|Win32.ActiveCfg = Debug|Win32 + {FD311CE7-C059-457C-BEEC-86CEB1E7014D}.Debug|Win32.Build.0 = Debug|Win32 + {FD311CE7-C059-457C-BEEC-86CEB1E7014D}.Release|Win32.ActiveCfg = Release|Win32 + {FD311CE7-C059-457C-BEEC-86CEB1E7014D}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -237,6 +243,7 @@ {EA2B1E39-B9F4-4424-A01B-65628E87BEB5} = {92E4C2EB-ED44-4B47-805D-CC272C8838EB} {28D14679-1C21-4B6E-B891-62769EDCEFFF} = {92E4C2EB-ED44-4B47-805D-CC272C8838EB} {2ED2DF44-488D-470A-9C52-88D9D10518F7} = {92E4C2EB-ED44-4B47-805D-CC272C8838EB} + {FD311CE7-C059-457C-BEEC-86CEB1E7014D} = {92E4C2EB-ED44-4B47-805D-CC272C8838EB} {FA13F082-633C-4DAD-B282-6B0E1BDD3412} = {FAE70B4A-0D9D-4748-9DED-991D4101AE93} {B031A581-FDE5-4CDC-A124-573F6EECB54A} = {FAE70B4A-0D9D-4748-9DED-991D4101AE93} {23C9BE84-E4D3-4F06-9188-533991022D48} = {FAE70B4A-0D9D-4748-9DED-991D4101AE93}
View file
bento4-1.5.1r621.tar.gz/Build/Targets/x86-microsoft-win32-vs2010/Mp4IframeIndex
Added
+(directory)
View file
bento4-1.5.1r621.tar.gz/Build/Targets/x86-microsoft-win32-vs2010/Mp4IframeIndex/Mp4IframeIndex.vcxproj
Added
@@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{FD311CE7-C059-457C-BEEC-86CEB1E7014D}</ProjectGuid> + <Keyword>Win32Proj</Keyword> + <RootNamespace>Mp4IframeIndex</RootNamespace> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <LinkIncremental>false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>..\..\..\..\Source\C++\Core;..\..\..\..\Source\C++\MetaData;..\..\..\..\Source\C++\Codecs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>..\..\..\..\Source\C++\Core;..\..\..\..\Source\C++\MetaData;..\..\..\..\Source\C++\Codecs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ProjectReference Include="..\Bento4\Bento4.vcxproj"> + <Project>{a714aa1c-45a9-403d-a6e1-020e520119a2}</Project> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <ClCompile Include="..\..\..\..\Source\C++\Apps\Mp4IframeIndex\Mp4IframeIndex.cpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline at end of file
View file
bento4-1.5.1r621.tar.gz/Build/Targets/x86-microsoft-win32-vs2010/Mp4IframeIndex/Mp4IframeIndex.vcxproj.filters
Added
@@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="..\..\..\..\Source\C++\Apps\Mp4IframeIndex\Mp4IframeIndex.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> +</Project> \ No newline at end of file
View file
bento4-1.5.1r620.tar.gz/CMakeLists.txt -> bento4-1.5.1r621.tar.gz/CMakeLists.txt
Changed
@@ -44,7 +44,7 @@ ) # Apps -set(BENTO4_APPS "Aac2Mp4;Mp42Aac;Mp42Ts;Mp42Hls;Mp4Compact;Mp4DcfPackager;Mp4Decrypt;Mp4Dump;Mp4Edit;Mp4Encrypt;Mp4Extract;Mp4Fragment;Mp4Info;Mp4Mux;Mp4Split;Mp4Tag") +set(BENTO4_APPS "Aac2Mp4;Mp42Aac;Mp42Ts;Mp42Hls;Mp4Compact;Mp4DcfPackager;Mp4Decrypt;Mp4Dump;Mp4Edit;Mp4Encrypt;Mp4Extract;Mp4Fragment;Mp4Info;Mp4Mux;Mp4Split;Mp4Tag;Mp4Diff;Mp4IframeIndex") foreach(app ${BENTO4_APPS}) string(TOLOWER ${app} binary_name) add_executable(${binary_name} ${SOURCE_ROOT}/Apps/${app}/${app}.cpp)
View file
bento4-1.5.1r620.tar.gz/Scripts/SdkPackager.py -> bento4-1.5.1r621.tar.gz/Scripts/SdkPackager.py
Changed
@@ -237,6 +237,7 @@ (bin_in,'aac2mp4','bin'), (bin_in,'mp42ts','bin'), (bin_in,'mp42hls','bin'), + (bin_in,'mp4iframeindex','bin'), (bin_in,'*.a','lib'), (bin_in,'*.dll','bin'), (bin_in,'*.dylib','bin'),
View file
bento4-1.5.1r620.tar.gz/Source/C++/Apps/Mp42Hls/Mp42Hls.cpp -> bento4-1.5.1r621.tar.gz/Source/C++/Apps/Mp42Hls/Mp42Hls.cpp
Changed
@@ -932,19 +932,19 @@ return AP4_ERROR_INVALID_FORMAT; } if (sample_description->GetFormat() == AP4_SAMPLE_FORMAT_MP4A) { - AP4_MpegAudioSampleDescription* audio_desc = AP4_DYNAMIC_CAST(AP4_MpegAudioSampleDescription, sample_description); + AP4_MpegAudioSampleDescription* mpeg_audio_desc = AP4_DYNAMIC_CAST(AP4_MpegAudioSampleDescription, sample_description); - if (audio_desc == NULL) return AP4_ERROR_NOT_SUPPORTED; - if (audio_desc->GetMpeg4AudioObjectType() != AP4_MPEG4_AUDIO_OBJECT_TYPE_AAC_LC && - audio_desc->GetMpeg4AudioObjectType() != AP4_MPEG4_AUDIO_OBJECT_TYPE_AAC_MAIN && - audio_desc->GetMpeg4AudioObjectType() != AP4_MPEG4_AUDIO_OBJECT_TYPE_SBR && - audio_desc->GetMpeg4AudioObjectType() != AP4_MPEG4_AUDIO_OBJECT_TYPE_PS) { + if (mpeg_audio_desc == NULL) return AP4_ERROR_NOT_SUPPORTED; + if (mpeg_audio_desc->GetMpeg4AudioObjectType() != AP4_MPEG4_AUDIO_OBJECT_TYPE_AAC_LC && + mpeg_audio_desc->GetMpeg4AudioObjectType() != AP4_MPEG4_AUDIO_OBJECT_TYPE_AAC_MAIN && + mpeg_audio_desc->GetMpeg4AudioObjectType() != AP4_MPEG4_AUDIO_OBJECT_TYPE_SBR && + mpeg_audio_desc->GetMpeg4AudioObjectType() != AP4_MPEG4_AUDIO_OBJECT_TYPE_PS) { return AP4_ERROR_NOT_SUPPORTED; } - unsigned int sample_rate = audio_desc->GetSampleRate(); - unsigned int channel_count = audio_desc->GetChannelCount(); - const AP4_DataBuffer& dsi = audio_desc->GetDecoderInfo(); + unsigned int sample_rate = mpeg_audio_desc->GetSampleRate(); + unsigned int channel_count = mpeg_audio_desc->GetChannelCount(); + const AP4_DataBuffer& dsi = mpeg_audio_desc->GetDecoderInfo(); if (dsi.GetDataSize()) { AP4_Mp4AudioDecoderConfig dec_config; AP4_Result result = dec_config.Parse(dsi.GetData(), dsi.GetDataSize()); @@ -1176,7 +1176,7 @@ if (Options.encryption_mode == ENCRYPTION_MODE_SAMPLE_AES) { AP4_DataBuffer descriptor; if (audio_track) { - AP4_Result result = MakeSampleAesAudioDescriptor(descriptor, audio_track->GetSampleDescription(0), audio_sample_data); + result = MakeSampleAesAudioDescriptor(descriptor, audio_track->GetSampleDescription(0), audio_sample_data); if (AP4_SUCCEEDED(result) && descriptor.GetDataSize()) { audio_stream->SetDescriptor(descriptor.GetData(), descriptor.GetDataSize()); } else { @@ -1185,7 +1185,7 @@ } } if (video_track) { - AP4_Result result = MakeSampleAesVideoDescriptor(descriptor); + result = MakeSampleAesVideoDescriptor(descriptor); if (AP4_SUCCEEDED(result) && descriptor.GetDataSize()) { video_stream->SetDescriptor(descriptor.GetData(), descriptor.GetDataSize()); } else {
View file
bento4-1.5.1r620.tar.gz/Source/C++/Apps/Mp4Diff/Mp4Diff.cpp -> bento4-1.5.1r621.tar.gz/Source/C++/Apps/Mp4Diff/Mp4Diff.cpp
Changed
@@ -1,8 +1,8 @@ /***************************************************************** | -| AP4 - MP4 File Info +| AP4 - MP4 File Comparator | -| Copyright 2002-2015 Axiomatic Systems, LLC +| Copyright 2002-2017 Axiomatic Systems, LLC | | | This file is part of Bento4/AP4 (MP4 Atom Processing Library). @@ -65,9 +65,7 @@ | DiffSamples +---------------------------------------------------------------------*/ static void -DiffSamples(unsigned int index, - AP4_Sample& sample1, AP4_DataBuffer& sample_data1, - AP4_Sample& sample2, AP4_DataBuffer& sample_data2) +DiffSamples(unsigned int index, AP4_DataBuffer& sample_data1, AP4_DataBuffer& sample_data2) { if (sample_data1.GetDataSize() != sample_data2.GetDataSize()) { printf("!!! sample %d: sizes not equal: %d, %d\n", index, sample_data1.GetDataSize(), sample_data2.GetDataSize()); @@ -137,7 +135,7 @@ prev_track_id = track_id1; } - DiffSamples(i, sample1, sample_data1, sample2, sample_data2); + DiffSamples(i, sample_data1, sample_data2); } else { printf("### processed %d samples\n", i+1); break;
View file
bento4-1.5.1r621.tar.gz/Source/C++/Apps/Mp4IframeIndex
Added
+(directory)
View file
bento4-1.5.1r621.tar.gz/Source/C++/Apps/Mp4IframeIndex/Mp4IframeIndex.cpp
Added
@@ -0,0 +1,263 @@ +/***************************************************************** +| +| AP4 - MP4 I-Frame Indexer +| +| Copyright 2002-2017 Axiomatic Systems, LLC +| +| +| This file is part of Bento4/AP4 (MP4 Atom Processing Library). +| +| Unless you have obtained Bento4 under a difference license, +| this version of Bento4 is Bento4|GPL. +| Bento4|GPL is free software; you can redistribute it and/or modify +| it under the terms of the GNU General Public License as published by +| the Free Software Foundation; either version 2, or (at your option) +| any later version. +| +| Bento4|GPL is distributed in the hope that it will be useful, +| but WITHOUT ANY WARRANTY; without even the implied warranty of +| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +| GNU General Public License for more details. +| +| You should have received a copy of the GNU General Public License +| along with Bento4|GPL; see the file COPYING. If not, write to the +| Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA +| 02111-1307, USA. +| + ****************************************************************/ + +/*---------------------------------------------------------------------- +| includes ++---------------------------------------------------------------------*/ +#include <stdio.h> +#include <stdlib.h> + +#include "Ap4.h" + +/*---------------------------------------------------------------------- +| constants ++---------------------------------------------------------------------*/ +#define BANNER "MP4 Iframe Index - Version 1.0.0\n"\ + "(Bento4 Version " AP4_VERSION_STRING ")\n"\ + "(c) 2002-2017 Axiomatic Systems, LLC" + +/*---------------------------------------------------------------------- +| PrintUsageAndExit ++---------------------------------------------------------------------*/ +static void +PrintUsageAndExit() +{ + fprintf(stderr, + BANNER + "\n\nusage: mp4iframeindex [options] <input> [<output>]\n" + " options:\n" + " --track <id>: ID of the video track\n" + ); + exit(1); +} + +/*---------------------------------------------------------------------- +| IndexTrack ++---------------------------------------------------------------------*/ +static AP4_Result +IndexTrack(AP4_Track& track, const char** separator, AP4_ByteStream* output) +{ + AP4_Sample sample; + for (unsigned int i=0; i<track.GetSampleCount(); i++) { + // get the sample + AP4_Result result = track.GetSample(i, sample); + if (AP4_FAILED(result)) return result; + + if (sample.IsSync()) { + AP4_Offset offset = sample.GetOffset(); + char workspace[256]; + AP4_FormatString(workspace, sizeof(workspace), + "%s{ \"size\": %u, \"offset\": %llu, \"fragmentStart\": 0 }", + *separator, + (unsigned int)sample.GetSize(), + (unsigned long long)offset); + *separator = ",\n"; + output->WriteString(workspace); + } + } + + return AP4_SUCCESS; +} + +/*---------------------------------------------------------------------- +| IndexFragments ++---------------------------------------------------------------------*/ +static AP4_Result +IndexFragments(AP4_Movie& movie, unsigned int track_id, AP4_ByteStream* stream, const char** separator, AP4_ByteStream* output) +{ + stream->Seek(0); + AP4_LinearReader reader(movie, stream); + reader.EnableTrack(track_id); + + AP4_Sample sample; + AP4_Position last_fragment_position = (AP4_Position)(-1); + for (unsigned int i=0; ; i++) { + AP4_UI32 found_track_id = 0; + AP4_Result result = reader.GetNextSample(sample, found_track_id); + if (AP4_FAILED(result)) break; + + // only output the first sync sample of each fragment + if (reader.GetCurrentFragmentPosition() == last_fragment_position) { + continue; + } + if (found_track_id == track_id && sample.IsSync()) { + AP4_Offset offset = sample.GetOffset(); + char workspace[256]; + AP4_FormatString(workspace, sizeof(workspace), + "%s{ \"size\": %u, \"offset\": %llu, \"fragmentStart\": %llu }", + *separator, + (unsigned int)sample.GetSize(), + (unsigned long long)offset, + (unsigned long long)reader.GetCurrentFragmentPosition()); + *separator = ",\n"; + output->WriteString(workspace); + } + last_fragment_position = reader.GetCurrentFragmentPosition(); + } + + return AP4_SUCCESS; +} + +/*---------------------------------------------------------------------- +| main ++---------------------------------------------------------------------*/ +int +main(int argc, char** argv) +{ + if (argc < 2) { + PrintUsageAndExit(); + } + const char* input_filename = NULL; + const char* output_filename = NULL; + const char* moov_filename = NULL; + unsigned int track_id = 0; + + ++argv; + while (char* arg = *argv++) { + if (!strcmp(arg, "--track")) { + arg = *argv++; + if (arg == NULL) { + fprintf(stderr, "ERROR: missing argument after --track option\n"); + return 1; + } + track_id = (unsigned int)strtoul(arg, NULL, 10); + } else if (!strcmp(arg, "--fragments-info")) { + moov_filename = *argv++; + if (moov_filename == NULL) { + fprintf(stderr, "ERROR: missing argument after --fragments-info option\n"); + } + } else if (input_filename == NULL) { + input_filename = arg; + } else if (output_filename == NULL) { + output_filename = arg; + } else { + fprintf(stderr, "ERROR: unexpected argument '%s'\n", arg); + return 1; + } + } + if (input_filename == NULL) { + fprintf(stderr, "ERROR: input filename missing\n"); + return 1; + } + if (output_filename == NULL) { + output_filename = "-stdout"; + } + + AP4_ByteStream* output = NULL; + AP4_Result result = AP4_FileByteStream::Create(output_filename, + AP4_FileByteStream::STREAM_MODE_WRITE, + output); + if (AP4_FAILED(result)) { + fprintf(stderr, "ERROR: cannot open output file %s (%d)\n", input_filename, result); + return 1; + } + + AP4_ByteStream* input = NULL; + result = AP4_FileByteStream::Create(input_filename, + AP4_FileByteStream::STREAM_MODE_READ, + input); + if (AP4_FAILED(result)) { + fprintf(stderr, "ERROR: cannot open input file %s (%d)\n", input_filename, result); + return 1; + } + + AP4_ByteStream* moov = NULL; + if (moov_filename) { + result = AP4_FileByteStream::Create(moov_filename, + AP4_FileByteStream::STREAM_MODE_READ, + moov); + if (AP4_FAILED(result)) { + fprintf(stderr, "ERROR: cannot open fragments info file %s (%d)\n", moov_filename, result); + return 1; + } + } +
View file
bento4-1.5.1r620.tar.gz/Source/C++/Codecs/Ap4HevcParser.cpp -> bento4-1.5.1r621.tar.gz/Source/C++/Codecs/Ap4HevcParser.cpp
Changed
@@ -37,7 +37,7 @@ +---------------------------------------------------------------------*/ #define AP4_HEVC_PARSER_ENABLE_DEBUG 0 -#if defined(AP4_HEVC_PARSER_ENABLE_DEBUG) +#if AP4_HEVC_PARSER_ENABLE_DEBUG #define DBG_PRINTF_0(_x0) printf(_x0) #define DBG_PRINTF_1(_x0, _x1) printf(_x0, _x1) #define DBG_PRINTF_2(_x0, _x1, _x2) printf(_x0, _x1, _x2) @@ -220,17 +220,14 @@ } /*---------------------------------------------------------------------- -| short_term_ref_pic_set +| st_ref_pic_set +---------------------------------------------------------------------*/ -typedef struct { - unsigned int delta_poc_s0_minus1[16]; - unsigned int delta_poc_s1_minus1[16]; - unsigned int used_by_curr_pic_s0_flag[16]; - unsigned int used_by_curr_pic_s1_flag[16]; -} short_term_ref_pic_set; - static AP4_Result -parse_short_term_ref_pic_set(short_term_ref_pic_set* rps, unsigned int stRpsIdx, unsigned int num_short_term_ref_pic_sets, AP4_BitReader& bits) { +parse_st_ref_pic_set(AP4_HevcShortTermRefPicSet* rps, + const AP4_HevcSequenceParameterSet* sps, + unsigned int stRpsIdx, + unsigned int num_short_term_ref_pic_sets, + AP4_BitReader& bits) { AP4_SetMemory(rps, 0, sizeof(*rps)); unsigned int inter_ref_pic_set_prediction_flag = 0; @@ -245,28 +242,25 @@ /* delta_rps_sign = */ bits.ReadBit(); /* abs_delta_rps_minus1 = */ ReadGolomb(bits); if (delta_idx_minus1+1 > stRpsIdx) return AP4_ERROR_INVALID_FORMAT; // should not happen - //unsigned int RefRpsIdx = stRpsIdx - (delta_idx_minus1 + 1); - // TODO: finish parsing this - printf("### This bitstream uses features that are not yet supported. Please file a ticket."); - return AP4_ERROR_NOT_SUPPORTED; -// for (unsigned j=0; j<=NumDeltaPocs[RefRpsIdx]; j++) { -// unsigned int used_by_curr_pic_flag /*[j]*/ = bits.ReadBit(); -// if (!used_by_curr_pic_flag /*[j]*/) { -// /* use_delta_flag[j] = */ bits.ReadBit(); -// } -// } - // <TODO + unsigned int RefRpsIdx = stRpsIdx - (delta_idx_minus1 + 1); + unsigned int NumDeltaPocs = sps->short_term_ref_pic_sets[RefRpsIdx].num_negative_pics + sps->short_term_ref_pic_sets[RefRpsIdx].num_positive_pics; + for (unsigned j=0; j<=NumDeltaPocs; j++) { + unsigned int used_by_curr_pic_flag /*[j]*/ = bits.ReadBit(); + if (!used_by_curr_pic_flag /*[j]*/) { + /* use_delta_flag[j] = */ bits.ReadBit(); + } + } } else { - unsigned int num_negative_pics = ReadGolomb(bits); - unsigned int num_positive_pics = ReadGolomb(bits); - if (num_negative_pics > 16 || num_positive_pics > 16) { + rps->num_negative_pics = ReadGolomb(bits); + rps->num_positive_pics = ReadGolomb(bits); + if (rps->num_negative_pics > 16 || rps->num_positive_pics > 16) { return AP4_ERROR_INVALID_FORMAT; } - for (unsigned int i=0; i<num_negative_pics; i++) { + for (unsigned int i=0; i<rps->num_negative_pics; i++) { rps->delta_poc_s0_minus1[i] = ReadGolomb(bits); rps->used_by_curr_pic_s0_flag[i] = bits.ReadBit(); } - for (unsigned i=0; i<num_positive_pics; i++) { + for (unsigned i=0; i<rps->num_positive_pics; i++) { rps->delta_poc_s1_minus1[i] = ReadGolomb(bits); rps->used_by_curr_pic_s1_flag[i] = bits.ReadBit(); } @@ -276,6 +270,40 @@ } /*---------------------------------------------------------------------- +| NumPicTotalCurr ++---------------------------------------------------------------------*/ +static unsigned int +NumPicTotalCurr(const AP4_HevcShortTermRefPicSet* rps, + const AP4_HevcSliceSegmentHeader* slice_segment_header) +{ + // compute NumPicTotalCurr + unsigned int nptc = 0; + if (rps) { + for (unsigned int i=0; i<rps->num_negative_pics; i++) { + if (rps->used_by_curr_pic_s0_flag[i]) { + ++nptc; + } + } + for (unsigned int i=0; i<rps->num_positive_pics; i++) { + if (rps->used_by_curr_pic_s1_flag[i]) { + ++nptc; + } + } + } + for (unsigned int i=0; i<slice_segment_header->num_long_term_sps + slice_segment_header->num_long_term_pics; i++) { + if (slice_segment_header->used_by_curr_pic_lt_flag[i]) { + ++nptc; + } + } + // TODO: for now we assume pps_curr_pic_ref_enabled is 0 + //if (pps_curr_pic_ref_enabled) { + // ++nptc; + //} + + return nptc; +} + +/*---------------------------------------------------------------------- | AP4_HevcSliceSegmentHeader::Parse +---------------------------------------------------------------------*/ AP4_Result @@ -355,23 +383,35 @@ unsigned int slice_sao_chroma_flag = 0; unsigned int slice_deblocking_filter_disabled_flag = 0; unsigned int slice_temporal_mvp_enabled_flag = 0; + const AP4_HevcShortTermRefPicSet* rps = NULL; if (nal_unit_type != AP4_HEVC_NALU_TYPE_IDR_W_RADL && nal_unit_type != AP4_HEVC_NALU_TYPE_IDR_N_LP) { slice_pic_order_cnt_lsb = bits.ReadBits(sps->log2_max_pic_order_cnt_lsb_minus4+4); short_term_ref_pic_set_sps_flag = bits.ReadBit(); if (!short_term_ref_pic_set_sps_flag) { - short_term_ref_pic_set rps; - AP4_Result result = parse_short_term_ref_pic_set(&rps, sps->num_short_term_ref_pic_sets, sps->num_short_term_ref_pic_sets, bits); + AP4_Result result = parse_st_ref_pic_set(&short_term_ref_pic_set, + sps, + sps->num_short_term_ref_pic_sets, + sps->num_short_term_ref_pic_sets, + bits); if (AP4_FAILED(result)) return result; + rps = &short_term_ref_pic_set; } else if (sps->num_short_term_ref_pic_sets > 1) { short_term_ref_pic_set_idx = bits.ReadBits(BitsNeeded(sps->num_short_term_ref_pic_sets)); + rps = &sps->short_term_ref_pic_sets[short_term_ref_pic_set_idx]; } if (sps->long_term_ref_pics_present_flag) { - unsigned int num_long_term_sps = 0; if (sps->num_long_term_ref_pics_sps > 0) { num_long_term_sps = ReadGolomb(bits); } - unsigned int num_long_term_pics = ReadGolomb(bits); + num_long_term_pics = ReadGolomb(bits); + + if (num_long_term_sps > sps->num_long_term_ref_pics_sps) { + return AP4_ERROR_INVALID_FORMAT; + } + if (num_long_term_sps + num_long_term_pics > AP4_HEVC_MAX_LT_REFS) { + return AP4_ERROR_INVALID_FORMAT; + } for (unsigned int i=0; i<num_long_term_sps + num_long_term_pics; i++) { if (i < num_long_term_sps) { if (sps->num_long_term_ref_pics_sps > 1) { @@ -379,7 +419,7 @@ } } else { /* poc_lsb_lt[i] = */ bits.ReadBits(sps->log2_max_pic_order_cnt_lsb_minus4+4); - /* used_by_curr_pic_lt_flag[i] = */ bits.ReadBit(); + used_by_curr_pic_lt_flag[i] = bits.ReadBit(); } unsigned int delta_poc_msb_present_flag /*[i]*/ = bits.ReadBit(); if (delta_poc_msb_present_flag /*[i]*/) { @@ -411,10 +451,24 @@ if (num_ref_idx_l0_active_minus1 > 14 || num_ref_idx_l1_active_minus1 > 14) { return AP4_ERROR_INVALID_FORMAT; } - // TODO: finish parsing this - //if (pps->lists_modification_present_flag && NumPicTotalCurr > 1) { - //ref_pic_lists_modification( ) - //} + unsigned int nptc = NumPicTotalCurr(rps, this); + if (pps->lists_modification_present_flag && nptc > 1) { + // ref_pic_lists_modification + unsigned int ref_pic_list_modification_flag_l0 = bits.ReadBit(); + if (ref_pic_list_modification_flag_l0) { + for (unsigned int i=0; i<=num_ref_idx_l0_active_minus1; i++) { + /* list_entry_l0[i]; */ bits.ReadBits(BitsNeeded(nptc)); + } + } + if (slice_type == AP4_HEVC_SLICE_TYPE_B) { + unsigned int ref_pic_list_modification_flag_l1 = bits.ReadBit(); + if (ref_pic_list_modification_flag_l1) { + for (unsigned int i=0; i<=num_ref_idx_l1_active_minus1; i++) { + /* list_entry_l1[i]; */ bits.ReadBits(BitsNeeded(nptc)); + } + } + } + } if (slice_type == AP4_HEVC_SLICE_TYPE_B) { /* mvd_l1_zero_flag = */ bits.ReadBit(); } @@ -530,9 +584,16 @@ } } + // byte_alignment() + bits.ReadBit(); // alignment_bit_equal_to_one
View file
bento4-1.5.1r620.tar.gz/Source/C++/Codecs/Ap4HevcParser.h -> bento4-1.5.1r621.tar.gz/Source/C++/Codecs/Ap4HevcParser.h
Changed
@@ -94,6 +94,8 @@ const unsigned int AP4_HEVC_PPS_MAX_ID = 63; const unsigned int AP4_HEVC_SPS_MAX_ID = 15; const unsigned int AP4_HEVC_VPS_MAX_ID = 15; +const unsigned int AP4_HEVC_SPS_MAX_RPS = 64; +const unsigned int AP4_HEVC_MAX_LT_REFS = 32; const unsigned int AP4_HEVC_ACCESS_UNIT_FLAG_IS_IDR = 0x01; const unsigned int AP4_HEVC_ACCESS_UNIT_FLAG_IS_IRAP = 0x02; @@ -150,6 +152,18 @@ }; /*---------------------------------------------------------------------- +| AP4_HevcShortTermRefPicSet ++---------------------------------------------------------------------*/ +typedef struct { + unsigned int delta_poc_s0_minus1[16]; + unsigned int delta_poc_s1_minus1[16]; + unsigned int used_by_curr_pic_s0_flag[16]; + unsigned int used_by_curr_pic_s1_flag[16]; + unsigned int num_negative_pics; + unsigned int num_positive_pics; +} AP4_HevcShortTermRefPicSet; + +/*---------------------------------------------------------------------- | AP4_HevcPictureParameterSet +---------------------------------------------------------------------*/ struct AP4_HevcPictureParameterSet { @@ -251,6 +265,8 @@ unsigned int num_long_term_ref_pics_sps; unsigned int sps_temporal_mvp_enabled_flag; unsigned int strong_intra_smoothing_enabled_flag; + + AP4_HevcShortTermRefPicSet short_term_ref_pic_sets[AP4_HEVC_SPS_MAX_RPS]; }; /*---------------------------------------------------------------------- @@ -308,6 +324,11 @@ unsigned int short_term_ref_pic_set_idx; unsigned int num_entry_point_offsets; unsigned int offset_len_minus1; + unsigned int num_long_term_sps; + unsigned int num_long_term_pics; + + AP4_HevcShortTermRefPicSet short_term_ref_pic_set; + unsigned int used_by_curr_pic_lt_flag[AP4_HEVC_MAX_LT_REFS]; }; /*----------------------------------------------------------------------
View file
bento4-1.5.1r620.tar.gz/Source/C++/Core/Ap4CommonEncryption.cpp -> bento4-1.5.1r621.tar.gz/Source/C++/Core/Ap4CommonEncryption.cpp
Changed
@@ -412,9 +412,8 @@ } // leave the slice header in the clear, including the NAL type - //unsigned int cleartext_size = m_NaluLengthSize+2+(slice_header.size+7)/8; - // HACK: add one byte when the slice header is a multiple of 8 bits, to match what Apple is doing - unsigned int header_size = 1+(slice_header.size/8); + // NOTE: the slice header is always a multiple of 8 bits because of byte_alignment() + unsigned int header_size = slice_header.size/8; unsigned int cleartext_size = m_NaluLengthSize+2+header_size; // unsigned int encrypted_size = nalu_size-cleartext_size;
View file
bento4-1.5.1r620.tar.gz/Source/C++/Core/Ap4LinearReader.cpp -> bento4-1.5.1r621.tar.gz/Source/C++/Core/Ap4LinearReader.cpp
Changed
@@ -46,6 +46,7 @@ m_Movie(movie), m_Fragment(NULL), m_FragmentStream(fragment_stream), + m_CurrentFragmentPosition(0), m_NextFragmentPosition(0), m_BufferFullness(0), m_BufferFullnessPeak(0), @@ -55,7 +56,8 @@ m_HasFragments = movie.HasFragments(); if (fragment_stream) { fragment_stream->AddReference(); - fragment_stream->Tell(m_NextFragmentPosition); + fragment_stream->Tell(m_CurrentFragmentPosition); + m_NextFragmentPosition = m_CurrentFragmentPosition; } } @@ -339,6 +341,7 @@ // go the the start of the next fragment result = m_FragmentStream->Seek(m_NextFragmentPosition); if (AP4_FAILED(result)) return result; + m_CurrentFragmentPosition = m_NextFragmentPosition; // read atoms until we find a moof assert(m_HasFragments); @@ -346,11 +349,16 @@ AP4_DefaultAtomFactory atom_factory; do { AP4_Atom* atom = NULL; + AP4_Position last_position = 0; + m_FragmentStream->Tell(last_position); result = atom_factory.CreateAtomFromStream(*m_FragmentStream, atom); if (AP4_SUCCEEDED(result)) { if (atom->GetType() == AP4_ATOM_TYPE_MOOF) { AP4_ContainerAtom* moof = AP4_DYNAMIC_CAST(AP4_ContainerAtom, atom); if (moof) { + // remember where the moof started + m_CurrentFragmentPosition = last_position; + // remember where we are in the stream AP4_Position position = 0; m_FragmentStream->Tell(position);
View file
bento4-1.5.1r620.tar.gz/Source/C++/Core/Ap4LinearReader.h -> bento4-1.5.1r621.tar.gz/Source/C++/Core/Ap4LinearReader.h
Changed
@@ -90,6 +90,7 @@ // accessors AP4_Size GetBufferFullness() { return m_BufferFullness; } + AP4_Position GetCurrentFragmentPosition() { return m_CurrentFragmentPosition; } // classes class SampleReader { @@ -178,6 +179,7 @@ bool m_HasFragments; AP4_MovieFragment* m_Fragment; AP4_ByteStream* m_FragmentStream; + AP4_Position m_CurrentFragmentPosition; AP4_Position m_NextFragmentPosition; AP4_Array<Tracker*> m_Trackers; AP4_Size m_BufferFullness;
View file
bento4-1.5.1r620.tar.gz/Source/Python/utils/mp4-dash.py -> bento4-1.5.1r621.tar.gz/Source/Python/utils/mp4-dash.py
Changed
@@ -28,7 +28,7 @@ # setup main options VERSION = "1.8.0" -SDK_REVISION = '620' +SDK_REVISION = '621' SCRIPT_PATH = path.abspath(path.dirname(__file__)) sys.path += [SCRIPT_PATH] @@ -571,27 +571,70 @@ ############################################# -def OutputHlsTrack(options, track, media_subdir, media_playlist_name, media_file_name): +def ComputeHlsWidevineKeyLine(options, track): + try: + pairs = options.widevine_header.split('#') + fields = {} + for pair in pairs: + name, value = pair.split(':', 1) + fields[name] = value + except: + raise Exception('invalid syntax for --widevine-header option') + + if 'content_id' not in fields: + fields['content_id'] = '*' + if 'kid' not in fields: + fields['kid'] = track.key_info['kid'] + + json_param = '{ "provider": "%(provider)s", "content_id": "%(content_id)s", "key_ids": ["%(kid)s"] }' % fields + key_line = 'URI="data:text/plain;base64,'+json_param.encode('base64').replace('\n','')+'",KEYFORMAT="com.widevine",KEYFORMATVERSIONS="1",IV=0x'+track.key_info['iv'] + + return key_line + +############################################# +def ComputeHlsFairplayKeyLine(options): + return 'URI="'+options.fairplay_key_uri+'",KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"' + +############################################# +def OutputHlsCommon(options, track, media_subdir, playlist_name, media_file_name): hls_target_duration = math.ceil(max(track.segment_durations)) - media_playlist_file = open(path.join(options.output_dir, media_subdir, media_playlist_name), 'w+') - media_playlist_file.write('#EXTM3U\r\n') - media_playlist_file.write('# Created with Bento4 mp4-dash.py, VERSION=' + VERSION + '-' + SDK_REVISION+'\r\n') - media_playlist_file.write('#\r\n') - media_playlist_file.write('#EXT-X-VERSION:6\r\n') - media_playlist_file.write('#EXT-X-PLAYLIST-TYPE:VOD\r\n') - media_playlist_file.write('#EXT-X-INDEPENDENT-SEGMENTS\r\n') - media_playlist_file.write('#EXT-X-TARGETDURATION:%d\r\n' % (hls_target_duration)) - media_playlist_file.write('#EXT-X-MEDIA-SEQUENCE:0\r\n') - if options.on_demand or not options.split: - init_segment_size = track.parent.init_segment.position + track.parent.init_segment.size - media_playlist_file.write('#EXT-X-MAP:URI="%s",BYTERANGE="%d@0"\r\n' % (media_file_name, init_segment_size)) + playlist_file = open(path.join(options.output_dir, media_subdir, playlist_name), 'w+') + playlist_file.write('#EXTM3U\r\n') + playlist_file.write('# Created with Bento4 mp4-dash.py, VERSION=' + VERSION + '-' + SDK_REVISION+'\r\n') + playlist_file.write('#\r\n') + playlist_file.write('#EXT-X-VERSION:6\r\n') + playlist_file.write('#EXT-X-PLAYLIST-TYPE:VOD\r\n') + playlist_file.write('#EXT-X-INDEPENDENT-SEGMENTS\r\n') + playlist_file.write('#EXT-X-TARGETDURATION:%d\r\n' % (hls_target_duration)) + playlist_file.write('#EXT-X-MEDIA-SEQUENCE:0\r\n') + if options.split: + playlist_file.write('#EXT-X-MAP:URI="%s"\r\n' % (SPLIT_INIT_SEGMENT_NAME)) else: - media_playlist_file.write('#EXT-X-MAP:URI="%s"\r\n' % (SPLIT_INIT_SEGMENT_NAME)) - segment_pattern = SEGMENT_PATTERN.replace('ll','') + init_segment_size = track.parent.init_segment.position + track.parent.init_segment.size + playlist_file.write('#EXT-X-MAP:URI="%s",BYTERANGE="%d@0"\r\n' % (media_file_name, init_segment_size)) if options.encryption_key: - media_playlist_file.write('#EXT-X-KEY:METHOD=SAMPLE-AES,URI="'+options.hls_key_url+'",IV=0x'+track.key_info['iv']+'\r\n') + key_lines = [] + if options.fairplay_key_uri: + key_lines.append(ComputeHlsFairplayKeyLine(options)) + if options.widevine_header: + key_lines.append(ComputeHlsWidevineKeyLine(options, track)) + + if len(key_lines) == 0: + key_lines.append('URI="'+options.hls_key_url+'",IV=0x'+track.key_info['iv']) + + for key_line in key_lines: + playlist_file.write('#EXT-X-KEY:METHOD=SAMPLE-AES,'+key_line+'\r\n') + + return playlist_file + +############################################# +def OutputHlsTrack(options, track, media_subdir, media_playlist_name, media_file_name): + media_playlist_file = OutputHlsCommon(options, track, media_subdir, media_playlist_name, media_file_name) + + if options.split: + segment_pattern = SEGMENT_PATTERN.replace('ll','') for i in range(len(track.segment_durations)): media_playlist_file.write('#EXTINF:%f,\r\n' % (track.segment_durations[i])) @@ -608,6 +651,47 @@ media_playlist_file.write('#EXT-X-ENDLIST\r\n') ############################################# +def OutputHlsIframeIndex(options, track, media_subdir, iframes_playlist_name, media_file_name): + index_playlist_file = OutputHlsCommon(options, track, media_subdir, iframes_playlist_name, media_file_name) + + index_playlist_file.write('#EXT-X-I-FRAMES-ONLY\r\n') + + if not options.split: + # get the I-frame index for a single file + json_index = Mp4IframIndex(options, path.join(options.output_dir, media_file_name)) + index = json.loads(json_index) + for i in range(len(track.segment_durations)): + if i < len(index): + index_entry = index[i] + index_playlist_file.write('#EXTINF:%f,\r\n' % (track.segment_durations[i])) + fragment_start = int(index_entry['fragmentStart']) + iframe_offset = int(index_entry['offset']) + iframe_size = int(index_entry['size']) + iframe_range_size = iframe_size + (iframe_offset-fragment_start) + index_playlist_file.write('#EXT-X-BYTERANGE:%d@%d\r\n' % (iframe_range_size, fragment_start)) + index_playlist_file.write(media_file_name+'\r\n') + else: + segment_pattern = SEGMENT_PATTERN.replace('ll','') + for i in range(len(track.segment_durations)): + fragment_basename = segment_pattern % (i+1) + fragment_file = path.join(options.output_dir, media_subdir, fragment_basename) + init_file = path.join(options.output_dir, media_subdir, options.init_segment) + if not path.exists(fragment_file): + break + json_index = Mp4IframIndex(options, fragment_file, fragments_info=init_file) + index = json.loads(json_index) + if len(index) < 1: + break + iframe_size = int(index[0]['size']) + iframe_offset = int(index[0]['offset']) + iframe_range_size = iframe_size + iframe_offset + index_playlist_file.write('#EXTINF:%f,\r\n' % (track.segment_durations[i])) + index_playlist_file.write('#EXT-X-BYTERANGE:%d@0\r\n' % (iframe_range_size)) + index_playlist_file.write(fragment_basename+'\r\n') + + index_playlist_file.write('#EXT-X-ENDLIST\r\n') + +############################################# def OutputHls(options, set_attributes, audio_sets, video_sets, subtitles_sets, subtitles_files): all_audio_tracks = sum(audio_sets.values(), []) all_video_tracks = sum(video_sets.values(), []) @@ -670,15 +754,17 @@ master_playlist_file.write('# Video\r\n') for video_track in all_video_tracks: if options.on_demand or not options.split: - media_subdir = '' - media_file_name = video_track.parent.media_name - media_playlist_name = video_track.representation_id+".m3u8" - media_playlist_path = media_playlist_name + media_subdir = '' + media_file_name = video_track.parent.media_name + media_playlist_name = video_track.representation_id+".m3u8" + media_playlist_path = media_playlist_name + iframes_playlist_name = video_track.representation_id+"_iframes.m3u8" else: - media_subdir = video_track.representation_id - media_file_name = '' - media_playlist_name = options.hls_media_playlist_name - media_playlist_path = media_subdir+'/'+media_playlist_name + media_subdir = video_track.representation_id + media_file_name = '' + media_playlist_name = options.hls_media_playlist_name + media_playlist_path = media_subdir+'/'+media_playlist_name + iframes_playlist_name = options.hls_iframes_playlist_name if len(audio_groups): # one entry per audio group @@ -703,6 +789,17 @@ master_playlist_file.write(media_playlist_path+'\r\n') OutputHlsTrack(options, video_track, media_subdir, media_playlist_name, media_file_name) + OutputHlsIframeIndex(options, video_track, media_subdir, iframes_playlist_name, media_file_name) + + master_playlist_file.write('\r\n# I-Frame Playlists\r\n') + for video_track in all_video_tracks: + master_playlist_file.write('#EXT-X-I-FRAME-STREAM-INF:AVERAGE-BANDWIDTH=%d,BANDWIDTH=%d,CODECS="%s",RESOLUTION=%dx%d,URI="%s"\r\n' % ( + video_track.average_segment_bitrate, + video_track.max_segment_bitrate, + video_track.codec, + video_track.width, + video_track.height, + media_playlist_path)) if len(subtitles_files): master_playlist_file.write('# Subtitles\r\n') @@ -1244,6 +1341,8 @@ "The <primetime-data> argument can be either: " + "(1) the character '@' followed by the name of a file containing the Primetime Metadata to use, or " "(2) the character '#' followed by the Primetime Metadata encoded in Base64") + parser.add_option('', "--fairplay-key-uri", dest="fairplay_key_uri", + help="Specify the key URI to use for FairPlay Streaming key delivery (only valid with --hls option)") parser.add_option('', "--exec-dir", metavar="<exec_dir>", dest="exec_dir", default=default_exec_dir, help="Directory where the Bento4 executables are located") (options, args) = parser.parse_args() @@ -1337,10 +1436,16 @@ if options.widevine_header:
View file
bento4-1.5.1r620.tar.gz/Source/Python/utils/mp4-hls.py -> bento4-1.5.1r621.tar.gz/Source/Python/utils/mp4-hls.py
Changed
@@ -27,7 +27,7 @@ # setup main options VERSION = "1.1.0" -SDK_REVISION = '620' +SDK_REVISION = '621' SCRIPT_PATH = path.abspath(path.dirname(__file__)) sys.path += [SCRIPT_PATH]
View file
bento4-1.5.1r620.tar.gz/Source/Python/utils/mp4utils.py -> bento4-1.5.1r621.tar.gz/Source/Python/utils/mp4utils.py
Changed
@@ -302,6 +302,9 @@ def Mp42Hls(options, input_filename, *args, **kwargs): return Bento4Command(options, 'mp42hls', input_filename, *args, **kwargs) +def Mp4IframIndex(options, input_filename, *args, **kwargs): + return Bento4Command(options, 'mp4iframeindex', input_filename, *args, **kwargs) + class Mp4Atom: def __init__(self, type, size, position): self.type = type
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.