diff options
author | Aleksoid <aleksoid@users.sourceforge.net> | 2011-05-21 10:40:38 +0400 |
---|---|---|
committer | Aleksoid <aleksoid@users.sourceforge.net> | 2011-05-21 10:40:38 +0400 |
commit | d1bf9ac678b5abb1dccd0db933761ab9d7fa9a51 (patch) | |
tree | 204d2901945ceda199026ee04bfe16c9ebc42f74 /src/filters/parser/MP4Splitter/AP4 | |
parent | dcb02c95613ecf539ba2cd61a87714b01869dfe7 (diff) |
Change/fix : MP4Splitter, true way to detect & parse E-AC3 stream;
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@3126 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/parser/MP4Splitter/AP4')
-rw-r--r-- | src/filters/parser/MP4Splitter/AP4/Core/Ap4SampleEntry.cpp | 51 | ||||
-rw-r--r-- | src/filters/parser/MP4Splitter/AP4/Core/Ap4SampleEntry.h | 5 |
2 files changed, 4 insertions, 52 deletions
diff --git a/src/filters/parser/MP4Splitter/AP4/Core/Ap4SampleEntry.cpp b/src/filters/parser/MP4Splitter/AP4/Core/Ap4SampleEntry.cpp index e8e3ed516..957b9cc3c 100644 --- a/src/filters/parser/MP4Splitter/AP4/Core/Ap4SampleEntry.cpp +++ b/src/filters/parser/MP4Splitter/AP4/Core/Ap4SampleEntry.cpp @@ -36,6 +36,7 @@ #include "Ap4SampleDescription.h"
#include "Ap4FtabAtom.h"
#include "Ap4EndaAtom.h"
+
/*----------------------------------------------------------------------
| AP4_SampleEntry::AP4_SampleEntry
+---------------------------------------------------------------------*/
@@ -1248,57 +1249,11 @@ AP4_AC3SampleEntry::GetFieldsSize() }
/*----------------------------------------------------------------------
-| AP4_AC3SampleEntry::AP4_AC3SampleEntry
+| AP4_EAC3SampleEntry::AP4_EAC3SampleEntry
+---------------------------------------------------------------------*/
AP4_EAC3SampleEntry::AP4_EAC3SampleEntry(AP4_Size size,
AP4_ByteStream& stream,
AP4_AtomFactory& atom_factory) :
- AP4_AudioSampleEntry(AP4_ATOM_TYPE_EAC3, size)
+ AP4_AudioSampleEntry(AP4_ATOM_TYPE_EAC3, size, stream, atom_factory)
{
-
- // read fields
- ReadFields(stream);
-
- AP4_Size fields_size = GetFieldsSize();
-
- // read children atoms (ex: esds and maybe others)
- ReadChildren(atom_factory, stream, size-AP4_ATOM_HEADER_SIZE-fields_size);
}
-
-/*----------------------------------------------------------------------
-| AP4_AC3SampleEntry::ReadFields
-+---------------------------------------------------------------------*/
-AP4_Result
-AP4_EAC3SampleEntry::ReadFields(AP4_ByteStream& stream)
-{
-
- AP4_AudioSampleEntry::ReadFields(stream);
-
- // SampleSize field from AudioSampleEntry shall be ignored
- m_SampleSize = 0;
-
- // AC3SpecificBox
-
- // BoxHeader.Size, BoxHeader.Type
- char junk[8];
- stream.Read(junk, 8);
-
- AP4_UI32 data;
- stream.ReadUI24(data);
-
- // fscod
- m_SampleRate = freq[(data>>22) & 0x3];
- m_SampleRate <<= 16;
-
- // acmod
- m_ChannelCount = channels[(data>>17) & 0x7] + ((data>>18) & 0x1);
-
- return AP4_SUCCESS;
-}
-
-AP4_Size
-AP4_EAC3SampleEntry::GetFieldsSize()
-{
- return AP4_AudioSampleEntry::GetFieldsSize() + 11;
-}
-
diff --git a/src/filters/parser/MP4Splitter/AP4/Core/Ap4SampleEntry.h b/src/filters/parser/MP4Splitter/AP4/Core/Ap4SampleEntry.h index 61dbda53e..9e8cfe732 100644 --- a/src/filters/parser/MP4Splitter/AP4/Core/Ap4SampleEntry.h +++ b/src/filters/parser/MP4Splitter/AP4/Core/Ap4SampleEntry.h @@ -390,7 +390,7 @@ class AP4_AC3SampleEntry : public AP4_AudioSampleEntry };
/*----------------------------------------------------------------------
-| AP4_AC3SampleEntry
+| AP4_EAC3SampleEntry
+---------------------------------------------------------------------*/
class AP4_EAC3SampleEntry : public AP4_AudioSampleEntry
{
@@ -399,9 +399,6 @@ class AP4_EAC3SampleEntry : public AP4_AudioSampleEntry AP4_EAC3SampleEntry(AP4_Size size,
AP4_ByteStream& stream,
AP4_AtomFactory& atom_factory);
-
- AP4_Result ReadFields(AP4_ByteStream& stream);
- AP4_Size GetFieldsSize();
};
#endif // _AP4_SAMPLE_ENTRY_H_
|