4 #include "formatcheck.h"
8 #define _(String) gettext(String)
9 #define gettext_noop(String) String
10 #define N_(String) gettext_noop (String)
12 FormatCheck::FormatCheck(Asset *asset)
17 FormatCheck::~FormatCheck()
21 int FormatCheck::check_format()
25 if(!result && asset->video_data)
27 // Only 1 format can store video.
28 if(!File::supports_video(asset->format))
30 ErrorBox errorbox(PROGRAM_NAME ": Error");
31 errorbox.create_objects(_("The format you selected doesn't support video."));
32 errorbox.run_window();
37 if(!result && asset->audio_data)
39 if(!File::supports_audio(asset->format))
41 ErrorBox errorbox(PROGRAM_NAME ": Error");
42 errorbox.create_objects(_("The format you selected doesn't support audio."));
43 errorbox.run_window();
47 if(!result && asset->bits == BITSIMA4 && asset->format != FILE_MOV)
49 ErrorBox errorbox(PROGRAM_NAME ": Error");
50 errorbox.create_objects(_("IMA4 compression is only available in Quicktime movies."));
51 errorbox.run_window();
55 if(!result && asset->bits == BITSULAW &&
56 asset->format != FILE_MOV &&
57 asset->format != FILE_PCM)
59 ErrorBox errorbox(PROGRAM_NAME ": Error");
60 errorbox.create_objects(_("ULAW compression is only available in\n"
61 "Quicktime Movies and PCM files."));
62 errorbox.run_window();