[asterisk-scf-commits] asterisk-scf/integration/file_media_service.git branch "initial_development" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Jan 4 12:23:40 CST 2012


branch "initial_development" has been updated
       via  7c092d13dd8d5a9c7b315d2fff81ce5df1dcbec2 (commit)
      from  3d42016cb464898fa770a0c1f433bfccfae6794c (commit)

Summary of changes:
 src/MatroskaDefines.h                 |   11 -----------
 src/MatroskaUtil.cpp                  |   11 ++++++++++-
 test/UnitTest_ContainerRepository.cpp |    2 +-
 3 files changed, 11 insertions(+), 13 deletions(-)


- Log -----------------------------------------------------------------
commit 7c092d13dd8d5a9c7b315d2fff81ce5df1dcbec2
Author: Brent Eagles <beagles at digium.com>
Date:   Wed Jan 4 14:52:51 2012 -0330

    - fix bug in test suite
    - add missing codec id to addTrack

diff --git a/src/MatroskaDefines.h b/src/MatroskaDefines.h
index 12f1f6a..4392e0b 100644
--- a/src/MatroskaDefines.h
+++ b/src/MatroskaDefines.h
@@ -17,13 +17,6 @@
 
 #include <string>
 
-namespace AsteriskSCF
-{
-namespace FileMediaService
-{
-namespace Implementation
-{
-
 const std::string MatroskaAudioAACv2Main = "A_AAC/MPEG2/MAIN";
 const std::string MatroskaAudioAACv2LC   = "A_AAC/MPEG2/LC";
 const std::string MatroskaAudioAACv2SSR  = "A_AAC/MPEG2/SSR";
@@ -86,7 +79,3 @@ const std::string MatroskaSubtitleKATE      = "S_KATE";
 const std::string MatroskaSubtitleHDMVvPGS  = "S_HDMV/PGS";
 
 const std::string MatroskaBlobVOB    = "B_VOBBTN";
-
-} /* End of namespace Implementation */
-} /* End of namespace FileMediaService */
-} /* End of namespace AsteriskSCF */
diff --git a/src/MatroskaUtil.cpp b/src/MatroskaUtil.cpp
index cb33b27..a9ce084 100644
--- a/src/MatroskaUtil.cpp
+++ b/src/MatroskaUtil.cpp
@@ -34,6 +34,8 @@ extern "C"
 #include <ebml/ebml.h>
 #include <matroska/matroska_sem.h>
 
+#include "MatroskaDefines.h"
+
 //
 // The initialization process includes "registering" these with the current
 // runtime.
@@ -1076,7 +1078,10 @@ uint16_t ContainerWriter::addTrack(const AsteriskSCF::Media::V1::FormatPtr& form
 
             el = EBML_MasterFindFirstElt((ebml_master*)newTrack, &MATROSKA_ContextName, true, false);
             EBML_StringSetValue((ebml_string*)el, id.c_str());
-            
+
+            el = EBML_MasterFindFirstElt((ebml_master*)newTrack, &MATROSKA_ContextCodecID, true, false);
+            EBML_StringSetValue((ebml_string*)el, MatroskaAudioPCM.c_str());
+
             return static_cast<uint16_t>(mTracks.size());
         }
     }
@@ -1180,8 +1185,12 @@ void ContainerWriter::addFrames(uint16_t trackNumber, const AsteriskSCF::Media::
         block.group = EBML_MasterAddElt((ebml_master*)mCurrentCluster, &MATROSKA_ContextBlockGroup, false);
         block.block = (matroska_block*)EBML_MasterAddElt((ebml_master*)block.group, &MATROSKA_ContextBlock, false);
         MATROSKA_LinkBlockWriteTrack(block.block, (ebml_master*)track);
+        MATROSKA_LinkBlockWriteSegmentInfo(block.block, mSections.segmentInformation);
         mCurrentBlocks[trackNumber-1] = block;
         MATROSKA_BlockSetTimecode(block.block, timecode, mCurrentTimecode);
+        ArrayInit(&(block.block->Data));
+        ArrayInit(&(block.block->Durations));
+        ArrayInit(&(block.block->SizeList));
     }
 
     //
diff --git a/test/UnitTest_ContainerRepository.cpp b/test/UnitTest_ContainerRepository.cpp
index a2fe711..ca5bfd8 100644
--- a/test/UnitTest_ContainerRepository.cpp
+++ b/test/UnitTest_ContainerRepository.cpp
@@ -258,7 +258,7 @@ public:
                 data->seqno = ++counter;
                 data->mediaFormat = format;
                 ShortSeqPayloadPtr p = new ShortSeqPayload;
-                p->payload.resize(frame.size * sizeof(frameDataBuf[0])/8);
+                p->payload.resize(frame.size / sizeof(frameDataBuf[0]));
                 memcpy(&(p->payload[0]), frame.buf, frame.size);
                 data->payload = p;
                 frames.push_back(data);

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/file_media_service.git



More information about the asterisk-scf-commits mailing list