mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2024-12-24 20:01:42 +00:00
put wtv specific dump in WTV_DEBUG macro
This commit is contained in:
parent
b7b8adf517
commit
015a50bafd
@ -614,9 +614,11 @@ int main(int argc, char *argv[])
|
||||
case CCX_SM_MP4:
|
||||
mprint ("\rFile seems to be a MP4\n");
|
||||
break;
|
||||
#ifdef WTV_DEBUG
|
||||
case CCX_SM_HEX_DUMP:
|
||||
mprint ("\rFile seems to be an hexadecimal dump\n");
|
||||
break;
|
||||
#endif
|
||||
case CCX_SM_MYTH:
|
||||
case CCX_SM_AUTODETECT:
|
||||
fatal(EXIT_BUG_BUG, "Cannot be reached!");
|
||||
@ -693,10 +695,12 @@ int main(int argc, char *argv[])
|
||||
close_input_file(); // No need to have it open. GPAC will do it for us
|
||||
processmp4 (inputfile[0]);
|
||||
break;
|
||||
#ifdef WTV_DEBUG
|
||||
case CCX_SM_HEX_DUMP:
|
||||
close_input_file(); // processhex will open it in text mode
|
||||
processhex (inputfile[0]);
|
||||
processhex (inputfile[0]);
|
||||
break;
|
||||
#endif
|
||||
case CCX_SM_AUTODETECT:
|
||||
fatal(EXIT_BUG_BUG, "Cannot be reached!");
|
||||
break;
|
||||
|
@ -173,7 +173,9 @@ enum ccx_stream_mode_enum
|
||||
CCX_SM_RCWT = 5, // Raw Captions With Time, not used yet.
|
||||
CCX_SM_MYTH = 6, // Use the myth loop
|
||||
CCX_SM_MP4 = 7, // MP4, ISO-
|
||||
#ifdef WTV_DEBUG
|
||||
CCX_SM_HEX_DUMP = 8, // Hexadecimal dump generated by wtvccdump
|
||||
#endif
|
||||
CCX_SM_WTV = 9,
|
||||
CCX_SM_AUTODETECT = 16
|
||||
};
|
||||
|
@ -266,6 +266,7 @@ LLONG general_getmoredata(void)
|
||||
return bytesread;
|
||||
}
|
||||
|
||||
#ifdef WTV_DEBUG
|
||||
// Hexadecimal dump process
|
||||
void processhex (char *filename)
|
||||
{
|
||||
@ -425,7 +426,7 @@ void processhex (char *filename)
|
||||
}
|
||||
fclose(fr);
|
||||
}
|
||||
|
||||
#endif
|
||||
// Raw file process
|
||||
void raw_loop ()
|
||||
{
|
||||
|
@ -318,8 +318,10 @@ void set_input_format (const char *format)
|
||||
auto_stream = CCX_SM_RCWT;
|
||||
else if (strcmp (format,"mp4")==0)
|
||||
auto_stream = CCX_SM_MP4;
|
||||
#ifdef WTV_DEBUG
|
||||
else if (strcmp (format,"hex")==0)
|
||||
auto_stream = CCX_SM_HEX_DUMP;
|
||||
#endif
|
||||
else
|
||||
fatal (EXIT_MALFORMED_PARAMETER, "Unknown input file format: %s\n", format);
|
||||
}
|
||||
@ -391,7 +393,9 @@ void usage (void)
|
||||
mprint (" bin -> CCExtractor's own binary format.\n");
|
||||
mprint (" raw -> For McPoodle's raw files.\n");
|
||||
mprint (" mp4 -> MP4/MOV/M4V and similar.\n");
|
||||
#ifdef WTV_DEBUG
|
||||
mprint (" hex -> Hexadecimal dump as generated by wtvccdump.\n");
|
||||
#endif
|
||||
mprint (" -ts, -ps, -es, -mp4, -wtv and -asf (or --dvr-ms) can be used as shorts.\n\n");
|
||||
mprint ("Output formats:\n\n");
|
||||
mprint (" -out=format\n\n");
|
||||
|
@ -56,9 +56,11 @@ void params_dump(void)
|
||||
case CCX_SM_MP4:
|
||||
mprint ("MP4");
|
||||
break;
|
||||
#ifdef WTV_DEBUG
|
||||
case CCX_SM_HEX_DUMP:
|
||||
mprint ("Hex");
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
fatal (EXIT_BUG_BUG, "BUG: Unknown stream mode.\n");
|
||||
break;
|
||||
@ -283,9 +285,11 @@ void print_file_report(void)
|
||||
case CCX_SM_RCWT:
|
||||
printf("BIN\n");
|
||||
break;
|
||||
#ifdef WTV_DEBUG
|
||||
case CCX_SM_HEX_DUMP:
|
||||
printf("Hex\n");
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ void detect_stream_type (void)
|
||||
startbytes[3]==0x20)
|
||||
stream_mode=CCX_SM_WTV;
|
||||
}
|
||||
#ifdef WTV_DEBUG
|
||||
if (stream_mode==CCX_SM_ELEMENTARY_OR_NOT_FOUND && startbytes_avail>=6)
|
||||
{
|
||||
// Check for hexadecimal dump generated by wtvccdump
|
||||
@ -42,6 +43,7 @@ void detect_stream_type (void)
|
||||
startbytes[5]=='D')
|
||||
stream_mode= CCX_SM_HEX_DUMP;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (stream_mode==CCX_SM_ELEMENTARY_OR_NOT_FOUND && startbytes_avail>=11)
|
||||
{
|
||||
|
@ -37,7 +37,9 @@ void set_fts(void)
|
||||
case CCX_SM_MCPOODLESRAW:
|
||||
case CCX_SM_RCWT:
|
||||
case CCX_SM_MP4:
|
||||
#ifdef WTV_DEBUG
|
||||
case CCX_SM_HEX_DUMP:
|
||||
#endif
|
||||
dif = 0;
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user