# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1274781205 -10800 # Node ID 0e2bdb6a08551cbcf0ef10467da6edfb19708a4e # Parent fc5f27757cbe6857cdd91f7bafb4c3ff83aa2687 Revision: 201019 Kit: 2010121 diff -r fc5f27757cbe -r 0e2bdb6a0855 camcordermmfplugin/filecomposer/Src/CamC3GPDataSinkImp.cpp --- a/camcordermmfplugin/filecomposer/Src/CamC3GPDataSinkImp.cpp Tue May 11 16:23:18 2010 +0300 +++ b/camcordermmfplugin/filecomposer/Src/CamC3GPDataSinkImp.cpp Tue May 25 12:53:25 2010 +0300 @@ -323,7 +323,7 @@ errorcode = iFS->SetAtt( iFileName, KEntryAttNormal, KEntryAttReadOnly ); PRINT((_L("CCamC3GPDataSinkImp::OpenFileL Deleting File: '%s'"), iFileName.Ptr())); errorcode = iFS->Delete(iFileName); - PRINT((_L("CCamC3GPDataSinkImp::OpenFileL Deleting File Error: %d"), errorcode)); + PRINT((_L("CCamC3GPDataSinkImp::OpenFileL Deleting File Error: %d if error is -1 its ok - means same name file doesn't exists."), errorcode)); if ( errorcode == KErrInUse && iMMFFile ) { @@ -1396,7 +1396,6 @@ } ConvertNALEncapsulationToNALSizes( aBuffer ); - iVideoBufferTimestamp = iVideoTimestamp; iVideoBufferRandomAccessPoint = iVideoRandomAccessPoint; break; @@ -1427,8 +1426,6 @@ } ConvertBytestreamHeadersToNALSizes(aBuffer); - Mem::Copy(iVideoBuffer, aBuffer->Data().Ptr(), iBufferSize); - iVideoBufferFrameSize = iBufferSize; break; } @@ -1455,9 +1452,6 @@ } ConvertBytestreamHeadersToNALSizes(aBuffer); - Mem::Copy(iVideoBuffer, aBuffer->Data().Ptr(), iBufferSize); - - iVideoBufferFrameSize = (TUint)iBufferSize; iVideoBufferTimestamp = iVideoTimestamp; iVideoBufferRandomAccessPoint = iVideoRandomAccessPoint; break; @@ -1988,25 +1982,23 @@ { if ( inputPtr[i] == 0 && inputPtr[i+1] == 0 && - inputPtr[i+2] == 0 && - inputPtr[i+3] == 1 ) - { // found bytestream header [00 00 00 01] + inputPtr[i+2] == 1 ) + { // found bytestream header [(00) 00 00 01] PRINT((_L("CCamC3GPDataSinkImp::ConvertAVCHeaderByteStreamL found header at: %d"), i)); - nalType = inputPtr[i+4] & 0x1F; + nalType = inputPtr[i+3] & 0x1F; PRINT((_L("CCamC3GPDataSinkImp::ConvertAVCHeaderByteStreamL NAL type: %d"), nalType)); if(nalType == 7) // SPS { numSPS++; // find length of SPS TInt j; - for (j=4; i+j+3> 24) & 0xff); - inputPtr[j+1] = TUint8((nalLength >> 16) & 0xff); - inputPtr[j+2] = TUint8((nalLength >> 8) & 0xff); - inputPtr[j+3] = TUint8(nalLength & 0xff); + nalLength = i-j-3; // 3 is the bytestream header + PRINT((_L("CCamC3GPDataSinkImp::ConvertBytestreamHeadersToNALSizesL NAL length: %d, toPos: %d"), nalLength, outputOffset)); + iVideoBuffer[outputOffset] = TUint8((nalLength >> 24) & 0xff); + iVideoBuffer[outputOffset+1] = TUint8((nalLength >> 16) & 0xff); + iVideoBuffer[outputOffset+2] = TUint8((nalLength >> 8) & 0xff); + iVideoBuffer[outputOffset+3] = TUint8(nalLength & 0xff); + PRINT((_L("CCamC3GPDataSinkImp::ConvertBytestreamHeadersToNALSizesL copy to:%d, from:%d, amount:%d"), outputOffset+4, j+3, nalLength )); + Mem::Copy(iVideoBuffer+outputOffset+4, inputPtr+j+3, nalLength); + outputOffset += 4 + nalLength; // 4 bytes for length information. } moreThanOneNAL = ETrue; j=i; } } // and update last (or if only 1 NAL size: - nalLength = headerLength-j-4; // 4 is the bytestream header - PRINT((_L("CCamC3GPDataSinkImp::ConvertBytestreamHeadersToNALSizesL last NAL length: %d"), nalLength)); - inputPtr[j] = TUint8((nalLength >> 24) & 0xff); - inputPtr[j+1] = TUint8((nalLength >> 16) & 0xff); - inputPtr[j+2] = TUint8((nalLength >> 8) & 0xff); - inputPtr[j+3] = TUint8(nalLength & 0xff); + nalLength = headerLength-j-3; // 3 is the bytestream header + PRINT((_L("CCamC3GPDataSinkImp::ConvertBytestreamHeadersToNALSizesL last NAL length: %d, toPos: %d"), nalLength, outputOffset)); + iVideoBuffer[outputOffset] = TUint8((nalLength >> 24) & 0xff); + iVideoBuffer[outputOffset+1] = TUint8((nalLength >> 16) & 0xff); + iVideoBuffer[outputOffset+2] = TUint8((nalLength >> 8) & 0xff); + iVideoBuffer[outputOffset+3] = TUint8(nalLength & 0xff); + PRINT((_L("CCamC3GPDataSinkImp::ConvertBytestreamHeadersToNALSizesL copy to:%d, from:%d, amount:%d"), outputOffset+4, j+3, nalLength )); + Mem::Copy(iVideoBuffer+outputOffset+4, inputPtr+j+3, nalLength); + + outputOffset += 4 + nalLength; // 4 bytes for length information. + iVideoBufferFrameSize = outputOffset; PRINT((_L("CCamC3GPDataSinkImp::ConvertBytestreamHeadersToNALSizesL out"))); } diff -r fc5f27757cbe -r 0e2bdb6a0855 configmanagers/imagingconfigmanager/conf/imagingconfigmanager.confml Binary file configmanagers/imagingconfigmanager/conf/imagingconfigmanager.confml has changed