Apply all necessary TechSmith customizations to mp4v2#2
Open
dchengTSC wants to merge 7 commits into
Open
Conversation
Add support for reading VP9 video tracks in MP4 files: - Add MP4Vp09Atom class that properly parses the vp09 sample entry, including its child atoms (vpcC, btrt, colr, pasp) - Register vp09 in the atom factory and as an expected stsd child Add MP4GetTrackAtomData/MP4FreeTrackAtomData API: - Allows reading the raw data of any track atom by path - Useful for extracting codec configuration boxes (e.g. vpcC, avcC) that don't have dedicated accessor functions - Memory is allocated by the library and freed via MP4FreeTrackAtomData to avoid CRT mismatch issues on Windows
Add support for creating and reading TSC2 video tracks in MP4 files: - Add MP4Tsc2Atom class that defines the tsc2 sample entry structure (dataReferenceIndex, width, height, compressorName, esds child atom) - Register tsc2 in the atom factory and as an expected stsd child - Add MP4File::AddTSC2VideoTrack() method for creating TSC2 tracks - Add MP4AddTSC2VideoTrack() public C API TSC2 is TechSmith's proprietary screen capture codec used in TREC (TechSmith Recording) container files which are MP4-based.
Add an optional callback parameter to MP4Read() that allows callers to control which atoms are fully parsed during file reading. When the callback returns false for a given atom type, the atom's properties and children are skipped (the atom is still recorded in the tree but its content is not read). This is useful for error recovery: if a file fails to parse due to a malformed atom (e.g. corrupted udta or text atoms), the caller can retry with a callback that skips problematic atoms, allowing the rest of the file structure to be read successfully. API changes: - Add MP4ShouldParseAtomCallback typedef in file.h - MP4Read() gains an optional second parameter (default NULL) - MP4File stores and exposes the callback via get/set methods - MP4Atom::Read() checks the callback before parsing
Add MP4PNGAtom class for properly parsing 'png ' sample entry atoms found in QuickTime MOV files that use PNG-encoded video frames. Without this registration, PNG atoms are treated as unknown and their width/height properties are not directly accessible (requiring fallback to tkhd dimensions). With this change, the stsd.png .width and stsd.png .height properties are properly parsed. Changes: - Add MP4PNGAtom class in atoms.h with standard video sample entry layout (dataReferenceIndex, width, height, compressorName) - Register 'png ' in the atom factory - Add as expected stsd child atom - esds child is optional (unlike TSC2) since PNG MOVs may not have it
Add missing C API functions needed by consuming code: MP4GetSampleFileOffset(): - Returns the byte offset within the file of a given sample - The underlying MP4Track::GetSampleFileOffset() already existed but was protected; moved to public and added MP4File wrapper + C API - Used by TRECBackupWriter and TRECMP4TrackReader MP4FreeTrackName(): - Frees memory allocated by MP4GetTrackName() - Needed on Windows where CRT heap mismatch between DLL and client can cause crashes if client calls free() directly - Wrapper around MP4Free()
so we don't end up with library names like libmp4v2.2.dylib
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.