pfsutils.cpp (pfstools-2.1.0.tgz) | : | pfsutils.cpp (pfstools-2.2.0.tgz) | ||
---|---|---|---|---|
skipping to change at line 39 | skipping to change at line 39 | |||
#include <getopt.h> | #include <getopt.h> | |||
#include <stdlib.h> | #include <stdlib.h> | |||
#include <list> | #include <list> | |||
#include <string> | #include <string> | |||
#include <sstream> | #include <sstream> | |||
#include "pfs.h" | #include "pfs.h" | |||
#define MAX_FRAME 99999 | #define MAX_FRAME 99999 | |||
using namespace std; | ||||
namespace pfs | namespace pfs | |||
{ | { | |||
using namespace std; | ||||
string getColorspaceString(ColorSpace cs){ | string getColorspaceString(ColorSpace cs){ | |||
switch(cs){ | switch(cs){ | |||
case CS_XYZ: | case CS_XYZ: | |||
return "XYZ"; | return "XYZ"; | |||
case CS_RGB: | case CS_RGB: | |||
return "RGB"; | return "RGB"; | |||
case CS_SRGB: | case CS_SRGB: | |||
return "sRGB"; | return "sRGB"; | |||
case CS_PQYCbCr2020: | case CS_PQYCbCr2020: | |||
return "PQ YCbCr 2020"; | return "PQ YCbCr 2020"; | |||
case CS_YCbCr709: | case CS_YCbCr709: | |||
return "YCbCr BT.709"; | return "YCbCr BT.709"; | |||
case CS_HLGYCbCr2020: | case CS_HLGYCbCr2020: | |||
return "HLG YCbCr 2020"; | return "HLG YCbCr 2020"; | |||
case CS_RGB2020: | case CS_RGB2020: | |||
return "RGB2020"; | return "RGB2020"; | |||
default: | ||||
return "Unknown"; | ||||
} | } | |||
} | } | |||
string intToString(int a){ | string intToString(int a){ | |||
stringstream ss; | stringstream ss; | |||
ss << a; | ss << a; | |||
return ss.str(); | return ss.str(); | |||
} | } | |||
static void removeCommandLineArg( int &argc, char* argv[], | static void removeCommandLineArg( int &argc, char* argv[], | |||
int firstArgToRemove, int numArgsToRemove = 1 ); | int firstArgToRemove, int numArgsToRemove = 1 ); | |||
skipping to change at line 234 | skipping to change at line 235 | |||
if( currentPattern->stdinout != NULL ) | if( currentPattern->stdinout != NULL ) | |||
fh = currentPattern->stdinout; | fh = currentPattern->stdinout; | |||
else | else | |||
fh = fopen( fileName, fopenMode ); | fh = fopen( fileName, fopenMode ); | |||
currentPattern->currentFrame += currentPattern->everyNthFrame; | currentPattern->currentFrame += currentPattern->everyNthFrame; | |||
if( fh != NULL ) return FrameFile( fh, fileName ); | if( fh != NULL ) return FrameFile( fh, fileName ); | |||
if( !currentPattern->isPattern || (currentPattern->currentFrame-currentP attern->everyNthFrame) == currentPattern->firstFrame ) { | if( !currentPattern->isPattern || (currentPattern->currentFrame-currentP attern->everyNthFrame) == currentPattern->firstFrame ) { | |||
char msg[1024]; | std::ostringstream msg; | |||
sprintf( msg, "Can not open file '%s'", fileName ); | msg << "Can not open file '" << fileName << "'"; | |||
throw pfs::Exception( msg ); | // char msg[1024]; | |||
// sprintf( msg, "Can not open file '%s'", fileName ); | ||||
throw pfs::Exception( msg.str().c_str() ); | ||||
} | } | |||
skippedFrames++; | skippedFrames++; | |||
} while( currentPattern->skipMissingFrames && skippedFrames < 10 ); | } while( currentPattern->skipMissingFrames && skippedFrames < 10 ); | |||
currentPattern++; | currentPattern++; | |||
} | } | |||
return FrameFile( NULL, NULL ); | return FrameFile( NULL, NULL ); | |||
} | } | |||
End of changes. 4 change blocks. | ||||
5 lines changed or deleted | 8 lines changed or added |