From: Damien S. <dsa...@us...> - 2007-08-31 12:39:44
|
Update of /cvsroot/openh323/opal/plugins/video/MPEG4-ffmpeg In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2200 Modified Files: mpeg4.cxx Log Message: Applied patch from Matthias Schneider <ma30002000 yahoo de> to fix compilation on WIN32. Index: mpeg4.cxx =================================================================== RCS file: /cvsroot/openh323/opal/plugins/video/MPEG4-ffmpeg/mpeg4.cxx,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mpeg4.cxx 29 Aug 2007 19:32:20 -0000 1.9 --- mpeg4.cxx 31 Aug 2007 07:55:09 -0000 1.10 *************** *** 40,43 **** --- 40,47 ---- * * $Log$ + * Revision 1.10 2007/08/31 07:55:09 dsandras + * Applied patch from Matthias Schneider <ma30002000 yahoo de> to fix + * compilation on WIN32. + * * Revision 1.9 2007/08/29 19:32:20 dsandras * Applied cleanup patch from Matthias Schneider <ma30002000 yahoo de> : *************** *** 108,115 **** #include "rtpframe.h" - #define FALSE false - #define TRUE true typedef unsigned char BYTE; - typedef bool BOOL; // Needed C++ headers --- 112,116 ---- *************** *** 300,307 **** { record(0); ! return TRUE; } } ! return FALSE; } void record(int bytes){ --- 301,308 ---- { record(0); ! return true; } } ! return false; } void record(int bytes){ *************** *** 728,732 **** if (_avcontext == NULL) { TRACE(1, "MPEG4\tEncoder\tFailed to allocate context for encoder"); ! return FALSE; } --- 729,733 ---- if (_avcontext == NULL) { TRACE(1, "MPEG4\tEncoder\tFailed to allocate context for encoder"); ! return false; } *************** *** 734,743 **** if (_avpicture == NULL) { TRACE(1, "MPEG4\tEncoder\tFailed to allocate frame for encoder"); ! return FALSE; } if((_avcodec = FFMPEGLibraryInstance.AvcodecFindEncoder(CODEC_ID_MPEG4)) == NULL){ TRACE(1, "MPEG4\tEncoder\tCodec not found for encoder"); ! return FALSE; } --- 735,744 ---- if (_avpicture == NULL) { TRACE(1, "MPEG4\tEncoder\tFailed to allocate frame for encoder"); ! return false; } if((_avcodec = FFMPEGLibraryInstance.AvcodecFindEncoder(CODEC_ID_MPEG4)) == NULL){ TRACE(1, "MPEG4\tEncoder\tCodec not found for encoder"); ! return false; } *************** *** 752,758 **** { TRACE(1, "MPEG4\tEncoder\tCould not open codec"); ! return FALSE; } ! return TRUE; } --- 753,759 ---- { TRACE(1, "MPEG4\tEncoder\tCould not open codec"); ! return false; } ! return true; } *************** *** 887,891 **** // for the frame, set the marker bit and flags if (_packetSizes.empty()) { ! dstRTP.SetMarker(TRUE); flags |= PluginCodec_ReturnCoderLastFrame; } --- 888,892 ---- // for the frame, set the marker bit and flags if (_packetSizes.empty()) { ! dstRTP.SetMarker(true); flags |= PluginCodec_ReturnCoderLastFrame; } *************** *** 900,904 **** dstLen = 0; dstRTP.SetPayloadSize(0); ! dstRTP.SetMarker(TRUE); } return 1; --- 901,905 ---- dstLen = 0; dstRTP.SetPayloadSize(0); ! dstRTP.SetMarker(true); } return 1; *************** *** 1243,1247 **** if ((_avcodec = FFMPEGLibraryInstance.AvcodecFindDecoder(CODEC_ID_MPEG4)) == NULL) { TRACE(1, "MPEG4\tDecoder\tCodec not found for encoder"); ! return FALSE; } --- 1244,1248 ---- if ((_avcodec = FFMPEGLibraryInstance.AvcodecFindDecoder(CODEC_ID_MPEG4)) == NULL) { TRACE(1, "MPEG4\tDecoder\tCodec not found for encoder"); ! return false; } *************** *** 1249,1253 **** if (_avcontext == NULL) { TRACE(1, "MPEG4\tDecoder\tFailed to allocate context for encoder"); ! return FALSE; } --- 1250,1254 ---- if (_avcontext == NULL) { TRACE(1, "MPEG4\tDecoder\tFailed to allocate context for encoder"); ! return false; } *************** *** 1255,1259 **** if (_avpicture == NULL) { TRACE(1, "MPEG4\tDecoder\tFailed to allocate frame for decoder"); ! return FALSE; } --- 1256,1260 ---- if (_avpicture == NULL) { TRACE(1, "MPEG4\tDecoder\tFailed to allocate frame for decoder"); ! return false; } *************** *** 1264,1271 **** if (FFMPEGLibraryInstance.AvcodecOpen(_avcontext, _avcodec) < 0) { TRACE(1, "MPEG4\tDecoder\tFailed to open MPEG4 decoder"); ! return FALSE; } TRACE(1, "MPEG4\tDecoder\tDecoder successfully opened"); ! return TRUE; } --- 1265,1272 ---- if (FFMPEGLibraryInstance.AvcodecOpen(_avcontext, _avcodec) < 0) { TRACE(1, "MPEG4\tDecoder\tFailed to open MPEG4 decoder"); ! return false; } TRACE(1, "MPEG4\tDecoder\tDecoder successfully opened"); ! return true; } *************** *** 1396,1400 **** dstRTP.SetPayloadType(RTP_DYNAMIC_PAYLOAD); dstRTP.SetTimestamp(srcRTP.GetTimestamp()); ! dstRTP.SetMarker(TRUE); dstLen = dstRTP.GetFrameLen(); flags |= PluginCodec_ReturnCoderLastFrame; --- 1397,1401 ---- dstRTP.SetPayloadType(RTP_DYNAMIC_PAYLOAD); dstRTP.SetTimestamp(srcRTP.GetTimestamp()); ! dstRTP.SetMarker(true); dstLen = dstRTP.GetFrameLen(); flags |= PluginCodec_ReturnCoderLastFrame; *************** *** 1407,1411 **** _lastPktOffset = 0; } ! return TRUE; } --- 1408,1412 ---- _lastPktOffset = 0; } ! return true; } |