FishSkeleton.cpp

Go to the documentation of this file.
00001 //===========================================================================
00002 //Copyright (C) 2003, 2004 Zentaro Kavanagh
00003 //
00004 //Copyright (C) 2004 Commonwealth Scientific and Industrial Research
00005 //   Organisation (CSIRO) Australia
00006 //
00007 //Redistribution and use in source and binary forms, with or without
00008 //modification, are permitted provided that the following conditions
00009 //are met:
00010 //
00011 //- Redistributions of source code must retain the above copyright
00012 //  notice, this list of conditions and the following disclaimer.
00013 //
00014 //- Redistributions in binary form must reproduce the above copyright
00015 //  notice, this list of conditions and the following disclaimer in the
00016 //  documentation and/or other materials provided with the distribution.
00017 //
00018 //- Neither the name of Zentaro Kavanagh nor the names of contributors 
00019 //  may be used to endorse or promote products derived from this software 
00020 //  without specific prior written permission.
00021 //
00022 //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00023 //``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00024 //LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
00025 //PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
00026 //CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00027 //EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00028 //PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00029 //PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00030 //LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00031 //NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00032 //SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00033 //===========================================================================
00034 
00035 #include "stdafx.h"
00036 #include ".\fishskeleton.h"
00037 
00038 FishSkeleton::FishSkeleton(void)
00039 {
00040 }
00041 
00042 FishSkeleton::~FishSkeleton(void)
00043 {
00044 }
00045 
00046         //Checksum tables from libogg
00047 static unsigned long fish_crc_lookup[256]={
00048   0x00000000,0x04c11db7,0x09823b6e,0x0d4326d9,
00049   0x130476dc,0x17c56b6b,0x1a864db2,0x1e475005,
00050   0x2608edb8,0x22c9f00f,0x2f8ad6d6,0x2b4bcb61,
00051   0x350c9b64,0x31cd86d3,0x3c8ea00a,0x384fbdbd,
00052   0x4c11db70,0x48d0c6c7,0x4593e01e,0x4152fda9,
00053   0x5f15adac,0x5bd4b01b,0x569796c2,0x52568b75,
00054   0x6a1936c8,0x6ed82b7f,0x639b0da6,0x675a1011,
00055   0x791d4014,0x7ddc5da3,0x709f7b7a,0x745e66cd,
00056   0x9823b6e0,0x9ce2ab57,0x91a18d8e,0x95609039,
00057   0x8b27c03c,0x8fe6dd8b,0x82a5fb52,0x8664e6e5,
00058   0xbe2b5b58,0xbaea46ef,0xb7a96036,0xb3687d81,
00059   0xad2f2d84,0xa9ee3033,0xa4ad16ea,0xa06c0b5d,
00060   0xd4326d90,0xd0f37027,0xddb056fe,0xd9714b49,
00061   0xc7361b4c,0xc3f706fb,0xceb42022,0xca753d95,
00062   0xf23a8028,0xf6fb9d9f,0xfbb8bb46,0xff79a6f1,
00063   0xe13ef6f4,0xe5ffeb43,0xe8bccd9a,0xec7dd02d,
00064   0x34867077,0x30476dc0,0x3d044b19,0x39c556ae,
00065   0x278206ab,0x23431b1c,0x2e003dc5,0x2ac12072,
00066   0x128e9dcf,0x164f8078,0x1b0ca6a1,0x1fcdbb16,
00067   0x018aeb13,0x054bf6a4,0x0808d07d,0x0cc9cdca,
00068   0x7897ab07,0x7c56b6b0,0x71159069,0x75d48dde,
00069   0x6b93dddb,0x6f52c06c,0x6211e6b5,0x66d0fb02,
00070   0x5e9f46bf,0x5a5e5b08,0x571d7dd1,0x53dc6066,
00071   0x4d9b3063,0x495a2dd4,0x44190b0d,0x40d816ba,
00072   0xaca5c697,0xa864db20,0xa527fdf9,0xa1e6e04e,
00073   0xbfa1b04b,0xbb60adfc,0xb6238b25,0xb2e29692,
00074   0x8aad2b2f,0x8e6c3698,0x832f1041,0x87ee0df6,
00075   0x99a95df3,0x9d684044,0x902b669d,0x94ea7b2a,
00076   0xe0b41de7,0xe4750050,0xe9362689,0xedf73b3e,
00077   0xf3b06b3b,0xf771768c,0xfa325055,0xfef34de2,
00078   0xc6bcf05f,0xc27dede8,0xcf3ecb31,0xcbffd686,
00079   0xd5b88683,0xd1799b34,0xdc3abded,0xd8fba05a,
00080   0x690ce0ee,0x6dcdfd59,0x608edb80,0x644fc637,
00081   0x7a089632,0x7ec98b85,0x738aad5c,0x774bb0eb,
00082   0x4f040d56,0x4bc510e1,0x46863638,0x42472b8f,
00083   0x5c007b8a,0x58c1663d,0x558240e4,0x51435d53,
00084   0x251d3b9e,0x21dc2629,0x2c9f00f0,0x285e1d47,
00085   0x36194d42,0x32d850f5,0x3f9b762c,0x3b5a6b9b,
00086   0x0315d626,0x07d4cb91,0x0a97ed48,0x0e56f0ff,
00087   0x1011a0fa,0x14d0bd4d,0x19939b94,0x1d528623,
00088   0xf12f560e,0xf5ee4bb9,0xf8ad6d60,0xfc6c70d7,
00089   0xe22b20d2,0xe6ea3d65,0xeba91bbc,0xef68060b,
00090   0xd727bbb6,0xd3e6a601,0xdea580d8,0xda649d6f,
00091   0xc423cd6a,0xc0e2d0dd,0xcda1f604,0xc960ebb3,
00092   0xbd3e8d7e,0xb9ff90c9,0xb4bcb610,0xb07daba7,
00093   0xae3afba2,0xaafbe615,0xa7b8c0cc,0xa379dd7b,
00094   0x9b3660c6,0x9ff77d71,0x92b45ba8,0x9675461f,
00095   0x8832161a,0x8cf30bad,0x81b02d74,0x857130c3,
00096   0x5d8a9099,0x594b8d2e,0x5408abf7,0x50c9b640,
00097   0x4e8ee645,0x4a4ffbf2,0x470cdd2b,0x43cdc09c,
00098   0x7b827d21,0x7f436096,0x7200464f,0x76c15bf8,
00099   0x68860bfd,0x6c47164a,0x61043093,0x65c52d24,
00100   0x119b4be9,0x155a565e,0x18197087,0x1cd86d30,
00101   0x029f3d35,0x065e2082,0x0b1d065b,0x0fdc1bec,
00102   0x3793a651,0x3352bbe6,0x3e119d3f,0x3ad08088,
00103   0x2497d08d,0x2056cd3a,0x2d15ebe3,0x29d4f654,
00104   0xc5a92679,0xc1683bce,0xcc2b1d17,0xc8ea00a0,
00105   0xd6ad50a5,0xd26c4d12,0xdf2f6bcb,0xdbee767c,
00106   0xe3a1cbc1,0xe760d676,0xea23f0af,0xeee2ed18,
00107   0xf0a5bd1d,0xf464a0aa,0xf9278673,0xfde69bc4,
00108   0x89b8fd09,0x8d79e0be,0x803ac667,0x84fbdbd0,
00109   0x9abc8bd5,0x9e7d9662,0x933eb0bb,0x97ffad0c,
00110   0xafb010b1,0xab710d06,0xa6322bdf,0xa2f33668,
00111   0xbcb4666d,0xb8757bda,0xb5365d03,0xb1f740b4
00112 };
00113 
00114   //End libogg tables
00115 
00116 bool FishSkeleton::setChecksum(OggPage* inOggPage) 
00117 {
00118         unsigned long locChecksum = 0;
00119         unsigned long locTemp = 0;
00120 
00121         unsigned char* locHeaderBuff = new unsigned char[300];
00122         if (inOggPage != NULL) {
00123                 //Set the checksum to NULL for the checksumming process.
00124                 inOggPage->header()->setCRCChecksum((unsigned long)0);
00125                 inOggPage->header()->rawData(locHeaderBuff, 300);
00126 
00127                 for(unsigned long i = 0; i < inOggPage->headerSize(); i++) {
00128                         //Create the index we use for the lookup
00129                         locTemp = ((locChecksum >> 24) & 0xff) ^ locHeaderBuff[i];
00130                         //XOR the lookup value with the the current checksum shifted left 8 bits.
00131                         locChecksum=(locChecksum << 8) ^ fish_crc_lookup[locTemp];
00132                 }
00133 
00134 
00135 
00136                 unsigned char* locBuff = NULL;
00137                 for(unsigned long i = 0; i < inOggPage->numPackets(); i++) {
00138                         locBuff = inOggPage->getPacket(i)->packetData();                        //View only don't delete.
00139 
00140                         for (unsigned long j = 0; j < inOggPage->getPacket(i)->packetSize(); j++) {
00141                                 locTemp = ((locChecksum >> 24) & 0xff) ^ locBuff[j];
00142                 locChecksum = (locChecksum << 8) ^ fish_crc_lookup[locTemp];
00143                         }
00144                 }
00145 
00146                 inOggPage->header()->setCRCChecksum(locChecksum);
00147         }
00148 
00149         delete[] locHeaderBuff;
00150         return true;
00151 
00152 }
00153 
00154 StampedOggPacket* FishSkeleton::makeCMMLBOS()
00155 {
00156         const unsigned short CMML_BOS_SIZE = 28;
00157         unsigned char* locPackBuff = new unsigned char[CMML_BOS_SIZE];
00158         locPackBuff[0] = 'C';
00159         locPackBuff[1] = 'M';
00160         locPackBuff[2] = 'M';
00161         locPackBuff[3] = 'L';
00162         locPackBuff[4] = 0;
00163         locPackBuff[5] = 0;
00164         locPackBuff[6] = 0;
00165         locPackBuff[7] = 0;
00166         locPackBuff[8] = 2;
00167         locPackBuff[9] = 0;
00168         locPackBuff[10] = 0;
00169         locPackBuff[11] = 0;
00170         LOOG_INT64 locInt64 = 1000;
00171         iLE_Math::Int64ToCharArr(locInt64, locPackBuff + 12);
00172         locInt64 = 1;
00173         iLE_Math::Int64ToCharArr(locInt64, locPackBuff + 20);
00174 
00175 
00176 
00177         StampedOggPacket* locPacket = new StampedOggPacket(locPackBuff, CMML_BOS_SIZE, false, false, 0, 0, StampedOggPacket::OGG_BOTH);
00178         return locPacket;
00179 }
00180 
00181 StampedOggPacket* FishSkeleton::makeCMML_XML_Thing() {
00182         string locXMLString = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<!DOCTYPE cmml SYSTEM \"cmml.dtd\">\n<?cmml xmlns=\"http://www.annodex.net/cmml\"?>";
00183 
00184 
00185         unsigned char* locPackBuff = new unsigned char[locXMLString.size()];
00186         memcpy((void*)locPackBuff, (const void*)locXMLString.c_str(), locXMLString.size());
00187         StampedOggPacket* locPacket = new StampedOggPacket(locPackBuff, locXMLString.size(), false, false, 0, 0, StampedOggPacket::OGG_BOTH);
00188         return locPacket;
00189 }
00190 OggPage* FishSkeleton::makeFishHeadBOS_3_0      (               unsigned long inSerialNo
00191                                                                                                 ,       unsigned short inVersionMajor
00192                                                                                                 ,       unsigned short inVersionMinor
00193                                                                                                 ,       unsigned __int64 inPresentTimeNum
00194                                                                                                 ,       unsigned __int64 inPresentTimeDenom
00195                                                                                                 ,       unsigned __int64 inTimebaseNum
00196                                                                                                 ,       unsigned __int64 inTimebaseDenom
00197                                                                                                 ,       const unsigned char* inUTC
00198                                                                                                                 
00199                                                                                         )
00200 {
00201         const LOOG_INT64 DEFAULT_TIMEBASE_DENOMINATOR = 1000;
00202         const LOOG_INT64 DEFAULT_PRESENTATION_TIME_DENOMINATOR = 1000;
00203 
00204         unsigned char* locBuff = NULL;
00205         StampedOggPacket* locPack = NULL;
00206         OggPage* retPage = NULL;
00207         unsigned char* locSegTable = NULL;
00208 
00209         switch (inVersionMajor) {
00210                 case 3:
00211                         locBuff = new unsigned char[FishSkeleton::FISHEAD_3_0_PACKET_SIZE];
00212 
00213                         //      0       -       7               fishead\0
00214                         //  8   -   9           Version Major
00215                         // 10   -  11           Version Minor
00216                         // 12   -  19           Presentation Num
00217                         // 20   -  27           Presentation Denom
00218                         // 28   -  35           Basetime Num
00219                         // 36   -  43       Basetime Denom
00220                         // 44   -  63           UTC
00221                         locBuff[0] = 'f';
00222                         locBuff[1] = 'i';
00223                         locBuff[2] = 's';
00224                         locBuff[3] = 'h';
00225                         locBuff[4] = 'e';
00226                         locBuff[5] = 'a';
00227                         locBuff[6] = 'd';
00228                         locBuff[7] = 0;
00229                         iLE_Math::UShortToCharArr(inVersionMajor, locBuff + 8);
00230                         iLE_Math::UShortToCharArr(inVersionMinor, locBuff + 10);
00231                         iLE_Math::Int64ToCharArr(inPresentTimeNum, locBuff + 12);
00232 
00233                         // Ensure that the presentation time denominator is not zero
00234                         if (inPresentTimeNum == 0 && inPresentTimeDenom == 0) {
00235                                 iLE_Math::Int64ToCharArr(DEFAULT_PRESENTATION_TIME_DENOMINATOR, locBuff + 20);
00236                         } else {
00237                                 // XXX: Should we handle the case wher the numerator is not
00238                                 // zero and the denominator is zero?
00239                                 iLE_Math::Int64ToCharArr(inPresentTimeDenom, locBuff + 20);
00240                         }
00241 
00242                         iLE_Math::Int64ToCharArr(inTimebaseNum, locBuff + 28);
00243 
00244                         // Ensure that the timebase denominator is not zero
00245                         if (inTimebaseNum == 0 && inTimebaseDenom == 0) {
00246                                 iLE_Math::Int64ToCharArr(DEFAULT_TIMEBASE_DENOMINATOR, locBuff + 36);
00247                         } else {
00248                                 // XXX: Should we handle the case wher the numerator is not
00249                                 // zero and the denominator is zero?
00250                                 iLE_Math::Int64ToCharArr(inTimebaseDenom, locBuff + 36);
00251                         }
00252 
00253                         
00254                         for (int i = 0; i < 20; i++) {
00255                                 locBuff[44 + i] = inUTC[i];
00256                         }
00257                         
00258                         locPack = new StampedOggPacket(locBuff, FishSkeleton::FISHEAD_3_0_PACKET_SIZE, false, false, 0, 0, StampedOggPacket::OGG_END_ONLY);
00259 
00260                         retPage = new OggPage;
00261                         retPage->header()->setHeaderFlags(2);
00262                         retPage->header()->setGranulePos((__int64)0);
00263                         retPage->header()->setNumPageSegments( 1);
00264                         locSegTable = new unsigned char[1];
00265                         locSegTable[0] = FishSkeleton::FISHEAD_3_0_PACKET_SIZE;
00266                         retPage->header()->setSegmentTable(locSegTable, 1);
00267                         retPage->header()->setHeaderSize(28);
00268                         retPage->header()->setDataSize(FishSkeleton::FISHEAD_3_0_PACKET_SIZE);
00269 
00270                         retPage->header()->setStreamSerialNo(inSerialNo);
00271                         retPage->addPacket(locPack);
00272 
00273                         setChecksum(retPage);
00274                         
00275                         return retPage;
00276 
00277                 default:
00278                         return NULL;
00279 
00280 
00281         }
00282 }
00283 
00284 OggPage* FishSkeleton::makeFishEOS (unsigned long inSerialNo) {
00285         OggPage* retPage = new OggPage();
00286         StampedOggPacket* locDudPacket = new StampedOggPacket(NULL, 0, false, false, 0, 0, StampedOggPacket::OGG_BOTH);
00287 
00288 
00289 
00290         retPage->header()->setNumPageSegments(1);
00291         unsigned char* locSegTable = new unsigned char[1];
00292 
00293         locSegTable[0] = 0;
00294         
00295 
00296         retPage->header()->setHeaderFlags(4);
00297         retPage->header()->setSegmentTable(locSegTable, 1);
00298         retPage->header()->setHeaderSize(28);
00299         retPage->header()->setDataSize(0);
00300 
00301         retPage->header()->setStreamSerialNo(inSerialNo);
00302         retPage->addPacket(locDudPacket);
00303 
00304         setChecksum(retPage);
00305 
00306         return retPage;
00307 
00308 }
00309 OggPage* FishSkeleton::makeFishBone_3_0_Page (StampedOggPacket* inFishBonePacket, unsigned long inFishStreamSerial)
00310 {
00311                         StampedOggPacket* locPack = inFishBonePacket;
00312                         OggPage* retPage = new OggPage;
00313                         retPage->header()->setHeaderFlags(0);
00314                         retPage->header()->setGranulePos((__int64)0);
00315                         
00316                         unsigned long locDataSize = locPack->packetSize();
00317 
00318                         
00319 
00320                         unsigned long locNumSegs = ((locDataSize / 255) + 1);
00321 
00322                         unsigned char locLastSeg = locDataSize % 255;
00323 
00324                         retPage->header()->setNumPageSegments(locNumSegs);
00325                         unsigned char* locSegTable = new unsigned char[locNumSegs];
00326 
00327                         for (int i = 0; i < locNumSegs - 1; i++) {
00328                                 locSegTable[i] = 255;
00329                         }
00330 
00331                         locSegTable[locNumSegs - 1] = locLastSeg;
00332                         
00333                         retPage->header()->setSegmentTable(locSegTable, locNumSegs);
00334                         retPage->header()->setHeaderSize(27 + locNumSegs);
00335                         retPage->header()->setDataSize(locDataSize);
00336 
00337                         retPage->header()->setStreamSerialNo(inFishStreamSerial);
00338                         retPage->addPacket(locPack);
00339 
00340                         setChecksum(retPage);
00341 
00342                         
00343                         return retPage;
00344 }
00345 
00346 
00347 
00348 //OggPage* FishSkeleton::makeFishBone_3_0_Page                  (               unsigned __int64 inGranuleRateNum
00349 //                                                                                                              ,       unsigned __int64 inGranuleRateDenom
00350 //                                                                                                              ,       unsigned __int64 inBaseGranule
00351 //                                                                                                              ,       unsigned long inNumSecHeaders
00352 //                                                                                                              ,       unsigned long inSerialNo
00353 //                                                                                                              ,       unsigned short inGranuleShift
00354 //                                                                                                              ,       unsigned char inPreroll
00355 //                                                                                                              ,       vector<string> inMessageHeaders
00356 //                                                                                                              ,       unsigned long inFishStreamSerial
00357 //                                                                                                      )
00358 //{
00359 //                      StampedOggPacket* locPack = makeFishBone_3_0(inGranuleRateNum, inGranuleRateDenom, inBaseGranule, inNumSecHeaders, inSerialNo, inGranuleShift, inPreroll,inMessageHeaders);
00360 //                      OggPage* retPage = new OggPage;
00361 //                      retPage->header()->setHeaderFlags(0);
00362 //                      retPage->header()->setGranulePos((__int64)0);
00363 //                      
00364 //                      unsigned long locDataSize = locPack->packetSize();
00365 //
00366 //                      
00367 //
00368 //                      unsigned long locNumSegs = ((locDataSize / 255) + 1);
00369 //
00370 //                      unsigned char locLastSeg = locDataSize % 255;
00371 //
00372 //                      retPage->header()->setNumPageSegments(locNumSegs);
00373 //                      unsigned char* locSegTable = new unsigned char[locNumSegs];
00374 //
00375 //                      for (int i = 0; i < locNumSegs - 1; i++) {
00376 //                              locSegTable[i] = 255;
00377 //                      }
00378 //
00379 //                      locSegTable[locNumSegs - 1] = locLastSeg;
00380 //                      
00381 //                      retPage->header()->setSegmentTable(locSegTable, locNumSegs);
00382 //                      retPage->header()->setHeaderSize(27 + locNumSegs);
00383 //                      retPage->header()->setDataSize(locDataSize);
00384 //
00385 //                      retPage->header()->setStreamSerialNo(inFishStreamSerial);
00386 //                      retPage->addPacket(locPack);
00387 //
00388 //                      return retPage;
00389 //}
00390 StampedOggPacket* FishSkeleton::makeFishBone_3_0        (               unsigned __int64 inGranuleRateNum
00391                                                                                                                 ,       unsigned __int64 inGranuleRateDenom
00392                                                                                                                 ,       unsigned __int64 inBaseGranule
00393                                                                                                                 ,       unsigned long inNumSecHeaders
00394                                                                                                                 ,       unsigned long inSerialNo
00395                                                                                                                 ,       unsigned char inGranuleShift
00396                                                                                                                 ,       unsigned long inPreroll
00397                                                                                                                 ,       vector<string> inMessageHeaders
00398                                                                                                         ) 
00399 {
00400 
00401         //      0       -       7               :       fisbone/0
00402         //      8       -       11              :       Bytes to message headers
00403         //      12      -       15              :       Serial NO
00404         //      16      -       19              :       Num Headers
00405         //      20      -       27              :       Granule Numerator
00406         //      28      -       35              :       Granule Denominator
00407         //      36      -       43              :       Base granule
00408         //      44      -       47              :       Preroll
00409         //      48      -       48              :       Granule shift
00410         //      49      -       51              :       *** PADDING ***
00411         //      52      -                       :       Message Headers
00412 
00413 
00414 
00415                 unsigned long locPacketSize = 52;  //Base header size
00416                 for (size_t i = 0; i < inMessageHeaders.size(); i++) {
00417                         //2 is the crlf
00418                         locPacketSize += (unsigned long)(inMessageHeaders[i].size() + 2);
00419                 }
00420 
00421                 //terminating crlf
00422                 //locPacketSize += 2;
00423 
00424                 unsigned char* locBuff = new unsigned char[locPacketSize];
00425 
00426                 locBuff[0] = 'f';
00427                 locBuff[1] = 'i';
00428                 locBuff[2] = 's';
00429                 locBuff[3] = 'b';
00430                 locBuff[4] = 'o';
00431                 locBuff[5] = 'n';
00432                 locBuff[6] = 'e';
00433                 locBuff[7] = 0;
00434 
00435                 iLE_Math::ULongToCharArr(44, locBuff + 8);
00436                 iLE_Math::ULongToCharArr(inSerialNo, locBuff + 12);
00437                 iLE_Math::ULongToCharArr(inNumSecHeaders, locBuff + 16);
00438 
00439                 iLE_Math::Int64ToCharArr(inGranuleRateNum, locBuff + 20);
00440                 iLE_Math::Int64ToCharArr(inGranuleRateDenom, locBuff + 28);
00441 
00442                 iLE_Math::Int64ToCharArr(inBaseGranule, locBuff + 36);
00443                 iLE_Math::ULongToCharArr(inPreroll, locBuff + 44);
00444 
00445                 locBuff[48] = inGranuleShift;
00446                 locBuff[49] = 0;
00447                 locBuff[50] = 0;
00448                 locBuff[51] = 0;
00449 
00450                 
00451 
00452                 
00453                 unsigned long locUpto = 52;
00454                 for (size_t i = 0; i < inMessageHeaders.size(); i++) {
00455                         memcpy((void*)(locBuff + locUpto), (const void*)(inMessageHeaders[i].c_str()), inMessageHeaders[i].size());
00456                         locUpto += (unsigned long)(inMessageHeaders[i].size());
00457                         //TODO::: How terminated ??
00458                         locBuff[locUpto++] = '\r';      
00459                         locBuff[locUpto++] = '\n';
00460                 }
00461 
00462                 //locBuff[locUpto++] = '\r';
00463                 //locBuff[locUpto++] = '\n';
00464                 
00465                 StampedOggPacket* locPack = new StampedOggPacket(locBuff, locPacketSize, false, false, 0, 0, StampedOggPacket::OGG_END_ONLY);
00466                 return locPack;
00467 
00468 
00469 
00470 
00471 }

Generated on Tue Feb 15 14:54:20 2005 for oggdsf by  doxygen 1.3.9