Compile the qte video output with qtopia core 4.1.3
Posted: 09 Aug 2006 10:55
i want test video output qte, using qtopia core 4.1.3, and i will use qvfb on my computer.
1.I modified the configure.ac file, as follows:
VLC_ADD_LDFLAGS([qte],[-L${with_qte}/lib -lQtCore -lQtGui -lQtSvg -ljpeg -lQt3Support])
VLC_ADD_CXXFLAGS([qte],[-I${with_qte}/include -DQT3_SUPPORT -fno-exceptions -fno-rtti])
2.my configure script:
./configure --prefix=/home/vlce --disable-x11 --enable-xvideo --disable-gtk --enable-sdl --enable-ffmpeg --with-ffmpeg-mp3lame --enable-mad --enable-libdvbpsi --enable-a52 --enable-dts --enable-libmpeg2 --enable-dvdnav --enable-faad --enable-vorbis --enable-ogg --enable-theora --enable-faac --enable-mkv --enable-freetype --enable-fribidi --enable-speex --enable-flac --enable-live555 --with-live555-tree=/home/yimin/project/live --with-ffmpeg-tree=/home/yimin/project/ffmpeg-20051126 --enable-caca --enable-skins --enable-skins2 --enable-alsa --disable-kde --disable-qt4 --disable-wxwidgets --enable-ncurses --enable-release --enable-dvdread --enable-qte --with-qte=/usr/local/Trolltech/QtopiaCore-4.1.3
3.when i compiled it , report follow error messages:
qte.cpp: In function ‘void Display(vout_thread_t*, picture_t*)’:
qte.cpp:341: 错误:对 ‘QDirectPainter::QDirectPainter(QWidget*&)’ 的调用没有匹配的函数
/usr/local/Trolltech/QtopiaCore-4.1.3/include/Qt/qdirectpainter_qws.h:37: 附注:备选为: QDirectPainter::QDirectPainter()
/usr/local/Trolltech/QtopiaCore-4.1.3/include/Qt/qdirectpainter_qws.h:37: 附注: QDirectPainter::QDirectPainter(const QDirectPainter&)
qte.cpp:342: 错误:‘class QDirectPainter’ 没有名为 ‘transformOrientation’ 的成员
qte.cpp:344: 错误:‘class QDirectPainter’ 没有名为 ‘lineStep’ 的成员
qte.cpp: In function ‘int OpenDisplay(vout_thread_t*)’:
qte.cpp:521: 错误:不能将 ‘QDesktopWidget*’ 转换为 ‘QWidget*’,在 initialization 中
qte.cpp: In function ‘void RunQtThread(event_thread_t*)’:
qte.cpp:626: 错误:不能将 ‘QDesktopWidget*’ 转换为 ‘QWidget*’,在 initialization 中
qte.cpp: At global scope:
qte.cpp:278: 警告:‘void Render(vout_thread_t*, picture_t*)’ 定义后未使用
qte.cpp:490: 警告:‘void ToggleFullScreen(vout_thread_t*)’ 定义后未使用
make[6]: *** [libqte_plugin_a-qte.o] 错误 1
make[6]: Leaving directory `/home/yimin/project/vlc-trunk/modules/video_output/qte'
make[5]: *** [all-modules] 错误 1
make[5]: Leaving directory `/home/yimin/project/vlc-trunk/modules/video_output/qte'
make[4]: *** [all-recursive] 错误 1
make[4]: Leaving directory `/home/yimin/project/vlc-trunk/modules/video_output'
make[3]: *** [all] 错误 2
make[3]: Leaving directory `/home/yimin/project/vlc-trunk/modules/video_output'
make[2]: *** [all-recursive] 错误 1
make[2]: Leaving directory `/home/yimin/project/vlc-trunk/modules'
make[1]: *** [all-recursive] 错误 1
make[1]: Leaving directory `/home/yimin/project/vlc-trunk'
make: *** [all] 错误 2
4.it seems that the function "Display" in qte.cpp has some error:
#ifndef USE_DIRECT_PAINTER
msg_Dbg(p_vout, "not using direct painter");
QPainter p(p_vout->p_sys->p_VideoWidget);
/* rotate frame */
int dd = QPixmap::defaultDepth();
int bytes = ( dd == 16 ) ? 2 : 4;
int rw = h, rh = w;
QImage rotatedFrame( rw, rh, bytes << 3 );
ushort* in = (ushort*)p_pic->p_sys->pQImage->bits();
ushort* out = (ushort*)rotatedFrame.bits();
int spl = rotatedFrame.bytesPerLine() / bytes;
for (int x=0; x<h; x++)
{
if ( bytes == 2 )
{
ushort* lout = out++ + (w - 1)*spl;
for (int y=0; y<w; y++)
{
*lout=*in++;
lout-=spl;
}
}
else
{
ulong* lout = ((ulong *)out)++ + (w - 1)*spl;
for (int y=0; y<w; y++)
{
*lout=*((ulong*)in)++;
lout-=spl;
}
}
}
p.drawImage( x, y, rotatedFrame, 0, 0, rw, rh );
#else
QDirectPainter p(p_vout->p_sys->p_VideoWidget);
p.transformOrientation();
// just copy the image to the frame buffer...
memcpy(p.frameBuffer(), (p_pic->p_sys->pQImage->jumpTable())[0], h *p.lineStep());
#endif
1.I modified the configure.ac file, as follows:
VLC_ADD_LDFLAGS([qte],[-L${with_qte}/lib -lQtCore -lQtGui -lQtSvg -ljpeg -lQt3Support])
VLC_ADD_CXXFLAGS([qte],[-I${with_qte}/include -DQT3_SUPPORT -fno-exceptions -fno-rtti])
2.my configure script:
./configure --prefix=/home/vlce --disable-x11 --enable-xvideo --disable-gtk --enable-sdl --enable-ffmpeg --with-ffmpeg-mp3lame --enable-mad --enable-libdvbpsi --enable-a52 --enable-dts --enable-libmpeg2 --enable-dvdnav --enable-faad --enable-vorbis --enable-ogg --enable-theora --enable-faac --enable-mkv --enable-freetype --enable-fribidi --enable-speex --enable-flac --enable-live555 --with-live555-tree=/home/yimin/project/live --with-ffmpeg-tree=/home/yimin/project/ffmpeg-20051126 --enable-caca --enable-skins --enable-skins2 --enable-alsa --disable-kde --disable-qt4 --disable-wxwidgets --enable-ncurses --enable-release --enable-dvdread --enable-qte --with-qte=/usr/local/Trolltech/QtopiaCore-4.1.3
3.when i compiled it , report follow error messages:
qte.cpp: In function ‘void Display(vout_thread_t*, picture_t*)’:
qte.cpp:341: 错误:对 ‘QDirectPainter::QDirectPainter(QWidget*&)’ 的调用没有匹配的函数
/usr/local/Trolltech/QtopiaCore-4.1.3/include/Qt/qdirectpainter_qws.h:37: 附注:备选为: QDirectPainter::QDirectPainter()
/usr/local/Trolltech/QtopiaCore-4.1.3/include/Qt/qdirectpainter_qws.h:37: 附注: QDirectPainter::QDirectPainter(const QDirectPainter&)
qte.cpp:342: 错误:‘class QDirectPainter’ 没有名为 ‘transformOrientation’ 的成员
qte.cpp:344: 错误:‘class QDirectPainter’ 没有名为 ‘lineStep’ 的成员
qte.cpp: In function ‘int OpenDisplay(vout_thread_t*)’:
qte.cpp:521: 错误:不能将 ‘QDesktopWidget*’ 转换为 ‘QWidget*’,在 initialization 中
qte.cpp: In function ‘void RunQtThread(event_thread_t*)’:
qte.cpp:626: 错误:不能将 ‘QDesktopWidget*’ 转换为 ‘QWidget*’,在 initialization 中
qte.cpp: At global scope:
qte.cpp:278: 警告:‘void Render(vout_thread_t*, picture_t*)’ 定义后未使用
qte.cpp:490: 警告:‘void ToggleFullScreen(vout_thread_t*)’ 定义后未使用
make[6]: *** [libqte_plugin_a-qte.o] 错误 1
make[6]: Leaving directory `/home/yimin/project/vlc-trunk/modules/video_output/qte'
make[5]: *** [all-modules] 错误 1
make[5]: Leaving directory `/home/yimin/project/vlc-trunk/modules/video_output/qte'
make[4]: *** [all-recursive] 错误 1
make[4]: Leaving directory `/home/yimin/project/vlc-trunk/modules/video_output'
make[3]: *** [all] 错误 2
make[3]: Leaving directory `/home/yimin/project/vlc-trunk/modules/video_output'
make[2]: *** [all-recursive] 错误 1
make[2]: Leaving directory `/home/yimin/project/vlc-trunk/modules'
make[1]: *** [all-recursive] 错误 1
make[1]: Leaving directory `/home/yimin/project/vlc-trunk'
make: *** [all] 错误 2
4.it seems that the function "Display" in qte.cpp has some error:
#ifndef USE_DIRECT_PAINTER
msg_Dbg(p_vout, "not using direct painter");
QPainter p(p_vout->p_sys->p_VideoWidget);
/* rotate frame */
int dd = QPixmap::defaultDepth();
int bytes = ( dd == 16 ) ? 2 : 4;
int rw = h, rh = w;
QImage rotatedFrame( rw, rh, bytes << 3 );
ushort* in = (ushort*)p_pic->p_sys->pQImage->bits();
ushort* out = (ushort*)rotatedFrame.bits();
int spl = rotatedFrame.bytesPerLine() / bytes;
for (int x=0; x<h; x++)
{
if ( bytes == 2 )
{
ushort* lout = out++ + (w - 1)*spl;
for (int y=0; y<w; y++)
{
*lout=*in++;
lout-=spl;
}
}
else
{
ulong* lout = ((ulong *)out)++ + (w - 1)*spl;
for (int y=0; y<w; y++)
{
*lout=*((ulong*)in)++;
lout-=spl;
}
}
}
p.drawImage( x, y, rotatedFrame, 0, 0, rw, rh );
#else
QDirectPainter p(p_vout->p_sys->p_VideoWidget);
p.transformOrientation();
// just copy the image to the frame buffer...
memcpy(p.frameBuffer(), (p_pic->p_sys->pQImage->jumpTable())[0], h *p.lineStep());
#endif