[mythtv] Thridparty libs in mythgallery patch

Colin Guthrie myth at colin.guthr.ie
Mon Nov 15 20:21:38 UTC 2004


Matthew Conway wrote:
> I did some tweaking of mythgallery over the weekend, but before I
> submit the patch here, I thought I'd check and see how I should
> resolve a thirdparty dependency the patch requires.

Nice!

> My camera is a canon s400 which has the ability to set an exif flag
> for the orientation of the camera when the image was taken.  This
> allows one to auto rotate based on this flag.  To get at the exif
> info, I just grabbed the first c++ lib I found for reading exif data
> (exiv-0.5), and used its api.

My Camera doesn't do that (a pain as I've found!), but nice all the 
same. Can I ask if the rotation of the image is done via a lossless 
algorithm? I'm sure it's jsut the code that's already in there, but one 
thing that really annoys me is when programs rotate (especially 
auto-rotate) my digital images and re-encode the JPEGs, thus 
contributing to the lossyness of the jpeg format.... The jpegtran 
program does lossless rotation IIRC.

> Thus, the mythgallery code now has a dependency on this lib.  Should I:
> a) Include the exiv src tree in the my mythgallery directory, and have
> its configure/make called by mythgallery's make
> b) Add a variable which points to this lib, and include it in the
> INCLUDEPATH/LIBPATH
> c) Something else?
> 
> In either case, should dependencies on thirdparty libs always be
> shared, or statically linked in?

Right. I'm no authority on this, but I've just done some big workarounds 
on MythMusic to avoid a 3rd party dependancy. It's generally the wish to 
remove all third party libraries whereever possible.

I think the general approach is either to include the relevent parts of 
the library and integrate it into the plugin, or if it is a general 
purpose library that could be used by other plugins to convert it to a 
Myth Library (like libavcodec or libsoundtouch).

The other option is to make your library code optional and have an 
option in the config.pro file to build your code as an optional extra 
with a few #if defined()'s. It really depends how integral your 
additions are to the plugin on the whole I guess.

For what it's worth, I'm pretty sure that shared linkage is prefered 
over static.

Like I say, I'm no authority, but I think this is vaugly correct.


Col.

-- 

+------------------------+
|     Colin Guthrie      |
+------------------------+
|   myth at colin.guthr.ie  |
| http://colin.guthr.ie/ |
+------------------------+


More information about the mythtv-dev mailing list