diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/demuxers/demux_asf.c | 10 | ||||
-rw-r--r-- | src/video_out/Makefile.am | 34 | ||||
-rw-r--r-- | src/video_out/video_out_aa.c | 4 | ||||
-rw-r--r-- | src/video_out/video_out_caca.c | 4 | ||||
-rw-r--r-- | src/video_out/video_out_macosx.m | 4 | ||||
-rw-r--r-- | src/video_out/video_out_none.c | 4 | ||||
-rw-r--r-- | src/xine-engine/io_helper.c | 48 |
7 files changed, 83 insertions, 25 deletions
diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c index 18f1a54bf..583e0daac 100644 --- a/src/demuxers/demux_asf.c +++ b/src/demuxers/demux_asf.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: demux_asf.c,v 1.172 2005/07/18 01:28:21 dsalt Exp $ + * $Id: demux_asf.c,v 1.173 2005/11/14 12:34:46 valtri Exp $ * * demultiplexer for asf streams * @@ -169,7 +169,9 @@ typedef struct demux_asf_s { int64_t first_packet_pos; int mode; - + + /* for fewer error messages */ + GUID last_unknown_guid; } demux_asf_t ; typedef struct { @@ -258,7 +260,9 @@ static int get_guid_id (demux_asf_t *this, GUID *g) { return i; } } - + + if (!memcmp(g, &this->last_unknown_guid, sizeof(GUID))) return GUID_ERROR; + memcpy(&this->last_unknown_guid, g, sizeof(GUID)); xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_asf: unknown GUID: 0x%" PRIx32 ", 0x%" PRIx16 ", 0x%" PRIx16 ", " "{ 0x%" PRIx8 ", 0x%" PRIx8 ", 0x%" PRIx8 ", 0x%" PRIx8 ", 0x%" PRIx8 ", 0x%" PRIx8 ", 0x%" PRIx8 ", 0x%" PRIx8 " }\n", diff --git a/src/video_out/Makefile.am b/src/video_out/Makefile.am index 54f3cde08..7fd141c25 100644 --- a/src/video_out/Makefile.am +++ b/src/video_out/Makefile.am @@ -94,70 +94,70 @@ lib_LTLIBRARIES = $(xshm_module) $(xv_module) $(xvmc_module) \ xineplug_vo_out_xshm_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ video_out_xshm.c $(X11OSD) -xineplug_vo_out_xshm_la_LIBADD = $(MLIB_LIBS) $(X_LIBS) -lXext $(XINE_LIB) +xineplug_vo_out_xshm_la_LIBADD = $(MLIB_LIBS) $(X_LIBS) -lXext $(XINE_LIB) $(THREAD_LIBS) xineplug_vo_out_xshm_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ xineplug_vo_out_xv_la_SOURCES = $(X11OSD) deinterlace.c video_out_xv.c -xineplug_vo_out_xv_la_LIBADD = $(XV_LIB) $(X_LIBS) -lXext $(XINE_LIB) +xineplug_vo_out_xv_la_LIBADD = $(XV_LIB) $(X_LIBS) -lXext $(XINE_LIB) $(THREAD_LIBS) xineplug_vo_out_xv_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ xineplug_vo_out_xvmc_la_SOURCES = deinterlace.c video_out_xvmc.c -xineplug_vo_out_xvmc_la_LIBADD = $(XVMC_LIB) $(XV_LIB) $(X_LIBS) -lXext $(XINE_LIB) +xineplug_vo_out_xvmc_la_LIBADD = $(XVMC_LIB) $(XV_LIB) $(X_LIBS) -lXext $(XINE_LIB) $(THREAD_LIBS) xineplug_vo_out_xvmc_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ xineplug_vo_out_xxmc_la_SOURCES = $(X11OSD) deinterlace.c video_out_xxmc.c\ xvmc_mocomp.c xvmc_vld.c xxmc.h -xineplug_vo_out_xxmc_la_LIBADD = $(XXMC_LIB) $(XV_LIB) $(X_LIBS) -lXext $(XINE_LIB) +xineplug_vo_out_xxmc_la_LIBADD = $(XXMC_LIB) $(XV_LIB) $(X_LIBS) -lXext $(XINE_LIB) $(THREAD_LIBS) xineplug_vo_out_xxmc_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ xineplug_vo_out_opengl_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ video_out_opengl.c myglext.h $(X11OSD) xineplug_vo_out_opengl_la_LIBADD = $(MLIB_LIBS) $(OPENGL_LIBS) $(GLUT_LIBS) \ - $(GLU_LIBS) $(X_LIBS) -lXext $(XINE_LIB) + $(GLU_LIBS) $(X_LIBS) -lXext $(XINE_LIB) $(THREAD_LIBS) xineplug_vo_out_opengl_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ xineplug_vo_out_syncfb_la_SOURCES = video_out_syncfb.c -xineplug_vo_out_syncfb_la_LIBADD = $(X_LIBS) $(XINE_LIB) +xineplug_vo_out_syncfb_la_LIBADD = $(X_LIBS) $(XINE_LIB) $(THREAD_LIBS) xineplug_vo_out_syncfb_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ xineplug_vo_out_pgx64_la_SOURCES = video_out_pgx64.c -xineplug_vo_out_pgx64_la_LIBADD = $(X_LIBS) $(SUNDGA_LIBS) +xineplug_vo_out_pgx64_la_LIBADD = $(X_LIBS) $(SUNDGA_LIBS) $(THREAD_LIBS) xineplug_vo_out_pgx64_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ xineplug_vo_out_pgx32_la_SOURCES = video_out_pgx32.c -xineplug_vo_out_pgx32_la_LIBADD = $(X_LIBS) $(SUNDGA_LIBS) +xineplug_vo_out_pgx32_la_LIBADD = $(X_LIBS) $(SUNDGA_LIBS) $(THREAD_LIBS) xineplug_vo_out_pgx32_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ xineplug_vo_out_vidix_la_SOURCES = video_out_vidix.c $(X11OSD) xineplug_vo_out_vidix_la_LIBADD = $(X_LIBS) \ $(top_builddir)/src/video_out/vidix/libvidix.la \ - $(top_builddir)/src/video_out/libdha/libdha.la + $(top_builddir)/src/video_out/libdha/libdha.la $(THREAD_LIBS) xineplug_vo_out_vidix_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ 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) $(THREAD_LIBS) xineplug_vo_out_aa_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ xineplug_vo_out_caca_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ video_out_caca.c -xineplug_vo_out_caca_la_LIBADD = $(CACA_LIBS) +xineplug_vo_out_caca_la_LIBADD = $(CACA_LIBS) $(THREAD_LIBS) xineplug_vo_out_caca_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ xineplug_vo_out_fb_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ video_out_fb.c -xineplug_vo_out_fb_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) +xineplug_vo_out_fb_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) $(THREAD_LIBS) xineplug_vo_out_fb_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ xineplug_vo_out_directfb_la_SOURCES = video_out_directfb.c -xineplug_vo_out_directfb_la_LIBADD = $(DIRECTFB_LIBS) $(X_LIBS) +xineplug_vo_out_directfb_la_LIBADD = $(DIRECTFB_LIBS) $(X_LIBS) $(THREAD_LIBS) xineplug_vo_out_directfb_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ xineplug_vo_out_sdl_la_SOURCES = video_out_sdl.c -xineplug_vo_out_sdl_la_LIBADD = $(SDL_LIBS) $(XINE_LIB) +xineplug_vo_out_sdl_la_LIBADD = $(SDL_LIBS) $(XINE_LIB) $(THREAD_LIBS) xineplug_vo_out_sdl_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ xineplug_vo_out_stk_la_SOURCES = video_out_stk.c -xineplug_vo_out_stk_la_LIBADD = $(LIBSTK_LIBS) +xineplug_vo_out_stk_la_LIBADD = $(LIBSTK_LIBS) $(THREAD_LIBS) xineplug_vo_out_stk_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ xineplug_vo_out_directx_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c video_out_directx.c @@ -166,13 +166,13 @@ xineplug_vo_out_directx_la_LIBADD = $(DIRECTX_VIDEO_LIBS) $(XINE_LIB) $(THREAD_L xineplug_vo_out_directx_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ xineplug_vo_out_none_la_SOURCES = video_out_none.c -xineplug_vo_out_none_la_LIBADD = $(XINE_LIB) +xineplug_vo_out_none_la_LIBADD = $(XINE_LIB) $(THREAD_LIBS) xineplug_vo_out_none_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ xineplug_vo_out_macosx_la_SOURCES = video_out_macosx.m xineplug_vo_out_macosx_la_CPPFLAGS = $(X_CFLAGS) $(MLIB_CFLAGS) xineplug_vo_out_macosx_la_LIBADD = $(MLIB_LIBS) $(OPENGL_LIBS) $(GLUT_LIBS) \ - $(GLU_LIBS) $(X_LIBS) $(XINE_LIB) + $(GLU_LIBS) $(X_LIBS) $(XINE_LIB) $(THREAD_LIBS) # The "-Wl,-framework -Wl,Cocoa" is needed for libtool versions before # 1.5.x (1.257): the default version that ships with Mac OS X is 1.5 (1.1220) xineplug_vo_out_macosx_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ \ diff --git a/src/video_out/video_out_aa.c b/src/video_out/video_out_aa.c index 55c74d7e1..1bdd580fd 100644 --- a/src/video_out/video_out_aa.c +++ b/src/video_out/video_out_aa.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_aa.c,v 1.45 2005/09/24 19:08:26 miguelfreitas Exp $ + * $Id: video_out_aa.c,v 1.46 2005/11/14 12:34:46 valtri Exp $ * * video_out_aa.c, ascii-art output plugin for xine * @@ -113,6 +113,8 @@ static vo_frame_t *aa_alloc_frame(vo_driver_t *this_gen) { if (!frame) return NULL; + pthread_mutex_init(&frame->vo_frame.mutex, NULL); + frame->vo_frame.proc_slice = NULL; frame->vo_frame.proc_frame = NULL; frame->vo_frame.field = aa_frame_field; diff --git a/src/video_out/video_out_caca.c b/src/video_out/video_out_caca.c index f9eb74b50..29ab5ca1b 100644 --- a/src/video_out/video_out_caca.c +++ b/src/video_out/video_out_caca.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_caca.c,v 1.4 2005/09/24 19:08:26 miguelfreitas Exp $ + * $Id: video_out_caca.c,v 1.5 2005/11/14 12:34:46 valtri Exp $ * * video_out_caca.c, Color AsCii Art output plugin for xine * @@ -124,6 +124,8 @@ static vo_frame_t *caca_alloc_frame(vo_driver_t *this_gen) { if (!frame) return NULL; + pthread_mutex_init(&frame->vo_frame.mutex, NULL); + frame->vo_frame.proc_slice = NULL; frame->vo_frame.proc_frame = NULL; frame->vo_frame.field = caca_frame_field; diff --git a/src/video_out/video_out_macosx.m b/src/video_out/video_out_macosx.m index e69d4e3f3..0149dfbc1 100644 --- a/src/video_out/video_out_macosx.m +++ b/src/video_out/video_out_macosx.m @@ -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_macosx.m,v 1.13 2005/09/25 00:44:04 miguelfreitas Exp $ + * $Id: video_out_macosx.m,v 1.14 2005/11/14 12:34:46 valtri Exp $ * * This output driver makes use of xine's objective-c video_output * classes located in the macosx folder. @@ -103,6 +103,8 @@ static vo_frame_t *macosx_alloc_frame(vo_driver_t *vo_driver) { if(!frame) return NULL; + pthread_mutex_init(&frame->vo_frame.mutex, NULL); + frame->vo_frame.base[0] = NULL; frame->vo_frame.base[1] = NULL; frame->vo_frame.base[2] = NULL; diff --git a/src/video_out/video_out_none.c b/src/video_out/video_out_none.c index 1d55ee208..d5ec0d374 100644 --- a/src/video_out/video_out_none.c +++ b/src/video_out/video_out_none.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_none.c,v 1.23 2005/09/24 19:08:26 miguelfreitas Exp $ + * $Id: video_out_none.c,v 1.24 2005/11/14 12:34:46 valtri Exp $ * * Was originally part of toxine frontend. * ...but has now been adapted to xine coding style standards ;) @@ -94,6 +94,8 @@ static vo_frame_t *none_alloc_frame(vo_driver_t *vo_driver) { if(!frame) return NULL; + pthread_mutex_init(&frame->vo_frame.mutex, NULL); + frame->vo_frame.base[0] = NULL; frame->vo_frame.base[1] = NULL; frame->vo_frame.base[2] = NULL; diff --git a/src/xine-engine/io_helper.c b/src/xine-engine/io_helper.c index 382874124..ae57b6938 100644 --- a/src/xine-engine/io_helper.c +++ b/src/xine-engine/io_helper.c @@ -199,10 +199,56 @@ int _x_io_select (xine_stream_t *stream, int fd, int state, int timeout_msec) { struct timeval select_timeout; int timeout_usec, total_time_usec; int ret; - +#ifdef WIN32 + HANDLE h; + DWORD dwret; + char msg[256]; +#endif + +#ifdef WIN32 + /* handle console file descriptiors differently on Windows */ + switch (fd) { + case STDIN_FILENO: h = GetStdHandle(STD_INPUT_HANDLE); break; + case STDOUT_FILENO: h = GetStdHandle(STD_OUTPUT_HANDLE); break; + case STDERR_FILENO: h = GetStdHandle(STD_ERROR_HANDLE); break; + default: h = INVALID_HANDLE_VALUE; + } +#endif timeout_usec = 1000 * timeout_msec; total_time_usec = 0; +#ifdef WIN32 + if (h != INVALID_HANDLE_VALUE) { + while (total_time_usec < timeout_usec) { + dwret = WaitForSingleObject(h, timeout_msec); + + switch (dwret) { + case WAIT_OBJECT_0: return XIO_READY; + case WAIT_TIMEOUT: + /* select timeout + * aborts current read if action pending. otherwise xine + * cannot be stopped when no more data is available. + */ + if (stream && stream->demux_action_pending) + return XIO_ABORTED; + break; + case WAIT_ABANDONED: + xine_log(stream->xine, XINE_LOG_MSG, + _("io_helper: waiting abandoned\n")); + return XIO_ERROR; + case WAIT_FAILED: + default: + dwret = GetLastError(); + FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0, (LPSTR)&msg, sizeof(msg), NULL); + xine_log(stream->xine, XINE_LOG_MSG, + _("io_helper: waiting failed: %s\n"), msg); + return XIO_ERROR; + } + } + total_time_usec += XIO_POLLING_INTERVAL; + return XIO_TIMEOUT; + } +#endif while (total_time_usec < timeout_usec) { FD_ZERO (&fdset); |