MythTV
0.27pre
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Groups
Pages
mythplugins
mythmusic
mythmusic
encoder.cpp
Go to the documentation of this file.
1
#include <iostream>
2
3
#include <
musicmetadata.h
>
4
#include <
mythcontext.h
>
5
6
#include "encoder.h"
7
8
9
using namespace
std;
10
11
Encoder::Encoder
(
const
QString &outfile,
int
qualitylevel,
MusicMetadata
*metadata)
12
: m_outfile(outfile), m_out(NULL), m_quality(qualitylevel),
13
m_metadata(metadata)
14
{
15
if
(!
m_outfile
.isEmpty())
16
{
17
QByteArray outfile =
m_outfile
.toLocal8Bit();
18
m_out
= fopen(outfile.constData(),
"w+"
);
19
if
(!
m_out
)
20
{
21
LOG(VB_GENERAL, LOG_ERR, QString(
"Error opening output file: '%1'"
)
22
.arg(
m_outfile
));
23
}
24
}
25
}
26
27
Encoder::~Encoder
()
28
{
29
if
(
m_out
)
30
fclose(
m_out
);
31
}
Generated on Tue May 21 2013 06:59:50 for MythTV by
1.8.1.2