[mythtv] Where is thumbnail generation done?
Michael Tiller
michael.tiller at gmail.com
Mon Jan 8 21:42:35 UTC 2007
Nigel,
Thanks for the hints. I compiled the backend with debugging information
and ran it in GDB. Sure enough, I uncovered two places where there were
problems with checking the values (one an integer that gets divided by and
another which was a pointer). This helped me craft a basic patch to avoid
the crashes (I suspect the developers will refactor it though).
This problem came up for me when using a HDHomerun in conjunction with SVN
MythTV. The stack trace and patch are available here:
http://svn.mythtv.org/trac/ticket/2889.
Thanks again for the tips. It motivated me to learn how to debug MythTV
which hopefully will help me provide better clues to developers for any
future problems I have.
--
Mike
On 1/7/07, Nigel Pearson <nigel at ind.tansu.com.au> wrote:
>
> Sorry for the delay in replying.
>
>
> 1) Crashing should always be investigated with a debugger
> (e.g. gdb). There is a section in the doco to help you.
> (although recompiling with debug can take a while)
>
>
>
> > Can anybody give me a hint about how thumbnails are generated?
>
> Not much, but a quick search reveals:
>
> % find . -name \*.cpp -exec egrep -i thumb {} \; -print
> *ptr++ = 0x00; *ptr++ = 0x00; // no thumbnail
> ./libs/libmythlivemedia/liveMedia/JPEGVideoRTPSource.cpp
> /* Delete preview thumbnail. */
> ./programs/mythbackend/mainserver.cpp
> // Add Thumbnail Resource
> ./programs/mythbackend/upnpcdstv.cpp
> gc->setLabel(QObject::tr("Display thumbnail preview images of "
> bs->setLabel(QObject::tr("Time offset for thumbnail preview
> images"));
> "thumbnail image this many seconds from the
> beginning "
> "as the offset for creating a thumbnail image. "
> ./programs/mythfrontend/globalsettings.cpp
>
>
> s/thumb/Preview Image/:
>
> % find . -name \*.cpp -exec egrep -i 'preview.*image' {} \; -print
> * \brief This class creates a preview image of a recording.
> ./libs/libmythtv/previewgenerator.cpp
> if (sURI == "getPreviewImage" ) return( HSM_GetPreviewImage );
> case HSM_GetPreviewImage: GetPreviewImage
> ( pRequest ); return( true );
> void HttpStatus::GetPreviewImage( HTTPRequest *pRequest )
> // check to see if preview image is already created.
> // Must generate Preview Image
> // Generate Preview Image and save.
> ./programs/mythbackend/httpstatus.cpp
> "find file locally, unable to make preview image.");
> VERBOSE(VB_IMPORTANT, "MainServer: Failed to make preview
> image.");
> ./programs/mythbackend/mainserver.cpp
> sURI = QString( "%1getPreviewImage%2").arg( sURIBase )
> ./programs/mythbackend/upnpcdstv.cpp
> gc->setLabel(QObject::tr("Display thumbnail preview images of "
> bs->setLabel(QObject::tr("Time offset for thumbnail preview
> images"));
> gc->setLabel(QObject::tr("Generate preview image from a bookmark "
> QImage* previewImage = new QImage(preview.absFilePath());
> if (previewImage->width() == 0 || previewImage->height() ==
> 0) {
> cout << QObject::tr("Problem reading theme preview image ")
> addImageSelection(theme->fileName(), previewImage);
> ./programs/mythfrontend/globalsettings.cpp
> // Preview Image Variables
> previewPixmap->convertFromImage(tmp2);
> previewPixmap->convertFromImage(*image);
> ./programs/mythfrontend/playbackbox.cpp
>
> %
>
>
> 2) Have a look in libs/libmythtv/previewgenerator.cpp,
> or programs/mythbackend/mainserver.cpp ?
> Just compiling those with debug symbols should be
> enough to get more useful output from gdb
>
>
>
> Good luck!
>
> --
> Nigel Pearson, nigel at ind.tansu.com.au|"Beware - I am a carrier
> Telstra Net. Eng., Sydney, Australia | of surrealism"
> Office: 9202 3900 Fax: 9261 3912 | D A
> Mobile: 0408 664435 Home: 9792 6998 | L I
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-dev/attachments/20070108/aa17c860/attachment.htm
More information about the mythtv-dev
mailing list