From aa00b31ddbcb9c8a2233bd95f1d577661465de0d Mon Sep 17 00:00:00 2001 From: Thulinma Date: Wed, 18 Feb 2015 02:55:21 +0100 Subject: [PATCH] Changes for new ESDS implementation in library. --- src/input/input_flv.cpp | 2 +- src/output/output_progressive_mp4.cpp | 36 +-------------------------- 2 files changed, 2 insertions(+), 36 deletions(-) diff --git a/src/input/input_flv.cpp b/src/input/input_flv.cpp index dc22473d..e029ee46 100644 --- a/src/input/input_flv.cpp +++ b/src/input/input_flv.cpp @@ -103,7 +103,7 @@ namespace Mist { } } if (FLV::Parse_Error){ - std::cerr << FLV::Error_Str << std::endl; + FAIL_MSG("FLV error: %s", FLV::Error_Str.c_str()); thisPack.null(); lastPack.null(); return; diff --git a/src/output/output_progressive_mp4.cpp b/src/output/output_progressive_mp4.cpp index fbec3a6b..9c986e23 100644 --- a/src/output/output_progressive_mp4.cpp +++ b/src/output/output_progressive_mp4.cpp @@ -118,41 +118,7 @@ namespace Mist { ase.setSampleRate(thisTrack.rate); ase.setChannelCount(thisTrack.channels); ase.setSampleSize(thisTrack.size); - //MP4::ESDS esdsBox(thisTrack.init, thisTrack.bps); - MP4::ESDS esdsBox; - - //outputting these values first, so malloc isn't called as often. - if (thisTrack.codec == "MP3"){ - esdsBox.setESHeaderStartCodes("\002"); - esdsBox.setConfigDescriptorTypeLength(1); - esdsBox.setSLConfigExtendedDescriptorTypeTag(0); - esdsBox.setSLDescriptorTypeLength(0); - esdsBox.setESDescriptorTypeLength(27); - esdsBox.setSLConfigDescriptorTypeTag(0); - esdsBox.setDecoderDescriptorTypeTag(0x06); - esdsBox.setSLValue(0); - //esdsBox.setBufferSize(0); - esdsBox.setDecoderConfigDescriptorTypeLength(13); - esdsBox.setByteObjectTypeID(0x6b); - }else{ - //AAC - esdsBox.setESHeaderStartCodes(thisTrack.init); - esdsBox.setConfigDescriptorTypeLength(thisTrack.init.size()); - esdsBox.setSLConfigExtendedDescriptorTypeTag(0x808080); - esdsBox.setSLDescriptorTypeLength(1); - esdsBox.setESDescriptorTypeLength(32+thisTrack.init.size()); - esdsBox.setSLConfigDescriptorTypeTag(0x6); - esdsBox.setSLValue(2); - esdsBox.setDecoderConfigDescriptorTypeLength(18 + thisTrack.init.size()); - esdsBox.setByteObjectTypeID(0x40); - } - esdsBox.setESID(2); - esdsBox.setStreamPriority(0); - esdsBox.setStreamType(5); - esdsBox.setReservedFlag(1); - esdsBox.setMaximumBitRate(10000000); - esdsBox.setAverageBitRate(thisTrack.bps * 8); - esdsBox.setBufferSize(1250000); + MP4::ESDS esdsBox(""); ase.setCodecBox(esdsBox); stsdBox.setEntry(ase,0); }