diff options
| author | jhurst <jhurst@cinecert.com> | 2008-08-15 22:47:07 +0000 |
|---|---|---|
| committer | jhurst <> | 2008-08-15 22:47:07 +0000 |
| commit | a6d7c84d3734a21dbe7112a3a83b791ec211a315 (patch) | |
| tree | 2e10284ae3b386cf0cbf3df7f8924d7e9a78a4b5 /src/AS_DCP_MXF.cpp | |
| parent | 4e404673b69a7e2772579788a0b55c7037cee314 (diff) | |
removed extraneous assert(), added multi-/ test to path-test.cpp
Diffstat (limited to 'src/AS_DCP_MXF.cpp')
| -rwxr-xr-x | src/AS_DCP_MXF.cpp | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/src/AS_DCP_MXF.cpp b/src/AS_DCP_MXF.cpp index 334d253..6b30da9 100755 --- a/src/AS_DCP_MXF.cpp +++ b/src/AS_DCP_MXF.cpp @@ -228,16 +228,27 @@ ASDCP::RawEssenceType(const char* filename, EssenceType_t& type) while ( p[i] == 0 ) i++; if ( i > 1 && p[i] == 1 && (p[i+1] == ASDCP::MPEG2::SEQ_START || p[i+1] == ASDCP::MPEG2::PIC_START) ) - type = ESS_MPEG2_VES; - + { + type = ESS_MPEG2_VES; + } else if ( ASDCP_SUCCESS(WavHeader.ReadFromBuffer(p, read_count, &data_offset)) ) - type = ESS_PCM_24b_48k; - + { + switch ( WavHeader.samplespersec ) + { + case 48000: type = ESS_PCM_24b_48k; break; + case 96000: type = ESS_PCM_24b_96k; break; + default: + return RESULT_FORMAT; + } + } else if ( ASDCP_SUCCESS(AIFFHeader.ReadFromBuffer(p, read_count, &data_offset)) ) - type = ESS_PCM_24b_48k; - + { + type = ESS_PCM_24b_48k; + } else if ( Kumu::StringIsXML((const char*)p, FB.Size()) ) - type = ESS_TIMED_TEXT; + { + type = ESS_TIMED_TEXT; + } } } else if ( Kumu::PathIsDirectory(filename) ) |
