testing/fixing

pull/421/head
m-bene 2014-05-05 15:54:13 +02:00
parent ceff5a98ea
commit ae0ee9b3b3
3 changed files with 10 additions and 7 deletions

View File

@ -121,11 +121,11 @@ int FfmpegCamera::PrimeCapture()
// Handle options
AVDictionary *opts = 0;
StringVector opVect = split(Options(), ",");
for (int i=0; i<opVect.size(), i++)
for (size_t i=0; i<opVect.size(); i++)
{
StringVector parts = split(opVect[i],"=");
if (parts.size() > 1)
av_dict_set(&opts, trimSpaces(parts[0]), trimSpaces(parts[1]));
av_dict_set(&opts, trimSpaces(parts[0]).c_str(), trimSpaces(parts[1]).c_str(), 0);
}
if ( avformat_open_input( &mFormatContext, mPath.c_str(), NULL, &opts ) !=0 )
#endif

View File

@ -147,12 +147,15 @@ int LibvlcCamera::PrimeCapture()
if (opVect.size() > 0)
{
mOptArgV = new char*[opVect.size()];cmd
for (int i=0; i< opVect.size(); i++)
mOptArgV[i] = opVect[i].c_str();
mOptArgV = new char*[opVect.size()];
Debug(2, "Size of Option Array: %d",opVect.size());
for (size_t i=0; i< opVect.size(); i++) {
mOptArgV[i] = (char *)opVect[i].c_str();
Debug(2, "set option %d to %s", i, opVect[i].c_str());
}
}
mLibvlcInstance = libvlc_new (opVect.size(), optArgV);
mLibvlcInstance = libvlc_new (opVect.size(), (const char* const*)mOptArgV);
if(mLibvlcInstance == NULL)
Fatal("Unable to create libvlc instance due to: %s", libvlc_errmsg());

View File

@ -46,7 +46,7 @@ class LibvlcCamera : public Camera
protected:
std::string mPath;
std::string mOptions;
unisgned char **mOptArgV;
char **mOptArgV;
LibvlcPrivateData mLibvlcData;
std::string mTargetChroma;
uint8_t mBpp;