MythTV
master
mythplugins
mythmusic
mythmusic
encoder.cpp
Go to the documentation of this file.
1
// C++
2
#include <iostream>
3
4
// MythTV
5
#include <
libmyth/mythcontext.h
>
6
#include <
libmythmetadata/musicmetadata.h
>
7
8
// MythMusic
9
#include "
encoder.h
"
10
11
12
Encoder::Encoder
(QString outfile,
int
qualitylevel,
MusicMetadata
*metadata)
13
: m_outfile(
std
::move(outfile)), m_quality(qualitylevel),
14
m_metadata(metadata)
15
{
16
if
(!
m_outfile
.isEmpty())
17
{
18
QByteArray loutfile =
m_outfile
.toLocal8Bit();
19
m_out
= fopen(loutfile.constData(),
"w+"
);
20
if
(!
m_out
)
21
{
22
LOG
(VB_GENERAL, LOG_ERR, QString(
"Error opening output file: '%1'"
)
23
.arg(
m_outfile
));
24
}
25
}
26
}
27
28
Encoder::~Encoder
()
29
{
30
if
(
m_out
)
31
fclose(
m_out
);
32
}
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition:
mythlogging.h:39
MusicMetadata
Definition:
musicmetadata.h:80
Encoder::Encoder
Encoder(QString outfile, int qualitylevel, MusicMetadata *metadata)
Definition:
encoder.cpp:12
encoder.h
std
Definition:
mythchrono.h:23
mythcontext.h
Encoder::m_outfile
const QString m_outfile
Definition:
mythplugins/mythmusic/mythmusic/encoder.h:23
Encoder::~Encoder
virtual ~Encoder()
Definition:
encoder.cpp:28
musicmetadata.h
Encoder::m_out
FILE * m_out
Definition:
mythplugins/mythmusic/mythmusic/encoder.h:24
Generated on Mon Nov 27 2023 03:19:43 for MythTV by
1.8.17