MythTV  master
mythvideoout.cpp
Go to the documentation of this file.
1 // MythTV
2 #include "osd.h"
3 #include "mythplayer.h"
4 #include "videodisplayprofile.h"
5 #include "decoderbase.h"
6 #include "mythcorecontext.h"
7 #include "mythlogging.h"
8 #include "mythmainwindow.h"
9 #include "mythuihelper.h"
10 #include "mythavutil.h"
11 #include "mthreadpool.h"
12 #include "mythcodeccontext.h"
13 
14 #ifdef _WIN32
15 #include "videoout_d3d.h"
16 #endif
17 
18 #ifdef USING_OPENGL
20 #endif
21 
22 #ifdef USING_VULKAN
24 #endif
25 
26 #include "mythvideooutnull.h"
27 #include "mythvideoout.h"
28 
29 // std
30 #include <cmath>
31 #include <cstdlib>
32 
33 #define LOC QString("VideoOutput: ")
34 
36 
38 {
40 
41 #ifdef _WIN32
43 #endif
44 
45 #ifdef USING_OPENGL
47 #endif
48 
49 #ifdef USING_VULKAN
51 #endif
52 }
53 
124 {
125  m_dbLetterboxColour = static_cast<LetterBoxColour>(gCoreContext->GetNumSetting("LetterboxColour", 0));
126 }
127 
133 {
134  delete m_dbDisplayProfile;
135 }
136 
142 bool MythVideoOutput::Init(const QSize& VideoDim, const QSize& VideoDispDim,
143  float VideoAspect, const QRect& WindowRect, MythCodecID CodecID)
144 {
145  m_videoCodecID = CodecID;
146  bool wasembedding = IsEmbedding();
147  QRect oldrect;
148  if (wasembedding)
149  {
150  oldrect = GetEmbeddingRect();
151  EmbedPlayback(false, {});
152  }
153 
154  bool mainSuccess = InitBounds(VideoDim, VideoDispDim, VideoAspect, WindowRect);
155 
156  if (m_dbDisplayProfile)
158 
159  if (wasembedding)
160  EmbedPlayback(true, oldrect);
161 
162  VideoAspectRatioChanged(VideoAspect); // apply aspect ratio and letterbox mode
163 
164  return mainSuccess;
165 }
166 
167 void MythVideoOutput::SetVideoFrameRate(float playback_fps)
168 {
169  if (m_dbDisplayProfile)
170  m_dbDisplayProfile->SetOutput(playback_fps);
171 }
172 
173 void MythVideoOutput::SetReferenceFrames(int ReferenceFrames)
174 {
175  m_maxReferenceFrames = ReferenceFrames;
176 }
177 
179 {
180  MythDeintType result = DEINT_NONE;
181 
182  if (Deinterlacer.contains(DEINT_QUALITY_HIGH))
183  result = DEINT_HIGH;
184  else if (Deinterlacer.contains(DEINT_QUALITY_MEDIUM))
185  result = DEINT_MEDIUM;
186  else if (Deinterlacer.contains(DEINT_QUALITY_LOW))
187  result = DEINT_BASIC;
188 
189  if (result != DEINT_NONE)
190  {
191  result = result | DEINT_CPU; // NB always assumed
192  if (Deinterlacer.contains(DEINT_QUALITY_SHADER))
193  result = result | DEINT_SHADER;
194  if (Deinterlacer.contains(DEINT_QUALITY_DRIVER))
195  result = result | DEINT_DRIVER;
196  }
197 
198  return result;
199 }
200 
201 void MythVideoOutput::SetDeinterlacing(bool Enable, bool DoubleRate, MythDeintType Force /*=DEINT_NONE*/)
202 {
203 
204 
205  if (!Enable)
206  {
207  m_deinterlacing = false;
208  m_deinterlacing2X = false;
211  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Disabled all deinterlacing");
212  return;
213  }
214 
215  m_deinterlacing = Enable;
216  m_deinterlacing2X = DoubleRate;
217  m_forcedDeinterlacer = Force;
218 
219  MythDeintType singlerate = DEINT_NONE;
220  MythDeintType doublerate = DEINT_NONE;
221  if (DEINT_NONE != Force)
222  {
223  singlerate = Force;
224  if (DoubleRate)
225  doublerate = Force;
226  LOG(VB_PLAYBACK, LOG_INFO, LOC + "Overriding deinterlacers");
227  }
228  else if (m_dbDisplayProfile)
229  {
231  if (DoubleRate)
233  }
234 
235  LOG(VB_GENERAL, LOG_INFO, LOC + QString("SetDeinterlacing (Doublerate %1): Single %2 Double %3")
236  .arg(DoubleRate).arg(MythVideoFrame::DeinterlacerPref(singlerate)).arg(MythVideoFrame::DeinterlacerPref(doublerate)));
237  m_videoBuffers.SetDeinterlacing(singlerate, doublerate, m_videoCodecID);
238 }
239 
245 bool MythVideoOutput::InputChanged(const QSize& VideoDim, const QSize& VideoDispDim,
246  float VideoAspect, MythCodecID CodecID,
247  bool& /*AspectOnly*/, int ReferenceFrames, bool /*ForceChange*/)
248 {
249  SourceChanged(VideoDim, VideoDispDim, VideoAspect);
250  m_maxReferenceFrames = ReferenceFrames;
251  AVCodecID avCodecId = myth2av_codecid(CodecID);
252  AVCodec* codec = avcodec_find_decoder(avCodecId);
253  QString codecName;
254  if (codec)
255  codecName = codec->name;
256  if (m_dbDisplayProfile)
257  m_dbDisplayProfile->SetInput(GetVideoDispDim(), 0 ,codecName);
258  m_videoCodecID = CodecID;
259  DiscardFrames(true, true);
260  // Update deinterlacers for any input change
262  return true;
263 }
264 
265 void MythVideoOutput::GetOSDBounds(QRect& Total, QRect& Visible,
266  float& VisibleAspect,
267  float& FontScaling,
268  float ThemeAspect) const
269 {
270  Total = GetTotalOSDBounds();
271  Visible = GetVisibleOSDBounds(VisibleAspect, FontScaling, ThemeAspect);
272 }
273 
280 QRect MythVideoOutput::GetVisibleOSDBounds(float& VisibleAspect,
281  float& FontScaling,
282  float ThemeAspect) const
283 {
284  QRect dvr = GetDisplayVisibleRect();
285  float dispPixelAdj = 1.0F;
286  if (dvr.height() && dvr.width())
287  dispPixelAdj = (GetDisplayAspect() * dvr.height()) / dvr.width();
288 
289  float ova = GetOverridenVideoAspect();
290  QRect vr = GetVideoRect();
291  float vs = vr.height() ? static_cast<float>(vr.width()) / vr.height() : 1.0F;
292  VisibleAspect = ThemeAspect * (ova > 0.0F ? vs / ova : 1.F) * dispPixelAdj;
293 
294  FontScaling = 1.0F;
295  return { QPoint(0,0), dvr.size() };
296 }
297 
303 {
304  return GetDisplayVisibleRect();
305 }
306 
308 {
310 }
311 
313 {
314  return m_videoColourSpace.ChangePictureAttribute(AttributeType, Direction);
315 }
316 
325 {
326  return m_videoColourSpace.SetPictureAttribute(Attribute, NewValue);
327 }
328 
330 {
331  return m_videoColourSpace.GetPictureAttribute(AttributeType);
332 }
333 
334 void MythVideoOutput::SetFramesPlayed(long long FramesPlayed)
335 {
336  m_framesPlayed = FramesPlayed;
337 }
338 
340 {
341  return m_framesPlayed;
342 }
343 
345 {
346  return m_errorState != kError_None;
347 }
348 
350 {
351  return m_errorState;
352 }
353 
356 {
358 }
359 
362 {
364 }
365 
368 {
369  return static_cast<int>(m_videoBuffers.ValidVideoFrames());
370 }
371 
374 {
375  return static_cast<int>(m_videoBuffers.FreeVideoFrames());
376 }
377 
380 {
382 }
383 
387 {
389 }
390 
393 {
395 }
396 
399 {
400  return m_videoBuffers.GetStatus();
401 }
402 
406 {
408 }
409 
411 QRect MythVideoOutput::GetImageRect(const QRect& Rect, QRect* DisplayRect)
412 {
413  qreal hscale = 0.0;
414  QSize video_size = GetVideoDispDim();
415  int image_height = video_size.height();
416  int image_width = (image_height > 720) ? 1920 :
417  (image_height > 576) ? 1280 : 720;
418  qreal image_aspect = static_cast<qreal>(image_width) / image_height;
419  qreal pixel_aspect = static_cast<qreal>(video_size.width()) / video_size.height();
420 
421  QRect rect1 = Rect;
422  if (DisplayRect && DisplayRect->isValid())
423  {
424  QTransform m0;
425  m0.scale(static_cast<qreal>(image_width) / DisplayRect->width(),
426  static_cast<qreal>(image_height) / DisplayRect->height());
427  rect1 = m0.mapRect(rect1);
428  rect1.translate(DisplayRect->left(), DisplayRect->top());
429  }
430  QRect result = rect1;
431 
432  QRect dvr_rec = GetDisplayVideoRect();
433  QRect vid_rec = GetVideoRect();
434 
435  hscale = image_aspect / pixel_aspect;
436  if (hscale < 0.99 || hscale > 1.01)
437  {
438  vid_rec.setLeft(static_cast<int>(lround(static_cast<qreal>(vid_rec.left()) * hscale)));
439  vid_rec.setWidth(static_cast<int>(lround(static_cast<qreal>(vid_rec.width()) * hscale)));
440  }
441 
442  qreal vscale = static_cast<qreal>(dvr_rec.width()) / image_width;
443  hscale = static_cast<qreal>(dvr_rec.height()) / image_height;
444  QTransform m1;
445  m1.translate(dvr_rec.left(), dvr_rec.top());
446  m1.scale(vscale, hscale);
447 
448  vscale = static_cast<qreal>(image_width) / vid_rec.width();
449  hscale = static_cast<qreal>(image_height) / vid_rec.height();
450  QTransform m2;
451  m2.scale(vscale, hscale);
452  m2.translate(-vid_rec.left(), -vid_rec.top());
453 
454  result = m2.mapRect(result);
455  result = m1.mapRect(result);
456  return result;
457 }
458 
466 {
467  static constexpr float kSafeMargin = 0.05F;
468  float dummy = NAN;
469  QRect result = GetVisibleOSDBounds(dummy, dummy, 1.0F);
470  int safex = static_cast<int>(static_cast<float>(result.width()) * kSafeMargin);
471  int safey = static_cast<int>(static_cast<float>(result.height()) * kSafeMargin);
472  return { result.left() + safex, result.top() + safey,
473  result.width() - (2 * safex), result.height() - (2 * safey) };
474 }
475 
477 {
478  return m_renderFrameTypes;
479 }
480 
485 {
487 }
488 
492 {
494 }
495 
498 {
500 }
501 
505 {
507 }
508 
512 {
514 }
515 
519 {
521 }
522 
525 void MythVideoOutput::DiscardFrames(bool KeyFrame, bool /*Flushed*/)
526 {
527  m_videoBuffers.DiscardFrames(KeyFrame);
528 }
MythVideoOutput::GetOSDBounds
virtual void GetOSDBounds(QRect &Total, QRect &Visible, float &VisibleAspect, float &FontScaling, float ThemeAspect) const
Definition: mythvideoout.cpp:265
DEINT_DRIVER
@ DEINT_DRIVER
Definition: mythframe.h:70
VideoBuffers::ValidVideoFrames
uint ValidVideoFrames(void) const
Definition: videobuffers.cpp:821
MythVideoBounds::IsEmbedding
bool IsEmbedding(void) const
Definition: mythvideobounds.h:66
VideoBuffers::ReleaseFrame
void ReleaseFrame(MythVideoFrame *Frame)
Frame is ready to be for filtering or OSD application.
Definition: videobuffers.cpp:375
MythVideoOutput::m_dbLetterboxColour
LetterBoxColour m_dbLetterboxColour
Definition: mythvideoout.h:103
DEINT_MEDIUM
@ DEINT_MEDIUM
Definition: mythframe.h:66
PictureAttributeSupported
PictureAttributeSupported
Definition: videoouttypes.h:83
MythVideoOutput::DirectRenderFormats
const VideoFrameTypes * DirectRenderFormats() const
Definition: mythvideoout.cpp:476
mythvideoout.h
VideoDisplayProfile::SetInput
void SetInput(const QSize &Size, float Framerate=0, const QString &CodecName=QString(), const QStringList &DisallowedDecoders=QStringList())
Definition: videodisplayprofile.cpp:359
videoout_d3d.h
MythVideoBounds::VideoAspectRatioChanged
void VideoAspectRatioChanged(float Aspect)
Calls SetVideoAspectRatio(float aspect), then calls MoveResize() to apply changes.
Definition: mythvideobounds.cpp:499
VideoOutputD3D::GetRenderOptions
static void GetRenderOptions(RenderOptions &Options)
Definition: videoout_d3d.cpp:32
DEINT_SHADER
@ DEINT_SHADER
Definition: mythframe.h:69
MythVideoOutput::InputChanged
virtual bool InputChanged(const QSize &VideoDim, const QSize &VideoDispDim, float VideoAspect, MythCodecID CodecID, bool &AspectChanged, int ReferenceFrames, bool ForceChange)
Tells video output to discard decoded frames and wait for new ones.
Definition: mythvideoout.cpp:245
MythVideoOutput::FreeVideoFrames
int FreeVideoFrames()
Returns number of frames available for decoding onto.
Definition: mythvideoout.cpp:373
MythVideoOutput::GetError
VideoErrorState GetError() const
Definition: mythvideoout.cpp:349
VideoBuffers::GetNextFreeFrame
MythVideoFrame * GetNextFreeFrame(BufferType EnqueueTo=kVideoBuffer_limbo)
Gets a frame from available buffers list.
Definition: videobuffers.cpp:334
MythVideoOutput::m_framesPlayed
long long m_framesPlayed
Definition: mythvideoout.h:109
kError_None
@ kError_None
Definition: videoouttypes.h:150
MythVideoBounds::GetDisplayVisibleRect
QRect GetDisplayVisibleRect(void) const
Definition: mythvideobounds.h:71
MythVideoOutput::m_errorState
VideoErrorState m_errorState
Definition: mythvideoout.h:108
Frame
Definition: zmdefines.h:94
MythVideoOutput::s_defaultFrameTypes
static VideoFrameTypes s_defaultFrameTypes
Definition: mythvideoout.h:36
VideoBuffers::EnoughDecodedFrames
bool EnoughDecodedFrames(void) const
Definition: videobuffers.cpp:836
VideoDisplayProfile::SetOutput
void SetOutput(float Framerate)
Definition: videodisplayprofile.cpp:384
MythVideoBounds::GetDisplayAspect
float GetDisplayAspect(void) const
Definition: mythvideobounds.h:82
DEINT_QUALITY_SHADER
#define DEINT_QUALITY_SHADER
Definition: videodisplayprofile.h:21
VideoErrorState
VideoErrorState
Definition: videoouttypes.h:149
MythVideoOutput::SetPictureAttribute
virtual int SetPictureAttribute(PictureAttribute Attribute, int NewValue)
Definition: mythvideoout.cpp:324
DEINT_NONE
@ DEINT_NONE
Definition: mythframe.h:64
arg
arg(title).arg(filename).arg(doDelete))
VideoBuffers::SetDeinterlacing
void SetDeinterlacing(MythDeintType Single, MythDeintType Double, MythCodecID CodecID)
Definition: videobuffers.cpp:214
MythVideoOutputOpenGL::GetRenderOptions
static void GetRenderOptions(RenderOptions &Options)
Generate the list of available OpenGL profiles.
Definition: mythvideooutopengl.cpp:43
osd.h
MythVideoOutput::m_forcedDeinterlacer
MythDeintType m_forcedDeinterlacer
Definition: mythvideoout.h:115
MythVideoOutput::m_renderFrameTypes
VideoFrameTypes * m_renderFrameTypes
Definition: mythvideoout.h:112
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
mythplayer.h
MythVideoOutput::SetFramesPlayed
virtual void SetFramesPlayed(long long FramesPlayed)
Definition: mythvideoout.cpp:334
MythVideoBounds::GetVideoRect
QRect GetVideoRect(void) const
Definition: mythvideobounds.h:74
Visible
Definition: channelsettings.cpp:392
MythVideoBounds::GetDisplayVideoRect
QRect GetDisplayVideoRect(void) const
Definition: mythvideobounds.h:75
mythvideooutputvulkan.h
MythVideoOutput::SetPrebuffering
void SetPrebuffering(bool Normal)
Sets whether to use a normal number of buffers or fewer buffers.
Definition: mythvideoout.cpp:355
MythVideoOutput::GetPictureAttribute
int GetPictureAttribute(PictureAttribute AttributeType)
Definition: mythvideoout.cpp:329
DEINT_CPU
@ DEINT_CPU
Definition: mythframe.h:68
MythVideoOutput::GetImageRect
QRect GetImageRect(const QRect &Rect, QRect *DisplayRect=nullptr)
translates caption/dvd button rectangle into 'screen' space
Definition: mythvideoout.cpp:411
MythCodecID
MythCodecID
Definition: mythcodecid.h:11
videodisplayprofile.h
MythVideoColourSpace::GetPictureAttribute
int GetPictureAttribute(PictureAttribute Attribute)
Definition: mythvideocolourspace.cpp:146
mythvideooutnull.h
DEINT_QUALITY_DRIVER
#define DEINT_QUALITY_DRIVER
Definition: videodisplayprofile.h:22
mythlogging.h
RenderOptions
Definition: videodisplayprofile.h:27
MythVideoOutput::ValidVideoFrames
virtual int ValidVideoFrames() const
Returns number of frames that are fully decoded.
Definition: mythvideoout.cpp:367
VideoDisplayProfile::GetDoubleRatePreferences
QString GetDoubleRatePreferences(void) const
Definition: videodisplayprofile.cpp:409
DEINT_QUALITY_HIGH
#define DEINT_QUALITY_HIGH
Definition: videodisplayprofile.h:20
MythVideoOutput::GetTotalOSDBounds
QRect GetTotalOSDBounds() const
Definition: mythvideoout.cpp:302
MythVideoOutput::m_dbDisplayProfile
VideoDisplayProfile * m_dbDisplayProfile
Definition: mythvideoout.h:106
MythVideoOutput::ClearAfterSeek
virtual void ClearAfterSeek()
Tells video output to toss decoded buffers due to a seek.
Definition: mythvideoout.cpp:361
MythVideoOutput::DeLimboFrame
virtual void DeLimboFrame(MythVideoFrame *Frame)
Releases a frame for reuse if it is in limbo.
Definition: mythvideoout.cpp:497
FMT_YV12
@ FMT_YV12
Definition: mythframe.h:19
VideoFrameTypes
std::vector< VideoFrameType > VideoFrameTypes
Definition: mythframe.h:78
MythVideoOutput::GetFrameStatus
QString GetFrameStatus() const
Returns string with status of each frame for debugging.
Definition: mythvideoout.cpp:398
VideoBuffers::EnoughFreeFrames
bool EnoughFreeFrames(void) const
Definition: videobuffers.cpp:831
MythVideoOutput::GetNextFreeFrame
virtual MythVideoFrame * GetNextFreeFrame()
Blocks until it is possible to return a frame for decoding onto.
Definition: mythvideoout.cpp:484
VideoBuffers::StartDisplayingFrame
void StartDisplayingFrame(void)
Sets rpos to index of videoframe at head of used queue.
Definition: videobuffers.cpp:422
MythVideoOutput::GetFramesPlayed
virtual long long GetFramesPlayed()
Definition: mythvideoout.cpp:339
MythVideoBounds::GetEmbeddingRect
QRect GetEmbeddingRect(void) const
Definition: mythvideobounds.h:76
MythVideoOutput::DiscardFrames
virtual void DiscardFrames(bool KeyFrame, bool Flushed)
Releases all frames not being actively displayed from any queue onto the queue of frames ready for de...
Definition: mythvideoout.cpp:525
MythVideoOutput::GetLastDecodedFrame
virtual MythVideoFrame * GetLastDecodedFrame()
Definition: mythvideoout.cpp:392
MythVideoOutput::m_videoCodecID
MythCodecID m_videoCodecID
Definition: mythvideoout.h:104
MythVideoBounds::GetOverridenVideoAspect
float GetOverridenVideoAspect(void) const
Definition: mythvideobounds.h:70
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:56
MythVideoColourSpace::ChangePictureAttribute
int ChangePictureAttribute(PictureAttribute AttributeType, bool Direction)
Definition: mythvideocolourspace.cpp:326
MythVideoBounds::GetVideoDispDim
QSize GetVideoDispDim(void) const
Definition: mythvideobounds.h:69
MythVideoOutput::SetReferenceFrames
void SetReferenceFrames(int ReferenceFrames)
Definition: mythvideoout.cpp:173
MythCoreContext::GetNumSetting
int GetNumSetting(const QString &key, int defaultval=0)
Definition: mythcorecontext.cpp:929
MythVideoOutput::~MythVideoOutput
~MythVideoOutput() override
Definition: mythvideoout.cpp:132
MythVideoFrame::DeinterlacerPref
static QString DeinterlacerPref(MythDeintType Deint)
Definition: mythframe.cpp:515
MythVideoBounds::EmbedPlayback
virtual void EmbedPlayback(bool Embed, const QRect &Rect)
Definition: mythvideobounds.cpp:671
MythVideoOutputVulkan::GetRenderOptions
static void GetRenderOptions(RenderOptions &Options)
Definition: mythvideooutputvulkan.cpp:22
MythVideoOutput::EnoughFreeFrames
bool EnoughFreeFrames()
Returns true iff enough frames are available to decode onto.
Definition: mythvideoout.cpp:379
PictureAttribute
PictureAttribute
Definition: videoouttypes.h:70
MythVideoOutput::ReleaseFrame
virtual void ReleaseFrame(MythVideoFrame *Frame)
Releases a frame from the ready for decoding queue onto the queue of frames ready for display.
Definition: mythvideoout.cpp:491
MythVideoOutput::StartDisplayingFrame
virtual void StartDisplayingFrame()
Tell GetLastShownFrame() to return the next frame from the head of the queue of frames to display.
Definition: mythvideoout.cpp:504
MythVideoOutput::IsErrored
bool IsErrored() const
Definition: mythvideoout.cpp:344
MythVideoOutputNull::GetRenderOptions
static void GetRenderOptions(RenderOptions &Options)
Definition: mythvideooutnull.cpp:16
mthreadpool.h
LOC
#define LOC
Definition: mythvideoout.cpp:33
mythuihelper.h
MythVideoOutput::Init
virtual bool Init(const QSize &VideoDim, const QSize &VideoDispDim, float VideoAspect, const QRect &WindowRect, MythCodecID CodecID)
Definition: mythvideoout.cpp:142
VideoBuffers::GetLastShownFrame
MythVideoFrame * GetLastShownFrame(void)
Definition: videobuffers.cpp:803
MythVideoOutput::SetVideoFrameRate
virtual void SetVideoFrameRate(float playback_fps)
Definition: mythvideoout.cpp:167
MythDeintType
MythDeintType
Definition: mythframe.h:63
myth2av_codecid
AVCodecID myth2av_codecid(MythCodecID codec_id)
Definition: mythcodecid.cpp:228
MythVideoOutput::ChangePictureAttribute
int ChangePictureAttribute(PictureAttribute AttributeType, bool Direction)
Definition: mythvideoout.cpp:312
VideoBuffers::DiscardFrame
void DiscardFrame(MythVideoFrame *Frame)
Frame is ready to be reused by decoder.
Definition: videobuffers.cpp:465
mythcorecontext.h
MythVideoOutput::GetSupportedPictureAttributes
PictureAttributeSupported GetSupportedPictureAttributes()
Definition: mythvideoout.cpp:307
LetterBoxColour
LetterBoxColour
Definition: videoouttypes.h:53
DEINT_QUALITY_LOW
#define DEINT_QUALITY_LOW
Definition: videodisplayprofile.h:18
DEINT_HIGH
@ DEINT_HIGH
Definition: mythframe.h:67
VideoBuffers::GetLastDecodedFrame
MythVideoFrame * GetLastDecodedFrame(void)
Definition: videobuffers.cpp:798
mythavutil.h
MythVideoOutput::MythVideoOutput
MythVideoOutput()
Definition: mythvideoout.cpp:123
VideoBuffers::SetPrebuffering
void SetPrebuffering(bool Normal)
Sets prebuffering state to normal, or small.
Definition: videobuffers.cpp:296
MythVideoOutput::GetSafeRect
QRect GetSafeRect()
Returns a QRect describing an area of the screen on which it is 'safe' to render the On Screen Displa...
Definition: mythvideoout.cpp:465
VideoBuffers::ClearAfterSeek
void ClearAfterSeek(void)
Clear used frames after seeking.
Definition: videobuffers.cpp:947
VideoBuffers::DoneDisplayingFrame
void DoneDisplayingFrame(MythVideoFrame *Frame)
Removes frame from used queue and adds it to the available list.
Definition: videobuffers.cpp:432
decoderbase.h
mythvideooutopengl.h
VideoBuffers::FreeVideoFrames
uint FreeVideoFrames(void) const
Definition: videobuffers.cpp:826
mythcodeccontext.h
MythVideoOutput::GetRenderOptions
static void GetRenderOptions(RenderOptions &Options)
Definition: mythvideoout.cpp:37
MythVideoBounds::SourceChanged
void SourceChanged(const QSize &VideoDim, const QSize &VideoDispDim, float Aspect)
Update for new source video dimensions and aspect ratio.
Definition: mythvideobounds.cpp:511
MythVideoOutput::SetDeinterlacing
virtual void SetDeinterlacing(bool Enable, bool DoubleRate, MythDeintType Force=DEINT_NONE)
Definition: mythvideoout.cpp:201
MythVideoFrame
Definition: mythframe.h:83
VideoBuffers::DiscardFrames
void DiscardFrames(bool NextFrameIsKeyFrame)
Mark all used frames as ready to be reused, this is for seek.
Definition: videobuffers.cpp:860
DEINT_BASIC
@ DEINT_BASIC
Definition: mythframe.h:65
VideoBuffers::DeLimboFrame
void DeLimboFrame(MythVideoFrame *Frame)
If the frame is still in the limbo state it is added to the available queue.
Definition: videobuffers.cpp:392
MythVideoOutput::EnoughDecodedFrames
bool EnoughDecodedFrames()
Returns true iff there are plenty of decoded frames ready for display.
Definition: mythvideoout.cpp:386
VideoDisplayProfile::GetSingleRatePreferences
QString GetSingleRatePreferences(void) const
Definition: videodisplayprofile.cpp:404
MythVideoOutput::GetLastShownFrame
virtual MythVideoFrame * GetLastShownFrame()
Returns frame from the head of the ready to be displayed queue, if StartDisplayingFrame has been call...
Definition: mythvideoout.cpp:405
MythVideoColourSpace::SupportedAttributes
PictureAttributeSupported SupportedAttributes(void) const
Definition: mythvideocolourspace.cpp:130
MythVideoOutput::m_maxReferenceFrames
int m_maxReferenceFrames
Definition: mythvideoout.h:105
MythVideoOutput::ParseDeinterlacer
static MythDeintType ParseDeinterlacer(const QString &Deinterlacer)
Definition: mythvideoout.cpp:178
mythmainwindow.h
VideoBuffers::GetStatus
QString GetStatus(uint Num=0) const
Definition: videobuffers.cpp:1061
MythVideoColourSpace::SetPictureAttribute
int SetPictureAttribute(PictureAttribute Attribute, int Value)
Set the Value for the given PictureAttribute.
Definition: mythvideocolourspace.cpp:154
MythVideoOutput::GetVisibleOSDBounds
QRect GetVisibleOSDBounds(float &VisibleAspect, float &FontScaling, float ThemeAspect) const
Returns visible portions of total OSD bounds.
Definition: mythvideoout.cpp:280
MythVideoBounds::InitBounds
bool InitBounds(const QSize &VideoDim, const QSize &VideoDispDim, float Aspect, const QRect &WindowRect)
Definition: mythvideobounds.cpp:438
DEINT_QUALITY_MEDIUM
#define DEINT_QUALITY_MEDIUM
Definition: videodisplayprofile.h:19
MythVideoOutput::m_deinterlacing2X
bool m_deinterlacing2X
Definition: mythvideoout.h:114
MythVideoOutput::m_videoBuffers
VideoBuffers m_videoBuffers
Definition: mythvideoout.h:107
MythVideoOutput::m_videoColourSpace
MythVideoColourSpace m_videoColourSpace
Definition: mythvideoout.h:102
MythVideoOutput::DiscardFrame
virtual void DiscardFrame(MythVideoFrame *frame)
Releases frame from any queue onto the queue of frames ready for decoding onto.
Definition: mythvideoout.cpp:518
MythVideoOutput::m_deinterlacing
bool m_deinterlacing
Definition: mythvideoout.h:113
MythVideoOutput::DoneDisplayingFrame
virtual void DoneDisplayingFrame(MythVideoFrame *Frame)
Releases frame returned from GetLastShownFrame() onto the queue of frames ready for decoding onto.
Definition: mythvideoout.cpp:511