[mythtv] XMVC code error ?
Jean-Yves Avenard
jyavenard at gmail.com
Sun Jan 25 06:41:14 UTC 2009
Hi
Not too sure where to report this..
Currently looking over the code, and something caught my attention as
it doesn't make sense, and as such is probably buggy.
In mythtv/libs/libmythtv/avformatdecoder.cpp, from line 1556 you have:
1556 QString dec = "ffmpeg";
1557 uint thread_count = 1;
1558
1559 bool handled = false;
1560 #if defined(USING_VDPAU) || defined(USING_XVMC)
1561 if (!using_null_videoout && mpeg_version(enc->codec_id))
1562 {
1563 // HACK -- begin
1564 // Force MPEG2 decoder on MPEG1 streams.
1565 // Needed for broken transmitters which mark
1566 // MPEG2 streams as MPEG1 streams, and should
1567 // be harmless for unbroken ones.
1568 if (CODEC_ID_MPEG1VIDEO == enc->codec_id)
1569 enc->codec_id = CODEC_ID_MPEG2VIDEO;
1570 // HACK -- end
1571
1572 bool force_xv = false;
1573 if (ringBuffer && ringBuffer->isDVD())
1574 {
1575 if (dec.left(4) == "xvmc")
1576 dvd_xvmc_enabled = true;
1577
1578 if (ringBuffer->InDVDMenuOrStillFrame() &&
1579 dvd_xvmc_enabled)
1580 {
1581 force_xv = true;
1582 enc->pix_fmt = PIX_FMT_YUV420P;
1583 }
1584 }
If you look line 1575, there is a test to find out if XVMC is being
used when watching a DVD. But the variable dec (QString) is always set
to ffmep, so this test will always return false.
This change was introduced from revision 19165 with the VDPAU patches.
Prior to 19165, the decoder value was retrieved with:
if (!is_db_ignored)
{
VideoDisplayProfile vdp;
vdp.SetInput(QSize(width, height));
dec = vdp.GetDecoder();
thread_count = vdp.GetMaxCPUs();
}
Following 19165, this was moved after the VDPAU/XVMC code
In latest trunk (19417) this change is still in place...
If this isn't the proper place to report this problem, please let me know ..
Cheers
Jean-Yves
More information about the mythtv-dev
mailing list