MythTV  master
mythmediawriter.cpp
Go to the documentation of this file.
1 /*
2  * Class FileWriterBase
3  *
4  * Copyright (C) Chris Pinkham 2011
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 // MythTV
22 #include "io/mythmediawriter.h"
23 
24 void MythMediaWriter::SetFilename(const QString &FileName)
25 {
26  m_filename = FileName;
27 }
28 
29 void MythMediaWriter::SetContainer(const QString &Cont)
30 {
31  m_container = Cont;
32 }
33 
34 void MythMediaWriter::SetVideoCodec(const QString &Codec)
35 {
36  m_videoCodec = Codec;
37 }
38 
40 {
41  m_videoBitrate = Bitrate;
42 }
43 
45 {
46  m_width = Width;
47 }
48 
50 {
51  m_height = Height;
52 }
53 
54 void MythMediaWriter::SetAspect(float Aspect)
55 {
56  m_aspect = Aspect;
57 }
58 
60 {
61  m_frameRate = Rate;
62 }
63 
65 {
66  m_keyFrameDist = Dist;
67 }
68 
69 void MythMediaWriter::SetAudioCodec(const QString &Codec)
70 {
71  m_audioCodec = Codec;
72 }
73 
75 {
76  m_audioBitrate = Bitrate;
77 }
78 
80 {
81  m_audioChannels = Channels;
82 }
83 
85 {
86  m_audioFrameRate = Rate;
87 }
88 
90 {
92 }
93 
95 {
96  m_encodingThreadCount = Count;
97 }
98 
99 void MythMediaWriter::SetTimecodeOffset(std::chrono::milliseconds Offset)
100 {
101  m_startingTimecodeOffset = Offset;
102 }
103 
104 void MythMediaWriter::SetEncodingPreset(const QString &Preset)
105 {
106  m_encodingPreset = Preset;
107 }
108 
109 void MythMediaWriter::SetEncodingTune(const QString &Tune)
110 {
111  m_encodingTune = Tune;
112 }
113 
115 {
116  return m_framesWritten;
117 }
118 
119 std::chrono::milliseconds MythMediaWriter::GetTimecodeOffset(void) const
120 {
122 }
123 
125 {
126  return m_audioFrameSize;
127 }
MythMediaWriter::m_audioChannels
int m_audioChannels
Definition: mythmediawriter.h:62
mythmediawriter.h
MythMediaWriter::m_audioBitrate
int m_audioBitrate
Definition: mythmediawriter.h:61
MythMediaWriter::SetTimecodeOffset
void SetTimecodeOffset(std::chrono::milliseconds Offset)
Definition: mythmediawriter.cpp:99
MythMediaWriter::SetAudioFrameRate
void SetAudioFrameRate(int Rate)
Definition: mythmediawriter.cpp:84
MythMediaWriter::m_videoCodec
QString m_videoCodec
Definition: mythmediawriter.h:53
MythMediaWriter::SetVideoCodec
void SetVideoCodec(const QString &Codec)
Definition: mythmediawriter.cpp:34
MythMediaWriter::SetAudioCodec
void SetAudioCodec(const QString &Codec)
Definition: mythmediawriter.cpp:69
MythMediaWriter::m_audioFormat
AudioFormat m_audioFormat
Definition: mythmediawriter.h:64
MythMediaWriter::m_container
QString m_container
Definition: mythmediawriter.h:52
MythMediaWriter::SetAudioChannels
void SetAudioChannels(int Channels)
Definition: mythmediawriter.cpp:79
MythMediaWriter::m_height
int m_height
Definition: mythmediawriter.h:56
MythMediaWriter::m_videoBitrate
int m_videoBitrate
Definition: mythmediawriter.h:54
MythMediaWriter::GetFramesWritten
long long GetFramesWritten(void) const
Definition: mythmediawriter.cpp:114
MythDate::Format
Format
Definition: mythdate.h:15
MythMediaWriter::m_keyFrameDist
int m_keyFrameDist
Definition: mythmediawriter.h:59
MythMediaWriter::m_audioFrameSize
int m_audioFrameSize
Definition: mythmediawriter.h:65
MythMediaWriter::m_encodingThreadCount
int m_encodingThreadCount
Definition: mythmediawriter.h:66
MythMediaWriter::SetEncodingPreset
void SetEncodingPreset(const QString &Preset)
Definition: mythmediawriter.cpp:104
MythMediaWriter::SetFilename
void SetFilename(const QString &FileName)
Definition: mythmediawriter.cpp:24
MythMediaWriter::m_audioCodec
QString m_audioCodec
Definition: mythmediawriter.h:60
MythMediaWriter::m_startingTimecodeOffset
std::chrono::milliseconds m_startingTimecodeOffset
Definition: mythmediawriter.h:68
MythMediaWriter::GetAudioFrameSize
int GetAudioFrameSize(void) const
Definition: mythmediawriter.cpp:124
MythMediaWriter::SetWidth
void SetWidth(int Width)
Definition: mythmediawriter.cpp:44
MythMediaWriter::m_encodingPreset
QString m_encodingPreset
Definition: mythmediawriter.h:69
MythMediaWriter::SetEncodingTune
void SetEncodingTune(const QString &Tune)
Definition: mythmediawriter.cpp:109
MythMediaWriter::SetAudioBitrate
void SetAudioBitrate(int Bitrate)
Definition: mythmediawriter.cpp:74
MythMediaWriter::m_audioFrameRate
int m_audioFrameRate
Definition: mythmediawriter.h:63
MythMediaWriter::SetKeyFrameDist
void SetKeyFrameDist(int Dist)
Definition: mythmediawriter.cpp:64
MythMediaWriter::SetThreadCount
void SetThreadCount(int Count)
Definition: mythmediawriter.cpp:94
MythMediaWriter::SetContainer
void SetContainer(const QString &Cont)
Definition: mythmediawriter.cpp:29
MythMediaWriter::m_encodingTune
QString m_encodingTune
Definition: mythmediawriter.h:70
MythMediaWriter::GetTimecodeOffset
std::chrono::milliseconds GetTimecodeOffset(void) const
Definition: mythmediawriter.cpp:119
MythMediaWriter::m_width
int m_width
Definition: mythmediawriter.h:55
AudioFormat
AudioFormat
Definition: audiooutputsettings.h:24
MythMediaWriter::SetHeight
void SetHeight(int Height)
Definition: mythmediawriter.cpp:49
MythMediaWriter::SetFramerate
void SetFramerate(double Rate)
Definition: mythmediawriter.cpp:59
MythMediaWriter::SetAudioFormat
void SetAudioFormat(AudioFormat Format)
Definition: mythmediawriter.cpp:89
MythMediaWriter::m_filename
QString m_filename
Definition: mythmediawriter.h:51
MythMediaWriter::SetAspect
void SetAspect(float Aspect)
Definition: mythmediawriter.cpp:54
MythMediaWriter::m_aspect
float m_aspect
Definition: mythmediawriter.h:57
MythMediaWriter::m_framesWritten
long long m_framesWritten
Definition: mythmediawriter.h:67
MythMediaWriter::SetVideoBitrate
void SetVideoBitrate(int Bitrate)
Definition: mythmediawriter.cpp:39
MythMediaWriter::m_frameRate
double m_frameRate
Definition: mythmediawriter.h:58