diff options
author | Aleksoid <aleksoid@users.sourceforge.net> | 2010-08-20 02:29:43 +0400 |
---|---|---|
committer | Aleksoid <aleksoid@users.sourceforge.net> | 2010-08-20 02:29:43 +0400 |
commit | d7b8dffbcc20a1901d9ee36d35fde681e6d84db2 (patch) | |
tree | ee712f1dc71fd8140d131798d93f8846ee2ce085 /src/filters/parser/MP4Splitter | |
parent | fe385e117952ba595e0a761b5921beb5f65de741 (diff) |
Change : rewrite code for 'raw ','twos','sowt';
Add : support for 8-bit 'twos';
Add : support for 'in32', 'fl32';
Fix : bug bit depth of sound in Bento4;
Thanks to V0lt for patch.
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@2278 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/parser/MP4Splitter')
3 files changed, 7 insertions, 1 deletions
diff --git a/src/filters/parser/MP4Splitter/AP4/Source/Core/Ap4Atom.h b/src/filters/parser/MP4Splitter/AP4/Source/Core/Ap4Atom.h index fba2fa91b..b661f2a43 100644 --- a/src/filters/parser/MP4Splitter/AP4/Source/Core/Ap4Atom.h +++ b/src/filters/parser/MP4Splitter/AP4/Source/Core/Ap4Atom.h @@ -253,6 +253,8 @@ const AP4_Atom::Type AP4_ATOM_TYPE_QDMC = AP4_ATOM_TYPE('Q','D','M','C'); const AP4_Atom::Type AP4_ATOM_TYPE_QDM2 = AP4_ATOM_TYPE('Q','D','M','2');
const AP4_Atom::Type AP4_ATOM_TYPE_TWOS = AP4_ATOM_TYPE('t','w','o','s');
const AP4_Atom::Type AP4_ATOM_TYPE_SOWT = AP4_ATOM_TYPE('s','o','w','t');
+const AP4_Atom::Type AP4_ATOM_TYPE_IN32 = AP4_ATOM_TYPE('i','n','3','2');
+const AP4_Atom::Type AP4_ATOM_TYPE_FL32 = AP4_ATOM_TYPE('f','l','3','2');
const AP4_Atom::Type AP4_ATOM_TYPE_CHPL = AP4_ATOM_TYPE('c','h','p','l');
const AP4_Atom::Type AP4_ATOM_TYPE_NAM = AP4_ATOM_TYPE(169,'n','a','m');
const AP4_Atom::Type AP4_ATOM_TYPE_ART = AP4_ATOM_TYPE(169,'A','R','T');
diff --git a/src/filters/parser/MP4Splitter/AP4/Source/Core/Ap4AtomFactory.cpp b/src/filters/parser/MP4Splitter/AP4/Source/Core/Ap4AtomFactory.cpp index 6b2927879..99d74643d 100644 --- a/src/filters/parser/MP4Splitter/AP4/Source/Core/Ap4AtomFactory.cpp +++ b/src/filters/parser/MP4Splitter/AP4/Source/Core/Ap4AtomFactory.cpp @@ -405,6 +405,8 @@ AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream& stream, case AP4_ATOM_TYPE_QDM2:
case AP4_ATOM_TYPE_TWOS:
case AP4_ATOM_TYPE_SOWT:
+ case AP4_ATOM_TYPE_IN32:
+ case AP4_ATOM_TYPE_FL32:
case AP4_ATOM_TYPE_RAW:
case AP4_ATOM_TYPE_ULAW:
atom = DNew AP4_AudioSampleEntry(type, size, stream, *this);
diff --git a/src/filters/parser/MP4Splitter/AP4/Source/Core/Ap4SampleEntry.cpp b/src/filters/parser/MP4Splitter/AP4/Source/Core/Ap4SampleEntry.cpp index 48bb52879..85d4a88dd 100644 --- a/src/filters/parser/MP4Splitter/AP4/Source/Core/Ap4SampleEntry.cpp +++ b/src/filters/parser/MP4Splitter/AP4/Source/Core/Ap4SampleEntry.cpp @@ -384,7 +384,9 @@ AP4_AudioSampleEntry::ReadFields(AP4_ByteStream& stream) if(m_DescriptionVersion == 1)
{
stream.ReadUI32(m_SamplesPerPacket);
- stream.ReadUI32(m_BytesPerPacket);
+ stream.ReadUI32(m_BytesPerPacket);
+ //QuickTime File Format Specification->Sound Sample Description (Version 1)->Bytes per packet
+ if (m_SampleSize == 16) {m_SampleSize = m_BytesPerPacket * 8;}
stream.ReadUI32(m_BytesPerFrame);
stream.ReadUI32(m_BytesPerSample);
}
|