Opened 10 years ago

Closed 10 years ago

#6902 closed defect (fixed)

DetectLetterbox.cpp fails to compile when not using X11

Reported by: mythdev@… Owned by: Janne Grunau
Priority: minor Milestone: 0.22
Component: MythTV - Video Playback Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Compilation fails when not using X11:

make[2]: Entering directory `/root/myth/mythtv/libs/libmythtv'
g++ -c -pipe -march=k8 -fomit-frame-pointer -O3 -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -Wno-non-virtual-dtor -funit-at-a-time -D__STDC_CONSTANT_MACROS -I/usr/include/freetype2 -D_REENTRANT -DPIC -fPIC -DMMX -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUSING_FRIBIDI -DUSING_OPENGL -DUSING_FRONTEND -DUSING_FFMPEG_THREADS -DUSING_ALSA -DUSING_V4L -DUSING_IVTV -DUSING_DVB -DUSING_BACKEND -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4 -I/usr/local -I.. -I../.. -I. -I../libmyth -I../libavcodec -I../libavformat -I../libavutil -I../libswscale -I../libmythmpeg2 -I../libmythdb -I../libmythhdhomerun -I../libmythdvdnav -Idvbdev -Impeg -Iiptv -Ichannelscan -I../libmythlivemedia/BasicUsageEnvironment/include -I../libmythlivemedia/BasicUsageEnvironment -I../libmythlivemedia/groupsock/include -I../libmythlivemedia/groupsock -I../libmythlivemedia/liveMedia/include -I../libmythlivemedia/liveMedia -I../libmythlivemedia/UsageEnvironment/include -I../libmythlivemedia/UsageEnvironment -I../libmythdb -I../libmythui -I/usr/include -I/usr/include -I. -o DetectLetterbox.o DetectLetterbox.cpp
In file included from DetectLetterbox.cpp:12:
videoout_xv.h:113: error: 'MythXDisplay' has not been declared
videoout_xv.h:120: error: expected ';' before '(' token
videoout_xv.h:123: error: 'MythXDisplay' has not been declared
videoout_xv.h:194: error: ISO C++ forbids declaration of 'MythXDisplay' with no type
videoout_xv.h:194: error: expected ';' before '*' token
make[2]: *** [DetectLetterbox.o] Error 1
make[2]: Leaving directory `/root/myth/mythtv/libs/libmythtv'
make[1]: *** [sub-libmythtv-make_default] Error 2
make[1]: Leaving directory `/root/myth/mythtv/libs'
make: *** [sub-libs-make_default-ordered] Error 2

This can be fixed by only including the videoout_xv header when X11 support is required:

Index: libs/libmythtv/DetectLetterbox.cpp
===================================================================
--- libs/libmythtv/DetectLetterbox.cpp  (revision 21487)
+++ libs/libmythtv/DetectLetterbox.cpp  (working copy)
@@ -8,7 +8,9 @@
 #include "DetectLetterbox.h"
 #include "NuppelVideoPlayer.h"
 #include "videoouttypes.h"
+#ifdef USING_X11
 #include "videoout_xv.h"
+#endif

 DetectLetterbox::DetectLetterbox(NuppelVideoPlayer* const nvp)
 {

Change History (3)

comment:1 Changed 10 years ago by JYA

It will also fail even with X11 if xv headers aren't installed (on ubuntu that is libxv-dev)

comment:2 Changed 10 years ago by Janne Grunau

Component: MythTV - GeneralMythTV - Video Playback
Owner: changed from Isaac Richards to Janne Grunau
Status: newaccepted

comment:3 Changed 10 years ago by Janne Grunau

Resolution: fixed
Status: acceptedclosed

(In [21490]) remove unecessary include from DetectLetterbox?.cpp, fixes compilation without X

Fixes #6902, Refs #4872

Note: See TracTickets for help on using tickets.