[mythtv] Patch proposal for better logging of ivtv select timeouts

Daniel Kristjansson danielk at cuymedia.net
Thu Apr 13 14:52:33 UTC 2006


On Wed, 2006-04-12 at 21:34 -0400, f-myth-users at media.mit.edu wrote:
> I'd like to propose changing this line in libs/libmythtv/mpegrecorder.cpp:
> 
>   printf("select timeout - ivtv driver has stopped responding\n");
> 
> to something like
> 
>   printf("%s select timeout - ivtv driver has stopped responding\n", videodevice.ascii());
> 
> If I opened a ticket and generated a patch for this, would it be
> likely to be accepted?

Nope, but if you change the cerr redirects and printfs to the proper
verbose macros that would be appreciated and accepted. Assign the ticket
to 'danielk' for the quickest response.

    cerr << "Audiorate(L1): " << value << " is invalid\n";
becomes
    VERBOSE(VB_IMPORTANT, LOC_ERR +
            QString("Audiorate(L1 %1) is invalid").arg(value);


    printf("select timeout - ivtv driver has stopped responding\n");
becomes
    VERBOSE(VB_IMPORTANT, LOC_ERR + "select timeout -- "
            "ivtv driver has stopped responding" + ENO);

where LOC and LOC_ERR are:
#define LOC QString("IVTVRec(%1): ").arg(videodevice)
#define LOC QString("IVTVRec(%1) Error: ").arg(videodevice)

You can see dvbrecorder.cpp for an example that uses VB_GENERAL and
VB_RECORD for less important information as well.

-- Daniel



More information about the mythtv-dev mailing list