MythTV  master
audioplayer.cpp
Go to the documentation of this file.
1 
4 
5 #include "audioplayer.h"
6 #include "mythplayer.h"
8 
9 #define LOC QString("AudioPlayer: ")
10 
11 //static const QString _Location = AudioPlayer::tr("Audio Player");
12 
14  : m_parent(parent),
15  m_mutedOnCreation(muted)
16 {
17  m_controlsVolume = gCoreContext->GetBoolSetting("MythControlsVolume", true);
18 }
19 
21 {
22  DeleteOutput();
23  m_visuals.clear();
24 }
25 
27 {
28  if (!m_audioOutput)
29  return;
30 
31  QMutexLocker lock(&m_lock);
32  auto it = std::find(m_visuals.begin(), m_visuals.end(), vis);
33  if (it == m_visuals.end())
34  {
35  m_visuals.push_back(vis);
37  }
38 }
39 
41 {
42  if (!m_audioOutput)
43  return;
44 
45  QMutexLocker lock(&m_lock);
46  auto it = std::find(m_visuals.begin(), m_visuals.end(), vis);
47  if (it != m_visuals.end())
48  {
49  m_visuals.erase(it);
51  }
52 }
53 
55 {
56  if (!m_audioOutput)
57  return;
58 
59  QMutexLocker lock(&m_lock);
60  for (auto & visual : m_visuals)
61  m_audioOutput->addVisual(visual);
62 }
63 
65 {
66  if (!m_audioOutput)
67  return;
68 
69  QMutexLocker lock(&m_lock);
70  for (auto & visual : m_visuals)
71  m_audioOutput->removeVisual(visual);
72 }
73 
75 {
76  if (!m_audioOutput)
77  return;
78 
79  QMutexLocker lock(&m_lock);
80  for (auto & visual : m_visuals)
81  visual->prepare();
82 }
83 
85 {
86  if (!m_audioOutput)
87  return;
88 
89  QMutexLocker lock(&m_lock);
91 }
92 
94 {
95  RemoveVisuals();
96  QMutexLocker locker(&m_lock);
97  if (m_audioOutput)
98  {
99  delete m_audioOutput;
100  m_audioOutput = nullptr;
101  }
102  m_noAudioOut = true;
103 }
104 
106 {
107  bool want_audio = m_parent->IsAudioNeeded();
108  QString errMsg;
109  QMutexLocker lock(&m_lock);
110 
111  if ((m_state.m_format == FORMAT_NONE) || (m_state.m_channels <= 0) || (m_state.m_sampleRate <= 0))
112  m_noAudioIn = m_noAudioOut = true;
113  else
114  m_noAudioIn = false;
115 
116  if (want_audio && !m_audioOutput)
117  {
118  // AudioOutput has never been created and we will want audio
124  if (m_noAudioIn)
125  aos.m_init = false;
126 
128  if (!m_audioOutput)
129  {
130  errMsg = tr("Unable to create AudioOutput.");
131  }
132  else
133  {
134  errMsg = m_audioOutput->GetError();
135  }
136  AddVisuals();
137  }
138  else if (!m_noAudioIn && m_audioOutput)
139  {
143  m_audioOutput->Reconfigure(settings);
144  errMsg = m_audioOutput->GetError();
146  }
147 
148  if (!errMsg.isEmpty())
149  {
150  LOG(VB_GENERAL, LOG_NOTICE, LOC + "Disabling Audio" +
151  QString(", reason is: %1").arg(errMsg));
152  ShowNotificationError(tr("Disabling Audio"),
153  AudioPlayer::tr( "Audio Player" ), errMsg);
154  m_noAudioOut = true;
155  }
156  else if (m_noAudioOut && m_audioOutput)
157  {
158  LOG(VB_GENERAL, LOG_NOTICE, LOC + "Enabling Audio");
159  m_noAudioOut = false;
160  }
161 
162  if (m_mutedOnCreation)
163  {
165  m_mutedOnCreation = false;
166  }
167 
168  ResetVisuals();
169 
170  return errMsg;
171 }
172 
174 {
176  m_noAudioIn = m_noAudioOut = true;
177 }
178 
179 bool AudioPlayer::Pause(bool pause)
180 {
181  if (!m_audioOutput || m_noAudioOut)
182  return false;
183 
184  QMutexLocker lock(&m_lock);
185  m_audioOutput->Pause(pause);
186  return true;
187 }
188 
190 {
191  if (!m_audioOutput || m_noAudioOut)
192  return false;
193  QMutexLocker lock(&m_lock);
194  return m_audioOutput->IsPaused();
195 }
196 
198 {
199  if (!m_audioOutput || m_noAudioOut)
200  return;
201  QMutexLocker lock(&m_lock);
203 }
204 
206 {
207  // delete current audio class if any
208  DeleteOutput();
209  m_lock.lock();
210  m_audioOutput = ao;
211  AddVisuals();
212  m_lock.unlock();
213 }
214 
216 {
217  if (!m_audioOutput || m_noAudioOut)
218  return 0;
219  QMutexLocker lock(&m_lock);
221 }
222 
227 void AudioPlayer::SetAudioInfo(const QString &main_device,
228  const QString &passthru_device,
229  uint samplerate,
230  int codec_profile)
231 {
232  m_mainDevice.clear();
233  m_passthruDevice.clear();
234  if (!main_device.isEmpty())
235  m_mainDevice = main_device;
236  if (!passthru_device.isEmpty())
237  m_passthruDevice = passthru_device;
238  m_state.m_sampleRate = static_cast<int>(samplerate);
239  m_state.m_codecProfile = codec_profile;
241 }
242 
247 void AudioPlayer::SetAudioParams(AudioFormat format, int orig_channels,
248  int channels, AVCodecID codec,
249  int samplerate, bool passthru,
250  int codec_profile)
251 {
252  m_state.m_format = CanProcess(format) ? format : FORMAT_S16;
253  m_state.m_origChannels = orig_channels;
254  m_state.m_channels = channels;
255  m_state.m_codec = codec;
256  m_state.m_sampleRate = samplerate;
257  m_state.m_passthru = passthru;
258  m_state.m_codecProfile = codec_profile;
259  ResetVisuals();
261 }
262 
263 void AudioPlayer::SetEffDsp(int dsprate)
264 {
265  if (!m_audioOutput || !m_noAudioOut)
266  return;
267  QMutexLocker lock(&m_lock);
268  m_audioOutput->SetEffDsp(dsprate);
269 }
270 
271 bool AudioPlayer::SetMuted(bool mute)
272 {
273  bool is_muted = IsMuted();
274  QMutexLocker lock(&m_lock);
275 
276  if (m_audioOutput && !m_noAudioOut && !is_muted && mute &&
278  {
279  LOG(VB_AUDIO, LOG_INFO, QString("muting sound %1").arg(IsMuted()));
280  return true;
281  }
282  if (m_audioOutput && !m_noAudioOut && is_muted && !mute &&
284  {
285  LOG(VB_AUDIO, LOG_INFO, QString("unmuting sound %1").arg(IsMuted()));
286  return true;
287  }
288 
289  LOG(VB_AUDIO, LOG_ERR,
290  QString("not changing sound mute state %1").arg(IsMuted()));
291 
292  return false;
293 }
294 
296 {
297  if (!m_audioOutput || m_noAudioOut)
298  return kMuteAll;
299  QMutexLocker lock(&m_lock);
300  return m_audioOutput->SetMuteState(mstate);
301 }
302 
304 {
305  if (!m_audioOutput || m_noAudioOut)
306  return kMuteAll;
308 }
309 
311 {
312  if (!m_audioOutput || m_noAudioOut)
313  return kMuteAll;
314  QMutexLocker lock(&m_lock);
315  return m_audioOutput->GetMuteState();
316 }
317 
319 {
320  if (!m_audioOutput || m_noAudioOut)
321  return GetVolume();
322  QMutexLocker lock(&m_lock);
324  return GetVolume();
325 }
326 
328 {
329  if (!m_audioOutput || m_noAudioOut)
330  return GetVolume();
331  QMutexLocker lock(&m_lock);
332  m_audioOutput->SetCurrentVolume(newvolume);
333  return GetVolume();
334 }
335 
336 std::chrono::milliseconds AudioPlayer::GetAudioTime(void)
337 {
338  if (!m_audioOutput || m_noAudioOut)
339  return 0ms;
340  QMutexLocker lock(&m_lock);
341  return m_audioOutput->GetAudiotime();
342 }
343 
345 {
346  if (!m_audioOutput)
347  return false;
348  QMutexLocker lock(&m_lock);
349  return m_audioOutput->IsUpmixing();
350 }
351 
352 bool AudioPlayer::EnableUpmix(bool enable, bool toggle)
353 {
354  if (!m_audioOutput)
355  return false;
356  QMutexLocker lock(&m_lock);
357  if (toggle || (enable != IsUpmixing()))
358  return m_audioOutput->ToggleUpmix();
359  return enable;
360 }
361 
363 {
364  if (!m_audioOutput)
365  return false;
366  QMutexLocker lock(&m_lock);
367  return m_audioOutput->CanUpmix();
368 }
369 
371 {
372  m_stretchFactor = factor;
373  if (!m_audioOutput)
374  return;
375  QMutexLocker lock(&m_lock);
377 }
378 
379 // The following methods are not locked as this hinders performance.
380 // They are however only called from the Decoder and only the decode
381 // thread will trigger a deletion/recreation of the AudioOutput device, hence
382 // they should be safe.
383 
385 {
386  if (!ao)
387  return false;
388 
389  return ao->GetOutputSettingsUsers(true)->canFeature(feature);
390 }
391 
393 {
395 }
396 
398 {
400 }
401 
403 {
405 }
406 
408 {
410 }
411 
413 {
415 }
416 
418 {
419  if (!m_audioOutput)
420  return 2;
422 }
423 
425 {
426  if (!m_audioOutput)
427  return 0;
429 }
430 
431 bool AudioPlayer::CanPassthrough(int samplerate, int channels,
432  AVCodecID codec, int profile)
433 {
434  if (!m_audioOutput)
435  return false;
436  return m_audioOutput->CanPassthrough(samplerate, channels, codec, profile);
437 }
438 
440 {
441  if (!m_audioOutput)
442  return false;
443  return m_audioOutput->CanDownmix();
444 }
445 
446 /*
447  * if frames = -1 : let AudioOuput calculate value
448  * if frames = 0 && len > 0: will calculate according to len
449  */
450 void AudioPlayer::AddAudioData(char *buffer, int len,
451  std::chrono::milliseconds timecode, int frames)
452 {
453  if (!m_audioOutput || m_noAudioOut)
454  return;
455 
456  if (m_parent->PrepareAudioSample(timecode))
457  m_audioOutput->Drain();
458  int samplesize = m_audioOutput->GetBytesPerFrame();
459 
460  if (samplesize <= 0)
461  return;
462 
463  if (frames == 0 && len > 0)
464  frames = len / samplesize;
465 
466  if (!m_audioOutput->AddData(buffer, len, timecode, frames))
467  LOG(VB_PLAYBACK, LOG_ERR, LOC + "AddAudioData(): "
468  "Audio buffer overflow, audio data lost!");
469 }
470 
472 {
473  if (!m_audioOutput)
474  return true;
476 }
477 
478 std::chrono::milliseconds AudioPlayer::LengthLastData(void)
479 {
480  if (!m_audioOutput)
481  return 0ms;
482  return m_audioOutput->LengthLastData();
483 }
484 
486 {
487  fill = total = 0;
488  if (!m_audioOutput || m_noAudioOut)
489  return false;
490  m_audioOutput->GetBufferStatus(fill, total);
491  return true;
492 }
493 
495 {
496  uint ofill = 0;
497  uint ototal = 0;
498  if (GetBufferStatus(ofill, ototal))
499  {
500  uint othresh = ((ototal>>1) + (ototal>>2));
501  if (ofill > othresh)
502  return true;
503  return GetAudioBufferedTime() > 8s;
504  }
505  return false;
506 }
507 
508 std::chrono::milliseconds AudioPlayer::GetAudioBufferedTime(void)
509 {
511 }
512 
513 
515 {
516  if (!m_audioOutput)
517  return false;
518  return m_audioOutput->CanProcess(fmt);
519 }
520 
522 {
523  if (!m_audioOutput)
524  return 0;
525  return m_audioOutput->CanProcess();
526 }
527 
538 int AudioPlayer::DecodeAudio(AVCodecContext *ctx,
539  uint8_t *buffer, int &data_size,
540  const AVPacket *pkt)
541 {
542  if (!m_audioOutput)
543  {
544  data_size = 0;
545  return 0;
546  }
547  return m_audioOutput->DecodeAudio(ctx, buffer, data_size, pkt);
548 }
AudioOutput::GetError
QString GetError(void) const
Definition: audiooutput.h:147
OutputListeners::addVisual
void addVisual(MythTV::Visual *v)
Definition: output.cpp:35
AudioPlayer::addVisual
void addVisual(MythTV::Visual *vis)
Definition: audioplayer.cpp:26
AudioOutput::AddData
virtual bool AddData(void *buffer, int len, std::chrono::milliseconds timecode, int frames)=0
Add data to the audiobuffer for playback.
AudioPlayer::CanAC3
bool CanAC3(void)
Definition: audioplayer.cpp:392
VolumeBase::SetCurrentVolume
virtual void SetCurrentVolume(int value)
Definition: volumebase.cpp:123
LOC
#define LOC
Definition: audioplayer.cpp:9
AudioPlayer::SetEffDsp
void SetEffDsp(int dsprate)
Definition: audioplayer.cpp:263
AudioPlayer::m_audioOutput
AudioOutput * m_audioOutput
Definition: audioplayer.h:111
AudioPlayer::Reset
void Reset(void)
Definition: audioplayer.cpp:84
ShowNotificationError
void ShowNotificationError(const QString &msg, const QString &from, const QString &detail, const VNMask visibility, const MythNotification::Priority priority)
convenience utility to display error message as notification
Definition: mythnotificationcenter.cpp:1426
FEATURE_DTS
@ FEATURE_DTS
Definition: audiooutputsettings.h:37
VolumeBase::AdjustCurrentVolume
virtual void AdjustCurrentVolume(int change)
Definition: volumebase.cpp:132
AudioPlayer::ReinitAudio
QString ReinitAudio(void)
Definition: audioplayer.cpp:105
VolumeBase::GetCurrentVolume
virtual uint GetCurrentVolume(void) const
Definition: volumebase.cpp:118
AudioPlayer::~AudioPlayer
~AudioPlayer() override
Definition: audioplayer.cpp:20
FORMAT_S16
@ FORMAT_S16
Definition: audiooutputsettings.h:27
AudioOutput::Reset
virtual void Reset(void)=0
AudioPlayer::ResetVisuals
void ResetVisuals(void)
Definition: audioplayer.cpp:74
MythPlayer::PrepareAudioSample
virtual bool PrepareAudioSample(std::chrono::milliseconds &timecode)
Definition: mythplayer.cpp:1306
AudioPlayer::EnableUpmix
bool EnableUpmix(bool enable, bool toggle=false)
Definition: audioplayer.cpp:352
AudioPlayer::AudioPlayerStateChanged
void AudioPlayerStateChanged(MythAudioPlayerState State)
AudioOutput::GetBytesPerFrame
virtual int GetBytesPerFrame(void) const
Definition: audiooutput.h:78
VolumeBase::SetMuteState
virtual MuteState SetMuteState(MuteState)
Definition: volumebase.cpp:137
FEATURE_TRUEHD
@ FEATURE_TRUEHD
Definition: audiooutputsettings.h:40
AudioPlayer::GetVolume
uint GetVolume(void)
Definition: audioplayer.cpp:215
AudioPlayer::SetStretchFactor
void SetStretchFactor(float factor)
Definition: audioplayer.cpp:370
AudioPlayer::SetMuteState
MuteState SetMuteState(MuteState mstate)
Definition: audioplayer.cpp:295
AudioOutput::NeedDecodingBeforePassthrough
virtual bool NeedDecodingBeforePassthrough(void) const
Definition: audiooutput.h:123
AudioPlayer::CheckFormat
void CheckFormat(void)
Definition: audioplayer.cpp:173
AudioPlayer::IsBufferAlmostFull
bool IsBufferAlmostFull(void)
Definition: audioplayer.cpp:494
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
AudioPlayer::m_mainDevice
QString m_mainDevice
Definition: audioplayer.h:116
mythplayer.h
MythPlayer
Definition: mythplayer.h:83
AudioPlayer::SetMuted
bool SetMuted(bool mute)
Definition: audioplayer.cpp:271
AudioPlayer::GetMuteState
MuteState GetMuteState(void)
Definition: audioplayer.cpp:310
OutputListeners::removeVisual
void removeVisual(MythTV::Visual *v)
Definition: output.cpp:42
AudioPlayer::m_visuals
std::vector< MythTV::Visual * > m_visuals
Definition: audioplayer.h:121
AudioOutput::LengthLastData
virtual std::chrono::milliseconds LengthLastData(void) const
Definition: audiooutput.h:130
AudioPlayer::AddAudioData
void AddAudioData(char *buffer, int len, std::chrono::milliseconds timecode, int frames)
Definition: audioplayer.cpp:450
AudioPlayer::CanTrueHD
bool CanTrueHD(void)
Definition: audioplayer.cpp:407
AudioOutput::CanDownmix
virtual bool CanDownmix(void) const
Definition: audiooutput.h:84
AudioOutput::OpenAudio
static AudioOutput * OpenAudio(const QString &main_device, const QString &passthru_device, AudioFormat format, int channels, AVCodecID codec, int samplerate, AudioOutputSource source, bool set_initial_vol, bool passthru, int upmixer_startup=0, AudioOutputSettings *custom=nullptr)
Definition: audiooutput.cpp:57
AudioOutput::CanProcess
virtual bool CanProcess(AudioFormat fmt)
Definition: audiooutput.h:168
AudioOutput::CanUpmix
virtual bool CanUpmix(void)
Definition: audiooutput.h:160
AudioOutput::GetAudioBufferedTime
virtual std::chrono::milliseconds GetAudioBufferedTime(void)
report amount of audio buffered in milliseconds.
Definition: audiooutput.h:143
AudioOutput::Drain
virtual void Drain(void)=0
AudioPlayer::m_lock
QRecursiveMutex m_lock
Definition: audioplayer.h:114
AudioPlayer::SetAudioInfo
void SetAudioInfo(const QString &main_device, const QString &passthru_device, uint samplerate, int codec_profile=-1)
Set audio output device parameters.
Definition: audioplayer.cpp:227
AudioSettings
Definition: audiosettings.h:28
AudioPlayer::IsPaused
bool IsPaused(void)
Definition: audioplayer.cpp:189
DigitalFeature
DigitalFeature
Definition: audiooutputsettings.h:34
MythTV::Visual
Definition: visual.h:16
AudioOutput::CanPassthrough
virtual bool CanPassthrough(int samplerate, int channels, AVCodecID codec, int profile) const
Definition: audiooutput.cpp:267
AudioOutput
Definition: audiooutput.h:25
AudioPlayer::SetVolume
uint SetVolume(int newvolume)
Definition: audioplayer.cpp:327
TestDigitalFeature
bool TestDigitalFeature(AudioOutput *ao, DigitalFeature feature)
Definition: audioplayer.cpp:384
AudioSettings::m_init
bool m_init
If set to false, AudioOutput instance will not try to initially open the audio device.
Definition: audiosettings.h:85
AudioPlayer::DecodeAudio
int DecodeAudio(AVCodecContext *ctx, uint8_t *buffer, int &data_size, const AVPacket *pkt)
DecodeAudio Utility routine.
Definition: audioplayer.cpp:538
AudioOutput::Pause
virtual void Pause(bool paused)=0
hardwareprofile.scan.profile
profile
Definition: scan.py:97
AudioOutputSettings::GetMaxHDRate
int GetMaxHDRate() const
return the highest iec958 rate supported.
Definition: audiooutputsettings.cpp:415
AudioPlayer::m_controlsVolume
bool m_controlsVolume
Definition: audioplayer.h:120
AudioPlayer::DeleteOutput
void DeleteOutput(void)
Definition: audioplayer.cpp:93
AudioPlayer::AudioPlayer
AudioPlayer(MythPlayer *parent, bool muted)
Definition: audioplayer.cpp:13
feature
static const std::array< featureStruct, 7 > feature
Definition: audiooutputsettings.cpp:434
FORMAT_NONE
@ FORMAT_NONE
Definition: audiooutputsettings.h:25
AudioPlayer::SetAudioParams
void SetAudioParams(AudioFormat format, int orig_channels, int channels, AVCodecID codec, int samplerate, bool passthru, int codec_profile=-1)
Set audio output parameters.
Definition: audioplayer.cpp:247
AudioOutputSettings::BestSupportedChannels
int BestSupportedChannels()
Definition: audiooutputsettings.cpp:254
MythAudioPlayerState::m_sampleRate
int m_sampleRate
Definition: mythplayerstate.h:40
AudioPlayer::AdjustVolume
uint AdjustVolume(int change)
Definition: audioplayer.cpp:318
AudioPlayer::m_stretchFactor
float m_stretchFactor
Definition: audioplayer.h:113
AudioPlayer::LengthLastData
std::chrono::milliseconds LengthLastData(void)
Definition: audioplayer.cpp:478
AudioPlayer::CanPassthrough
bool CanPassthrough(int samplerate, int channels, AVCodecID codec, int profile)
Definition: audioplayer.cpp:431
AudioPlayer::CanDTS
bool CanDTS(void)
Definition: audioplayer.cpp:397
AudioPlayer::IsUpmixing
bool IsUpmixing(void)
Definition: audioplayer.cpp:344
MythPlayer::IsAudioNeeded
bool IsAudioNeeded(void)
Definition: mythplayer.h:134
VolumeBase::GetMuteState
virtual MuteState GetMuteState(void) const
Definition: volumebase.cpp:150
AudioPlayer::IncrMuteState
MuteState IncrMuteState(void)
Definition: audioplayer.cpp:303
AudioPlayer::GetMaxHDRate
int GetMaxHDRate(void)
Definition: audioplayer.cpp:424
MythAudioPlayerState::m_codecProfile
int m_codecProfile
Definition: mythplayerstate.h:41
VolumeBase::NextMuteState
static MuteState NextMuteState(MuteState)
Definition: volumebase.cpp:155
AudioPlayer::RemoveVisuals
void RemoveVisuals(void)
Definition: audioplayer.cpp:64
AudioOutput::DecodeAudio
virtual int DecodeAudio(AVCodecContext *ctx, uint8_t *buffer, int &data_size, const AVPacket *pkt)
Utility routine.
Definition: audiooutput.cpp:595
AudioPlayer::GetBufferStatus
bool GetBufferStatus(uint &fill, uint &total)
Definition: audioplayer.cpp:485
MythAudioPlayerState::m_passthru
bool m_passthru
Definition: mythplayerstate.h:42
AudioPlayer::CanDTSHD
bool CanDTSHD(void)
Definition: audioplayer.cpp:412
AudioPlayer::IsMuted
bool IsMuted(void)
Definition: audioplayer.h:86
AudioOutput::SetEffDsp
virtual void SetEffDsp(int dsprate)=0
AudioOutputSettings::canFeature
bool canFeature(DigitalFeature arg) const
return DigitalFeature mask.
Definition: audiooutputsettings.h:88
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:55
FEATURE_DTSHD
@ FEATURE_DTSHD
Definition: audiooutputsettings.h:41
MuteState
MuteState
Definition: volumebase.h:8
AudioPlayer::m_noAudioIn
bool m_noAudioIn
Definition: audioplayer.h:118
AudioOutput::GetAudiotime
virtual std::chrono::milliseconds GetAudiotime(void)=0
AUDIOOUTPUT_VIDEO
@ AUDIOOUTPUT_VIDEO
Definition: audiosettings.h:23
AudioPlayer::m_parent
MythPlayer * m_parent
Definition: audioplayer.h:110
MythAudioPlayerState::m_format
AudioFormat m_format
Definition: mythplayerstate.h:39
AudioPlayer::SetAudioOutput
void SetAudioOutput(AudioOutput *ao)
Definition: audioplayer.cpp:205
MythCoreContext::GetBoolSetting
bool GetBoolSetting(const QString &key, bool defaultval=false)
Definition: mythcorecontext.cpp:910
AudioPlayer::GetMaxChannels
uint GetMaxChannels(void)
Definition: audioplayer.cpp:417
AudioPlayer::removeVisual
void removeVisual(MythTV::Visual *vis)
Definition: audioplayer.cpp:40
MythAudioPlayerState::m_codec
AVCodecID m_codec
Definition: mythplayerstate.h:38
AudioPlayer::AddVisuals
void AddVisuals(void)
Definition: audioplayer.cpp:54
AudioPlayer::CanUpmix
bool CanUpmix(void)
Definition: audioplayer.cpp:362
AudioPlayer::m_state
MythAudioPlayerState m_state
Definition: audioplayer.h:112
AudioPlayer::GetAudioBufferedTime
std::chrono::milliseconds GetAudioBufferedTime(void)
Definition: audioplayer.cpp:508
AudioPlayer::NeedDecodingBeforePassthrough
bool NeedDecodingBeforePassthrough(void)
Definition: audioplayer.cpp:471
AudioOutput::Reconfigure
virtual void Reconfigure(const AudioSettings &settings)=0
AudioOutput::GetBufferStatus
virtual void GetBufferStatus(uint &fill, uint &total)
Definition: audiooutput.h:150
AudioOutput::SetStretchFactor
virtual void SetStretchFactor(float factor)
Definition: audiooutput.cpp:253
AudioPlayer::m_noAudioOut
bool m_noAudioOut
Definition: audioplayer.h:119
audiooutput.h
AudioFormat
AudioFormat
Definition: audiooutputsettings.h:24
FEATURE_AC3
@ FEATURE_AC3
Definition: audiooutputsettings.h:36
audioplayer.h
videovisual.h
FEATURE_EAC3
@ FEATURE_EAC3
Definition: audiooutputsettings.h:39
AudioPlayer::Pause
bool Pause(bool pause)
Definition: audioplayer.cpp:179
AudioPlayer::m_passthruDevice
QString m_passthruDevice
Definition: audioplayer.h:117
AudioOutput::IsUpmixing
virtual bool IsUpmixing(void)
Definition: audiooutput.h:158
AudioPlayer::CanDownmix
bool CanDownmix(void)
Definition: audioplayer.cpp:439
kMuteOff
@ kMuteOff
Definition: volumebase.h:9
AudioPlayer::CanProcess
uint32_t CanProcess(void)
Definition: audioplayer.cpp:521
AudioPlayer::PauseAudioUntilBuffered
void PauseAudioUntilBuffered(void)
Definition: audioplayer.cpp:197
AudioPlayer::CanEAC3
bool CanEAC3(void)
Definition: audioplayer.cpp:402
MythAudioPlayerState::m_origChannels
int m_origChannels
Definition: mythplayerstate.h:37
kMuteAll
@ kMuteAll
Definition: volumebase.h:12
AudioOutput::GetOutputSettingsUsers
virtual AudioOutputSettings * GetOutputSettingsUsers(bool digital=true)
Definition: audiooutput.cpp:262
AudioPlayer::GetAudioTime
std::chrono::milliseconds GetAudioTime(void)
Definition: audioplayer.cpp:336
mythnotificationcenter.h
AudioPlayer::m_mutedOnCreation
bool m_mutedOnCreation
Definition: audioplayer.h:115
AudioOutput::ToggleUpmix
virtual bool ToggleUpmix(void)
Definition: audiooutput.h:159
AudioOutput::PauseUntilBuffered
virtual void PauseUntilBuffered(void)=0
AudioOutput::IsPaused
virtual bool IsPaused(void) const =0
find
static pid_list_t::iterator find(const PIDInfoMap &map, pid_list_t &list, pid_list_t::iterator begin, pid_list_t::iterator end, bool find_open)
Definition: dvbstreamhandler.cpp:363
uint
unsigned int uint
Definition: freesurround.h:24
MythAudioPlayerState::m_channels
int m_channels
Definition: mythplayerstate.h:36