Source is not a valid %1% file

This commit is contained in:
Luther Stickell 2011-10-21 15:11:55 +02:00
parent 6dd2e69b2f
commit d4f7e94d5c
9 changed files with 9 additions and 9 deletions

View File

@ -101,7 +101,7 @@ avi_reader_c::avi_reader_c(track_info_c &_ti)
mm_file_io_c io(m_ti.m_fname);
size = io.get_size();
if (!avi_reader_c::probe_file(&io, size))
throw error_c(Y("avi_reader: Source is not a valid AVI file."));
throw error_c(boost::format(Y("%1%: Source is not a valid %1% file.")) % get_format_name());
} catch (...) {
throw error_c(Y("avi_reader: Could not read the source file."));

View File

@ -69,7 +69,7 @@ corepicture_reader_c::corepicture_reader_c(track_info_c &_ti)
m_xml_source = new mm_text_io_c(new mm_file_io_c(m_ti.m_fname));
if (!corepicture_reader_c::probe_file(m_xml_source, 0))
throw error_c(Y("corepicture_reader: Source is not a valid CorePanorama file."));
throw error_c(boost::format(Y("%1%: Source is not a valid %1% file.")) % get_format_name());
parse_xml_file();

View File

@ -329,7 +329,7 @@ ogm_reader_c::ogm_reader_c(track_info_c &_ti)
throw error_c(boost::format(Y("%1%: Could not open the source file.")) % get_format_name());
}
if (!ogm_reader_c::probe_file(io, file_size))
throw error_c(Y("ogm_reader: Source is not a valid OGG media file."));
throw error_c(boost::format(Y("%1%: Source is not a valid %1% file.")) % get_format_name());
ogg_sync_init(&oy);

View File

@ -118,7 +118,7 @@ qtmp4_reader_c::qtmp4_reader_c(track_info_c &_ti)
file_size = io->getFilePointer();
io->setFilePointer(0, seek_beginning);
if (!qtmp4_reader_c::probe_file(io, file_size))
throw error_c(Y("Quicktime/MP4 reader: Source is not a valid Quicktime/MP4 file."));
throw error_c(boost::format(Y("%1%: Source is not a valid %1% file.")) % get_format_name());
show_demuxer_info();

View File

@ -144,7 +144,7 @@ real_reader_c::real_reader_c(track_info_c &_ti)
file = rmff_open_file_with_io(m_ti.m_fname.c_str(), RMFF_OPEN_MODE_READING, &mm_io_file_io);
if (NULL == file) {
if (RMFF_ERR_NOT_RMFF == rmff_last_error)
throw error_c(Y("real_reader: Source is not a valid RealMedia file."));
throw error_c(boost::format(Y("%1%: Source is not a valid %1% file.")) % get_format_name());
else
throw error_c(Y("real_reader: Could not read the source file."));
}

View File

@ -31,7 +31,7 @@ srt_reader_c::srt_reader_c(track_info_c &p_ti)
try {
m_io = mm_text_io_cptr(new mm_text_io_c(new mm_file_io_c(m_ti.m_fname)));
if (!srt_parser_c::probe(m_io.get_object()))
throw error_c(Y("srt_reader: Source is not a valid SRT file."));
throw error_c(boost::format(Y("%1%: Source is not a valid %1% file.")) % get_format_name());
m_ti.m_id = 0; // ID for this track.
m_subs = srt_parser_cptr(new srt_parser_c(m_io.get_object(), m_ti.m_fname, 0));

View File

@ -41,7 +41,7 @@ ssa_reader_c::ssa_reader_c(track_info_c &_ti)
}
if (!ssa_reader_c::probe_file(io.get_object(), 0))
throw error_c(Y("ssa_reader: Source is not a valid SSA/ASS file."));
throw error_c(boost::format(Y("%1%: Source is not a valid %1% file.")) % get_format_name());
charset_converter_cptr cc_utf8 = map_has_key(m_ti.m_sub_charsets, 0) ? charset_converter_c::init(m_ti.m_sub_charsets[ 0])
: map_has_key(m_ti.m_sub_charsets, -1) ? charset_converter_c::init(m_ti.m_sub_charsets[-1])

View File

@ -72,7 +72,7 @@ usf_reader_c::usf_reader_c(track_info_c &_ti)
size_t i;
if (!usf_reader_c::probe_file(m_xml_source, 0))
throw error_c(Y("usf_reader: Source is not a valid USF file."));
throw error_c(boost::format(Y("%1%: Source is not a valid %1% file.")) % get_format_name());
parse_xml_file();
m_private_data += "</USFSubtitles>";

View File

@ -463,7 +463,7 @@ wav_reader_c::wav_reader_c(track_info_c &ti_)
}
if (!wav_reader_c::probe_file(m_io.get_object(), size))
throw error_c(Y("wav_reader: Source is not a valid WAVE file."));
throw error_c(boost::format(Y("%1%: Source is not a valid %1% file.")) % get_format_name());
parse_file();
create_demuxer();