Tested w/ the following:
gcc version 2.95.4 20010319 (Debian prerelease)
gcc version 3.0.1 20010728 (Debian prerelease)
Without this patch, compilation fails under gcc 3.0.1. The patch has
no major changes, and consists almost entirely of clarifications
(ie, "friend foo;" to "friend class foo;" and "vector" to "std::vector").
Not sure if anyone else has submitted such a patch, but I see at least
1 person on the mailing list w/ the same problem. Hopefully we'll see
a 0.53.6 release w/ this patch (or similar) included.
--
"... being a Linux user is sort of like living in a house inhabited
by a large family of carpenters and architects. Every morning when
you wake up, the house is a little different. Maybe there is a new
turret, or some walls have moved. Or perhaps someone has temporarily
removed the floor under your bed." - Unix for Dummies, 2nd Edition
-- found in the .sig of Rob Riggs, [EMAIL PROTECTED]
diff -urN avifile-0.53.5/include/com.h avifile-0.53.5.dilinger/include/com.h
--- avifile-0.53.5/include/com.h Fri Dec 8 15:05:32 2000
+++ avifile-0.53.5.dilinger/include/com.h Mon Jul 30 22:00:28 2001
@@ -60,4 +60,5 @@
};
#endif
-#endif
\ No newline at end of file
+#endif
+
diff -urN avifile-0.53.5/include/infotypes.h
avifile-0.53.5.dilinger/include/infotypes.h
--- avifile-0.53.5/include/infotypes.h Mon Dec 18 03:46:08 2000
+++ avifile-0.53.5.dilinger/include/infotypes.h Mon Jul 30 22:00:28 2001
@@ -40,13 +40,13 @@
std::string dll;
enum Kind {Win32, Source, Plugin, DShow_Dec};
Kind kind;
- vector<AttributeInfo> decoder_info;
- vector<AttributeInfo> encoder_info;
+ std::vector<AttributeInfo> decoder_info;
+ std::vector<AttributeInfo> encoder_info;
GUID* guid;
CodecInfo(){}
CodecInfo(int* array, const char* info, const char* path, const char* a,
- Kind _kind, GUID* id=0, const vector<AttributeInfo>& ei=vector<AttributeInfo>(),
- const vector<AttributeInfo>& di=vector<AttributeInfo>())
+ Kind _kind, GUID* id=0, const std::vector<AttributeInfo> &ei =
+std::vector<AttributeInfo>(),
+ const std::vector<AttributeInfo> &di = std::vector<AttributeInfo>())
:kind(_kind), dll(path), text(info), about(a), fourcc(array[0]),
decoder_info(di), encoder_info(ei), guid(id)
{
if(!*array) // uncompressed codec
@@ -71,4 +71,4 @@
BITMAPINFOHEADER header;
};
-#endif
\ No newline at end of file
+#endif
diff -urN avifile-0.53.5/lib/avifile/AVIReadHandler.cpp
avifile-0.53.5.dilinger/lib/avifile/AVIReadHandler.cpp
--- avifile-0.53.5/lib/avifile/AVIReadHandler.cpp Mon Nov 27 00:08:44 2000
+++ avifile-0.53.5.dilinger/lib/avifile/AVIReadHandler.cpp Mon Jul 30 22:00:28
+2001
@@ -255,7 +255,7 @@
class AVIReadStream : public IvAVIReadStream, public ListNode2<AVIReadStream> {
- friend AVIReadHandler;
+ friend class AVIReadHandler;
public:
AVIReadStream(AVIReadHandler *, AVIStreamNode *, int);
@@ -987,7 +987,7 @@
int hdrSize;
switch(fccType) {
case ckidAVIMAINHDR:
- hdrSize=min(dwLength, sizeof(m_header));
+ hdrSize=(dwLength < sizeof(m_header) ? dwLength :
+sizeof(m_header));
_readFile2(&m_header, hdrSize);
// printf("Found main header, size %d\n", hdrSize);
dwLength-=hdrSize;
@@ -1109,7 +1109,7 @@
__int64 cpos=_posFile();
while(cpos/(i64FileSize/10)>progress)
{
- cerr<<".";
+ std::cerr<<".";
progress++;
}
@@ -1154,7 +1154,7 @@
// pd.advance((long)((_posFile() - i64ChunkMoviPos)/1024));
// pd.check();
}
- cerr<<endl;
+ std::cerr<<std::endl;
}
diff -urN avifile-0.53.5/lib/avifile/AVIReadHandler2.cpp
avifile-0.53.5.dilinger/lib/avifile/AVIReadHandler2.cpp
--- avifile-0.53.5/lib/avifile/AVIReadHandler2.cpp Wed Jan 10 13:01:12 2001
+++ avifile-0.53.5.dilinger/lib/avifile/AVIReadHandler2.cpp Mon Jul 30 22:00:28
+2001
@@ -456,7 +456,7 @@
///////////////////////////////////////////////////////////////////////////
class AVIReadStream2 : public IvAVIReadStream {
- friend AVIReadHandler2;
+ friend class AVIReadHandler2;
public:
AVIReadStream2(AVIReadHandler2 *, ASFStreamNode *, int);
diff -urN avifile-0.53.5/lib/avifile/List.h avifile-0.53.5.dilinger/lib/avifile/List.h
--- avifile-0.53.5/lib/avifile/List.h Sun Nov 26 12:43:55 2000
+++ avifile-0.53.5.dilinger/lib/avifile/List.h Mon Jul 30 22:00:28 2001
@@ -78,7 +78,7 @@
template<class T>
class ListNode2 : public ListNode {
-friend List2<T>;
+friend class List2<T>;
public:
ListNode2<T>() {}
ListNode2<T>(void *pv) : ListNode(pv) {}
diff -urN avifile-0.53.5/lib/aviplay/aviplay.cpp
avifile-0.53.5.dilinger/lib/aviplay/aviplay.cpp
--- avifile-0.53.5/lib/aviplay/aviplay.cpp Thu Dec 21 06:26:11 2000
+++ avifile-0.53.5.dilinger/lib/aviplay/aviplay.cpp Mon Jul 30 22:00:28 2001
@@ -6,7 +6,7 @@
*********************************************************/
#ifndef QUIET
-#define debug_out(X) Debug cout<<X<<": "<<(t2-t1)/freq<<" ms"<<endl
+#define debug_out(X) Debug std::cout<<X<<": "<<(t2-t1)/freq<<" ms"<<std::endl
#define Debug if(AVIPLAY_DEBUG)
#else
#define debug_out(X)
@@ -39,7 +39,7 @@
double stream_time;
if(time_start==0)
{
- Debug cout<<"AviPlayer::getAsync(): resetting"<<endl;
+ Debug std::cout<<"AviPlayer::getAsync(): resetting"<<std::endl;
time_start=longcount();
if(stream)
frame_start=stream->GetTime();
@@ -55,15 +55,15 @@
//#endif
{
actual_time=frame_start+to_float(time_current, time_start);
-// cout<<freq<<" "<<to_float(time_current, time_start)<<" since
"<<frame_start<<endl;
+// std::cout<<freq<<" "<<to_float(time_current, time_start)<<" since
+"<<frame_start<< std::endl;
}
- Debug cout<<"AviPlayer::getAsync(): actual_time "<<actual_time<<endl;
+ Debug std::cout<<"AviPlayer::getAsync(): actual_time "<<actual_time<<std::endl;
if(stream)
stream_time=stream->GetTime();
else
stream_time=actual_time;
- Debug cout<<"AviPlayer::getAsync(): stream_time "<<stream_time<<endl;
-// cout<<"Async "<<stream_time-actual_time<<" as "<<stream_time<<" -
"<<actual_time<<endl;
+ Debug std::cout<<"AviPlayer::getAsync(): stream_time "<<stream_time<<
+std::endl;
+// std::cout<<"Async "<<stream_time-actual_time<<" as "<<stream_time<<" -
+"<<actual_time<< std::endl;
return stream_time-actual_time;
}
void* main_thread_novideo(void* arg)
@@ -83,7 +83,7 @@
if(quit)
{
#ifndef QUIET
- cout<<"Quitting main thread"<<endl;
+ std::cout<<"Quitting main thread"<< std::endl;
#endif
return 0;
}
@@ -95,7 +95,7 @@
if(!initialized)
{
#ifndef QUIET
-// if(debug_status==0)cout<<"Waiting for start()"<<endl;
+// if(debug_status==0) std::cout<<"Waiting for start()"<< std::endl;
#endif
usleep(200000);
continue;
@@ -115,7 +115,7 @@
}
double frame_time=a.ar->buffer_time();
- Debug cout<<"main_thread(): frame_time "<<frame_time<<endl;
+ Debug std::cout<<"main_thread(): frame_time "<<frame_time<<std::endl;
if(frame_time>.5)
{
@@ -160,7 +160,7 @@
if(quit)
{
#ifndef QUIET
-// cout<<"Quitting main thread"<<endl;
+// std::cout<<"Quitting main thread"<< std::endl;
#endif
return 0;
}
@@ -172,7 +172,7 @@
if(!initialized)
{
#ifndef QUIET
-// if(debug_status==0)cout<<"Waiting for start()"<<endl;
+// if(debug_status==0) std::cout<<"Waiting for start()"<< std::endl;
#endif
usleep(200000);
continue;
@@ -195,7 +195,7 @@
}
double async=a.getAsync(1);
- Debug cout<<"main_thread(): 1) async() is "<<async<<endl;
+ Debug std::cout<<"main_thread(): 1) async() is "<<async<< std::endl;
if(async>.1)
{
@@ -203,7 +203,7 @@
if(a.ar && !a.audio_mute)
{
double frame_time=a.ar->buffer_time();
- Debug cout<<"main_thread(): frame_time "<<frame_time<<endl;
+ Debug std::cout<<"main_thread(): frame_time "<<frame_time<< std::endl;
// low-water mark for audio queue is 0.3 seconds.
// high-water mark depends on bitrate; it's 80000 bytes + size of DMA
buffer,
// for my ESS1868 it's 145536 bytes or approx. 0.8 seconds for
44100/16/stereo.
@@ -238,7 +238,7 @@
}
}
async=a.getAsync();
- Debug cout<<"main_thread(): 2) async() is "<<async<<endl;
+ Debug std::cout<<"main_thread(): 2) async() is "<<async<< std::endl;
// printf("Async %f ms\n", 1000.*async);
//
@@ -261,13 +261,13 @@
if(async<=-.1)
drop_frame=!(a.frames_video%3);//yes
if(drop_frame)
- Debug cout<<"main_thread(): dropping frame"<<endl;
+ Debug std::cout<<"main_thread(): dropping frame"<< std::endl;
if(novideo)
- Debug cout<<"main_thread(): Audio underrun, not drawing"<<endl;
+ Debug std::cout<<"main_thread(): Audio underrun, not drawing"<< std::endl;
if(((drop_frame==0) && (novideo==0)) || a.paused || (!a.video_sync))
{
- Debug cout<<"Reading frame"<<endl;
+ Debug std::cout<<"Reading frame"<< std::endl;
t1=localcount();
CImage* im=0;
if(!a.video_mute)
@@ -289,8 +289,8 @@
if(drop_frame && (!a.paused))
{
#ifndef QUIET
-// cout<<"!"<<flush;
- Debug cout<<endl;
+// std::cout<<"!"<<flush;
+ Debug std::cout<< std::endl;
#endif
a.frame_drop++;
}
@@ -301,7 +301,7 @@
drawfunc(0);
}
a.drop.Insert("Drop", drop_frame*100.);
- Debug cout<<"main_thread(): current video pos "<<stream->GetTime()<<endl;
+ Debug std::cout<<"main_thread(): current video pos "<<stream->GetTime()<<
+std::endl;
t1=localcount();
if(a.ar)
if(!a.ar->Eof())
@@ -392,13 +392,13 @@
{
if(clip==0)clip=CreateIAviReadFile(filename);
- cout<<"File "<<filename<<" successfully opened"<<endl;
- cout<<clip->StreamCount()<<" streams"<<endl;
+ std::cout<<"File "<<filename<<" successfully opened"<< std::endl;
+ std::cout<<clip->StreamCount()<<" streams"<< std::endl;
_fn=filename;
audiostream=clip->GetStream(0, IAviReadStream::Audio);
if(audiostream==0)
- cout<<"WARNING: File does not contain audio streams"<<endl;
+ std::cout<<"WARNING: File does not contain audio streams"<< std::endl;
else
{
if(ar)delete ar;
@@ -429,7 +429,7 @@
int w=384,h=70;
if(stream==0)
- cerr<<"WARNING: File does not contain video streams"<<endl;
+ std::cerr<<"WARNING: File does not contain video streams"<< std::endl;
else
try
{
@@ -465,7 +465,7 @@
catch(FatalError& e)
{
e.Print();
- cerr<<"No video will be available"<<endl;
+ std::cerr<<"No video will be available"<< std::endl;
stream=0;
}
m_width=w;
@@ -478,7 +478,7 @@
stream->SeekToTime(0);
// short fs;
// __asm__ __volatile__ ("movw %%fs, %%ax":"=a"(fs));
-// cout<<"Before pthread_create: fs is "<<fs<<endl;
+// std::cout<<"Before pthread_create: fs is "<<fs<< std::endl;
// fs_seg=fs;
if(stream)
pthread_create(&main_thread, NULL, ::main_thread, (void*)this);
@@ -529,14 +529,14 @@
if (stream)
{
frame_time = stream->GetFrameTime();
-// cout<<"Frame time "<<frame_time<<endl;
+// std::cout<<"Frame time "<<frame_time<< std::endl;
}
FILE* file=fopen(filename, "rb");
subtitles.clear();
if(file==0)
{
#ifndef QUIET
- cout<<"File "<<filename<<" not found"<<endl;
+ std::cout<<"File "<<filename<<" not found"<< std::endl;
#endif
return -1;
}
@@ -550,7 +550,7 @@
}
fclose(file);
#ifndef QUIET
- cout<<"Subtitles: read "<<subtitles.size()<<" lines"<<endl;
+ std::cout<<"Subtitles: read "<<subtitles.size()<<" lines"<< std::endl;
#endif
return 0;
}
@@ -592,12 +592,12 @@
{
if(initialized==1)
{
- cout<<"Can't start(), already started"<<endl;
+ std::cout<<"Can't start(), already started"<< std::endl;
return;
}
if(clip==0)
{
- cout<<"Can't start(), no clip"<<endl;
+ std::cout<<"Can't start(), no clip"<< std::endl;
return;
}
quit=0;
@@ -643,7 +643,7 @@
}
if(clip)
{
- cout<<"Closing clip"<<endl;
+ std::cout<<"Closing clip"<< std::endl;
delete clip;
}
clip=0;
@@ -652,23 +652,23 @@
initialized=0;
ar=0;
if(frames_video)
- cout<<"Played "<<frames_video<<" video frames ( " <<
frame_drop*100./frames_video << "% drop )" << endl;
+ std::cout<<"Played "<<frames_video<<" video frames ( " <<
+frame_drop*100./frames_video << "% drop )" << std::endl;
}
double AviPlayer::reseek(double pos)
{
#ifndef QUIET
- cout<<"Seek pos: "<<pos<<endl;
+ std::cout<<"Seek pos: "<<pos<< std::endl;
#endif
if(initialized==0)return -1;
hangup=1;
- cout<<"Waiting for main_thread to hang up"<<endl;
+ std::cout<<"Waiting for main_thread to hang up"<< std::endl;
while(hangup)usleep(10000);
- cout<<"OK!\n";
+ std::cout<<"OK!\n";
if(stream)
pos=stream->SeekToTime(pos);
#ifndef QUIET
- cout<<"Keyframe pos: "<<pos<<endl;
+ std::cout<<"Keyframe pos: "<<pos<< std::endl;
#endif
if(ar)
ar->reseek(pos);
@@ -681,7 +681,7 @@
if(stream->ReadFrame()==0)
frames_video++;
CImage* im=stream->GetFrame();
- cerr<<"Image "<<im<<endl;
+ std::cerr<<"Image "<<im<< std::endl;
if(drawfunc2)
drawfunc2(im);
else
@@ -705,7 +705,7 @@
if(result==-1)return -1;
hangup=1;
- cout<<"Waiting for main_thread to hang up"<<endl;
+ std::cout<<"Waiting for main_thread to hang up"<< std::endl;
while(hangup)usleep(10000);
double pos=stream->GetTime();
@@ -715,7 +715,7 @@
{
stream->ReadFrame();
CImage* im=stream->GetFrame();
- cerr<<"Image "<<im<<endl;
+ std::cerr<<"Image "<<im<< std::endl;
if(drawfunc2)
drawfunc2(im);
else
@@ -729,7 +729,7 @@
else
{
hangup=1;
- cout<<"Waiting for main_thread to hang up"<<endl;
+ std::cout<<"Waiting for main_thread to hang up"<< std::endl;
while(hangup)usleep(10000);
ar->reseek(ar->getTime()-1.);
@@ -744,7 +744,7 @@
if(result==-1)return -1;
// We can't predict what happens if main_thread won't 'sleep' during reseek
hangup=1;
- cout<<"Waiting for main_thread to hang up"<<endl;
+ std::cout<<"Waiting for main_thread to hang up"<< std::endl;
while(hangup)usleep(10000);
double pos=stream->GetTime();
@@ -769,7 +769,7 @@
if(result==-1)return -1;
hangup=1;
- cout<<"Waiting for main_thread to hang up"<<endl;
+ std::cout<<"Waiting for main_thread to hang up"<< std::endl;
while(hangup)usleep(10000);
double pos=stream->GetTime();
@@ -779,7 +779,7 @@
{
stream->ReadFrame();
CImage* im=stream->GetFrame();
- cerr<<"Image "<<im<<endl;
+ std::cerr<<"Image "<<im<< std::endl;
if(drawfunc2)
drawfunc2(im);
else
@@ -793,7 +793,7 @@
else
{
hangup=1;
- cout<<"Waiting for main_thread to hang up"<<endl;
+ std::cout<<"Waiting for main_thread to hang up"<< std::endl;
while(hangup)usleep(10000);
ar->reseek(ar->getTime()-1.);
@@ -808,25 +808,25 @@
double pos2=0;
if(initialized==0)return -1;
hangup=1;
- cout<<"Waiting for main_thread to hang up"<<endl;
+ std::cout<<"Waiting for main_thread to hang up"<< std::endl;
while(hangup)usleep(10000);
- cout<<"OK!\n";
+ std::cout<<"OK!\n";
if(stream)
pos2=stream->SeekToTime(pos);
if(ar)ar->reseek(pos);
- cout<<"Seek OK\n";
+ std::cout<<"Seek OK\n";
if(pos2<0)
{
if(stream)stream->SeekToTime(0);
if(ar)ar->reseek(0);
time_start=0;
initialized=1;
- cout<<"Returning\n";
+ std::cout<<"Returning\n";
return -1;
}
if(pos2>pos)
{
- cout<<"ERROR: reseek_exact: pos2>pos"<<endl;
+ std::cout<<"ERROR: reseek_exact: pos2>pos"<< std::endl;
return -1;
}
if(stream)
@@ -838,7 +838,7 @@
}
else
{
- cout<<"Adjusting pos, please wait\n";
+ std::cout<<"Adjusting pos, please wait\n";
while(stream->GetTime()<pos)
{
if(stream->Eof())
@@ -850,7 +850,7 @@
}
time_start=0;
initialized=1;
- cout<<"Success"<<endl;
+ std::cout<<"Success"<< std::endl;
return 0;
}
void AviPlayer::setVolume(float volume)
diff -urN avifile-0.53.5/lib/aviplay/aviutil.cpp
avifile-0.53.5.dilinger/lib/aviplay/aviutil.cpp
--- avifile-0.53.5/lib/aviplay/aviutil.cpp Wed Nov 29 08:16:09 2000
+++ avifile-0.53.5.dilinger/lib/aviplay/aviutil.cpp Mon Jul 30 22:00:28 2001
@@ -6,6 +6,7 @@
#include <wine/winreg.h>
#include <stdio.h>
#include <string.h>
+#include <string>
#include <ctype.h>
#include <default.h>
@@ -139,7 +140,7 @@
continue;
}
- cout<<"Available CPU flags: "<<flags<<endl;
+ printf("Available CPU flags: %s\n", flags);
if(strstr(flags, "tsc")==0)
have_tsc=0;
else
@@ -162,30 +163,30 @@
if(freq<0)freq=old_freq();
if(have_tsc)
- cout<<freq/1000.<<" MHz "<<model<<" processor detected"<<endl;
+ printf("%f MHz %s processor detected\n", freq/1000.0, model);
fclose(f);
}
CPU_Info freq;
-int Registry::WriteInt(string appname, string valname, int value)
+int Registry::WriteInt( std::string appname, std::string valname, int value)
{
return WriteData(appname, valname, &value, 4);
}
-int Registry::ReadInt(string appname, string valname, int def_value)
+int Registry::ReadInt( std::string appname, std::string valname, int def_value)
{
int res=def_value;
if(ReadData(appname, valname, &res, 4)!=0)
WriteInt(appname, valname, def_value);
return res;
}
-int Registry::WriteFloat(string appname, string valname, float value)
+int Registry::WriteFloat( std::string appname, std::string valname, float value)
{
return WriteData(appname, valname, &value, 4);
}
-float Registry::ReadFloat(string appname, string valname, float def_value)
+float Registry::ReadFloat( std::string appname, std::string valname, float def_value)
{
float res=def_value;
if(ReadData(appname, valname, &res, 4)!=0)
@@ -193,12 +194,12 @@
return res;
}
-int Registry::WriteString(string appname, string valname, string value)
+int Registry::WriteString( std::string appname, std::string valname, std::string
+value)
{
return WriteData(appname, valname, value.c_str(), value.length()+1);
}
-string Registry::ReadString(string appname, string valname, string def_value)
+std::string Registry::ReadString( std::string appname, std::string valname,
+std::string def_value)
{
char name[256];
int result=ReadData(appname, valname, name, 256);
@@ -208,15 +209,15 @@
return def_value;
}
name[255]=0;
- return string(name);
+ return std::string(name);
}
-int Registry::WriteData(string appname, string valname, const void* data, int size)
+int Registry::WriteData( std::string appname, std::string valname, const void* data,
+int size)
{
int result, status, newkey;
-// cerr<<appname<<" "<<valname<<endl;
- string fullname=string("Software\\Registry\\")+appname;
-// cerr<<fullname<<" qqq"<<endl;
+// std::cerr<<appname<<" "<<valname<< std::endl;
+ std::string fullname= std::string("Software\\Registry\\")+appname;
+// std::cerr<<fullname<<" qqq"<< std::endl;
result=RegCreateKeyExA(HKEY_CURRENT_USER, fullname.c_str(), 0, 0, 0, 0, 0,
&newkey, &status);
if(result!=0)
@@ -226,15 +227,15 @@
return 0;
}
-int Registry::ReadData(string appname, string valname, void* data, int size)
+int Registry::ReadData( std::string appname, std::string valname, void* data, int
+size)
{
int result, status, newkey;
if(!data)return -1;
-// cerr<<appname<<" "<<valname<<endl;
- string fullname=string("Software\\Registry\\");
-// cerr<<fullname<<" zzz"<<endl;
+// std::cerr<<appname<<" "<<valname<< std::endl;
+ std::string fullname= std::string("Software\\Registry\\");
+// std::cerr<<fullname<<" zzz"<< std::endl;
fullname+=appname;
-// cerr<<fullname<<" zzz"<<endl;
+// std::cerr<<fullname<<" zzz"<< std::endl;
result=RegCreateKeyExA(HKEY_CURRENT_USER, fullname.c_str(), 0, 0, 0, 0, 0,
&newkey, &status);
if(result!=0)
diff -urN avifile-0.53.5/lib/videocodec/DirectShow/DS_VideoDecoder.h
avifile-0.53.5.dilinger/lib/videocodec/DirectShow/DS_VideoDecoder.h
--- avifile-0.53.5/lib/videocodec/DirectShow/DS_VideoDecoder.h Wed Dec 20 19:34:19
2000
+++ avifile-0.53.5.dilinger/lib/videocodec/DirectShow/DS_VideoDecoder.h Mon Jul 30
+22:00:28 2001
@@ -18,7 +18,7 @@
}
catch(FatalError& error)
{
- cerr<<"~DS_VideoDecoder(): ";
+ std::cerr<<"~DS_VideoDecoder(): ";
error.Print();
}
if(m_outFrame)delete m_outFrame;
diff -urN avifile-0.53.5/lib/videocodec/codeckeeper.cpp
avifile-0.53.5.dilinger/lib/videocodec/codeckeeper.cpp
--- avifile-0.53.5/lib/videocodec/codeckeeper.cpp Sun Feb 4 00:37:51 2001
+++ avifile-0.53.5.dilinger/lib/videocodec/codeckeeper.cpp Mon Jul 30 22:00:28
+2001
@@ -2,9 +2,9 @@
#include <dlfcn.h>
#include <dirent.h>
#include "DirectShow/guids.h"
-vector<CodecInfo> video_codecs;
-map<int, vector<AttributeInfo> > video_attributes;
-map<int, vector<AttributeInfo> > decoder_attributes;
+std::vector<CodecInfo> video_codecs;
+std::map<int, std::vector<AttributeInfo> > video_attributes;
+std::map<int, std::vector<AttributeInfo> > decoder_attributes;
extern "C" char* def_path;
GUID wmv1_clsid={0x4facbba1, 0xffd8, 0x4cd7,
@@ -156,14 +156,14 @@
video_codecs.clear();
- vector<AttributeInfo> vs;
+ std::vector<AttributeInfo> vs;
vs.push_back("BitRate");
vs.push_back("Crispness");
vs.push_back("KeyFrames");
- vector<AttributeInfo> ds;
+ std::vector<AttributeInfo> ds;
ds.push_back(AttributeInfo("Quality", "Quality/CPU balance ( 0 fastest )",
AttributeInfo::Integer, 0, 4));
- vector<AttributeInfo> ds1;
+ std::vector<AttributeInfo> ds1;
ds1.push_back(AttributeInfo("Quality", "Quality/CPU balance ( 0 fastest )",
AttributeInfo::Integer, 0, 4));
ds1.push_back(AttributeInfo("Saturation", "Saturation", AttributeInfo::Integer,
0, 100));
ds1.push_back(AttributeInfo("Hue", "Hue", AttributeInfo::Integer, 0, 100));
@@ -255,18 +255,17 @@
const CodecInfo* CodecInfo::match(int codec, const CodecInfo* start=0)
{
- vector<CodecInfo>::const_iterator it;
- if(start==0)
- it=video_codecs.begin();
- else
- it=start;
- vector<int>::const_iterator iv;
+ std::vector<CodecInfo>::const_iterator it = video_codecs.begin();
+ if (start)
+ it= std::vector<CodecInfo>::const_iterator(start);
+
+ std::vector<int>::const_iterator iv;
for(; it!=video_codecs.end(); it++)
{
- if(start && (it==start))continue;
+ if(start && (&(*it)==start))continue;
for(iv=it->fourcc_array.begin(); iv!=it->fourcc_array.end(); iv++)
if(codec==(*iv))
- return (const CodecInfo*)it;
+ return &(*it);
}
return 0;
}
diff -urN avifile-0.53.5/lib/videocodec/image.cpp
avifile-0.53.5.dilinger/lib/videocodec/image.cpp
--- avifile-0.53.5/lib/videocodec/image.cpp Sat Jan 27 12:46:37 2001
+++ avifile-0.53.5.dilinger/lib/videocodec/image.cpp Mon Jul 30 22:00:28 2001
@@ -431,7 +431,7 @@
return;
}
}
- cerr<<"Unsupported"<<endl;
+ std::cerr<<"Unsupported"<<std::endl;
}
BitmapInfo* CImage::get_fmt(){return _info;}
const BitmapInfo* CImage::get_fmt() const{return _info;}
diff -urN avifile-0.53.5/samples/avitest/main.cpp
avifile-0.53.5.dilinger/samples/avitest/main.cpp
--- avifile-0.53.5/samples/avitest/main.cpp Fri Jan 26 10:48:16 2001
+++ avifile-0.53.5.dilinger/samples/avitest/main.cpp Mon Jul 30 22:00:28 2001
@@ -25,7 +25,7 @@
FILE* f1;
if(GetAvifileVersion()!=AVIFILE_VERSION)
{
- cout<<"This binary was compiled for Avifile ver. "<<AVIFILE_VERSION<<", but
the library is ver. "<<GetAvifileVersion()<<". Aborting."<<endl;
+ std::cout<<"This binary was compiled for Avifile ver. "<<AVIFILE_VERSION<<",
+but the library is ver. "<<GetAvifileVersion()<<". Aborting."<<std::endl;
return 0;
}
if(argc!=2)
@@ -67,7 +67,7 @@
printf("%d frames written\n", i);
}
long long t2=longcount();
- cerr<<(t2-t1)/freq/144<<" ms per frame"<<endl;
+ std::cerr<<(t2-t1)/freq/144<<" ms per frame"<<std::endl;
stream->Stop();
delete file;//here all headers are actually written
fclose(f1);
@@ -81,7 +81,7 @@
}
catch(...)
{
- cout<<"ERROR: Caught unknown exception!"<<endl;
+ std::cout<<"ERROR: Caught unknown exception!"<<std::endl;
}
return 0;
}
diff -urN avifile-0.53.5/samples/extractor/extractor.cpp
avifile-0.53.5.dilinger/samples/extractor/extractor.cpp
--- avifile-0.53.5/samples/extractor/extractor.cpp Wed Dec 13 21:38:08 2000
+++ avifile-0.53.5.dilinger/samples/extractor/extractor.cpp Mon Jul 30 22:00:28
+2001
@@ -22,7 +22,7 @@
char* zz=0;
if(GetAvifileVersion()!=AVIFILE_VERSION)
{
- cout<<"This binary was compiled for Avifile ver. "<<AVIFILE_VERSION<<", but
the library is ver. "<<GetAvifileVersion()<<". Aborting."<<endl;
+ std::cout<<"This binary was compiled for Avifile ver. "<<AVIFILE_VERSION<<",
+but the library is ver. "<<GetAvifileVersion()<<". Aborting."<<std::endl;
return 0;
}
try
@@ -43,4 +43,4 @@
if(f)fclose(f);
if(ac)delete ac;
if(zz)delete zz;
-}
\ No newline at end of file
+}