fix MSVC build errors for GSoC2013 VideoWrite

v0.27.3
Robin Mills 11 years ago
parent 66e473db32
commit 74e8adfa37

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1909,7 +1909,7 @@ void QuickTimeVideo::sampleDesc(uint32_t size)
uint64_t cur_pos = io_->tell();
io_->read(buf.pData_, 4);
io_->read(buf.pData_, 4);
uint32_t noOfEntries = returnUnsignedBufValue(buf);
uint64_t noOfEntries = returnUnsignedBufValue(buf);
for(uint32_t i = 1; i <= noOfEntries; i++){
if (d->currentStream_ == Video) imageDescDecoder();
else if (d->currentStream_ == Audio) audioDescDecoder();
@ -2448,7 +2448,7 @@ void QuickTimeVideo::mediaHeaderDecoder(uint32_t size)
case MediaDuration:
io_->read(buf.pData_,4);
time_scale = returnBufValue(buf);
bDataWritten = writeAudVidData("MediaDuration", time_scale, 4, 0, 0); break;
bDataWritten = writeAudVidData("MediaDuration", (double) time_scale, 4, 0, 0); break;
case MediaLanguageCode:
if(d->currentStream_ == Video){
if(xmpData_["Xmp.video.MediaLanguage"].count() > 0){
@ -2556,23 +2556,25 @@ void QuickTimeVideo::trackHeaderDecoder(uint32_t size)
bool QuickTimeVideo::writeAudVidData
( std::string sXmpTag, double iMulFactor, int64_t iBytCnt, int64_t iOffset, int64_t iRetFuncCall)
{
DataBuf buf(5);
// DataBuf buf(5);
bool bRetVal = false;
int64_t iXmpTagVal = 0;
if(d->currentStream_ == Video){
if(xmpData_["Xmp.video." + sXmpTag].count() > 0){
iXmpTagVal = xmpData_["Xmp.video." + sXmpTag].toLong()*iMulFactor;
if(iRetFuncCall == 0) buf = returnBuf(iXmpTagVal, iBytCnt);
else buf = returnUnsignedBuf(iXmpTagVal);
bRetVal = writeMultibyte(buf.pData_, iBytCnt ,iOffset);
iXmpTagVal = (int64_t) (xmpData_["Xmp.video." + sXmpTag].toLong()*iMulFactor);
DataBuf buf = iRetFuncCall == 0 ? returnBuf(iXmpTagVal, (int32_t) iBytCnt)
: returnUnsignedBuf(iXmpTagVal)
;
bRetVal = writeMultibyte(buf.pData_, iBytCnt ,iOffset);
}
}
else if(d->currentStream_ == Audio){
if(xmpData_["Xmp.audio." + sXmpTag].count() > 0){
iXmpTagVal = xmpData_["Xmp.audio." + sXmpTag].toLong()*iMulFactor;
if(iRetFuncCall == 0) buf = returnBuf(iXmpTagVal, iBytCnt);
else buf = returnUnsignedBuf(iXmpTagVal);
DataBuf buf = iRetFuncCall == 0 ? returnBuf(iXmpTagVal, (int32_t) iBytCnt)
: returnUnsignedBuf(iXmpTagVal)
;
bRetVal = writeMultibyte(buf.pData_, iBytCnt ,iOffset);
}
}

@ -143,12 +143,14 @@ namespace Exiv2 {
}
}
#ifndef _MSC_VER
DataBuf& DataBuf::operator=(DataBuf& rhs)
{
if (this == &rhs) return *this;
reset(rhs.release());
return *this;
}
#endif
void DataBuf::alloc(long size)
{

@ -230,7 +230,11 @@ namespace Exiv2 {
buffer at the original object similar to std::auto_ptr, i.e.,
the original object is modified.
*/
#ifndef _MSC_VER
// MSVC reports a template confusion with DataBufRef for this
// It seems to be harmless to omit this and rely on the DataBufRef code
DataBuf& operator=(DataBuf& rhs);
#endif
/*!
@brief Allocate a data buffer of at least the given size. Note that if
the requested \em size is less than the current buffer size, no

Loading…
Cancel
Save