[Opalvoip-svn] SF.net SVN: opalvoip:[25200] opal/branches/v3_10
Brought to you by:
csoutheren,
rjongbloed
From: <rjo...@us...> - 2011-02-25 04:11:53
|
Revision: 25200 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=25200&view=rev Author: rjongbloed Date: 2011-02-25 04:11:43 +0000 (Fri, 25 Feb 2011) Log Message: ----------- Logging improvements Fixed output path for SpanDSP plug in Fixed x264 library initialisation when decoder is created first. Modified Paths: -------------- opal/branches/v3_10/plugins/fax/fax_spandsp/spandsp_fax_2005.vcproj opal/branches/v3_10/plugins/video/H.264/h264-x264.cxx opal/branches/v3_10/plugins/video/H.264/h264pipe_unix.cxx opal/branches/v3_10/plugins/video/H.264/h264pipe_win32.cxx opal/branches/v3_10/plugins/video/H.264/shared/h264frame.cxx opal/branches/v3_10/plugins/video/common/dyna.cxx Property Changed: ---------------- opal/branches/v3_10/ Property changes on: opal/branches/v3_10 ___________________________________________________________________ Modified: svn:mergeinfo - /opal/branches/Sirius_A:23371,23374,23549,23560,23770 /opal/branches/Sirius_B:24566,24579,24589,24594,24596,24601,24604,24635-24636,24639-24642,24644,24651,24653,24655-24656,24683,24685,24714-24717,24771,24777-24783,24842,24845,24858,24947,24954-24970,24980,25085 /opal/branches/autoconf:20594-21001 /opal/branches/csoutheren/LalandeBranch1:23412-23413,23415,23424,23510,23516,23553,23577,23607,23669,23724,23742-23744,23747-23748,23755,23758,23780,23788,23848,23850,23856 /opal/branches/rjongbloed/BarnardPlus:20584,20656,20749,20751,20756,20762,20786,20789,20814,20820,20829,20831,20841,20843,20923,20927,20938,22016-22017,22518,22582,22941 /opal/branches/v3_2:21143,21220,21227,21253,21455 /opal/branches/v3_4:21060,21062,21088,21092,21111,21113,21115,21119,21143,21148,21151-21152,21155,21158,21184,21188,21253,21265-21266,21283-21284,21298,21300,21303,21307,21309,21311,21327,21331,21333,21359,21367,21369,21488,21556,21564-21565,21568,21570,21620,21625,21631,21748,21751,21756,21759,21761,21767,21770,22246,23044,23140,23143,23286 /opal/branches/v3_6:22169,22178,22184,22186,22197,22204,22216,22251,22253,22255,22258,22260,22291,22296,22300,22306,22308,22313,22319,22336,22353,22358,22436,22447,22449,22497,22511,22517,22519-22521,22527,22536,22538,22589,22596,22599,22617,22620,22622,22630,22640,22655,22675,22682,22726-22728,22730,22733,22738,22745-22746,22800,22820-22821,22842,22844-22845,22851,22853,22889,22896,22902,22904,22906,22918,22924,22928,22946,22965,22967,22976,22978,22980,22982,22994,23028,23123,23125-23126,23128,23157,23165,23173,23175,23183,23294,23341,23465,23467,23474,23521,23829,24346,24809 /opal/branches/v3_8:24025,24027,24029,24036,24038,24040,24042,24048,24050,24058,24061,24068,24071,24074,24076,24080,24082,24086-24087,24092,24099,24101,24105,24107,24109,24111,24114,24116-24117,24120-24121,24125,24127,24130,24132,24134,24138,24140,24144,24146,24148,24150-24151,24154,24156,24158,24162,24170,24218,24245,24257,24261,24340,24362-24363,24365,24369,24373,24422,24440,24442,24447,24489,24504,24506,24532,24536,24545,24547,24552,24554,24614,24678,24687,24699,24705,24775,24833,24861,24903,25146 /opal/trunk:25190-25191 /ptlib/branches/v2_8:24136 /ptlib/trunk:20820 + /opal/branches/Sirius_A:23371,23374,23549,23560,23770 /opal/branches/Sirius_B:24566,24579,24589,24594,24596,24601,24604,24635-24636,24639-24642,24644,24651,24653,24655-24656,24683,24685,24714-24717,24771,24777-24783,24842,24845,24858,24947,24954-24970,24980,25085 /opal/branches/autoconf:20594-21001 /opal/branches/csoutheren/LalandeBranch1:23412-23413,23415,23424,23510,23516,23553,23577,23607,23669,23724,23742-23744,23747-23748,23755,23758,23780,23788,23848,23850,23856 /opal/branches/rjongbloed/BarnardPlus:20584,20656,20749,20751,20756,20762,20786,20789,20814,20820,20829,20831,20841,20843,20923,20927,20938,22016-22017,22518,22582,22941 /opal/branches/v3_2:21143,21220,21227,21253,21455 /opal/branches/v3_4:21060,21062,21088,21092,21111,21113,21115,21119,21143,21148,21151-21152,21155,21158,21184,21188,21253,21265-21266,21283-21284,21298,21300,21303,21307,21309,21311,21327,21331,21333,21359,21367,21369,21488,21556,21564-21565,21568,21570,21620,21625,21631,21748,21751,21756,21759,21761,21767,21770,22246,23044,23140,23143,23286 /opal/branches/v3_6:22169,22178,22184,22186,22197,22204,22216,22251,22253,22255,22258,22260,22291,22296,22300,22306,22308,22313,22319,22336,22353,22358,22436,22447,22449,22497,22511,22517,22519-22521,22527,22536,22538,22589,22596,22599,22617,22620,22622,22630,22640,22655,22675,22682,22726-22728,22730,22733,22738,22745-22746,22800,22820-22821,22842,22844-22845,22851,22853,22889,22896,22902,22904,22906,22918,22924,22928,22946,22965,22967,22976,22978,22980,22982,22994,23028,23123,23125-23126,23128,23157,23165,23173,23175,23183,23294,23341,23465,23467,23474,23521,23829,24346,24809 /opal/branches/v3_8:24025,24027,24029,24036,24038,24040,24042,24048,24050,24058,24061,24068,24071,24074,24076,24080,24082,24086-24087,24092,24099,24101,24105,24107,24109,24111,24114,24116-24117,24120-24121,24125,24127,24130,24132,24134,24138,24140,24144,24146,24148,24150-24151,24154,24156,24158,24162,24170,24218,24245,24257,24261,24340,24362-24363,24365,24369,24373,24422,24440,24442,24447,24489,24504,24506,24532,24536,24545,24547,24552,24554,24614,24678,24687,24699,24705,24775,24833,24861,24903,25146 /opal/trunk:25190-25191,25195-25199 /ptlib/branches/v2_8:24136 /ptlib/trunk:20820 Modified: opal/branches/v3_10/plugins/fax/fax_spandsp/spandsp_fax_2005.vcproj =================================================================== --- opal/branches/v3_10/plugins/fax/fax_spandsp/spandsp_fax_2005.vcproj 2011-02-25 04:04:16 UTC (rev 25199) +++ opal/branches/v3_10/plugins/fax/fax_spandsp/spandsp_fax_2005.vcproj 2011-02-25 04:11:43 UTC (rev 25200) @@ -16,8 +16,8 @@ <Configurations> <Configuration Name="Release|Win32" - OutputDirectory="..\..\$(ConfigurationName)" - IntermediateDirectory="..\..\$(ConfigurationName)\SpanDSPFax" + OutputDirectory="..\..\..\bin\plugins\$(ConfigurationName)\" + IntermediateDirectory="$(OutDir)$(ProjectName)\" ConfigurationType="2" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="false" @@ -107,8 +107,8 @@ </Configuration> <Configuration Name="Debug|Win32" - OutputDirectory="..\..\$(ConfigurationName)" - IntermediateDirectory="..\..\$(ConfigurationName)\SpanDSPFax" + OutputDirectory="..\..\..\bin\plugins\$(ConfigurationName)\" + IntermediateDirectory="$(OutDir)$(ProjectName)\" ConfigurationType="2" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="false" @@ -203,7 +203,6 @@ <References> <ProjectReference ReferencedProjectIdentifier="{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}" - RelativePathToProject=".\spandsp-0.0.6\src\libspandsp.2005.vcproj" /> </References> <Files> Modified: opal/branches/v3_10/plugins/video/H.264/h264-x264.cxx =================================================================== --- opal/branches/v3_10/plugins/video/H.264/h264-x264.cxx 2011-02-25 04:04:16 UTC (rev 25199) +++ opal/branches/v3_10/plugins/video/H.264/h264-x264.cxx 2011-02-25 04:11:43 UTC (rev 25200) @@ -102,12 +102,12 @@ static bool InitLibs() { if (!FFMPEGLibraryInstance.Load()) { - PTRACE(1, "H264", "Codec\tDisabled"); + PTRACE(1, MY_CODEC_LOG, "Codec\tDisabled"); return false; } if (!H264EncCtxInstance.Load()) { - PTRACE(1, "H264", "Codec\tDisabled"); + PTRACE(1, MY_CODEC_LOG, "Codec\tDisabled"); return false; } @@ -816,7 +816,7 @@ if (strstr(optionValue, OpalPluginCodec_Identifer_H264_Aligned) != NULL || strstr(optionValue, OpalPluginCodec_Identifer_H264_Truncated) != NULL) return SetPacketisationMode(0); - PTRACE(2, "H.264", "Unknown packetisation mode: \"" << optionValue << '"'); + PTRACE(2, MY_CODEC_LOG, "Unknown packetisation mode: \"" << optionValue << '"'); return false; // Unknown/unsupported media packetization } @@ -858,6 +858,14 @@ H264EncCtxInstance.call(SET_MAX_FRAME_SIZE, m_maxRTPSize); H264EncCtxInstance.call(SET_TSTO, m_tsto); H264EncCtxInstance.call(APPLY_OPTIONS); + PTRACE(3, MY_CODEC_LOG, "Applied options: " + "prof=" << m_profile << " " + "lev=" << m_level << " " + "res=" << m_width << 'x' << m_height << " " + "fps=" << m_frameRate << " " + "bps=" << m_bitRate << " " + "RTP=" << m_maxRTPSize << " " + "TSTO=" << m_tsto); return true; } @@ -914,6 +922,9 @@ virtual bool Construct() { + if (!InitLibs()) + return false; + /* Complete construction of object after it has been created. This allows you to fail the create operation (return false), which cannot be done in the normal C++ constructor. */ @@ -969,11 +980,11 @@ if (m_fullFrame.GetFrameSize() == 0) { m_fullFrame.BeginNewFrame(); - PTRACE(3, "H264", "Got an empty video frame - skipping"); + PTRACE(3, MY_CODEC_LOG, "Got an empty video frame - skipping"); return true; } - PTRACE(5, "H264", "Decoding " << m_fullFrame.GetFrameSize() << " bytes"); + PTRACE(5, MY_CODEC_LOG, "Decoding " << m_fullFrame.GetFrameSize() << " bytes"); /* Do conversion of RTP packet. Note that typically many are received before an output frame is generated. If no output fram is available @@ -988,7 +999,7 @@ m_fullFrame.BeginNewFrame(); if (!gotPicture) { - PTRACE(4, "H264", "Decoding " << bytesDecoded << " bytes without a picture."); + PTRACE(4, MY_CODEC_LOG, "Decoding " << bytesDecoded << " bytes without a picture."); flags |= PluginCodec_ReturnCoderRequestIFrame; return true; } Modified: opal/branches/v3_10/plugins/video/H.264/h264pipe_unix.cxx =================================================================== --- opal/branches/v3_10/plugins/video/H.264/h264pipe_unix.cxx 2011-02-25 04:04:16 UTC (rev 25199) +++ opal/branches/v3_10/plugins/video/H.264/h264pipe_unix.cxx 2011-02-25 04:11:43 UTC (rev 25200) @@ -68,7 +68,7 @@ if (!findGplProcess()) { - PTRACE(1, "H264", "IPC\tPP: Couldn't find GPL process executable: " << GPL_PROCESS_FILENAME); + PTRACE(1, "x264", "IPC\tPP: Couldn't find GPL process executable: " << GPL_PROCESS_FILENAME); closeAndRemovePipes(); return false; } @@ -81,7 +81,7 @@ else if(pid < 0) { - PTRACE(1, "H264", "IPC\tPP: Error when trying to fork"); + PTRACE(1, "x264", "IPC\tPP: Error when trying to fork"); closeAndRemovePipes(); return false; } @@ -89,14 +89,14 @@ dlStream.open(dlName, std::ios::binary); if (dlStream.fail()) { - PTRACE(1, "H264", "IPC\tPP: Error when opening DL named pipe"); + PTRACE(1, "x264", "IPC\tPP: Error when opening DL named pipe"); closeAndRemovePipes(); return false; } ulStream.open(ulName, std::ios::binary); if (ulStream.fail()) { - PTRACE(1, "H264", "IPC\tPP: Error when opening UL named pipe"); + PTRACE(1, "x264", "IPC\tPP: Error when opening UL named pipe"); closeAndRemovePipes(); return false; } @@ -110,12 +110,12 @@ readStream((char*) &status, sizeof(status)); if (status == 0) { - PTRACE(1, "H264", "IPC\tPP: GPL Process returned failure on initialization - plugin disabled"); + PTRACE(1, "x264", "IPC\tPP: GPL Process returned failure on initialization - plugin disabled"); closeAndRemovePipes(); return false; } - PTRACE(1, "H264", "IPC\tPP: Successfully forked child process "<< pid << " and established communication"); + PTRACE(1, "x264", "IPC\tPP: Successfully forked child process "<< pid << " and established communication"); loaded = true; return true; } @@ -189,23 +189,23 @@ #ifdef HAVE_MKFIFO if (mkfifo((const char*) &dlName, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP)) { - PTRACE(1, "H264", "IPC\tPP: Error when trying to create DL named pipe"); + PTRACE(1, "x264", "IPC\tPP: Error when trying to create DL named pipe"); return false; } if (mkfifo((const char*) &ulName, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP)) { - PTRACE(1, "H264", "IPC\tPP: Error when trying to create UL named pipe"); + PTRACE(1, "x264", "IPC\tPP: Error when trying to create UL named pipe"); return false; } #else if (mknod((const char*) &dlName, S_IFIFO | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP, 0)) { - PTRACE(1, "H264", "IPC\tPP: Error when trying to create named pipe"); + PTRACE(1, "x264", "IPC\tPP: Error when trying to create named pipe"); return false; } if (mknod((const char*) &ulName, S_IFIFO | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP, 0)) { - PTRACE(1, "H264", "IPC\tPP: Error when trying to create named pipe"); + PTRACE(1, "x264", "IPC\tPP: Error when trying to create named pipe"); return false; } #endif /* HAVE_MKFIFO */ @@ -216,14 +216,14 @@ { if (pipesOpened) { dlStream.close(); - if (dlStream.fail()) { PTRACE(1, "H264", "IPC\tPP: Error when closing DL named pipe"); } + if (dlStream.fail()) { PTRACE(1, "x264", "IPC\tPP: Error when closing DL named pipe"); } ulStream.close(); - if (ulStream.fail()) { PTRACE(1, "H264", "IPC\tPP: Error when closing UL named pipe"); } + if (ulStream.fail()) { PTRACE(1, "x264", "IPC\tPP: Error when closing UL named pipe"); } pipesOpened = false; } if (pipesCreated) { - if (std::remove((const char*) &ulName) == -1) PTRACE(1, "H264", "IPC\tPP: Error when trying to remove UL named pipe - " << strerror(errno)); - if (std::remove((const char*) &dlName) == -1) PTRACE(1, "H264", "IPC\tPP: Error when trying to remove DL named pipe - " << strerror(errno)); + if (std::remove((const char*) &ulName) == -1) PTRACE(1, "x264", "IPC\tPP: Error when trying to remove UL named pipe - " << strerror(errno)); + if (std::remove((const char*) &dlName) == -1) PTRACE(1, "x264", "IPC\tPP: Error when trying to remove DL named pipe - " << strerror(errno)); pipesCreated = false; } } @@ -231,21 +231,21 @@ void H264EncCtx::readStream (char* data, unsigned bytes) { ulStream.read(data, bytes); - if (ulStream.fail()) { PTRACE(1, "H264", "IPC\tPP: Failure on reading - terminating"); closeAndRemovePipes(); } - if (ulStream.bad()) { PTRACE(1, "H264", "IPC\tPP: Bad flag set on reading - terminating"); closeAndRemovePipes(); } - if (ulStream.eof()) { PTRACE(1, "H264", "IPC\tPP: Received EOF - terminating"); closeAndRemovePipes(); } + if (ulStream.fail()) { PTRACE(1, "x264", "IPC\tPP: Failure on reading - terminating"); closeAndRemovePipes(); } + if (ulStream.bad()) { PTRACE(1, "x264", "IPC\tPP: Bad flag set on reading - terminating"); closeAndRemovePipes(); } + if (ulStream.eof()) { PTRACE(1, "x264", "IPC\tPP: Received EOF - terminating"); closeAndRemovePipes(); } } void H264EncCtx::writeStream (const char* data, unsigned bytes) { dlStream.write(data, bytes); - if (dlStream.bad()) { PTRACE(1, "H264", "IPC\tPP: Bad flag set on writing - terminating"); closeAndRemovePipes(); } + if (dlStream.bad()) { PTRACE(1, "x264", "IPC\tPP: Bad flag set on writing - terminating"); closeAndRemovePipes(); } } void H264EncCtx::flushStream () { dlStream.flush(); - if (dlStream.bad()) { PTRACE(1, "H264", "IPC\tPP: Bad flag set on flushing - terminating"); closeAndRemovePipes(); } + if (dlStream.bad()) { PTRACE(1, "x264", "IPC\tPP: Bad flag set on flushing - terminating"); closeAndRemovePipes(); } } bool H264EncCtx::findGplProcess() @@ -294,11 +294,11 @@ if (stat(gplProcess, &buffer ) ) { - PTRACE(4, "H264", "IPC\tPP: Couldn't find GPL process executable in " << gplProcess); + PTRACE(4, "x264", "IPC\tPP: Couldn't find GPL process executable in " << gplProcess); return false; } - PTRACE(4, "H264", "IPC\tPP: Found GPL process executable in " << gplProcess); + PTRACE(4, "x264", "IPC\tPP: Found GPL process executable in " << gplProcess); return true; } @@ -309,25 +309,25 @@ unsigned status = 0; if (execl(gplProcess,"h264_video_pwplugin_helper", dlName,ulName, NULL) == -1) { - PTRACE(1, "H264", "IPC\tPP: Error when trying to execute GPL process " << gplProcess << " - " << strerror(errno)); + PTRACE(1, "x264", "IPC\tPP: Error when trying to execute GPL process " << gplProcess << " - " << strerror(errno)); cpDLStream.open(dlName, std::ios::binary); - if (cpDLStream.fail()) { PTRACE(1, "H264", "IPC\tCP: Error when opening DL named pipe"); exit (1); } + if (cpDLStream.fail()) { PTRACE(1, "x264", "IPC\tCP: Error when opening DL named pipe"); exit (1); } cpULStream.open(ulName,std::ios::binary); - if (cpULStream.fail()) { PTRACE(1, "H264", "IPC\tCP: Error when opening UL named pipe"); exit (1); } + if (cpULStream.fail()) { PTRACE(1, "x264", "IPC\tCP: Error when opening UL named pipe"); exit (1); } cpDLStream.read((char*)&msg, sizeof(msg)); - if (cpDLStream.fail()) { PTRACE(1, "H264", "IPC\tCP: Failure on reading - terminating"); cpCloseAndExit(); } - if (cpDLStream.bad()) { PTRACE(1, "H264", "IPC\tCP: Bad flag set on reading - terminating"); cpCloseAndExit(); } - if (cpDLStream.eof()) { PTRACE(1, "H264", "IPC\tCP: Received EOF - terminating"); exit (1); cpCloseAndExit(); } + if (cpDLStream.fail()) { PTRACE(1, "x264", "IPC\tCP: Failure on reading - terminating"); cpCloseAndExit(); } + if (cpDLStream.bad()) { PTRACE(1, "x264", "IPC\tCP: Bad flag set on reading - terminating"); cpCloseAndExit(); } + if (cpDLStream.eof()) { PTRACE(1, "x264", "IPC\tCP: Received EOF - terminating"); exit (1); cpCloseAndExit(); } cpULStream.write((char*)&msg, sizeof(msg)); - if (cpULStream.bad()) { PTRACE(1, "H264", "IPC\tCP: Bad flag set on writing - terminating"); cpCloseAndExit(); } + if (cpULStream.bad()) { PTRACE(1, "x264", "IPC\tCP: Bad flag set on writing - terminating"); cpCloseAndExit(); } cpULStream.write((char*)&status, sizeof(status)); - if (cpULStream.bad()) { PTRACE(1, "H264", "IPC\tCP: Bad flag set on writing - terminating"); cpCloseAndExit(); } + if (cpULStream.bad()) { PTRACE(1, "x264", "IPC\tCP: Bad flag set on writing - terminating"); cpCloseAndExit(); } cpULStream.flush(); - if (cpULStream.bad()) { PTRACE(1, "H264", "IPC\tCP: Bad flag set on flushing - terminating"); } + if (cpULStream.bad()) { PTRACE(1, "x264", "IPC\tCP: Bad flag set on flushing - terminating"); } cpCloseAndExit(); } } @@ -335,8 +335,8 @@ void H264EncCtx::cpCloseAndExit() { cpDLStream.close(); - if (cpDLStream.fail()) { PTRACE(1, "H264", "IPC\tCP: Error when closing DL named pipe"); } + if (cpDLStream.fail()) { PTRACE(1, "x264", "IPC\tCP: Error when closing DL named pipe"); } cpULStream.close(); - if (cpULStream.fail()) { PTRACE(1, "H264", "IPC\tCP: Error when closing UL named pipe"); } + if (cpULStream.fail()) { PTRACE(1, "x264", "IPC\tCP: Error when closing UL named pipe"); } exit(1); } Modified: opal/branches/v3_10/plugins/video/H.264/h264pipe_win32.cxx =================================================================== --- opal/branches/v3_10/plugins/video/H.264/h264pipe_win32.cxx 2011-02-25 04:04:16 UTC (rev 25199) +++ opal/branches/v3_10/plugins/video/H.264/h264pipe_win32.cxx 2011-02-25 04:11:43 UTC (rev 25200) @@ -85,7 +85,7 @@ if (!findGplProcess()) { - PTRACE(1, "H264", "IPC\tPP: Couldn't find GPL process executable " << GPL_PROCESS_FILENAME); + PTRACE(1, "x264", "IPC\tPP: Couldn't find GPL process executable " << GPL_PROCESS_FILENAME); closeAndRemovePipes(); return false; } @@ -99,13 +99,13 @@ if (!ConnectNamedPipe(stream, NULL)) { if (GetLastError() != ERROR_PIPE_CONNECTED) { - PTRACE(1, "H264", "IPC\tPP: Could not establish communication with child process (" << ErrorMessage() << ")"); + PTRACE(1, "x264", "IPC\tPP: Could not establish communication with child process (" << ErrorMessage() << ")"); closeAndRemovePipes(); return false; } } - PTRACE(1, "H264", "IPC\tPP: Successfully established communication with child process"); + PTRACE(1, "x264", "IPC\tPP: Successfully established communication with child process"); loaded = true; return true; } @@ -189,7 +189,7 @@ if (stream == INVALID_HANDLE_VALUE) { - PTRACE(1, "H264", "IPC\tPP: Failure on creating Pipe - terminating (" << ErrorMessage() << ")"); + PTRACE(1, "x264", "IPC\tPP: Failure on creating Pipe - terminating (" << ErrorMessage() << ")"); return false; } return true; @@ -198,9 +198,9 @@ void H264EncCtx::closeAndRemovePipes() { if (!DisconnectNamedPipe(stream)) - PTRACE(1, "H264", "IPC\tPP: Failure on disconnecting Pipe (" << ErrorMessage() << ")"); + PTRACE(1, "x264", "IPC\tPP: Failure on disconnecting Pipe (" << ErrorMessage() << ")"); if (!CloseHandle(stream)) - PTRACE(1, "H264", "IPC\tPP: Failure on closing Handle (" << ErrorMessage() << ")"); + PTRACE(1, "x264", "IPC\tPP: Failure on closing Handle (" << ErrorMessage() << ")"); } void H264EncCtx::readStream (LPVOID data, unsigned bytes) @@ -217,13 +217,13 @@ if (!fSuccess) { - PTRACE(1, "H264", "IPC\tPP: Failure on reading - terminating (" << ErrorMessage() << ")"); + PTRACE(1, "x264", "IPC\tPP: Failure on reading - terminating (" << ErrorMessage() << ")"); closeAndRemovePipes(); } if (bytes != bytesRead) { - PTRACE(1, "H264", "IPC\tPP: Failure on reading - terminating (Read " << bytesRead << " bytes, expected " << bytes); + PTRACE(1, "x264", "IPC\tPP: Failure on reading - terminating (Read " << bytesRead << " bytes, expected " << bytes); closeAndRemovePipes(); } } @@ -242,13 +242,13 @@ if (!fSuccess) { - PTRACE(1, "H264", "IPC\tPP: Failure on writing - terminating (" << ErrorMessage() << ")"); + PTRACE(1, "x264", "IPC\tPP: Failure on writing - terminating (" << ErrorMessage() << ")"); closeAndRemovePipes(); } if (bytes != bytesWritten) { - PTRACE(1, "H264", "IPC\tPP: Failure on writing - terminating (Written " << bytesWritten << " bytes, intended " << bytes); + PTRACE(1, "x264", "IPC\tPP: Failure on writing - terminating (Written " << bytesWritten << " bytes, intended " << bytes); closeAndRemovePipes(); } } @@ -257,7 +257,7 @@ { if (!FlushFileBuffers(stream)) { - PTRACE(1, "H264", "IPC\tPP: Failure on flushing - terminating (" << ErrorMessage() << ")"); + PTRACE(1, "x264", "IPC\tPP: Failure on flushing - terminating (" << ErrorMessage() << ")"); closeAndRemovePipes(); } } @@ -296,12 +296,12 @@ fin.open(gplProcess,ios::in); if( !fin.is_open() ){ - PTRACE(1, "H264", "IPC\tPP: Couldn't find GPL process executable in " << gplProcess); + PTRACE(1, "x264", "IPC\tPP: Couldn't find GPL process executable in " << gplProcess); fin.close(); return false; } fin.close(); - PTRACE(1, "H264", "IPC\tPP: Found GPL process executable in " << gplProcess); + PTRACE(1, "x264", "IPC\tPP: Found GPL process executable in " << gplProcess); return true; } @@ -328,10 +328,10 @@ &si, // Pointer to STARTUPINFO structure &pi )) // Pointer to PROCESS_INFORMATION structure { - PTRACE(1, "H264", "IPC\tPP: Couldn't create child process: " << ErrorMessage()); + PTRACE(1, "x264", "IPC\tPP: Couldn't create child process: " << ErrorMessage()); return false; } - PTRACE(1, "H264", "IPC\tPP: Successfully created child process " << pi.dwProcessId); + PTRACE(1, "x264", "IPC\tPP: Successfully created child process " << pi.dwProcessId); return true; } Modified: opal/branches/v3_10/plugins/video/H.264/shared/h264frame.cxx =================================================================== --- opal/branches/v3_10/plugins/video/H.264/shared/h264frame.cxx 2011-02-25 04:04:16 UTC (rev 25199) +++ opal/branches/v3_10/plugins/video/H.264/shared/h264frame.cxx 2011-02-25 04:11:43 UTC (rev 25200) @@ -120,11 +120,11 @@ } m_NALs[m_numberOfNALsInFrame].length -= header; m_NALs[m_numberOfNALsInFrame].offset += header; - PTRACE(6, "H264", "Loaded NAL unit #" << currentNAL << " - type " << NALs[currentNAL].i_type); + PTRACE(6, "x264", "Loaded NAL unit #" << currentNAL << " - type " << NALs[currentNAL].i_type); uint8_t* NALptr = NALs[currentNAL].p_payload; if (PTRACE_CHECK(4) && (NALs[currentNAL].i_type == H264_NAL_TYPE_SEQ_PARAM)) { - PTRACE(4, "H264", "Profile: " << (int)NALptr[0] << + PTRACE(4, "x264", "Profile: " << (int)NALptr[0] << " Level: " << (int)NALptr[2] << " Constraints: " << (NALptr[1] & 0x80 ? 1 : 0) << (NALptr[1] & 0x40 ? 1 : 0) @@ -138,10 +138,10 @@ } else { - PTRACE(4, "H264", "[enc] Need to increase vop buffer size by " << -currentNALLen); + PTRACE(4, "x264", "[enc] Need to increase vop buffer size by " << -currentNALLen); } } - PTRACE(6, "H264", "Loaded an encoded frame of " << m_encodedFrameLen << " bytes consisiting of " << numberOfNALs << " NAL units"); + PTRACE(6, "x264", "Loaded an encoded frame of " << m_encodedFrameLen << " bytes consisiting of " << numberOfNALs << " NAL units"); } #endif @@ -183,7 +183,7 @@ frame.SetMarker((m_currentNAL + 1) >= m_numberOfNALsInFrame ? 1 : 0); flags |= frame.GetMarker() ? isLastFrame : 0; // marker bit on last frame of video - PTRACE(6, "H264", "Encapsulating NAL unit #" << m_currentNAL << "/" << (m_numberOfNALsInFrame-1) << " of " << curNALLen << " bytes as a regular NAL unit"); + PTRACE(6, "x264", "Encapsulating NAL unit #" << m_currentNAL << "/" << (m_numberOfNALsInFrame-1) << " of " << curNALLen << " bytes as a regular NAL unit"); m_currentNAL++; return true; #ifdef SEND_STAP_PACKETS @@ -219,7 +219,7 @@ highestNALNumberInSTAP--; } - PTRACE(6, "H264", "Encapsulating NAL units " << m_currentNAL << "-"<< (highestNALNumberInSTAP-1) << "/" << (m_numberOfNALsInFrame-1) << " as a STAP of " << STAPLen); + PTRACE(6, "x264", "Encapsulating NAL units " << m_currentNAL << "-"<< (highestNALNumberInSTAP-1) << "/" << (m_numberOfNALsInFrame-1) << " as a STAP of " << STAPLen); frame.SetPayloadSize(1); // for stap header @@ -240,7 +240,7 @@ memcpy ((uint8_t*)frame.GetPayloadPtr() + frame.GetPayloadSize() - curNALLen, (void *)curNALPtr, curNALLen); if ((*curNALPtr & 0x60) > maxNRI) maxNRI = *curNALPtr & 0x60; - PTRACE(6, "H264", "Adding NAL unit " << m_currentNAL << "/" << (m_numberOfNALsInFrame-1) << " of " << curNALLen << " bytes to STAP"); + PTRACE(6, "x264", "Adding NAL unit " << m_currentNAL << "/" << (m_numberOfNALsInFrame-1) << " of " << curNALLen << " bytes to STAP"); m_currentNAL++; } @@ -300,7 +300,7 @@ m_currentNALFURemainingDataPtr += curFULen; m_currentNALFURemainingLen -= curFULen; - PTRACE(6, "H264", "Encapsulating "<< curFULen << " bytes of NAL " << m_currentNAL<< "/" << (m_numberOfNALsInFrame-1) << " as a FU (" << m_currentNALFURemainingLen << " bytes remaining)"); + PTRACE(6, "x264", "Encapsulating "<< curFULen << " bytes of NAL " << m_currentNAL<< "/" << (m_numberOfNALsInFrame-1) << " as a FU (" << m_currentNALFURemainingLen << " bytes remaining)"); } if (m_currentNALFURemainingLen==0) { @@ -317,7 +317,7 @@ curNALType <= H264_NAL_TYPE_FILLER_DATA) { // regular NAL - put in buffer, adding the header. - PTRACE(6, "H264", "Deencapsulating a regular NAL unit NAL of " << frame.GetPayloadSize() - 1 << " bytes (type " << (int) curNALType << ")"); + PTRACE(6, "x264", "Deencapsulating a regular NAL unit NAL of " << frame.GetPayloadSize() - 1 << " bytes (type " << (int) curNALType << ")"); AddDataToEncodedFrame(frame.GetPayloadPtr() + 1, frame.GetPayloadSize() - 1, *(frame.GetPayloadPtr()), 1); } else if (curNALType == 24) @@ -332,7 +332,7 @@ } else { - PTRACE(2, "H264", "Skipping unsupported NAL unit type " << curNALType); + PTRACE(2, "x264", "Skipping unsupported NAL unit type " << curNALType); return false; } return true; @@ -356,7 +356,7 @@ uint8_t* curSTAP = frame.GetPayloadPtr() + 1; uint32_t curSTAPLen = frame.GetPayloadSize() - 1; - PTRACE(6, "H264", "Deencapsulating a STAP of " << curSTAPLen << " bytes"); + PTRACE(6, "x264", "Deencapsulating a STAP of " << curSTAPLen << " bytes"); while (curSTAPLen > 0) { // first, theres a 2 byte length field @@ -364,13 +364,13 @@ curSTAP += 2; // then the header, followed by the body. We'll add the header // in the AddDataToEncodedFrame - that's why the nal body is dptr + 1 - PTRACE(6, "H264", "Deencapsulating an NAL unit of " << len << " bytes (type " << (int)(*curSTAP && 0x1f) << ") from STAP"); + PTRACE(6, "x264", "Deencapsulating an NAL unit of " << len << " bytes (type " << (int)(*curSTAP && 0x1f) << ") from STAP"); AddDataToEncodedFrame(curSTAP + 1, len - 1, *curSTAP, 1); curSTAP += len; if ((len + 2) > curSTAPLen) { curSTAPLen = 0; - PTRACE(2, "H264", "Error deencapsulating STAP, STAP header says its " << len + 2 << " bytes long but there are only " << curSTAPLen << " bytes left of the packet"); + PTRACE(2, "x264", "Error deencapsulating STAP, STAP header says its " << len + 2 << " bytes long but there are only " << curSTAPLen << " bytes left of the packet"); return false; } else @@ -388,7 +388,7 @@ if ((curFUPtr[1] & 0x80) && !(curFUPtr[1] & 0x40)) { - PTRACE(6, "H264", "Deencapsulating a FU of " << frame.GetPayloadSize() - 1 << " bytes (Startbit, !Endbit)"); + PTRACE(6, "x264", "Deencapsulating a FU of " << frame.GetPayloadSize() - 1 << " bytes (Startbit, !Endbit)"); if (m_currentFU) { m_currentFU=1; } @@ -401,7 +401,7 @@ } else if (!(curFUPtr[1] & 0x80) && !(curFUPtr[1] & 0x40)) { - PTRACE(6, "H264", "Deencapsulating a FU of " << frame.GetPayloadSize() - 1 << " bytes (!Startbit, !Endbit)"); + PTRACE(6, "x264", "Deencapsulating a FU of " << frame.GetPayloadSize() - 1 << " bytes (!Startbit, !Endbit)"); if (m_currentFU) { m_currentFU++; @@ -410,13 +410,13 @@ else { m_currentFU=0; - PTRACE(2, "H264", "Received an intermediate FU without getting the first - dropping!"); + PTRACE(2, "x264", "Received an intermediate FU without getting the first - dropping!"); return false; } } else if (!(curFUPtr[1] & 0x80) && (curFUPtr[1] & 0x40)) { - PTRACE(6, "H264", "Deencapsulating a FU of " << frame.GetPayloadSize() - 1 << " bytes (!Startbit, Endbit)"); + PTRACE(6, "x264", "Deencapsulating a FU of " << frame.GetPayloadSize() - 1 << " bytes (!Startbit, Endbit)"); if (m_currentFU) { m_currentFU=0; AddDataToEncodedFrame( curFUPtr + 2, curFULen - 2, 0, 0); @@ -424,14 +424,14 @@ else { m_currentFU=0; - PTRACE(2, "H264", "Received a last FU without getting the first - dropping!"); + PTRACE(2, "x264", "Received a last FU without getting the first - dropping!"); return false; } } else if ((curFUPtr[1] & 0x80) && (curFUPtr[1] & 0x40)) { - PTRACE(6, "H264", "Deencapsulating a FU of " << frame.GetPayloadSize() - 1 << " bytes (Startbit, Endbit)"); - PTRACE(2, "H264", "Received a FU with both Starbit and Endbit set - This MUST NOT happen!"); + PTRACE(6, "x264", "Deencapsulating a FU of " << frame.GetPayloadSize() - 1 << " bytes (Startbit, Endbit)"); + PTRACE(2, "x264", "Received a FU with both Starbit and Endbit set - This MUST NOT happen!"); m_currentFU=0; return false; } @@ -444,11 +444,11 @@ if (addHeader) { - PTRACE(6, "H264", "Adding a NAL unit of " << dataLen << " bytes to buffer (type " << (int)(header & 0x1f) << ")"); + PTRACE(6, "x264", "Adding a NAL unit of " << dataLen << " bytes to buffer (type " << (int)(header & 0x1f) << ")"); uint8_t* NALptr = data; if (((header & 0x1f) == H264_NAL_TYPE_SEQ_PARAM) && (dataLen >= 3)) { - PTRACE(4, "H264", "Profile: " << (int)NALptr[0] << + PTRACE(4, "x264", "Profile: " << (int)NALptr[0] << " Level: " << (int)NALptr[2] << " Constraints: " << (NALptr[1] & 0x80 ? 1 : 0) << (NALptr[1] & 0x40 ? 1 : 0) @@ -457,10 +457,10 @@ } } else - PTRACE(6, "H264", "Adding a NAL unit of " << dataLen << " bytes to buffer"); + PTRACE(6, "x264", "Adding a NAL unit of " << dataLen << " bytes to buffer"); if (m_encodedFrameLen + dataLen + headerLen > MAX_FRAME_SIZE) { - PTRACE(2, "H264", "Frame too big (" << m_encodedFrameLen + dataLen + headerLen << ">" << MAX_FRAME_SIZE << ")"); + PTRACE(2, "x264", "Frame too big (" << m_encodedFrameLen + dataLen + headerLen << ">" << MAX_FRAME_SIZE << ")"); return; } @@ -495,7 +495,7 @@ m_NALs[m_numberOfNALsInFrame - 1].length += dataLen; } - PTRACE(6, "H264", "Reserved memory for " << m_numberOfNALsReserved <<" NALs, Inframe/current: "<< m_numberOfNALsInFrame <<" Offset: " + PTRACE(6, "x264", "Reserved memory for " << m_numberOfNALsReserved <<" NALs, Inframe/current: "<< m_numberOfNALsInFrame <<" Offset: " << m_NALs[m_numberOfNALsInFrame-1].offset << " Length: "<< m_NALs[m_numberOfNALsInFrame-1].length << " Type: "<< (int)(m_NALs[m_numberOfNALsInFrame-1].type)); memcpy(currentPositionInFrame, data, dataLen); Modified: opal/branches/v3_10/plugins/video/common/dyna.cxx =================================================================== --- opal/branches/v3_10/plugins/video/common/dyna.cxx 2011-02-25 04:04:16 UTC (rev 25199) +++ opal/branches/v3_10/plugins/video/common/dyna.cxx 2011-02-25 04:11:43 UTC (rev 25200) @@ -86,7 +86,8 @@ strcat(path, name); if (strlen(path) == 0) { - PTRACE(1, m_codecString, "\tDYNA\tdir '" << (dir != NULL ? dir : "(NULL)") << "', name '" << (name != NULL ? name : "(NULL)") << "' resulted in empty path"); + PTRACE(1, m_codecString, "DynaLink: dir '" << (dir != NULL ? dir : "(NULL)") + << "', name '" << (name != NULL ? name : "(NULL)") << "' resulted in empty path"); return false; } @@ -113,13 +114,13 @@ #ifndef _WIN32 const char * err = dlerror(); if (err != NULL) { - PTRACE(1, m_codecString, "\tDYNA\tError loading " << path << " - " << err); + PTRACE(1, m_codecString, "Error loading " << path << " - " << err); } else { - PTRACE(1, m_codecString, "\tDYNA\tError loading " << path); + PTRACE(1, m_codecString, "Error loading " << path); } #else /* _WIN32 */ - PTRACE(1, m_codecString, "\tDYNA\tError loading " << path); + PTRACE(1, m_codecString, "Error loading " << path); #endif /* _WIN32 */ return false; } @@ -128,7 +129,7 @@ GetModuleFileName(m_hDLL, path, sizeof(path)); #endif - PTRACE(1, m_codecString, "\tDYNA\tSuccessfully loaded '" << path << "'"); + PTRACE(1, m_codecString, "Successfully loaded '" << path << "'"); return true; } @@ -148,28 +149,34 @@ { if (m_hDLL == NULL) return false; + #ifdef _WIN32 -# ifdef UNICODE - USES_CONVERSION; - FARPROC p = GetProcAddress(m_hDLL, A2T(name)); -# else - FARPROC p = GetProcAddress(m_hDLL, name); -# endif /* UNICODE */ - if (p == NULL) + #ifdef UNICODE + USES_CONVERSION; + FARPROC p = GetProcAddress(m_hDLL, A2T(name)); + #else + FARPROC p = GetProcAddress(m_hDLL, name); + #endif /* UNICODE */ + if (p == NULL) { + PTRACE(1, m_codecString, "Error linking function " << name << ", error=" << GetLastError()); return false; + } func = (Function)p; - return true; -#else + +#else // _WIN32 + void * p = dlsym(m_hDLL, (const char *)name); if (p == NULL) { - PTRACE(1, m_codecString, "\tDYNA\tError " << dlerror()); + PTRACE(1, m_codecString, "Error linking function " << name << ", error=" << dlerror()); return false; } func = (Function &)p; + +#endif // _WIN32 + return true; -#endif /* _WIN32 */ } @@ -253,7 +260,7 @@ else if (m_libAvcodec.Open("avcodec-52")) seperateLibAvutil = true; else { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load FFMPEG libavcodec library"); + PTRACE(1, m_codecString, "Failed to load FFMPEG libavcodec library"); return false; } @@ -262,139 +269,95 @@ m_libAvutil.Open(LIBAVUTIL_LIB_NAME) || #endif m_libAvutil.Open("avutil-50")) ) { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load FFMPEG libavutil library"); + PTRACE(1, m_codecString, "Failed to load FFMPEG libavutil library"); return false; } strcpy(m_libAvcodec.m_codecString, m_codecString); strcpy(m_libAvutil.m_codecString, m_codecString); - if (!m_libAvcodec.GetFunction("avcodec_init", (DynaLink::Function &)Favcodec_init)) { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load avcodec_init"); + if (!m_libAvcodec.GetFunction("avcodec_init", (DynaLink::Function &)Favcodec_init)) return false; - } if (m_codec==CODEC_ID_H264) { - if (!m_libAvcodec.GetFunction("h264_decoder", (DynaLink::Function &)Favcodec_h264_decoder)) { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load h264_decoder"); + if (!m_libAvcodec.GetFunction("h264_decoder", (DynaLink::Function &)Favcodec_h264_decoder)) return false; - } } if (m_codec==CODEC_ID_H263P) { - if (!m_libAvcodec.GetFunction("h263_encoder", (DynaLink::Function &)Favcodec_h263_encoder)) { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load h263_encoder" ); + if (!m_libAvcodec.GetFunction("h263_encoder", (DynaLink::Function &)Favcodec_h263_encoder)) return false; - } - if (!m_libAvcodec.GetFunction("h263p_encoder", (DynaLink::Function &)Favcodec_h263p_encoder)) { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load h263p_encoder" ); + if (!m_libAvcodec.GetFunction("h263p_encoder", (DynaLink::Function &)Favcodec_h263p_encoder)) return false; - } - if (!m_libAvcodec.GetFunction("h263_decoder", (DynaLink::Function &)Favcodec_h263_decoder)) { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load h263_decoder" ); + if (!m_libAvcodec.GetFunction("h263_decoder", (DynaLink::Function &)Favcodec_h263_decoder)) return false; - } } if (m_codec==CODEC_ID_MPEG4) { - if (!m_libAvcodec.GetFunction("mpeg4_encoder", (DynaLink::Function &)mpeg4_encoder)) { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load mpeg4_encoder"); + if (!m_libAvcodec.GetFunction("mpeg4_encoder", (DynaLink::Function &)mpeg4_encoder)) return false; - } - if (!m_libAvcodec.GetFunction("mpeg4_decoder", (DynaLink::Function &)mpeg4_decoder)) { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load mpeg4_decoder"); + if (!m_libAvcodec.GetFunction("mpeg4_decoder", (DynaLink::Function &)mpeg4_decoder)) return false; - } } - if (!m_libAvcodec.GetFunction("register_avcodec", (DynaLink::Function &)Favcodec_register)) { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load register_avcodec"); + if (!m_libAvcodec.GetFunction("register_avcodec", (DynaLink::Function &)Favcodec_register)) return false; - } - if (!m_libAvcodec.GetFunction("avcodec_find_encoder", (DynaLink::Function &)Favcodec_find_encoder)) { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load avcodec_find_encoder"); + if (!m_libAvcodec.GetFunction("avcodec_find_encoder", (DynaLink::Function &)Favcodec_find_encoder)) return false; - } - if (!m_libAvcodec.GetFunction("avcodec_find_decoder", (DynaLink::Function &)Favcodec_find_decoder)) { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load avcodec_find_decoder"); + if (!m_libAvcodec.GetFunction("avcodec_find_decoder", (DynaLink::Function &)Favcodec_find_decoder)) return false; - } - if (!m_libAvcodec.GetFunction("avcodec_alloc_context", (DynaLink::Function &)Favcodec_alloc_context)) { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load avcodec_alloc_context"); + if (!m_libAvcodec.GetFunction("avcodec_alloc_context", (DynaLink::Function &)Favcodec_alloc_context)) return false; - } - if (!m_libAvcodec.GetFunction("avcodec_alloc_frame", (DynaLink::Function &)Favcodec_alloc_frame)) { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load avcodec_alloc_frame"); + if (!m_libAvcodec.GetFunction("avcodec_alloc_frame", (DynaLink::Function &)Favcodec_alloc_frame)) return false; - } - if (!m_libAvcodec.GetFunction("avcodec_open", (DynaLink::Function &)Favcodec_open)) { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load avcodec_open"); + if (!m_libAvcodec.GetFunction("avcodec_open", (DynaLink::Function &)Favcodec_open)) return false; - } - if (!m_libAvcodec.GetFunction("avcodec_close", (DynaLink::Function &)Favcodec_close)) { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load avcodec_close"); + if (!m_libAvcodec.GetFunction("avcodec_close", (DynaLink::Function &)Favcodec_close)) return false; - } - if (!m_libAvcodec.GetFunction("avcodec_encode_video", (DynaLink::Function &)Favcodec_encode_video)) { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load avcodec_encode_video" ); + if (!m_libAvcodec.GetFunction("avcodec_encode_video", (DynaLink::Function &)Favcodec_encode_video)) return false; - } - if (!m_libAvcodec.GetFunction("avcodec_decode_video", (DynaLink::Function &)Favcodec_decode_video)) { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load avcodec_decode_video"); + if (!m_libAvcodec.GetFunction("avcodec_decode_video", (DynaLink::Function &)Favcodec_decode_video)) return false; - } - if (!m_libAvcodec.GetFunction("avcodec_set_dimensions", (DynaLink::Function &)Favcodec_set_dimensions)) { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load avcodec_set_dimensions"); + if (!m_libAvcodec.GetFunction("avcodec_set_dimensions", (DynaLink::Function &)Favcodec_set_dimensions)) return false; - } - if (!CHECK_AVUTIL("av_malloc", Favcodec_malloc)) { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load av_malloc"); + if (!CHECK_AVUTIL("av_malloc", Favcodec_malloc)) return false; - } - if (!CHECK_AVUTIL("av_free", Favcodec_free)) { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load av_free"); + if (!CHECK_AVUTIL("av_free", Favcodec_free)) return false; - } if (!m_libAvcodec.GetFunction("ff_check_alignment", (DynaLink::Function &) Fff_check_alignment)) { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load ff_check_alignment - alignment checks will be skipped"); + PTRACE(1, m_codecString, "Failed to load ff_check_alignment - alignment checks will be skipped"); Fff_check_alignment = NULL; } - if(!m_libAvcodec.GetFunction("avcodec_version", (DynaLink::Function &)Favcodec_version)){ - PTRACE(1, m_codecString, "DYYNA\tFailed to load avcodec_version"); + if(!m_libAvcodec.GetFunction("avcodec_version", (DynaLink::Function &)Favcodec_version)) return false; - } - if (!CHECK_AVUTIL("av_log_set_level", FAv_log_set_level)) { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load av_log_set_level"); + if (!CHECK_AVUTIL("av_log_set_level", FAv_log_set_level)) return false; - } - if (!CHECK_AVUTIL("av_log_set_callback", FAv_log_set_callback)) { - PTRACE(1, m_codecString, "\tDYNA\tFailed to load av_log_set_callback"); + if (!CHECK_AVUTIL("av_log_set_callback", FAv_log_set_callback)) return false; - } WITH_ALIGNED_STACK({ // must be called before using avcodec lib unsigned libVer = Favcodec_version(); if (libVer != LIBAVCODEC_VERSION_INT ) { - PTRACE(1, m_codecString, "\tDYNA\tWarning: compiled against libavcodec headers from version " + PTRACE(2, m_codecString, "Warning: compiled against libavcodec headers from version " << (LIBAVCODEC_VERSION_INT >> 16) << ((LIBAVCODEC_VERSION_INT>>8) & 0xff) << (LIBAVCODEC_VERSION_INT & 0xff) << ", loaded " << (libVer >> 16) << ((libVer>>8) & 0xff) << (libVer & 0xff)); @@ -418,7 +381,7 @@ } if (FFCheckAlignment() != 0) { - PTRACE(1, m_codecString, "\tDYNA\tff_check_alignment() reports failure - stack alignment is not correct"); + PTRACE(1, m_codecString, "ff_check_alignment() reports failure - stack alignment is not correct"); } }); @@ -428,7 +391,7 @@ #endif m_isLoadedOK = true; - PTRACE(4, m_codecString, "\tDYNA\tSuccessfully loaded libavcodec library and verified functions"); + PTRACE(4, m_codecString, "Successfully loaded libavcodec library and verified functions"); return true; } @@ -568,7 +531,7 @@ char dummy[16]; if (Fff_check_alignment == NULL) { - PTRACE(1, m_codecString, "\tDYNA\tff_check_alignment is not supported by libavcodec.so - skipping check"); + PTRACE(1, m_codecString, "ff_check_alignment is not supported by libavcodec.so - skipping check"); return 0; } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |