diff options
author | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-10-22 00:52:09 +0000 |
---|---|---|
committer | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-10-22 00:52:09 +0000 |
commit | 1daeddffa3521a15493dbbd57ea8847f09d931b1 (patch) | |
tree | 94435a387eb7e44bd3255faffd36ad6bfaa68a8b | |
parent | 66c7a3a86eebc9850ff3aa908ca0acc171450f77 (diff) | |
download | xine-lib-1daeddffa3521a15493dbbd57ea8847f09d931b1.tar.gz xine-lib-1daeddffa3521a15493dbbd57ea8847f09d931b1.tar.bz2 |
introducing libxineutils and a this pointer for video_out_x11 callbacks
CVS patchset: 852
CVS date: 2001/10/22 00:52:09
34 files changed, 194 insertions, 77 deletions
diff --git a/configure.in b/configure.in index aca3e598e..befeeb519 100644 --- a/configure.in +++ b/configure.in @@ -690,7 +690,7 @@ fi dnl dnl Some include paths ( !!! DO NOT REMOVE !!! ) dnl -INCLUDES='-I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/src -I$(top_builddir)/src -I$(top_srcdir)/src/xine-engine -I$(top_builddir)/src/xine-engine' +INCLUDES='-I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/src -I$(top_builddir)/src -I$(top_srcdir)/src/xine-engine -I$(top_builddir)/src/xine-engine -I$(top_srcdir)/src/xine-utils -I$(top_builddir)/src/xine-utils' AC_SUBST(INCLUDES) @@ -746,6 +746,7 @@ src/libspudec/Makefile src/libvfill/Makefile src/libvorbis/Makefile src/libdivx4/Makefile +src/xine-utils/Makefile src/input/Makefile src/xine-engine/Makefile misc/Makefile @@ -785,3 +786,4 @@ else fi chmod +x libtool-nofpic + diff --git a/src/Makefile.am b/src/Makefile.am index 7b284b9e3..c1860a489 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,7 @@ -SUBDIRS = audio_out video_out dxr3 input libmpeg2 libspudec demuxers \ +SUBDIRS = xine-utils xine-engine audio_out video_out dxr3 input libmpeg2 libspudec demuxers \ liba52 libffmpeg liblpcm libw32dll libmad libdts libvfill \ - libvorbis libdivx4 xine-engine + libvorbis libdivx4 debug: @list='$(SUBDIRS)'; for subdir in $$list; do \ diff --git a/src/audio_out/Makefile.am b/src/audio_out/Makefile.am index 81401173f..07fe7e799 100644 --- a/src/audio_out/Makefile.am +++ b/src/audio_out/Makefile.am @@ -53,29 +53,31 @@ lib_LTLIBRARIES = $(oss_module) $(alsa_module) $(esd_module) $(sun_module) $(art $(alsa05_module) $(irixal_module) xineplug_ao_out_oss_la_SOURCES = audio_oss_out.c +xineplug_ao_out_oss_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la xineplug_ao_out_oss_la_LDFLAGS = -avoid-version -module xineplug_ao_out_alsa05_la_SOURCES = audio_alsa05_out.c -xineplug_ao_out_alsa05_la_LIBADD = $(ALSA_LIBS) +xineplug_ao_out_alsa05_la_LIBADD = $(ALSA_LIBS) $(top_builddir)/src/xine-utils/libxineutils.la xineplug_ao_out_alsa05_la_LDFLAGS = -avoid-version -module xineplug_ao_out_alsa_la_SOURCES = audio_alsa_out.c -xineplug_ao_out_alsa_la_LIBADD = $(ALSA_LIBS) +xineplug_ao_out_alsa_la_LIBADD = $(ALSA_LIBS) $(top_builddir)/src/xine-utils/libxineutils.la xineplug_ao_out_alsa_la_LDFLAGS = -avoid-version -module xineplug_ao_out_esd_la_SOURCES = audio_esd_out.c -xineplug_ao_out_esd_la_LIBADD = $(ESD_LIBS) +xineplug_ao_out_esd_la_LIBADD = $(ESD_LIBS) $(top_builddir)/src/xine-utils/libxineutils.la xineplug_ao_out_esd_la_LDFLAGS = -avoid-version -module xineplug_ao_out_sun_la_SOURCES = audio_sun_out.c +xineplug_ao_out_sun_la_LIBADD = $(IRIXAL_LIBS) $(top_builddir)/src/xine-utils/libxineutils.la xineplug_ao_out_sun_la_LDFLAGS = -avoid-version -module xineplug_ao_out_irixal_la_SOURCES = audio_irixal_out.c -xineplug_ao_out_irixal_la_LIBADD = $(IRIXAL_LIBS) +xineplug_ao_out_irixal_la_LIBADD = $(IRIXAL_LIBS) $(top_builddir)/src/xine-utils/libxineutils.la xineplug_ao_out_irixal_la_LDFLAGS = -avoid-version -module xineplug_ao_out_arts_la_SOURCES = audio_arts_out.c -xineplug_ao_out_arts_la_LIBADD = $(ARTS_LIBS) +xineplug_ao_out_arts_la_LIBADD = $(ARTS_LIBS) $(top_builddir)/src/xine-utils/libxineutils.la xineplug_ao_out_arts_la_LDFLAGS = -avoid-version -module noinst_HEADERS = audio_oss_out.h audio_alsa_out.h audio_esd_out.h \ diff --git a/src/demuxers/Makefile.am b/src/demuxers/Makefile.am index 57cfac345..77b017c9a 100644 --- a/src/demuxers/Makefile.am +++ b/src/demuxers/Makefile.am @@ -21,36 +21,43 @@ lib_LTLIBRARIES = $(ogg_module) xineplug_dmx_avi.la \ xineplug_dmx_qt.la xineplug_dmx_asf.la xineplug_dmx_ogg_la_SOURCES = demux_ogg.c -xineplug_dmx_ogg_la_LIBADD = @OGG_LIBS@ +xineplug_dmx_ogg_la_LIBADD = @OGG_LIBS@ $(top_builddir)/src/xine-utils/libxineutils.la xineplug_dmx_ogg_la_LDFLAGS = -avoid-version -module xineplug_dmx_avi_la_SOURCES = demux_avi.c +xineplug_dmx_avi_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la xineplug_dmx_avi_la_LDFLAGS = -avoid-version -module xineplug_dmx_mpeg_block_la_SOURCES = demux_mpeg_block.c +xineplug_dmx_mpeg_block_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la $(top_builddir)/src/xine-engine/libxine.la xineplug_dmx_mpeg_block_la_LDFLAGS = -avoid-version -module xineplug_dmx_mpeg_la_SOURCES = demux_mpeg.c +xineplug_dmx_mpeg_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la xineplug_dmx_mpeg_la_LDFLAGS = -avoid-version -module xineplug_dmx_mpeg_audio_la_SOURCES = demux_mpgaudio.c -xineplug_dmx_mpeg_audio_la_LIBADD = -lm +xineplug_dmx_mpeg_audio_la_LIBADD = -lm $(top_builddir)/src/xine-utils/libxineutils.la xineplug_dmx_mpeg_audio_la_LDFLAGS = -avoid-version -module xineplug_dmx_mpeg_elem_la_SOURCES = demux_elem.c +xineplug_dmx_mpeg_elem_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la xineplug_dmx_mpeg_elem_la_LDFLAGS = -avoid-version -module xineplug_dmx_mpeg_pes_la_SOURCES = demux_pes.c +xineplug_dmx_mpeg_pes_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la xineplug_dmx_mpeg_pes_la_LDFLAGS = -avoid-version -module xineplug_dmx_mpeg_ts_la_SOURCES = demux_ts.c +xineplug_dmx_mpeg_ts_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la xineplug_dmx_mpeg_ts_la_LDFLAGS = -avoid-version -module xineplug_dmx_qt_la_SOURCES = demux_qt.c xineplug_dmx_qt_la_LDFLAGS = -avoid-version -module -xineplug_dmx_qt_la_LIBADD = -lz +xineplug_dmx_qt_la_LIBADD = -lz $(top_builddir)/src/xine-utils/libxineutils.la xineplug_dmx_asf_la_SOURCES = demux_asf.c +xineplug_dmx_asf_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la xineplug_dmx_asf_la_LDFLAGS = -avoid-version -module include_HEADERS = demux.h diff --git a/src/dxr3/Makefile.am b/src/dxr3/Makefile.am index 830d06cd6..a171d1fca 100644 --- a/src/dxr3/Makefile.am +++ b/src/dxr3/Makefile.am @@ -14,9 +14,11 @@ lib_LTLIBRARIES = $(dxr3_modules) xineplug_decode_dxr3_la_SOURCES = dxr3_decoder.c xineplug_decode_dxr3_la_LDFLAGS = -avoid-version -module +xineplug_decode_dxr3_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la $(top_builddir)/src/xine-engine/libxine.la xineplug_vo_out_dxr3_la_SOURCES = video_out_dxr3.c overlay.c xineplug_vo_out_dxr3_la_LDFLAGS = -avoid-version -module $(X_LIBS) +xineplug_vo_out_dxr3_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la include_HEADERS = dxr3_overlay.h diff --git a/src/input/Makefile.am b/src/input/Makefile.am index 470428383..c79c1d5ca 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -24,21 +24,27 @@ lib_LTLIBRARIES = xineplug_inp_file.la $(in_dvd) $(in_vcd) \ xineplug_inp_rtp.la xineplug_inp_file_la_SOURCES = input_file.c +xineplug_inp_file_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la xineplug_inp_file_la_LDFLAGS = -avoid-version -module xineplug_inp_dvd_la_SOURCES = input_dvd.c dvd_udf.c read_cache.c +xineplug_inp_dvd_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la xineplug_inp_dvd_la_LDFLAGS = -avoid-version -module xineplug_inp_net_la_SOURCES = input_net.c +xineplug_inp_net_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la xineplug_inp_net_la_LDFLAGS = -avoid-version -module xineplug_inp_vcd_la_SOURCES = input_vcd.c +xineplug_inp_vcd_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la xineplug_inp_vcd_la_LDFLAGS = -avoid-version -module xineplug_inp_stdin_fifo_la_SOURCES = input_stdin_fifo.c +xineplug_inp_stdin_fifo_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la xineplug_inp_stdin_fifo_la_LDFLAGS = -avoid-version -module xineplug_inp_rtp_la_SOURCES = input_rtp.c +xineplug_inp_rtp_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la xineplug_inp_rtp_la_LDFLAGS = -avoid-version -module include_HEADERS = input_plugin.h diff --git a/src/liba52/Makefile.am b/src/liba52/Makefile.am index 81e457c54..ac03c97aa 100644 --- a/src/liba52/Makefile.am +++ b/src/liba52/Makefile.am @@ -12,6 +12,7 @@ xineplug_decode_a52_la_SOURCES = bitstream.c bit_allocate.c \ parse.c downmix.c imdct.c imdct_mlib.c \ xine_decoder.c xineplug_decode_a52_la_LDFLAGS = -avoid-version -module +xineplug_decode_a52_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la noinst_HEADERS = a52.h a52_internal.h \ bitstream.h tables.h diff --git a/src/libdivx4/Makefile.am b/src/libdivx4/Makefile.am index 7cd8b7b56..3ad16baef 100644 --- a/src/libdivx4/Makefile.am +++ b/src/libdivx4/Makefile.am @@ -12,6 +12,7 @@ lib_LTLIBRARIES = xineplug_decode_divx4.la xineplug_decode_divx4_la_SOURCES = xine_decoder.c xineplug_decode_divx4_la_LDFLAGS = -avoid-version -module +xineplug_decode_divx4_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la noinst_HEADERS = decore-if.h diff --git a/src/libdts/Makefile.am b/src/libdts/Makefile.am index 6e7a93629..719daac06 100644 --- a/src/libdts/Makefile.am +++ b/src/libdts/Makefile.am @@ -8,6 +8,7 @@ lib_LTLIBRARIES = xineplug_decode_dts.la xineplug_decode_dts_la_SOURCES = xine_decoder.c xineplug_decode_dts_la_LDFLAGS = -avoid-version -module +xineplug_decode_dts_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la noinst_HEADERS = diff --git a/src/libffmpeg/Makefile.am b/src/libffmpeg/Makefile.am index b180b3ba4..f4d21c7c7 100644 --- a/src/libffmpeg/Makefile.am +++ b/src/libffmpeg/Makefile.am @@ -14,6 +14,8 @@ lib_LTLIBRARIES = xineplug_decode_ff.la xineplug_decode_ff_la_SOURCES = xine_decoder.c +xineplug_decode_ff_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la + xineplug_decode_ff_la_LDFLAGS = \ $(top_builddir)/src/libffmpeg/libavcodec/libavcodec.la \ -avoid-version -module diff --git a/src/liblpcm/Makefile.am b/src/liblpcm/Makefile.am index a382669f2..2e576650f 100644 --- a/src/liblpcm/Makefile.am +++ b/src/liblpcm/Makefile.am @@ -8,6 +8,7 @@ lib_LTLIBRARIES = xineplug_decode_lpcm.la xineplug_decode_lpcm_la_SOURCES = xine_decoder.c xineplug_decode_lpcm_la_LDFLAGS = -avoid-version -module +xineplug_decode_lpcm_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la noinst_HEADERS = diff --git a/src/libmad/Makefile.am b/src/libmad/Makefile.am index 35843426b..d3f295a8f 100644 --- a/src/libmad/Makefile.am +++ b/src/libmad/Makefile.am @@ -11,6 +11,7 @@ xineplug_decode_mad_la_SOURCES = bit.c frame.c layer3.c timer.c \ xineplug_decode_mad_la_LDFLAGS = -avoid-version -module +xineplug_decode_mad_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la noinst_HEADERS = D.dat huffman.h mad.h stream.h fixed.h \ imdct_s.dat qc_table.dat synth.h bit.h frame.h layer12.h \ diff --git a/src/libmpeg2/Makefile.am b/src/libmpeg2/Makefile.am index cf093d802..5a63a0e71 100644 --- a/src/libmpeg2/Makefile.am +++ b/src/libmpeg2/Makefile.am @@ -16,6 +16,7 @@ xineplug_decode_mpeg2_la_SOURCES = slice.c header.c stats.c idct.c \ motion_comp.c decode.c idct_mmx.c motion_comp_mmx.c \ idct_mlib.c motion_comp_mlib.c xine_decoder.c xineplug_decode_mpeg2_la_LDFLAGS = -avoid-version -module +xineplug_decode_mpeg2_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la noinst_HEADERS = vlc.h mpeg2.h mpeg2_internal.h diff --git a/src/libspudec/Makefile.am b/src/libspudec/Makefile.am index 9e5d8ca4b..a9246e112 100644 --- a/src/libspudec/Makefile.am +++ b/src/libspudec/Makefile.am @@ -8,6 +8,7 @@ lib_LTLIBRARIES = xineplug_decode_spu.la xineplug_decode_spu_la_SOURCES = spu.c xine_decoder.c xineplug_decode_spu_la_LDFLAGS = -avoid-version -module +xineplug_decode_spu_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la $(top_builddir)/src/xine-engine/libxine.la noinst_HEADERS = spu.h include_HEADERS = spu_decoder_api.h diff --git a/src/libvfill/Makefile.am b/src/libvfill/Makefile.am index 4548b4c72..dcfd8b886 100644 --- a/src/libvfill/Makefile.am +++ b/src/libvfill/Makefile.am @@ -10,6 +10,7 @@ libdir = $(XINE_PLUGINDIR) lib_LTLIBRARIES = xineplug_decode_vfill.la xineplug_decode_vfill_la_SOURCES = xine_decoder.c +xineplug_decode_vfill_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la xineplug_decode_vfill_la_LDFLAGS = -avoid-version -module # noinst_HEADERS = diff --git a/src/libvorbis/Makefile.am b/src/libvorbis/Makefile.am index 5a581756f..70216225f 100644 --- a/src/libvorbis/Makefile.am +++ b/src/libvorbis/Makefile.am @@ -15,7 +15,7 @@ endif lib_LTLIBRARIES = $(vorbis_module) xineplug_decode_vorbis_la_SOURCES = xine_decoder.c -xineplug_decode_vorbis_la_LIBADD = @VORBIS_LIBS@ +xineplug_decode_vorbis_la_LIBADD = @VORBIS_LIBS@ $(top_builddir)/src/xine-utils/libxineutils.la xineplug_decode_vorbis_la_LDFLAGS = -avoid-version -module diff --git a/src/libw32dll/Makefile.am b/src/libw32dll/Makefile.am index 5012c03f4..83a8df279 100644 --- a/src/libw32dll/Makefile.am +++ b/src/libw32dll/Makefile.am @@ -19,7 +19,7 @@ lib_LTLIBRARIES = $(w32dll_codec) xineplug_decode_w32dll_la_SOURCES = w32codec.c xineplug_decode_w32dll_la_LDFLAGS = -avoid-version -module -xineplug_decode_w32dll_la_LIBADD = $(top_builddir)/src/libw32dll/wine/libwine.la @KSTAT_LIBS@ +xineplug_decode_w32dll_la_LIBADD = $(top_builddir)/src/libw32dll/wine/libwine.la @KSTAT_LIBS@ $(top_builddir)/src/xine-utils/libxineutils.la noinst_HEADERS = w32codec.h diff --git a/src/video_out/Makefile.am b/src/video_out/Makefile.am index 908d9d1e5..2d3eeab22 100644 --- a/src/video_out/Makefile.am +++ b/src/video_out/Makefile.am @@ -26,19 +26,20 @@ endif lib_LTLIBRARIES = $(xv_module) $(syncfb_module) $(xshm_module) $(aa_module) xineplug_vo_out_xv_la_SOURCES = deinterlace.c alphablend.c video_out_xv.c -xineplug_vo_out_xv_la_LIBADD = $(XV_LIB) $(X_LIBS) -lXext +xineplug_vo_out_xv_la_LIBADD = $(XV_LIB) $(X_LIBS) -lXext $(top_builddir)/src/xine-utils/libxineutils.la xineplug_vo_out_xv_la_LDFLAGS = -avoid-version -module xineplug_vo_out_xshm_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ alphablend.c video_out_xshm.c -xineplug_vo_out_xshm_la_LIBADD = $(X_LIBS) -lXext +xineplug_vo_out_xshm_la_LIBADD = $(X_LIBS) -lXext $(top_builddir)/src/xine-utils/libxineutils.la xineplug_vo_out_xshm_la_LDFLAGS = -avoid-version -module -xineplug_vo_out_syncfb_la_SOURCES = video_out_syncfb.c +xineplug_vo_out_syncfb_la_SOURCES = video_out_syncfb.c +xineplug_vo_out_syncfb_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la xineplug_vo_out_syncfb_la_LDFLAGS = -avoid-version -module xineplug_vo_out_aa_la_SOURCES = video_out_aa.c -xineplug_vo_out_aa_la_LIBADD = $(AALIB_LIBS) +xineplug_vo_out_aa_la_LIBADD = $(AALIB_LIBS) $(top_builddir)/src/xine-utils/libxineutils.la xineplug_vo_out_aa_la_LDFLAGS = -avoid-version -module noinst_HEADERS = yuv2rgb.h video_out_syncfb.h alphablend.h deinterlace.h diff --git a/src/video_out/deinterlace.c b/src/video_out/deinterlace.c index afdc320bb..540941c20 100644 --- a/src/video_out/deinterlace.c +++ b/src/video_out/deinterlace.c @@ -27,10 +27,11 @@ #include <stdio.h> #include <string.h> #include "xine_internal.h" -#include "cpu_accel.h" #include "deinterlace.h" #include "memcpy.h" +#include "cpu_accel.c" +#include "memcpy.c" /* DeinterlaceFieldBob algorithm @@ -329,15 +330,17 @@ static int deinterlace_weave_yuv_mmx( uint8_t *pdst, uint8_t *psrc[], psubsw_r2r ( mm4, mm5 ); // mm5 = Oold - O psraw_i2r ( 1, mm5 ); // XXX pmullw_r2r ( mm5, mm5 ); // mm5 = (Oold - O) ^ 2 - psubusw_r2r ( mm5, mm3 ); // mm0 = TT - (Oold - O) ^ 2, or 0 if that's negative + psubusw_r2r ( mm5, mm3 ); /* mm0 = TT - (Oold - O) ^ 2, or 0 if that's negative */ paddusw_r2r ( mm3, mm7 ); // mm7 = our magic number - // Now compare the similarity totals against our threshold. The pcmpgtw - // instruction will populate the target register with a bunch of mask bits, - // filling words where the comparison is true with 1s and ones where it's - // false with 0s. A few ANDs and NOTs and an OR later, we have bobbed - // values for pixels under the similarity threshold and weaved ones for - // pixels over the threshold. + /* + * Now compare the similarity totals against our threshold. The pcmpgtw + * instruction will populate the target register with a bunch of mask bits, + * filling words where the comparison is true with 1s and ones where it's + * false with 0s. A few ANDs and NOTs and an OR later, we have bobbed + * values for pixels under the similarity threshold and weaved ones for + * pixels over the threshold. + */ pcmpgtw_m2r( *&qwThreshold, mm7 ); // mm7 = 0xffff where we're greater than the threshold, 0 elsewhere movq_r2r ( mm7, mm6 ); // mm6 = 0xffff where we're greater than the threshold, 0 elsewhere @@ -521,7 +524,7 @@ static int deinterlace_greedy_yuv_mmx( uint8_t *pdst, uint8_t *psrc[], } } - // Copy last odd line if we're processing an Odd field. + /* Copy last odd line if we're processing an Odd field. */ if (IsOdd) { fast_memcpy(pdst + (height * 2 - 1) * LineLength, @@ -529,7 +532,7 @@ static int deinterlace_greedy_yuv_mmx( uint8_t *pdst, uint8_t *psrc[], LineLength); } - // clear out the MMX registers ready for doing floating point again + /* clear out the MMX registers ready for doing floating point again */ emms(); #endif @@ -559,8 +562,11 @@ static void deinterlace_onefield_yuv_mmx( uint8_t *pdst, uint8_t *psrc[], static mmx_t Mask = {ub:{0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe}}; - // copy first even line no matter what, and the first odd line if we're - // processing an odd field. + /* + * copy first even line no matter what, and the first odd line if we're + * processing an odd field. + */ + fast_memcpy(pdst, pEvenLines, LineLength); if (IsOdd) fast_memcpy(pdst + LineLength, pOddLines, LineLength); @@ -601,7 +607,7 @@ static void deinterlace_onefield_yuv_mmx( uint8_t *pdst, uint8_t *psrc[], } } - // Copy last odd line if we're processing an even field. + /* Copy last odd line if we're processing an even field. */ if (! IsOdd) { fast_memcpy(pdst + (height * 2 - 1) * LineLength, @@ -609,8 +615,9 @@ static void deinterlace_onefield_yuv_mmx( uint8_t *pdst, uint8_t *psrc[], LineLength); } - // clear out the MMX registers ready for doing floating point - // again + /* clear out the MMX registers ready for doing floating point + * again + */ emms(); #endif } diff --git a/src/video_out/video_out_syncfb.c b/src/video_out/video_out_syncfb.c index 645b9f50b..a2226db8c 100644 --- a/src/video_out/video_out_syncfb.c +++ b/src/video_out/video_out_syncfb.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_syncfb.c,v 1.15 2001/10/14 23:19:59 f1rmb Exp $ + * $Id: video_out_syncfb.c,v 1.16 2001/10/22 00:52:10 guenter Exp $ * * video_out_syncfb.c, Matrox G400 video extension interface for xine * @@ -143,8 +143,11 @@ typedef struct _mga_globals { int overlay_state; + void *user_data; + /* gui callback */ - void (*request_dest_size) (int video_width, int video_height, + void (*request_dest_size) (void *user_data, + int video_width, int video_height, int *dest_x, int *dest_y, int *dest_height, int *dest_width); @@ -927,6 +930,7 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual) { _mga_priv.user_ratio_changed = 0 ; _mga_priv.fourcc_format = 0; _mga_priv.request_dest_size = ((x11_visual_t*) visual)->request_dest_size; + _mga_priv.user_data = ((x11_visual_t*) visual)->user_data; _window.clasped_window = 0; _display.default_screen = DefaultScreen(_mga_priv.lDisplay); diff --git a/src/video_out/video_out_x11.h b/src/video_out/video_out_x11.h index faedf511e..a98ca612b 100644 --- a/src/video_out/video_out_x11.h +++ b/src/video_out/video_out_x11.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_x11.h,v 1.7 2001/10/10 10:06:59 jkeil Exp $ + * $Id: video_out_x11.h,v 1.8 2001/10/22 00:52:10 guenter Exp $ * * structs and defines specific to all x11 related output plugins * (any x11 base xine ui should include this) @@ -52,6 +52,8 @@ typedef struct { /* drawable to display the video in/on */ Drawable d; + + void *user_data; /* * calc dest size @@ -62,7 +64,8 @@ typedef struct { * video out area, just do some calculations and return * the size */ - void (*calc_dest_size) (int video_width, int video_height, + void (*calc_dest_size) (void *user_data, + int video_width, int video_height, int *dest_width, int *dest_height); /* @@ -78,7 +81,8 @@ typedef struct { * preserving aspect ration and stuff). */ - void (*request_dest_size) (int video_width, int video_height, + void (*request_dest_size) (void *user_data, + int video_width, int video_height, int *dest_x, int *dest_y, int *dest_width, int *dest_height); diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c index c46c8d75b..f6e02a773 100644 --- a/src/video_out/video_out_xshm.c +++ b/src/video_out/video_out_xshm.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_xshm.c,v 1.47 2001/10/20 13:40:20 miguelfreitas Exp $ + * $Id: video_out_xshm.c,v 1.48 2001/10/22 00:52:10 guenter Exp $ * * video_out_xshm.c, X11 shared memory extension interface for xine * @@ -137,13 +137,17 @@ typedef struct xshm_driver_s { /* profiler */ int prof_yuv2rgb; + void *user_data; + /* gui callbacks */ - void (*request_dest_size) (int video_width, int video_height, + void (*request_dest_size) (void *user_data, + int video_width, int video_height, int *dest_x, int *dest_y, int *dest_height, int *dest_width); - void (*calc_dest_size) (int video_width, int video_height, + void (*calc_dest_size) (void *user_data, + int video_width, int video_height, int *dest_width, int *dest_height); } xshm_driver_t; @@ -445,7 +449,8 @@ static void xshm_calc_output_size (xshm_driver_t *this) { this->output_height = this->delivered_height; this->ratio_factor = 1.0; - this->calc_dest_size (this->output_width, this->output_height, + this->calc_dest_size (this->user_data, + this->output_width, this->output_height, &dest_width, &dest_height); } else { @@ -528,7 +533,8 @@ static void xshm_calc_output_size (xshm_driver_t *this) { ideal_height != this->delivered_height ) ideal_width &= ~7; - this->calc_dest_size (ideal_width, ideal_height, + this->calc_dest_size (this->user_data, + ideal_width, ideal_height, &dest_width, &dest_height); /* @@ -776,7 +782,8 @@ static void xshm_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { xprintf (VIDEO, "video_out_xshm: requesting dest size of %d x %d \n", frame->rgb_width, frame->rgb_height); - this->request_dest_size (frame->rgb_width, frame->rgb_height, + this->request_dest_size (this->user_data, + frame->rgb_width, frame->rgb_height, &this->dest_x, &this->dest_y, &this->gui_width, &this->gui_height); /* for fullscreen modes, clear unused areas of old video area */ @@ -1174,6 +1181,7 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { this->display_ratio = visual->display_ratio; this->request_dest_size = visual->request_dest_size; this->calc_dest_size = visual->calc_dest_size; + this->user_data = visual->user_data; this->output_width = 0; this->output_height = 0; this->output_scale_factor = 1.0; diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index cdbbcd030..30bc08e70 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_xv.c,v 1.69 2001/10/15 12:20:01 jkeil Exp $ + * $Id: video_out_xv.c,v 1.70 2001/10/22 00:52:10 guenter Exp $ * * video_out_xv.c, X11 video extension interface for xine * @@ -51,7 +51,6 @@ #include <string.h> #include "monitor.h" -#include "utils.h" #include "video_out.h" #include "video_out_x11.h" #include "xine_internal.h" @@ -131,9 +130,12 @@ typedef struct { double display_ratio; /* given by visual parameter from init function */ + void *user_data; + /* gui callback */ - void (*request_dest_size) (int video_width, int video_height, + void (*request_dest_size) (void *user_data, + int video_width, int video_height, int *dest_x, int *dest_y, int *dest_height, int *dest_width); @@ -331,7 +333,7 @@ static XvImage *create_ximage (xv_driver_t *this, XShmSegmentInfo *shminfo, char *data; - data = xmalloc (width * height * 3/2); + data = malloc (width * height * 3/2); image = XvCreateImage (this->display, this->xv_port, xv_format, data, width, height); @@ -605,7 +607,8 @@ static void xv_calc_format (xv_driver_t *this, * ask gui to adapt to this size */ - this->request_dest_size (ideal_width, ideal_height, + this->request_dest_size (this->user_data, + ideal_width, ideal_height, &dest_x, &dest_y, &dest_width, &dest_height); xv_adapt_to_output_area (this, dest_x, dest_y, dest_width, dest_height); @@ -1025,6 +1028,7 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { this->screen = visual->screen; this->display_ratio = visual->display_ratio; this->request_dest_size = visual->request_dest_size; + this->user_data = visual->user_data; this->output_xoffset = 0; this->output_yoffset = 0; this->output_width = 0; diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am index a9dd27d7e..b04c5c736 100644 --- a/src/xine-engine/Makefile.am +++ b/src/xine-engine/Makefile.am @@ -5,14 +5,12 @@ CFLAGS = @GLOBAL_CFLAGS@ @THREAD_CFLAGS@ -EXTRA_DIST = cpu_accel.c - lib_LTLIBRARIES = libxine.la -libxine_la_SOURCES = xine.c metronom.c configfile.c buffer.c monitor.c \ - utils.c memcpy.c load_plugins.c video_decoder.c \ +libxine_la_SOURCES = xine.c metronom.c configfile.c buffer.c \ + load_plugins.c video_decoder.c \ audio_decoder.c video_out.c audio_out.c resample.c events.c lrb.c -libxine_la_LIBADD = cpu_accel.lo \ +libxine_la_LIBADD = $(top_builddir)/src/xine-utils/libxineutils.la\ $(THREAD_LIBS) \ $(DYNAMIC_LD_LIBS) \ -lm @@ -22,31 +20,11 @@ libxine_la_LDFLAGS = \ -release $(LT_RELEASE) include_HEADERS = buffer.h metronom.h configfile.h \ - monitor.h cpu_accel.h attributes.h utils.h memcpy.h \ audio_out.h resample.h video_out.h xine_internal.h spu_decoder.h \ events.h lrb.h noinst_HEADERS = bswap.h -### -# Hardcoded rule: -# gcc failed to compile this with -fPIC flag -# hackish: [X] yes [ ] no -# -LIBTOOLNOFPIC = $(SHELL) $(top_builddir)/libtool-nofpic -LTCOMPILENOFPIC = $(LIBTOOLNOFPIC) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -cpu_accel.lo: cpu_accel.c - @mkdir -p .deps; touch .deps/cpu_accel.pp; \ - echo '$(LTCOMPILENOFPIC) -c $<'; \ - $(LTCOMPILENOFPIC) -Wp,-MD,.deps/$(*F).pp -c $< - @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ - < .deps/$(*F).pp > .deps/$(*F).P; \ - tr ' ' '\012' < .deps/$(*F).pp \ - | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ - >> .deps/$(*F).P; \ - rm -f .deps/$(*F).pp - - debug: @$(MAKE) CFLAGS="$(DEBUG_CFLAGS)" diff --git a/src/xine-utils/Makefile.am b/src/xine-utils/Makefile.am new file mode 100644 index 000000000..29ef6eef0 --- /dev/null +++ b/src/xine-utils/Makefile.am @@ -0,0 +1,82 @@ +## +## Process this file with automake to produce Makefile.in +## + +CFLAGS = @GLOBAL_CFLAGS@ @THREAD_CFLAGS@ + + +EXTRA_DIST = cpu_accel.c + +lib_LTLIBRARIES = libxineutils.la + +libxineutils_la_SOURCES = utils.c memcpy.c monitor.c +libxineutils_la_LIBADD = cpu_accel.lo \ + $(THREAD_LIBS) \ + $(DYNAMIC_LD_LIBS) \ + -lm + +libxineutils_la_LDFLAGS = \ + -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ + -release $(LT_RELEASE) + +include_HEADERS = attributes.h cpu_accel.h memcpy.h utils.h monitor.h + +### +# Hardcoded rule: +# gcc failed to compile this with -fPIC flag +# hackish: [X] yes [ ] no +# +LIBTOOLNOFPIC = $(SHELL) $(top_builddir)/libtool-nofpic +LTCOMPILENOFPIC = $(LIBTOOLNOFPIC) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +cpu_accel.lo: cpu_accel.c + @mkdir -p .deps; touch .deps/cpu_accel.pp; \ + echo '$(LTCOMPILENOFPIC) -c $<'; \ + $(LTCOMPILENOFPIC) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp + + +debug: + @$(MAKE) CFLAGS="$(DEBUG_CFLAGS)" + +install-debug: debug + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + + + +### +# Install header files (default=$includedir/xine) +# +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(includedir)/xine + @list='$(include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ + echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/xine/$$p"; \ + $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/xine/$$p; \ + done + + +### +# Remove them +# +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + list='$(include_HEADERS)'; for p in $$list; do \ + rm -f $(DESTDIR)$(includedir)/xine/$$p; \ + done + + +mostlyclean-generic: + -rm -f *~ \#* .*~ .\#* + + +maintainer-clean-generic: + -@echo "This command is intended for maintainers to use;" + -@echo "it deletes files that may require special tools to rebuild." + -rm -f Makefile.in + diff --git a/src/xine-engine/attributes.h b/src/xine-utils/attributes.h index 8ed7aef9e..8ed7aef9e 100644 --- a/src/xine-engine/attributes.h +++ b/src/xine-utils/attributes.h diff --git a/src/xine-engine/cpu_accel.c b/src/xine-utils/cpu_accel.c index 8c28d950a..8c28d950a 100644 --- a/src/xine-engine/cpu_accel.c +++ b/src/xine-utils/cpu_accel.c diff --git a/src/xine-engine/cpu_accel.h b/src/xine-utils/cpu_accel.h index 053c142f6..053c142f6 100644 --- a/src/xine-engine/cpu_accel.h +++ b/src/xine-utils/cpu_accel.h diff --git a/src/xine-engine/memcpy.c b/src/xine-utils/memcpy.c index 23a17059c..23a17059c 100644 --- a/src/xine-engine/memcpy.c +++ b/src/xine-utils/memcpy.c diff --git a/src/xine-engine/memcpy.h b/src/xine-utils/memcpy.h index a693f37fe..a693f37fe 100644 --- a/src/xine-engine/memcpy.h +++ b/src/xine-utils/memcpy.h diff --git a/src/xine-engine/monitor.c b/src/xine-utils/monitor.c index 05ac994a6..9250ee2c4 100644 --- a/src/xine-engine/monitor.c +++ b/src/xine-utils/monitor.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: monitor.c,v 1.5 2001/09/10 13:36:56 jkeil Exp $ + * $Id: monitor.c,v 1.1 2001/10/22 00:52:10 guenter Exp $ * * debug print and profiling functions - implementation * diff --git a/src/xine-engine/monitor.h b/src/xine-utils/monitor.h index 6acb7ea9e..6f899aaf4 100644 --- a/src/xine-engine/monitor.h +++ b/src/xine-utils/monitor.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: monitor.h,v 1.5 2001/09/10 13:36:56 jkeil Exp $ + * $Id: monitor.h,v 1.1 2001/10/22 00:52:10 guenter Exp $ * * debug print and profiling functions * diff --git a/src/xine-engine/utils.c b/src/xine-utils/utils.c index e90b1dee1..d3435ea84 100644 --- a/src/xine-engine/utils.c +++ b/src/xine-utils/utils.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: utils.c,v 1.5 2001/10/03 15:16:50 jkeil Exp $ + * $Id: utils.c,v 1.1 2001/10/22 00:52:10 guenter Exp $ * */ #define _POSIX_PTHREAD_SEMANTICS 1 /* for 5-arg getpwuid_r on solaris */ diff --git a/src/xine-engine/utils.h b/src/xine-utils/utils.h index ddc130871..2c35d52db 100644 --- a/src/xine-engine/utils.h +++ b/src/xine-utils/utils.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: utils.h,v 1.3 2001/09/06 13:29:18 jkeil Exp $ + * $Id: utils.h,v 1.1 2001/10/22 00:52:10 guenter Exp $ * */ #ifndef HAVE_UTILS_H |