I have attached the version 2 patch and binaries to the first post for anyone who would like to test this.
Thanks for all the testing and feedback so far.
Are the binaries compiled for latest SVN?
If not, could you provide then? I only need .ax (DirectShowFilters) binaries..
In version 2 I see that you have decided to use two buffer sizes 10 & 172.
I think a better solution would be to adapt the #of buffers to the bitrate, so the playback time keept in the buffers are constant i.e low bitrate - low # of buffers, high bitrate - high # of buffers. A easy solution to this would be to measure the bitrate and calcuate # of buffers.
void CDiskRecorder::Write(byte* buffer,int len)
{
...
if(m_MyPacketCounter == 0)
m_iFirstPacketGetTime = timeGetTime();
else if (m_MyPacketCounter == 10000) // calc after 10000 packets
{
DWORD now = timeGetTime();
unsigned int bytesPerMsSec;
unsigned int bufferSize;
// Handle wrap
if(now > m_iFirstPacketGetTime)
bytesPerMsSec = (10000*188)/(now-m_iFirstPacketGetTime);
else
bytesPerMsSec = (10000*188)/(m_iFirstPacketGetTime-now);
// Arbitary scaling
bufferSize = bytesPerMsSec/25;
if (bufferSize<10)
m_iBufferSize=10*188;
else if(bufferSize>100)
m_iBufferSize = 100*188;
else
m_iBufferSize = bufferSize*188;
}
m_MyPacketCounter++;
}
A side benifit would be that the patch would not be so intrusive.
I have the same problem here. Replaced all binaries which I found in both directories (luckily renamed old ones first).Ok, trying to test v2 of the patch. But I think I got something wrong cos' now I can't tune a single channel without "unknown error". Perhaps someone can explain which binaries that goes into tvserver dir and which goes into MPclient dir, please!