00001 #include <iostream>
00002
00003 #include "metadata.h"
00004 #include "encoder.h"
00005
00006 #include <mythtv/mythcontext.h>
00007
00008 using namespace std;
00009
00010 Encoder::Encoder(const QString &outfile, int qualitylevel, Metadata *metadata)
00011 : m_outfile(outfile), m_out(NULL), m_quality(qualitylevel),
00012 m_metadata(metadata)
00013 {
00014 if (m_outfile)
00015 {
00016 m_out = fopen(m_outfile.local8Bit(), "w+");
00017 if (!m_out)
00018 VERBOSE(VB_GENERAL, QString("Error opening output file: %1")
00019 .arg(m_outfile.local8Bit()));
00020 }
00021 }
00022
00023 Encoder::~Encoder()
00024 {
00025 if (m_out)
00026 fclose(m_out);
00027 }