patches/dvgrab-04-sunpro.diff
author jurikm
Sun, 12 Feb 2012 14:04:10 +0000
changeset 8245 383896da4129
parent 445 8739b4d845c1
permissions -rw-r--r--
SFEsauerbraten.spec: add IPS package name
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
445
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
     1
diff -ur dvgrab-3.0.orig/avi.cc dvgrab-3.0/avi.cc
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
     2
--- dvgrab-3.0.orig/avi.cc	2007-07-07 01:47:26.000000000 +0700
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
     3
+++ dvgrab-3.0/avi.cc	2007-09-04 13:10:15.407408980 +0700
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
     4
@@ -341,8 +341,8 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
     5
 		int frameNumIndex = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
     6
 		for ( int i = 0; i < idx1->nEntriesInUse; ++i )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
     7
 		{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
     8
-			FOURCC chunkID1 = make_fourcc( "00dc" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
     9
-			FOURCC chunkID2 = make_fourcc( "00db" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    10
+			FOURCC chunkID1 = make_fourcc((char *)"00dc" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    11
+			FOURCC chunkID2 = make_fourcc((char *)"00db" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    12
 			if ( idx1->aIndex[ i ].dwChunkId == chunkID1 ||
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    13
 			        idx1->aIndex[ i ].dwChunkId == chunkID2 )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    14
 			{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    15
@@ -418,9 +418,9 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    16
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    17
 void AVIFile::PrintDirectoryEntryData( const RIFFDirEntry &entry )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    18
 {
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    19
-	static FOURCC lastStreamType = make_fourcc( "    " );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    20
+	static FOURCC lastStreamType = make_fourcc((char *)"    " );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    21
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    22
-	if ( entry.type == make_fourcc( "avih" ) )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    23
+	if ( entry.type == make_fourcc((char *)"avih" ) )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    24
 	{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    25
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    26
 		int i;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    27
@@ -443,7 +443,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    28
 			cout << "    dwReserved[" << i << "]:        " << ( int ) main_avi_header.dwReserved[ i ] << endl;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    29
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    30
 	}
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    31
-	else if ( entry.type == make_fourcc( "strh" ) )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    32
+	else if ( entry.type == make_fourcc((char *)"strh" ) )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    33
 	{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    34
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    35
 		AVIStreamHeader	avi_stream_header;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    36
@@ -476,7 +476,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    37
 		<< "    dwSampleSize:    " << ( int ) avi_stream_header.dwSampleSize << endl;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    38
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    39
 	}
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    40
-	else if ( entry.type == make_fourcc( "indx" ) )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    41
+	else if ( entry.type == make_fourcc((char *)"indx" ) )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    42
 	{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    43
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    44
 		int i;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    45
@@ -507,9 +507,9 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    46
 			<< "       dwDuration  : " << dec << avi_super_index.aIndex[ i ].dwDuration << endl;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    47
 		}
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    48
 	}
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    49
-	else if ( entry.type == make_fourcc( "strf" ) )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    50
+	else if ( entry.type == make_fourcc((char *)"strf" ) )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    51
 	{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    52
-		if ( lastStreamType == make_fourcc( "auds" ) )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    53
+		if ( lastStreamType == make_fourcc((char *)"auds" ) )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    54
 		{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    55
 			WAVEFORMATEX waveformatex;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    56
 			fail_if( lseek( fd, entry.offset, SEEK_SET ) == ( off_t ) - 1 );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    57
@@ -522,7 +522,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    58
 			cout << "    waveformatex.wBitsPerSample : " << waveformatex.wBitsPerSample << endl;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    59
 			cout << "    waveformatex.cbSize         : " << waveformatex.cbSize << endl;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    60
 		}
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    61
-		else if ( lastStreamType == make_fourcc( "vids" ) )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    62
+		else if ( lastStreamType == make_fourcc((char *)"vids" ) )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    63
 		{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    64
 			BITMAPINFOHEADER bitmapinfo;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    65
 			fail_if( lseek( fd, entry.offset, SEEK_SET ) == ( off_t ) - 1 );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    66
@@ -539,7 +539,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    67
 			cout << "    bitmapinfo.biClrUsed      : " << bitmapinfo.biClrUsed << endl;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    68
 			cout << "    bitmapinfo.biClrImportant : " << bitmapinfo.biClrImportant << endl;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    69
 		}
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    70
-		else if ( lastStreamType == make_fourcc( "iavs" ) )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    71
+		else if ( lastStreamType == make_fourcc((char *)"iavs" ) )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    72
 		{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    73
 			DVINFO dvinfo;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    74
 			fail_if( lseek( fd, entry.offset, SEEK_SET ) == ( off_t ) - 1 );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    75
@@ -556,7 +556,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    76
 	/* This is the Standard Index. It is an array of offsets and
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    77
 	   sizes relative to some start offset. */
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    78
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    79
-	else if ( ( entry.type == make_fourcc( "ix00" ) ) || ( entry.type == make_fourcc( "ix01" ) ) )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    80
+	else if ( ( entry.type == make_fourcc((char *)"ix00" ) ) || ( entry.type == make_fourcc((char *)"ix01" ) ) )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    81
 	{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    82
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    83
 		int i;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    84
@@ -587,13 +587,13 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    85
 		}
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    86
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    87
 	}
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    88
-	else if ( entry.type == make_fourcc( "idx1" ) )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    89
+	else if ( entry.type == make_fourcc((char *)"idx1" ) )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    90
 	{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    91
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    92
 		int i;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    93
 		int numEntries = entry.length / sizeof( int ) / 4;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    94
 		DWORD *idx1 = new DWORD[ numEntries * 4 ];
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    95
-		// FOURCC movi_list = FindDirectoryEntry(make_fourcc("movi"));
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    96
+		// FOURCC movi_list = FindDirectoryEntry(make_fourcc((char *)"movi"));
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    97
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    98
 		fail_if( lseek( fd, entry.offset, SEEK_SET ) == ( off_t ) - 1 );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
    99
 		fail_neg( read( fd, idx1, entry.length ) );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   100
@@ -615,7 +615,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   101
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   102
 		delete[] idx1;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   103
 	}
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   104
-	else if ( entry.type == make_fourcc( "dmlh" ) )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   105
+	else if ( entry.type == make_fourcc((char *)"dmlh" ) )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   106
 	{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   107
 		int i;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   108
 		int numEntries = entry.length / sizeof( int );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   109
@@ -664,7 +664,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   110
 	/* if we encounter a movi list, do not read it. It takes too much time
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   111
 	   and we don't need it anyway. */
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   112
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   113
-	if ( name != make_fourcc( "movi" ) )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   114
+	if ( name != make_fourcc((char *)"movi" ) )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   115
 	{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   116
 		//    if (1) {
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   117
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   118
@@ -698,7 +698,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   119
 {
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   120
 	RIFFFile::ParseRIFF();
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   121
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   122
-	avih_chunk = FindDirectoryEntry( make_fourcc( "avih" ) );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   123
+	avih_chunk = FindDirectoryEntry( make_fourcc((char *)"avih" ) );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   124
 	if ( avih_chunk != -1 )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   125
 		ReadChunk( avih_chunk, ( void* ) & mainHdr );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   126
 }
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   127
@@ -706,7 +706,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   128
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   129
 void AVIFile::ReadIndex()
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   130
 {
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   131
-	indx_chunk[ 0 ] = FindDirectoryEntry( make_fourcc( "indx" ) );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   132
+	indx_chunk[ 0 ] = FindDirectoryEntry( make_fourcc((char *)"indx" ) );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   133
 	if ( indx_chunk[ 0 ] != -1 )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   134
 	{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   135
 		ReadChunk( indx_chunk[ 0 ], ( void* ) indx[ 0 ] );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   136
@@ -720,7 +720,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   137
 			;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   138
 		return ;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   139
 	}
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   140
-	idx1_chunk = FindDirectoryEntry( make_fourcc( "idx1" ) );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   141
+	idx1_chunk = FindDirectoryEntry( make_fourcc((char *)"idx1" ) );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   142
 	if ( idx1_chunk != -1 )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   143
 	{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   144
 		ReadChunk( idx1_chunk, ( void* ) idx1 );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   145
@@ -729,8 +729,8 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   146
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   147
 		/* recalc number of frames from the simple index */
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   148
 		int frameNumIndex = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   149
-		FOURCC chunkID1 = make_fourcc( "00dc" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   150
-		FOURCC chunkID2 = make_fourcc( "00db" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   151
+		FOURCC chunkID1 = make_fourcc((char *)"00dc" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   152
+		FOURCC chunkID2 = make_fourcc((char *)"00db" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   153
 		for ( int i = 0; i < idx1->nEntriesInUse; ++i )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   154
 		{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   155
 			if ( idx1->aIndex[ i ].dwChunkId == chunkID1 ||
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   156
@@ -766,9 +766,9 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   157
 	/* make a new ix chunk. */
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   158
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   159
 	if ( stream == 0 )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   160
-		type = make_fourcc( "ix00" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   161
+		type = make_fourcc((char *)"ix00" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   162
 	else
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   163
-		type = make_fourcc( "ix01" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   164
+		type = make_fourcc((char *)"ix01" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   165
 	ix_chunk[ stream ] = AddDirectoryEntry( type, 0, sizeof( AVIStdIndex ), movi_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   166
 	GetDirectoryEntry( ix_chunk[ stream ], type, name, length, offset, parent );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   167
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   168
@@ -853,8 +853,8 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   169
 	int i, j = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   170
 	AVIStreamHeader	avi_stream_header;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   171
 	BITMAPINFOHEADER bih;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   172
-	FOURCC strh = make_fourcc( "strh" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   173
-	FOURCC strf = make_fourcc( "strf" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   174
+	FOURCC strh = make_fourcc((char *)"strh" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   175
+	FOURCC strf = make_fourcc((char *)"strf" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   176
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   177
 	while ( ( i = FindDirectoryEntry( strh, j++ ) ) != -1 )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   178
 	{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   179
@@ -877,7 +877,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   180
 {
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   181
 	int i, j = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   182
 	AVIStreamHeader	avi_stream_header;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   183
-	FOURCC strh = make_fourcc( "strh" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   184
+	FOURCC strh = make_fourcc((char *)"strh" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   185
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   186
 	while ( ( i = FindDirectoryEntry( strh, j++ ) ) != -1 )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   187
 	{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   188
@@ -891,7 +891,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   189
 bool AVIFile::isOpenDML( void )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   190
 {
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   191
 	int i, j = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   192
-	FOURCC dmlh = make_fourcc( "dmlh" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   193
+	FOURCC dmlh = make_fourcc((char *)"dmlh" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   194
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   195
 	while ( ( i = FindDirectoryEntry( dmlh, j++ ) ) != -1 )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   196
 	{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   197
@@ -1000,12 +1000,12 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   198
 		break;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   199
 	}
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   200
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   201
-	indx[ 0 ] ->dwChunkId = make_fourcc( "00__" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   202
+	indx[ 0 ] ->dwChunkId = make_fourcc((char *)"00__" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   203
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   204
 	/* Initialize the 'strh' chunk */
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   205
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   206
-	streamHdr[ 0 ].fccType = make_fourcc( "iavs" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   207
-	streamHdr[ 0 ].fccHandler = make_fourcc( "dvsd" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   208
+	streamHdr[ 0 ].fccType = make_fourcc((char *)"iavs" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   209
+	streamHdr[ 0 ].fccHandler = make_fourcc((char *)"dvsd" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   210
 	streamHdr[ 0 ].dwFlags = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   211
 	streamHdr[ 0 ].wPriority = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   212
 	streamHdr[ 0 ].wLanguage = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   213
@@ -1046,29 +1046,29 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   214
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   215
 	/* Create the container directory entry */
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   216
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   217
-	file_list = AddDirectoryEntry( make_fourcc( "FILE" ), make_fourcc( "FILE" ), 0, RIFF_NO_PARENT );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   218
+	file_list = AddDirectoryEntry( make_fourcc((char *)"FILE" ), make_fourcc((char *)"FILE" ), 0, RIFF_NO_PARENT );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   219
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   220
 	/* Create a basic directory structure. Only chunks defined from here on will be written to the AVI file. */
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   221
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   222
-	riff_list = AddDirectoryEntry( make_fourcc( "RIFF" ), make_fourcc( "AVI " ), RIFF_LISTSIZE, file_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   223
-	hdrl_list = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "hdrl" ), RIFF_LISTSIZE, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   224
-	avih_chunk = AddDirectoryEntry( make_fourcc( "avih" ), 0, sizeof( MainAVIHeader ), hdrl_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   225
-	strl_list[ 0 ] = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "strl" ), RIFF_LISTSIZE, hdrl_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   226
-	strh_chunk[ 0 ] = AddDirectoryEntry( make_fourcc( "strh" ), 0, sizeof( AVIStreamHeader ), strl_list[ 0 ] );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   227
-	strf_chunk[ 0 ] = AddDirectoryEntry( make_fourcc( "strf" ), 0, sizeof( dvinfo ), strl_list[ 0 ] );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   228
+	riff_list = AddDirectoryEntry( make_fourcc((char *)"RIFF" ), make_fourcc((char *)"AVI " ), RIFF_LISTSIZE, file_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   229
+	hdrl_list = AddDirectoryEntry( make_fourcc((char *)"LIST" ), make_fourcc((char *)"hdrl" ), RIFF_LISTSIZE, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   230
+	avih_chunk = AddDirectoryEntry( make_fourcc((char *)"avih" ), 0, sizeof( MainAVIHeader ), hdrl_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   231
+	strl_list[ 0 ] = AddDirectoryEntry( make_fourcc((char *)"LIST" ), make_fourcc((char *)"strl" ), RIFF_LISTSIZE, hdrl_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   232
+	strh_chunk[ 0 ] = AddDirectoryEntry( make_fourcc((char *)"strh" ), 0, sizeof( AVIStreamHeader ), strl_list[ 0 ] );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   233
+	strf_chunk[ 0 ] = AddDirectoryEntry( make_fourcc((char *)"strf" ), 0, sizeof( dvinfo ), strl_list[ 0 ] );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   234
 	if ( index_type & AVI_LARGE_INDEX )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   235
-		indx_chunk[ 0 ] = AddDirectoryEntry( make_fourcc( "indx" ), 0, sizeof( AVISuperIndex ), strl_list[ 0 ] );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   236
+		indx_chunk[ 0 ] = AddDirectoryEntry( make_fourcc((char *)"indx" ), 0, sizeof( AVISuperIndex ), strl_list[ 0 ] );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   237
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   238
-	odml_list = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "odml" ), RIFF_LISTSIZE, hdrl_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   239
-	dmlh_chunk = AddDirectoryEntry( make_fourcc( "dmlh" ), 0, 0x00f8, odml_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   240
+	odml_list = AddDirectoryEntry( make_fourcc((char *)"LIST" ), make_fourcc((char *)"odml" ), RIFF_LISTSIZE, hdrl_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   241
+	dmlh_chunk = AddDirectoryEntry( make_fourcc((char *)"dmlh" ), 0, 0x00f8, odml_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   242
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   243
 	/* align movi list to block */
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   244
 	GetDirectoryEntry( hdrl_list, type, name, length, offset, parent );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   245
 	num_blocks = length / PADDING_SIZE + 1;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   246
 	length = num_blocks * PADDING_SIZE - length - 5 * RIFF_HEADERSIZE; // why 5?
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   247
-	junk_chunk = AddDirectoryEntry( make_fourcc( "JUNK" ), 0, length, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   248
+	junk_chunk = AddDirectoryEntry( make_fourcc((char *)"JUNK" ), 0, length, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   249
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   250
-	movi_list = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "movi" ), RIFF_LISTSIZE, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   251
+	movi_list = AddDirectoryEntry( make_fourcc((char *)"LIST" ), make_fourcc((char *)"movi" ), RIFF_LISTSIZE, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   252
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   253
 	/* The ix00 chunk will be added dynamically to the movi_list in avi_write_frame
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   254
 	          as needed */
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   255
@@ -1108,7 +1108,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   256
 	   frame, then add a JUNK chunk which is sized such that we
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   257
 	   end up on a 512 bytes boundary. */
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   258
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   259
-	frame_chunk = AddDirectoryEntry( make_fourcc( "00__" ), 0, frame->GetDataLen(), movi_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   260
+	frame_chunk = AddDirectoryEntry( make_fourcc((char *)"00__" ), 0, frame->GetDataLen(), movi_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   261
 	if ( ( index_type & AVI_LARGE_INDEX ) && ( streamHdr[ 0 ].dwLength % IX00_INDEX_SIZE ) == 0 )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   262
 	{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   263
 		GetDirectoryEntry( frame_chunk, type, name, length, offset, parent );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   264
@@ -1117,7 +1117,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   265
 	WriteChunk( frame_chunk, frame->data );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   266
 	//    num_blocks = (frame->GetDataLen() + RIFF_HEADERSIZE) / PADDING_SIZE + 1;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   267
 	//	length = num_blocks * PADDING_SIZE - frame->GetDataLen() - 2 * RIFF_HEADERSIZE;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   268
-	//    junk_chunk = AddDirectoryEntry(make_fourcc("JUNK"), 0, length, movi_list);
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   269
+	//    junk_chunk = AddDirectoryEntry(make_fourcc((char *)"JUNK"), 0, length, movi_list);
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   270
 	//    WriteChunk(junk_chunk, g_zeroes);
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   271
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   272
 	if ( index_type & AVI_LARGE_INDEX )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   273
@@ -1143,7 +1143,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   274
 		/* write idx1 only once and before end of first GB */
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   275
 		if ( ( index_type & AVI_SMALL_INDEX ) && isUpdateIdx1 )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   276
 		{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   277
-			int idx1_chunk = AddDirectoryEntry( make_fourcc( "idx1" ), 0, idx1->nEntriesInUse * 16, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   278
+			int idx1_chunk = AddDirectoryEntry( make_fourcc((char *)"idx1" ), 0, idx1->nEntriesInUse * 16, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   279
 			WriteChunk( idx1_chunk, ( void* ) idx1 );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   280
 		}
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   281
 		isUpdateIdx1 = false;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   282
@@ -1152,7 +1152,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   283
 		{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   284
 			/* pad out to 1GB */
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   285
 			//GetDirectoryEntry(riff_list, type, name, length, offset, parent);
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   286
-			//junk_chunk = AddDirectoryEntry(make_fourcc("JUNK"), 0, PADDING_1GB - length - 5 * RIFF_HEADERSIZE, riff_list);
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   287
+			//junk_chunk = AddDirectoryEntry(make_fourcc((char *)"JUNK"), 0, PADDING_1GB - length - 5 * RIFF_HEADERSIZE, riff_list);
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   288
 			//WriteChunk(junk_chunk, g_zeroes);
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   289
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   290
 			/* padding for alignment */
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   291
@@ -1161,12 +1161,12 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   292
 			length = ( num_blocks * PADDING_SIZE ) - length - 4 * RIFF_HEADERSIZE - 2 * RIFF_LISTSIZE;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   293
 			if ( length > 0 )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   294
 			{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   295
-				junk_chunk = AddDirectoryEntry( make_fourcc( "JUNK" ), 0, length, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   296
+				junk_chunk = AddDirectoryEntry( make_fourcc((char *)"JUNK" ), 0, length, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   297
 				WriteChunk( junk_chunk, g_zeroes );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   298
 			}
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   299
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   300
-			riff_list = AddDirectoryEntry( make_fourcc( "RIFF" ), make_fourcc( "AVIX" ), RIFF_LISTSIZE, file_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   301
-			movi_list = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "movi" ), RIFF_LISTSIZE, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   302
+			riff_list = AddDirectoryEntry( make_fourcc((char *)"RIFF" ), make_fourcc((char *)"AVIX" ), RIFF_LISTSIZE, file_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   303
+			movi_list = AddDirectoryEntry( make_fourcc((char *)"LIST" ), make_fourcc((char *)"movi" ), RIFF_LISTSIZE, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   304
 		}
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   305
 	}
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   306
 	return true;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   307
@@ -1189,7 +1189,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   308
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   309
 	if ( ( index_type & AVI_SMALL_INDEX ) && isUpdateIdx1 )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   310
 	{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   311
-		int idx1_chunk = AddDirectoryEntry( make_fourcc( "idx1" ), 0, idx1->nEntriesInUse * 16, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   312
+		int idx1_chunk = AddDirectoryEntry( make_fourcc((char *)"idx1" ), 0, idx1->nEntriesInUse * 16, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   313
 		WriteChunk( idx1_chunk, ( void* ) idx1 );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   314
 	}
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   315
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   316
@@ -1231,8 +1231,8 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   317
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   318
 		/* Initialize the 'strh' chunk */
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   319
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   320
-		streamHdr[ 0 ].fccType = make_fourcc( "vids" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   321
-		streamHdr[ 0 ].fccHandler = make_fourcc( "dvsd" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   322
+		streamHdr[ 0 ].fccType = make_fourcc((char *)"vids" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   323
+		streamHdr[ 0 ].fccHandler = make_fourcc((char *)"dvsd" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   324
 		streamHdr[ 0 ].dwFlags = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   325
 		streamHdr[ 0 ].wPriority = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   326
 		streamHdr[ 0 ].wLanguage = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   327
@@ -1254,14 +1254,14 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   328
 		bitmapinfo.biHeight = 576;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   329
 		bitmapinfo.biPlanes = 1;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   330
 		bitmapinfo.biBitCount = 24;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   331
-		bitmapinfo.biCompression = make_fourcc( "dvsd" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   332
+		bitmapinfo.biCompression = make_fourcc((char *)"dvsd" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   333
 		bitmapinfo.biSizeImage = 144000;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   334
 		bitmapinfo.biXPelsPerMeter = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   335
 		bitmapinfo.biYPelsPerMeter = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   336
 		bitmapinfo.biClrUsed = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   337
 		bitmapinfo.biClrImportant = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   338
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   339
-		streamHdr[ 1 ].fccType = make_fourcc( "auds" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   340
+		streamHdr[ 1 ].fccType = make_fourcc((char *)"auds" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   341
 		streamHdr[ 1 ].fccHandler = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   342
 		streamHdr[ 1 ].dwFlags = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   343
 		streamHdr[ 1 ].wPriority = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   344
@@ -1289,8 +1289,8 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   345
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   346
 		/* Initialize the 'strh' chunk */
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   347
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   348
-		streamHdr[ 0 ].fccType = make_fourcc( "vids" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   349
-		streamHdr[ 0 ].fccHandler = make_fourcc( "dvsd" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   350
+		streamHdr[ 0 ].fccType = make_fourcc((char *)"vids" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   351
+		streamHdr[ 0 ].fccHandler = make_fourcc((char *)"dvsd" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   352
 		streamHdr[ 0 ].dwFlags = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   353
 		streamHdr[ 0 ].wPriority = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   354
 		streamHdr[ 0 ].wLanguage = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   355
@@ -1312,14 +1312,14 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   356
 		bitmapinfo.biHeight = 480;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   357
 		bitmapinfo.biPlanes = 1;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   358
 		bitmapinfo.biBitCount = 24;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   359
-		bitmapinfo.biCompression = make_fourcc( "dvsd" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   360
+		bitmapinfo.biCompression = make_fourcc((char *)"dvsd" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   361
 		bitmapinfo.biSizeImage = 120000;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   362
 		bitmapinfo.biXPelsPerMeter = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   363
 		bitmapinfo.biYPelsPerMeter = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   364
 		bitmapinfo.biClrUsed = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   365
 		bitmapinfo.biClrImportant = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   366
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   367
-		streamHdr[ 1 ].fccType = make_fourcc( "auds" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   368
+		streamHdr[ 1 ].fccType = make_fourcc((char *)"auds" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   369
 		streamHdr[ 1 ].fccHandler = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   370
 		streamHdr[ 1 ].dwFlags = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   371
 		streamHdr[ 1 ].wPriority = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   372
@@ -1347,47 +1347,47 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   373
 	waveformatex.wBitsPerSample = 16;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   374
 	waveformatex.cbSize = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   375
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   376
-	file_list = AddDirectoryEntry( make_fourcc( "FILE" ), make_fourcc( "FILE" ), 0, RIFF_NO_PARENT );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   377
+	file_list = AddDirectoryEntry( make_fourcc((char *)"FILE" ), make_fourcc((char *)"FILE" ), 0, RIFF_NO_PARENT );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   378
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   379
 	/* Create a basic directory structure. Only chunks defined from here on will be written to the AVI file. */
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   380
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   381
-	riff_list = AddDirectoryEntry( make_fourcc( "RIFF" ), make_fourcc( "AVI " ), RIFF_LISTSIZE, file_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   382
-	hdrl_list = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "hdrl" ), RIFF_LISTSIZE, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   383
-	avih_chunk = AddDirectoryEntry( make_fourcc( "avih" ), 0, sizeof( MainAVIHeader ), hdrl_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   384
-
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   385
-	strl_list[ 0 ] = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "strl" ), RIFF_LISTSIZE, hdrl_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   386
-	strh_chunk[ 0 ] = AddDirectoryEntry( make_fourcc( "strh" ), 0, sizeof( AVIStreamHeader ), strl_list[ 0 ] );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   387
-	strf_chunk[ 0 ] = AddDirectoryEntry( make_fourcc( "strf" ), 0, sizeof( BITMAPINFOHEADER ), strl_list[ 0 ] );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   388
+	riff_list = AddDirectoryEntry( make_fourcc((char *)"RIFF" ), make_fourcc((char *)"AVI " ), RIFF_LISTSIZE, file_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   389
+	hdrl_list = AddDirectoryEntry( make_fourcc((char *)"LIST" ), make_fourcc((char *)"hdrl" ), RIFF_LISTSIZE, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   390
+	avih_chunk = AddDirectoryEntry( make_fourcc((char *)"avih" ), 0, sizeof( MainAVIHeader ), hdrl_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   391
+
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   392
+	strl_list[ 0 ] = AddDirectoryEntry( make_fourcc((char *)"LIST" ), make_fourcc((char *)"strl" ), RIFF_LISTSIZE, hdrl_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   393
+	strh_chunk[ 0 ] = AddDirectoryEntry( make_fourcc((char *)"strh" ), 0, sizeof( AVIStreamHeader ), strl_list[ 0 ] );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   394
+	strf_chunk[ 0 ] = AddDirectoryEntry( make_fourcc((char *)"strf" ), 0, sizeof( BITMAPINFOHEADER ), strl_list[ 0 ] );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   395
 	if ( index_type & AVI_LARGE_INDEX )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   396
 	{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   397
-		indx_chunk[ 0 ] = AddDirectoryEntry( make_fourcc( "indx" ), 0, sizeof( AVISuperIndex ), strl_list[ 0 ] );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   398
+		indx_chunk[ 0 ] = AddDirectoryEntry( make_fourcc((char *)"indx" ), 0, sizeof( AVISuperIndex ), strl_list[ 0 ] );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   399
 		ix_chunk[ 0 ] = -1;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   400
-		indx[ 0 ] ->dwChunkId = make_fourcc( "00dc" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   401
+		indx[ 0 ] ->dwChunkId = make_fourcc((char *)"00dc" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   402
 	}
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   403
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   404
-	strl_list[ 1 ] = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "strl" ), RIFF_LISTSIZE, hdrl_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   405
-	strh_chunk[ 1 ] = AddDirectoryEntry( make_fourcc( "strh" ), 0, sizeof( AVIStreamHeader ), strl_list[ 1 ] );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   406
-	strf_chunk[ 1 ] = AddDirectoryEntry( make_fourcc( "strf" ), 0, sizeof( WAVEFORMATEX ) - 2, strl_list[ 1 ] );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   407
-	junk_chunk = AddDirectoryEntry( make_fourcc( "JUNK" ), 0, 2, strl_list[ 1 ] );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   408
+	strl_list[ 1 ] = AddDirectoryEntry( make_fourcc((char *)"LIST" ), make_fourcc((char *)"strl" ), RIFF_LISTSIZE, hdrl_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   409
+	strh_chunk[ 1 ] = AddDirectoryEntry( make_fourcc((char *)"strh" ), 0, sizeof( AVIStreamHeader ), strl_list[ 1 ] );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   410
+	strf_chunk[ 1 ] = AddDirectoryEntry( make_fourcc((char *)"strf" ), 0, sizeof( WAVEFORMATEX ) - 2, strl_list[ 1 ] );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   411
+	junk_chunk = AddDirectoryEntry( make_fourcc((char *)"JUNK" ), 0, 2, strl_list[ 1 ] );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   412
 	if ( index_type & AVI_LARGE_INDEX )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   413
 	{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   414
-		indx_chunk[ 1 ] = AddDirectoryEntry( make_fourcc( "indx" ), 0, sizeof( AVISuperIndex ), strl_list[ 1 ] );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   415
+		indx_chunk[ 1 ] = AddDirectoryEntry( make_fourcc((char *)"indx" ), 0, sizeof( AVISuperIndex ), strl_list[ 1 ] );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   416
 		ix_chunk[ 1 ] = -1;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   417
-		indx[ 1 ] ->dwChunkId = make_fourcc( "01wb" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   418
+		indx[ 1 ] ->dwChunkId = make_fourcc((char *)"01wb" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   419
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   420
-		odml_list = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "odml" ), RIFF_LISTSIZE, hdrl_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   421
-		dmlh_chunk = AddDirectoryEntry( make_fourcc( "dmlh" ), 0, 0x00f8, odml_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   422
+		odml_list = AddDirectoryEntry( make_fourcc((char *)"LIST" ), make_fourcc((char *)"odml" ), RIFF_LISTSIZE, hdrl_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   423
+		dmlh_chunk = AddDirectoryEntry( make_fourcc((char *)"dmlh" ), 0, 0x00f8, odml_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   424
 	}
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   425
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   426
 	/* align movi list to block */
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   427
 	GetDirectoryEntry( hdrl_list, type, name, length, offset, parent );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   428
 	num_blocks = length / PADDING_SIZE + 1;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   429
 	length = num_blocks * PADDING_SIZE - length - 5 * RIFF_HEADERSIZE; // why 5 headers?
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   430
-	junk_chunk = AddDirectoryEntry( make_fourcc( "JUNK" ), 0, length, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   431
+	junk_chunk = AddDirectoryEntry( make_fourcc((char *)"JUNK" ), 0, length, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   432
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   433
-	movi_list = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "movi" ), RIFF_LISTSIZE, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   434
+	movi_list = AddDirectoryEntry( make_fourcc((char *)"LIST" ), make_fourcc((char *)"movi" ), RIFF_LISTSIZE, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   435
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   436
-	idx1->aIndex[ idx1->nEntriesInUse ].dwChunkId = make_fourcc( "7Fxx" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   437
+	idx1->aIndex[ idx1->nEntriesInUse ].dwChunkId = make_fourcc((char *)"7Fxx" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   438
 	idx1->aIndex[ idx1->nEntriesInUse ].dwFlags = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   439
 	idx1->aIndex[ idx1->nEntriesInUse ].dwOffset = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   440
 	idx1->aIndex[ idx1->nEntriesInUse ].dwSize = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   441
@@ -1416,7 +1416,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   442
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   443
 	if ( ( index_type & AVI_SMALL_INDEX ) && isUpdateIdx1 )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   444
 	{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   445
-		int idx1_chunk = AddDirectoryEntry( make_fourcc( "idx1" ), 0, idx1->nEntriesInUse * 16, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   446
+		int idx1_chunk = AddDirectoryEntry( make_fourcc((char *)"idx1" ), 0, idx1->nEntriesInUse * 16, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   447
 		WriteChunk( idx1_chunk, ( void* ) idx1 );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   448
 	}
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   449
 	RIFFFile::WriteRIFF();
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   450
@@ -1463,7 +1463,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   451
 	audio_size = ((DVFrame*)frame)->ExtractAudio( soundbuf );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   452
 	if ( audio_size > 0 )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   453
 	{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   454
-		audio_chunk = AddDirectoryEntry( make_fourcc( "01wb" ), 0, audio_size, movi_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   455
+		audio_chunk = AddDirectoryEntry( make_fourcc((char *)"01wb" ), 0, audio_size, movi_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   456
 		if ( ( index_type & AVI_LARGE_INDEX ) && ( streamHdr[ 0 ].dwLength % IX00_INDEX_SIZE ) == 0 )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   457
 		{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   458
 			GetDirectoryEntry( audio_chunk, type, name, length, offset, parent );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   459
@@ -1472,7 +1472,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   460
 		WriteChunk( audio_chunk, soundbuf );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   461
 		//        num_blocks = (audio_size + RIFF_HEADERSIZE) / PADDING_SIZE + 1;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   462
 		//		length = num_blocks * PADDING_SIZE - audio_size - 2 * RIFF_HEADERSIZE;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   463
-		//        junk_chunk = AddDirectoryEntry(make_fourcc("JUNK"), 0, length, movi_list);
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   464
+		//        junk_chunk = AddDirectoryEntry(make_fourcc((char *)"JUNK"), 0, length, movi_list);
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   465
 		//        WriteChunk(junk_chunk, g_zeroes);
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   466
 		if ( index_type & AVI_LARGE_INDEX )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   467
 			UpdateIndx( 1, audio_chunk, audio_size / waveformatex.nChannels / 2 );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   468
@@ -1484,7 +1484,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   469
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   470
 	/* Write video data */
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   471
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   472
-	frame_chunk = AddDirectoryEntry( make_fourcc( "00dc" ), 0, frame->GetDataLen(), movi_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   473
+	frame_chunk = AddDirectoryEntry( make_fourcc((char *)"00dc" ), 0, frame->GetDataLen(), movi_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   474
 	if ( ( index_type & AVI_LARGE_INDEX ) && ( streamHdr[ 0 ].dwLength % IX00_INDEX_SIZE ) == 0 )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   475
 	{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   476
 		GetDirectoryEntry( frame_chunk, type, name, length, offset, parent );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   477
@@ -1493,7 +1493,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   478
 	WriteChunk( frame_chunk, frame->data );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   479
 	//    num_blocks = (frame->GetDataLen() + RIFF_HEADERSIZE) / PADDING_SIZE + 1;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   480
 	//	length = num_blocks * PADDING_SIZE - frame->GetDataLen() - 2 * RIFF_HEADERSIZE;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   481
-	//    junk_chunk = AddDirectoryEntry(make_fourcc("JUNK"), 0, length, movi_list);
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   482
+	//    junk_chunk = AddDirectoryEntry(make_fourcc((char *)"JUNK"), 0, length, movi_list);
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   483
 	//    WriteChunk(junk_chunk, g_zeroes);
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   484
 	if ( index_type & AVI_LARGE_INDEX )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   485
 		UpdateIndx( 0, frame_chunk, 1 );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   486
@@ -1519,7 +1519,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   487
 		/* write idx1 only once and before end of first GB */
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   488
 		if ( ( index_type & AVI_SMALL_INDEX ) && isUpdateIdx1 )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   489
 		{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   490
-			int idx1_chunk = AddDirectoryEntry( make_fourcc( "idx1" ), 0, idx1->nEntriesInUse * 16, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   491
+			int idx1_chunk = AddDirectoryEntry( make_fourcc((char *)"idx1" ), 0, idx1->nEntriesInUse * 16, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   492
 			WriteChunk( idx1_chunk, ( void* ) idx1 );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   493
 		}
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   494
 		isUpdateIdx1 = false;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   495
@@ -1532,12 +1532,12 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   496
 			length = ( num_blocks * PADDING_SIZE ) - length - 4 * RIFF_HEADERSIZE - 2 * RIFF_LISTSIZE;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   497
 			if ( length > 0 )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   498
 			{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   499
-				junk_chunk = AddDirectoryEntry( make_fourcc( "JUNK" ), 0, length, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   500
+				junk_chunk = AddDirectoryEntry( make_fourcc((char *)"JUNK" ), 0, length, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   501
 				WriteChunk( junk_chunk, g_zeroes );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   502
 			}
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   503
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   504
-			riff_list = AddDirectoryEntry( make_fourcc( "RIFF" ), make_fourcc( "AVIX" ), RIFF_LISTSIZE, file_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   505
-			movi_list = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "movi" ), RIFF_LISTSIZE, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   506
+			riff_list = AddDirectoryEntry( make_fourcc((char *)"RIFF" ), make_fourcc((char *)"AVIX" ), RIFF_LISTSIZE, file_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   507
+			movi_list = AddDirectoryEntry( make_fourcc((char *)"LIST" ), make_fourcc((char *)"movi" ), RIFF_LISTSIZE, riff_list );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   508
 		}
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   509
 	}
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   510
 	return true;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   511
@@ -1568,7 +1568,7 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   512
 		if ( streamHdr[ i ].fccType == type )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   513
 		{
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   514
 			int k, j = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   515
-			FOURCC strf = make_fourcc( "strf" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   516
+			FOURCC strf = make_fourcc((char *)"strf" );
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   517
 			BITMAPINFOHEADER bih;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   518
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   519
 			streamHdr[ i ].fccHandler = handler;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   520
diff -ur dvgrab-3.0.orig/avi.h dvgrab-3.0/avi.h
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   521
--- dvgrab-3.0.orig/avi.h	2007-07-07 01:47:26.000000000 +0700
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   522
+++ dvgrab-3.0/avi.h	2007-09-04 13:06:50.888773270 +0700
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   523
@@ -31,7 +31,15 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   524
 #include "riff.h"
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   525
 #include "dvframe.h"
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   526
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   527
+#if !defined(__ASSERT_FUNCTION)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   528
+#define __ASSERT_FUNCTION __func__
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   529
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   530
+
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   531
+#if defined(__SUNPRO_CC)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   532
+#define PACKED(x)	x
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   533
+#else
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   534
 #define PACKED(x)	__attribute__((packed)) x
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   535
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   536
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   537
 #define AVI_SMALL_INDEX (0x01)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   538
 #define AVI_LARGE_INDEX (0x02)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   539
@@ -45,6 +53,9 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   540
  
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   541
     The contents of this struct goes into the 'avih' chunk.  */
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   542
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   543
+#if defined(__SUNPRO_CC)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   544
+#pragma packed(1)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   545
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   546
 typedef struct
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   547
 {
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   548
 	/// frame display rate (or 0L)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   549
@@ -71,17 +82,29 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   550
 	DWORD dwReserved[ 4 ];
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   551
 }
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   552
 PACKED(MainAVIHeader);
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   553
+#if defined(__SUNPRO_CC)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   554
+#pragma packed
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   555
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   556
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   557
+#if defined(__SUNPRO_CC)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   558
+#pragma packed(1)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   559
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   560
 typedef struct
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   561
 {
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   562
 	WORD top, bottom, left, right;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   563
 }
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   564
 PACKED(RECT);
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   565
+#if defined(__SUNPRO_CC)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   566
+#pragma packed
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   567
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   568
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   569
 /** Declaration of a stream header
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   570
  
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   571
     The contents of this struct goes into the 'strh' header. */
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   572
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   573
+#if defined(__SUNPRO_CC)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   574
+#pragma packed(1)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   575
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   576
 typedef struct
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   577
 {
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   578
 	FOURCC fccType;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   579
@@ -100,7 +123,13 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   580
 	RECT rcFrame;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   581
 }
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   582
 PACKED(AVIStreamHeader);
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   583
+#if defined(__SUNPRO_CC)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   584
+#pragma packed
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   585
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   586
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   587
+#if defined(__SUNPRO_CC)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   588
+#pragma packed(1)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   589
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   590
 typedef struct
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   591
 {
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   592
 	DWORD dwDVAAuxSrc;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   593
@@ -112,7 +141,13 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   594
 	DWORD dwDVReserved[ 2 ];
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   595
 }
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   596
 PACKED(DVINFO);
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   597
+#if defined(__SUNPRO_CC)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   598
+#pragma packed
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   599
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   600
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   601
+#if defined(__SUNPRO_CC)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   602
+#pragma packed(1)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   603
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   604
 typedef struct
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   605
 {
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   606
 	DWORD biSize;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   607
@@ -128,7 +163,13 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   608
 	DWORD biClrImportant;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   609
 }
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   610
 PACKED(BITMAPINFOHEADER);
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   611
+#if defined(__SUNPRO_CC)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   612
+#pragma packed
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   613
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   614
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   615
+#if defined(__SUNPRO_CC)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   616
+#pragma packed(1)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   617
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   618
 typedef struct
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   619
 {
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   620
 	WORD wFormatTag;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   621
@@ -141,7 +182,13 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   622
 	WORD dummy;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   623
 }
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   624
 PACKED(WAVEFORMATEX);
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   625
+#if defined(__SUNPRO_CC)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   626
+#pragma packed
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   627
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   628
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   629
+#if defined(__SUNPRO_CC)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   630
+#pragma packed(1)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   631
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   632
 typedef struct
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   633
 {
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   634
 	WORD wLongsPerEntry;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   635
@@ -159,7 +206,13 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   636
 	aIndex[ 2014 ];
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   637
 }
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   638
 PACKED(AVISuperIndex);
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   639
+#if defined(__SUNPRO_CC)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   640
+#pragma packed
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   641
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   642
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   643
+#if defined(__SUNPRO_CC)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   644
+#pragma packed(1)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   645
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   646
 typedef struct
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   647
 {
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   648
 	WORD wLongsPerEntry;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   649
@@ -177,7 +230,13 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   650
 	aIndex[ 4028 ];
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   651
 }
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   652
 PACKED(AVIStdIndex);
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   653
+#if defined(__SUNPRO_CC)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   654
+#pragma packed
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   655
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   656
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   657
+#if defined(__SUNPRO_CC)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   658
+#pragma packed(1)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   659
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   660
 typedef struct
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   661
 {
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   662
 	struct avisimpleindex_entry
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   663
@@ -191,6 +250,9 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   664
 	DWORD	nEntriesInUse;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   665
 }
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   666
 PACKED(AVISimpleIndex);
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   667
+#if defined(__SUNPRO_CC)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   668
+#pragma packed
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   669
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   670
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   671
 typedef struct
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   672
 {
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   673
diff -ur dvgrab-3.0.orig/dvgrab.cc dvgrab-3.0/dvgrab.cc
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   674
--- dvgrab-3.0.orig/dvgrab.cc	2007-08-07 10:00:43.000000000 +0700
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   675
+++ dvgrab-3.0/dvgrab.cc	2007-09-04 13:06:50.889447865 +0700
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   676
@@ -291,50 +291,50 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   677
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   678
 void DVgrab::getargs( int argc, char *argv[] )
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   679
 {
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   680
-	char *opts = "d:hif:F:I:s:tVv-";
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   681
+	char *opts = (char *)"d:hif:F:I:s:tVv-";
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   682
 	int optindex = 0;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   683
 	int c;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   684
 	struct option long_opts[] = {
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   685
 		// all these use sscanf for int conversion, use val == 0xff to indicate
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   686
-		{ "autosplit", no_argument, &m_autosplit, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   687
-		{ "buffers", required_argument, &m_buffers, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   688
-		{ "card", required_argument, &m_port, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   689
-		{ "channel", required_argument, &m_channel, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   690
-		{ "cmincutsize", required_argument, &m_collection_min_cut_file_size, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   691
-		{ "csize", required_argument, &m_collection_size, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   692
-		{ "debug", required_argument, 0, 0 },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   693
-		{ "duration", required_argument, 0, 0 },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   694
-		{ "every", required_argument, &m_frame_every, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   695
-		{ "format", required_argument, 0, 'f' },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   696
-		{ "frames", required_argument, &m_frame_count, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   697
-		{ "guid", required_argument, 0, 0 },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   698
-		{ "help", no_argument, 0, 'h' },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   699
-		{ "input", required_argument, 0, 'I' },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   700
-		{ "interactive", no_argument, 0, 'i'},
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   701
+		{ (char *)"autosplit", no_argument, &m_autosplit, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   702
+		{ (char *)"buffers", required_argument, &m_buffers, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   703
+		{ (char *)"card", required_argument, &m_port, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   704
+		{ (char *)"channel", required_argument, &m_channel, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   705
+		{ (char *)"cmincutsize", required_argument, &m_collection_min_cut_file_size, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   706
+		{ (char *)"csize", required_argument, &m_collection_size, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   707
+		{ (char *)"debug", required_argument, 0, 0 },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   708
+		{ (char *)"duration", required_argument, 0, 0 },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   709
+		{ (char *)"every", required_argument, &m_frame_every, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   710
+		{ (char *)"format", required_argument, 0, 'f' },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   711
+		{ (char *)"frames", required_argument, &m_frame_count, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   712
+		{ (char *)"guid", required_argument, 0, 0 },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   713
+		{ (char *)"help", no_argument, 0, 'h' },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   714
+		{ (char *)"input", required_argument, 0, 'I' },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   715
+		{ (char *)"interactive", no_argument, 0, 'i'},
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   716
 #if defined(HAVE_LIBJPEG) && defined(HAVE_LIBDV)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   717
-		{ "jpeg-deinterlace", no_argument, &m_jpeg_deinterlace, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   718
-		{ "jpeg-height", required_argument, &m_jpeg_height, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   719
-		{ "jpeg-overwrite", no_argument, &m_jpeg_overwrite, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   720
-		{ "jpeg-quality", required_argument, &m_jpeg_quality, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   721
-		{ "jpeg-temp", required_argument, &m_jpeg_usetemp, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   722
-		{ "jpeg-width", required_argument, &m_jpeg_width, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   723
+		{ (char *)"jpeg-deinterlace", no_argument, &m_jpeg_deinterlace, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   724
+		{ (char *)"jpeg-height", required_argument, &m_jpeg_height, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   725
+		{ (char *)"jpeg-overwrite", no_argument, &m_jpeg_overwrite, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   726
+		{ (char *)"jpeg-quality", required_argument, &m_jpeg_quality, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   727
+		{ (char *)"jpeg-temp", required_argument, &m_jpeg_usetemp, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   728
+		{ (char *)"jpeg-width", required_argument, &m_jpeg_width, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   729
 #endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   730
-		{ "lockstep", no_argument, &m_lockstep, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   731
-		{ "lockstep_maxdrops", required_argument, &m_lockstep_maxdrops, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   732
-		{ "lockstep_totaldrops", required_argument, &m_lockstep_totaldrops, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   733
-		{ "noavc", no_argument, &m_noavc, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   734
-		{ "nostop", no_argument, &m_no_stop, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   735
-		{ "opendml", no_argument, &m_open_dml, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   736
-		{ "showstatus", no_argument, &m_showstatus, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   737
-		{ "size", required_argument, &m_max_file_size, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   738
-		{ "stdin", no_argument, 0, 0 },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   739
-		{ "timecode", no_argument, &m_timecode, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   740
-		{ "timestamp", no_argument, &m_timestamp, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   741
-		{ "timesys", no_argument, &m_timesys, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   742
+		{ (char *)"lockstep", no_argument, &m_lockstep, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   743
+		{ (char *)"lockstep_maxdrops", required_argument, &m_lockstep_maxdrops, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   744
+		{ (char *)"lockstep_totaldrops", required_argument, &m_lockstep_totaldrops, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   745
+		{ (char *)"noavc", no_argument, &m_noavc, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   746
+		{ (char *)"nostop", no_argument, &m_no_stop, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   747
+		{ (char *)"opendml", no_argument, &m_open_dml, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   748
+		{ (char *)"showstatus", no_argument, &m_showstatus, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   749
+		{ (char *)"size", required_argument, &m_max_file_size, 0xff },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   750
+		{ (char *)"stdin", no_argument, 0, 0 },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   751
+		{ (char *)"timecode", no_argument, &m_timecode, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   752
+		{ (char *)"timestamp", no_argument, &m_timestamp, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   753
+		{ (char *)"timesys", no_argument, &m_timesys, true },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   754
 #ifdef HAVE_LINUX_VIDEODEV2_H
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   755
-		{ "v4l2", no_argument, 0, 'V' },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   756
+		{ (char *)"v4l2", no_argument, 0, 'V' },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   757
 #endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   758
-		{ "version", no_argument, 0, 'v' },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   759
+		{ (char *)"version", no_argument, 0, 'v' },
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   760
 		{ 0, 0, 0, 0 }
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   761
 	};
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   762
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   763
diff -ur dvgrab-3.0.orig/endian_types.h dvgrab-3.0/endian_types.h
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   764
--- dvgrab-3.0.orig/endian_types.h	2005-04-18 21:24:48.000000000 +0700
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   765
+++ dvgrab-3.0/endian_types.h	2007-09-04 13:06:50.889699833 +0700
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   766
@@ -100,6 +100,9 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   767
 #endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   768
 }
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   769
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   770
+#if defined(__SUNPRO_CC)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   771
+#pragma packed(1)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   772
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   773
 template <class T> class le_t {
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   774
 	T	m;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   775
 	T	read() const {
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   776
@@ -150,10 +153,19 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   777
 		m |= t.m;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   778
 		return *this;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   779
 	};
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   780
+#if defined(__SUNPRO_CC)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   781
+};
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   782
+#pragma packed
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   783
+#else
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   784
 } __attribute__((packed));
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   785
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   786
+
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   787
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   788
 /* Just copy-and-pasted from le_t. Too lazy to do it right. */
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   789
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   790
+#if defined(__SUNPRO_CC)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   791
+#pragma packed(1)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   792
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   793
 template <class T> class be_t {
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   794
 	T	m;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   795
 	T	read() const {
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   796
@@ -204,7 +216,12 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   797
 		m |= t.m;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   798
 		return *this;
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   799
 	};
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   800
+#if defined(__SUNPRO_CC)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   801
+};
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   802
+#pragma packed
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   803
+#else
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   804
 } __attribute__((packed));
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   805
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   806
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   807
 /* Define types of native endianness similar to the little and big endian
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   808
  * versions below. Not really necessary but useful occasionally to emphasize
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   809
diff -ur dvgrab-3.0.orig/ieee1394io.cc dvgrab-3.0/ieee1394io.cc
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   810
--- dvgrab-3.0.orig/ieee1394io.cc	2007-07-07 14:10:12.000000000 +0700
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   811
+++ dvgrab-3.0/ieee1394io.cc	2007-09-04 13:06:50.890098559 +0700
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   812
@@ -47,6 +47,10 @@
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   813
 #include <config.h>
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   814
 #endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   815
 
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   816
+#if !defined(__ASSERT_FUNCTION)
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   817
+#define __ASSERT_FUNCTION __func__
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   818
+#endif
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   819
+
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   820
 #include <deque>
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   821
 #include <iostream>
8739b4d845c1 2007-09-04 Doug Scott <[email protected]>
drdoug007
parents:
diff changeset
   822