Skip to content

Commit

Permalink
References #1227. Better approximation for ValidVideoFrames.
Browse files Browse the repository at this point in the history
This just returns the number of frames in the typical full vo buffer.
In practice this means that NVP::IsReallyNearEnd() uses only the
RingBuffer buffer fill and block size to detect the end of file when
doing PVR-350 video output.



git-svn-id: http://svn.mythtv.org/svn/trunk@8884 7dbf422c-18fa-0310-86e9-fd20926502f2
  • Loading branch information
daniel-kristjansson committed Feb 6, 2006
1 parent e08af9a commit cffb645
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions mythtv/libs/libmythtv/videoout_ivtv.cpp
Expand Up @@ -160,6 +160,11 @@ int VideoOutputIvtv::GetRefreshRate(void)
return 0;
}

int VideoOutputIvtv::ValidVideoFrames(void) const
{
return 131; // approximation for when output buffer is full...
}

bool VideoOutputIvtv::Init(int width, int height, float aspect,
WId winid, int winx, int winy, int winw,
int winh, WId embedid)
Expand Down
3 changes: 3 additions & 0 deletions mythtv/libs/libmythtv/videoout_ivtv.h
Expand Up @@ -59,6 +59,9 @@ class VideoOutputIvtv: public VideoOutput
(void) allow_unsafe;
return NULL;
}

int ValidVideoFrames(void) const;

private:
typedef enum
{
Expand Down
3 changes: 2 additions & 1 deletion mythtv/libs/libmythtv/videooutbase.h
Expand Up @@ -215,7 +215,8 @@ class VideoOutput
bool WaitForAvailable(uint w) { return vbuffers.WaitForAvailable(w); }

/// \brief Returns number of frames that are fully decoded.
int ValidVideoFrames(void) { return vbuffers.ValidVideoFrames(); }
virtual int ValidVideoFrames(void) const
{ return vbuffers.ValidVideoFrames(); }
/// \brief Returns number of frames available for decoding onto.
int FreeVideoFrames(void) { return vbuffers.FreeVideoFrames(); }
/// \brief Returns true iff enough frames are available to decode onto.
Expand Down

0 comments on commit cffb645

Please sign in to comment.