[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[538] mplayerxp
Brought to you by:
olov
From: <nic...@us...> - 2012-12-11 14:15:18
|
Revision: 538 http://mplayerxp.svn.sourceforge.net/mplayerxp/?rev=538&view=rev Author: nickols_k Date: 2012-12-11 14:15:08 +0000 (Tue, 11 Dec 2012) Log Message: ----------- convert dec_ahead_engine_t::sh into Opaque* Modified Paths: -------------- mplayerxp/Makefile mplayerxp/input2/Makefile mplayerxp/libao2/Makefile mplayerxp/libmpcodecs/Makefile mplayerxp/libmpcodecs/liba52/Makefile mplayerxp/libmpcodecs/libdca/Makefile mplayerxp/libmpcodecs/libnuppelvideo/Makefile mplayerxp/libmpconf/Makefile mplayerxp/libmpdemux/Makefile mplayerxp/libmpstream/Makefile mplayerxp/libmpstream/freesdp/Makefile mplayerxp/libmpstream/librtsp/Makefile mplayerxp/libmpstream/realrtsp/Makefile mplayerxp/libmpstream/tvi/Makefile mplayerxp/libmpsub/Makefile mplayerxp/libplaytree/Makefile mplayerxp/libvo/Makefile mplayerxp/loader/Makefile mplayerxp/nls/Makefile mplayerxp/osdep/Makefile mplayerxp/postproc/Makefile mplayerxp/postproc/libmenu/Makefile mplayerxp/xmpcore/Makefile mplayerxp/xmpcore/mp_image.cpp mplayerxp/xmpcore/xmp_adecoder.cpp mplayerxp/xmpcore/xmp_aplayer.cpp mplayerxp/xmpcore/xmp_core.cpp mplayerxp/xmpcore/xmp_core.h mplayerxp/xmpcore/xmp_vdecoder.cpp mplayerxp/xmpcore/xmp_vplayer.cpp Modified: mplayerxp/Makefile =================================================================== --- mplayerxp/Makefile 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/Makefile 2012-12-11 14:15:08 UTC (rev 538) @@ -56,7 +56,7 @@ # .PHONY: all clean -all: $(TARGET_EXE) $(SUBDIRS) +all: dep $(TARGET_EXE) $(SUBDIRS) .cpp.o: $(CXX) -c $(CXXFLAGS) -o $@ $< @@ -68,7 +68,7 @@ $(DO_MAKE_ALL) $(CXX) -o $(TARGET_EXE) $(OBJS) $(LDFLAGS) $(LDXXFLAGS) $(LIBS) #-Xlinker --export-dynamic -Xlinker --gc-sections -Xlinker --sort-common -$(SRCS): .depend +$(SRCS): install: $(TARGET_EXE) ifeq ($(INSTALL),) @@ -103,7 +103,9 @@ -rm -f mp_config.h mp_config.mak mp_conf_lavc.h version.h -rm -f cpuinfo help_mp.h -.depend: +dep: .depend + +.depend: $(SRCS) $(CXX) -MM $(CXXFLAGS) $(SRCS) 1>.depend $(DO_MAKE) Modified: mplayerxp/input2/Makefile =================================================================== --- mplayerxp/input2/Makefile 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/input2/Makefile 2012-12-11 14:15:08 UTC (rev 538) @@ -16,7 +16,7 @@ $(LIBNAME): $(OBJS) $(AR) r $(LIBNAME) $(OBJS) -all: $(LIBNAME) +all: dep $(LIBNAME) clean: rm -f *.o *.a *~ @@ -24,9 +24,9 @@ distclean: rm -f Makefile.bak *.o *.a *~ .depend -dep: depend +dep: .depend -depend: +.depend: $(SRCS) $(CXX) -MM $(CXXFLAGS) $(SRCS) 1>.depend # Modified: mplayerxp/libao2/Makefile =================================================================== --- mplayerxp/libao2/Makefile 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/libao2/Makefile 2012-12-11 14:15:08 UTC (rev 538) @@ -49,7 +49,7 @@ $(LIBNAME): $(OBJS) $(CXXOBJS) $(AR) r $(LIBNAME) $(OBJS) $(CXXOBJS) -all: $(LIBNAME) +all: dep $(LIBNAME) clean: rm -f *.o *.a *~ @@ -57,9 +57,9 @@ distclean: rm -f Makefile.bak *.o *.a *~ .depend -dep: depend +dep: .depend -depend: +.depend: $(SRCS) $(CXXSRCS) $(CXX) -MM $(CXXFLAGS) $(SRCS) $(CXXSRCS) 1>.depend # Modified: mplayerxp/libmpcodecs/Makefile =================================================================== --- mplayerxp/libmpcodecs/Makefile 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/libmpcodecs/Makefile 2012-12-11 14:15:08 UTC (rev 538) @@ -64,7 +64,7 @@ .PHONY: $(SUBDIRS) -all: $(LIBNAME) +all: dep $(LIBNAME) $(SUBDIRS): $(DO_ALL) @@ -89,9 +89,9 @@ $(DO_MAKE) rm -f Makefile.bak *.o *.a *~ .depend -dep: depend +dep: .depend -depend: +.depend: $(SRCS) $(CXXSRCS) $(DO_MAKE) $(CXX) -MM $(CXXFLAGS) $(SRCS) $(CXXSRCS) 1>.depend Modified: mplayerxp/libmpcodecs/liba52/Makefile =================================================================== --- mplayerxp/libmpcodecs/liba52/Makefile 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/libmpcodecs/liba52/Makefile 2012-12-11 14:15:08 UTC (rev 538) @@ -1,7 +1,7 @@ include ../../mp_config.mak CXXSRCS = parse.cpp bitstream.cpp imdct.cpp downmix.cpp bit_allocate.cpp crc.cpp resample.cpp -SRCS = +SRCS = OBJS = $(SRCS:.c=.o) CXXOBJS = $(CXXSRCS:.cpp=.o) @@ -17,7 +17,7 @@ .cpp.o: $(CC) -c $(CXXFLAGS) -o $@ $< -all: $(OBJS) $(CXXOBJS) +all: dep $(OBJS) $(CXXOBJS) clean: rm -f *.o *.a *~ @@ -25,9 +25,9 @@ distclean: rm -f test *.o $(LIBNAME) *~ .depend -dep: depend +dep: .depend -depend: +.depend: $(SRCS) $(CXXSRCS) $(CC) -MM $(CFLAGS) $(SRCS) $(CXXSRCS) 1>.depend # Modified: mplayerxp/libmpcodecs/libdca/Makefile =================================================================== --- mplayerxp/libmpcodecs/libdca/Makefile 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/libmpcodecs/libdca/Makefile 2012-12-11 14:15:08 UTC (rev 538) @@ -12,7 +12,7 @@ .cpp.o: $(CXX) -c $(CXXFLAGS) -o $@ $< -all: $(CXXOBJS) +all: dep $(CXXOBJS) clean: rm -f *.o *.a *~ @@ -20,9 +20,9 @@ distclean: rm -f test *.o $(LIBNAME) *~ .depend -dep: depend +dep: .depend -depend: +.depend: $(CXXSRCS) $(CXX) -MM $(CXXFLAGS) $(CXXSRCS) 1>.depend # Modified: mplayerxp/libmpcodecs/libnuppelvideo/Makefile =================================================================== --- mplayerxp/libmpcodecs/libnuppelvideo/Makefile 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/libmpcodecs/libnuppelvideo/Makefile 2012-12-11 14:15:08 UTC (rev 538) @@ -8,7 +8,7 @@ .SUFFIXES: .cpp .o -all: $(CXXOBJS) +all: dep $(CXXOBJS) .cpp.o: $(CXX) -c $(CXXFLAGS) -o $@ $< @@ -19,9 +19,9 @@ distclean: rm -f Makefile.bak *.o *.a *~ .depend -dep: depend +dep: .depend -depend: +.depend: $(CXXSRCS) $(CXX) -MM $(CXXFLAGS) $(CXXSRCS) 1>.depend # Modified: mplayerxp/libmpconf/Makefile =================================================================== --- mplayerxp/libmpconf/Makefile 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/libmpconf/Makefile 2012-12-11 14:15:08 UTC (rev 538) @@ -22,7 +22,7 @@ .PHONY: $(SUBDIRS) -all: $(LIBNAME) +all: dep $(LIBNAME) $(SUBDIRS): $(DO_ALL) @@ -43,9 +43,9 @@ $(DO_MAKE) rm -f test Makefile.bak *.o *.a *~ .depend -dep: depend +dep: .depend -depend: +.depend: $(SRCS) $(CXXSRCS) $(DO_MAKE) $(CC) -MM $(CFLAGS) $(SRCS) $(CXXSRCS) 1>.depend Modified: mplayerxp/libmpdemux/Makefile =================================================================== --- mplayerxp/libmpdemux/Makefile 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/libmpdemux/Makefile 2012-12-11 14:15:08 UTC (rev 538) @@ -69,7 +69,7 @@ .PHONY: $(SUBDIRS) -all: $(LIBNAME) +all: dep $(LIBNAME) $(SUBDIRS): $(DO_ALL) @@ -96,9 +96,9 @@ $(DO_MAKE) rm -f test Makefile.bak *.o *.a *~ .depend -dep: depend +dep: .depend -depend: +.depend: $(SRCS) $(CXXSRCS) $(DO_MAKE) $(CXX) -MM $(CXXFLAGS) $(SRCS) $(CXXSRCS) 1>.depend Modified: mplayerxp/libmpstream/Makefile =================================================================== --- mplayerxp/libmpstream/Makefile 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/libmpstream/Makefile 2012-12-11 14:15:08 UTC (rev 538) @@ -56,7 +56,7 @@ .PHONY: $(SUBDIRS) -all: $(LIBNAME) +all: dep $(LIBNAME) $(SUBDIRS): $(DO_ALL) @@ -85,9 +85,9 @@ $(DO_MAKE) rm -f test Makefile.bak *.o *.a *~ .depend -dep: depend +dep: .depend -depend: +.depend: $(SRCS) $(CXXSRCS) $(DO_MAKE) $(CC) -MM $(CFLAGS) $(SRCS) $(CXXSRCS) 1>.depend Modified: mplayerxp/libmpstream/freesdp/Makefile =================================================================== --- mplayerxp/libmpstream/freesdp/Makefile 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/libmpstream/freesdp/Makefile 2012-12-11 14:15:08 UTC (rev 538) @@ -11,7 +11,7 @@ .SUFFIXES: .c .o -all: $(OBJS) $(CXXOBJS) +all: dep $(OBJS) $(CXXOBJS) .c.o: $(CC) -c $(CFLAGS) -o $@ $< @@ -24,9 +24,9 @@ distclean: rm -f Makefile.bak *.o *.a *~ .depend -dep: depend +dep: .depend -depend: +.depend: $(SRCS) $(CXXSRCS) $(CXX) -MM $(CXXFLAGS) $(SRCS) $(CXXSRCS) 1>.depend # Modified: mplayerxp/libmpstream/librtsp/Makefile =================================================================== --- mplayerxp/libmpstream/librtsp/Makefile 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/libmpstream/librtsp/Makefile 2012-12-11 14:15:08 UTC (rev 538) @@ -10,7 +10,7 @@ .SUFFIXES: .c .o -all: $(OBJS) $(CXXOBJS) +all: dep $(OBJS) $(CXXOBJS) .c.o: $(CC) -c $(CFLAGS) -o $@ $< @@ -23,9 +23,9 @@ distclean: rm -f Makefile.bak *.o *.a *~ .depend -dep: depend +dep: .depend -depend: +.depend: $(SRCS) $(CXXSRCS) $(CXX) -MM $(CXXFLAGS) $(SRCS) $(CXXSRCS) 1>.depend # Modified: mplayerxp/libmpstream/realrtsp/Makefile =================================================================== --- mplayerxp/libmpstream/realrtsp/Makefile 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/libmpstream/realrtsp/Makefile 2012-12-11 14:15:08 UTC (rev 538) @@ -12,7 +12,7 @@ .SUFFIXES: .c .o -all: $(OBJS) $(CXXOBJS) +all: dep $(OBJS) $(CXXOBJS) .c.o: $(CC) -c $(CFLAGS) -o $@ $< @@ -25,9 +25,9 @@ distclean: rm -f Makefile.bak *.o *.a *~ .depend -dep: depend +dep: .depend -depend: +.depend: $(SRCS) $(CXXSRCS) $(CXX) -MM $(CXXFLAGS) $(SRCS) $(CXXSRCS) 1>.depend # Modified: mplayerxp/libmpstream/tvi/Makefile =================================================================== --- mplayerxp/libmpstream/tvi/Makefile 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/libmpstream/tvi/Makefile 2012-12-11 14:15:08 UTC (rev 538) @@ -10,7 +10,7 @@ .SUFFIXES: .c .o -all: $(OBJS) $(CXXOBJS) +all: dep $(OBJS) $(CXXOBJS) .c.o: $(CC) -c $(CFLAGS) -o $@ $< @@ -23,9 +23,9 @@ distclean: rm -f Makefile.bak *.o *.a *~ .depend -dep: depend +dep: .depend -depend: +.depend: $(SRCS) $(CXXSRCS) $(CXX) -MM $(CFLAGS) $(SRCS) $(CXXSRCS) 1>.depend # Modified: mplayerxp/libmpsub/Makefile =================================================================== --- mplayerxp/libmpsub/Makefile 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/libmpsub/Makefile 2012-12-11 14:15:08 UTC (rev 538) @@ -19,7 +19,7 @@ .PHONY: $(SUBDIRS) -all: $(LIBNAME) +all: dep $(LIBNAME) $(SUBDIRS): $(DO_ALL) @@ -40,9 +40,9 @@ $(DO_MAKE) rm -f test Makefile.bak *.o *.a *~ .depend -dep: depend +dep: .depend -depend: +.depend: $(SRCS) $(CXXSRCS) $(DO_MAKE) $(CC) -MM $(CFLAGS) $(SRCS) $(CXXSRCS) 1>.depend Modified: mplayerxp/libplaytree/Makefile =================================================================== --- mplayerxp/libplaytree/Makefile 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/libplaytree/Makefile 2012-12-11 14:15:08 UTC (rev 538) @@ -19,7 +19,7 @@ .PHONY: $(SUBDIRS) -all: $(LIBNAME) +all: dep $(LIBNAME) $(SUBDIRS): $(DO_ALL) @@ -40,9 +40,9 @@ $(DO_MAKE) rm -f test Makefile.bak *.o *.a *~ .depend -dep: depend +dep: .depend -depend: +.depend: $(SRCS) $(CXXSRCS) $(DO_MAKE) $(CC) -MM $(CFLAGS) $(SRCS) $(CXXSRCS) 1>.depend Modified: mplayerxp/libvo/Makefile =================================================================== --- mplayerxp/libvo/Makefile 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/libvo/Makefile 2012-12-11 14:15:08 UTC (rev 538) @@ -49,7 +49,7 @@ $(LIBNAME): $(OBJS) $(CXXOBJS) $(AR) r $(LIBNAME) $(OBJS) $(CXXOBJS) -all: $(LIBNAME) +all: dep $(LIBNAME) clean: rm -f *.o *.a *~ @@ -57,9 +57,9 @@ distclean: rm -f Makefile.bak *.o *.a *~ .depend -dep: depend +dep: .depend -depend: +.depend: $(SRCS) $(CXXSRCS) $(CXX) -MM $(CXXFLAGS) $(SRCS) $(CXXSRCS) 1>.depend # Modified: mplayerxp/loader/Makefile =================================================================== --- mplayerxp/loader/Makefile 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/loader/Makefile 2012-12-11 14:15:08 UTC (rev 538) @@ -47,7 +47,7 @@ .PHONY: $(SUBDIRS) -all: $(LIBNAME) +all: dep $(LIBNAME) $(SUBDIRS): $(DO_ALL) @@ -73,9 +73,9 @@ $(wildcard dshow/*.o) \ $(wildcard dmo/*.o) -dep: depend +dep: .depend -depend: +.depend: $(SRCS) $(CXXSRCS) $(DO_MAKE) $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend Modified: mplayerxp/nls/Makefile =================================================================== --- mplayerxp/nls/Makefile 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/nls/Makefile 2012-12-11 14:15:08 UTC (rev 538) @@ -18,7 +18,7 @@ $(LIBNAME): $(OBJS) $(AR) r $(LIBNAME) $(OBJS) -all: $(LIBNAME) +all: dep $(LIBNAME) clean: rm -f *.o *.a *~ @@ -26,9 +26,9 @@ distclean: rm -f Makefile.bak *.o *.a *~ .depend -dep: depend +dep: .depend -depend: +.depend: $(SRCS) $(CXXSRCS) $(CXX) -MM $(CXXFLAGS) $(SRCS) 1>.depend # Modified: mplayerxp/osdep/Makefile =================================================================== --- mplayerxp/osdep/Makefile 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/osdep/Makefile 2012-12-11 14:15:08 UTC (rev 538) @@ -33,7 +33,7 @@ $(LIBNAME): $(CXXOBJS) $(OBJS) $(AR) r $(LIBNAME) $(CXXOBJS) $(OBJS) -all: $(LIBNAME) +all: dep $(LIBNAME) clean: rm -f *.o *.a *~ @@ -41,9 +41,9 @@ distclean: rm -f Makefile.bak *.o *.a *~ .depend -dep: depend +dep: .depend -depend: +.depend: $(SRCS) $(CXXSRCS) $(CXX) -MM $(CXXFLAGS) $(CXXSRCS) $(SRCS) 1>.depend # Modified: mplayerxp/postproc/Makefile =================================================================== --- mplayerxp/postproc/Makefile 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/postproc/Makefile 2012-12-11 14:15:08 UTC (rev 538) @@ -80,7 +80,7 @@ .PHONY: $(SUBDIRS) -all: $(LIBNAME) +all: dep $(LIBNAME) $(SUBDIRS): $(DO_ALL) @@ -103,9 +103,9 @@ $(DO_MAKE) rm -f Makefile.bak *.o *.a *~ .depend -dep: depend +dep: .depend -depend: +.depend: $(SRCS) $(CXXSRCS) $(DO_MAKE) $(CC) -MM $(CFLAGS) $(SRCS) $(CXXSRCS) 1>.depend Modified: mplayerxp/postproc/libmenu/Makefile =================================================================== --- mplayerxp/postproc/libmenu/Makefile 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/postproc/libmenu/Makefile 2012-12-11 14:15:08 UTC (rev 538) @@ -17,7 +17,7 @@ .SUFFIXES: .c .o -all: $(OBJS) $(CXXOBJS) +all: dep $(OBJS) $(CXXOBJS) .c.o: $(CC) -c $(CFLAGS) -o $@ $< @@ -30,9 +30,9 @@ distclean: rm -f Makefile.bak *.o *.a *~ .depend -dep: depend +dep: .depend -depend: +.depend: $(SRCS) $(CXXSRCS) $(CC) -MM $(CFLAGS) $(SRCS) $(CXXSRCS) 1>.depend # Modified: mplayerxp/xmpcore/Makefile =================================================================== --- mplayerxp/xmpcore/Makefile 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/xmpcore/Makefile 2012-12-11 14:15:08 UTC (rev 538) @@ -19,7 +19,7 @@ $(LIBNAME): $(OBJS) $(AR) r $(LIBNAME) $(OBJS) -all: $(LIBNAME) +all: dep $(LIBNAME) clean: rm -f *.o *.a *~ @@ -27,9 +27,9 @@ distclean: rm -f Makefile.bak *.o *.a *~ .depend -dep: depend +dep: .depend -depend: +.depend: $(SRCS) $(CXXSRCS) $(CXX) -MM $(CXXFLAGS) $(SRCS) 1>.depend # Modified: mplayerxp/xmpcore/mp_image.cpp =================================================================== --- mplayerxp/xmpcore/mp_image.cpp 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/xmpcore/mp_image.cpp 2012-12-11 14:15:08 UTC (rev 538) @@ -143,7 +143,7 @@ } mp_image_t* new_mp_image(unsigned w,unsigned h,unsigned xp_idx){ - mp_image_t* mpi=(mp_image_t*)mp_mallocz(sizeof(mp_image_t)); + mp_image_t* mpi=new(zeromem) mp_image_t; if(!mpi) return NULL; // error! mpi->xp_idx = xp_idx; mpi->width=mpi->w=w; Modified: mplayerxp/xmpcore/xmp_adecoder.cpp =================================================================== --- mplayerxp/xmpcore/xmp_adecoder.cpp 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/xmpcore/xmp_adecoder.cpp 2012-12-11 14:15:08 UTC (rev 538) @@ -66,9 +66,9 @@ int init_audio_buffer( int size, int min_reserv, int indices, sh_audio_t *sha ) { MSG_V("Using audio buffer %i bytes (min reserve = %i, indices %i)\n",size,min_reserv, indices); - if( !(audio_buffer.buffer = (unsigned char*)mp_malloc(size)) ) + if( !(audio_buffer.buffer = new unsigned char[size]) ) return ENOMEM; - if( !(audio_buffer.indices = (audio_buffer_index_t*)mp_malloc(indices*sizeof(audio_buffer_index_t))) ) { + if( !(audio_buffer.indices = new audio_buffer_index_t[indices])) { delete audio_buffer.buffer; audio_buffer.buffer=NULL; return ENOMEM; @@ -384,9 +384,9 @@ int xp_thread_decode_audio(Demuxer_Stream *d_audio) { - sh_audio_t* sh_audio=reinterpret_cast<sh_audio_t*>(mpxp_context().engine().xp_core->audio->sh); + sh_audio_t* sh_audio=static_cast<sh_audio_t*>(mpxp_context().engine().xp_core->audio->sh); sh_video_t* sh_video=NULL; - if(mpxp_context().engine().xp_core->video) sh_video=reinterpret_cast<sh_video_t*>(mpxp_context().engine().xp_core->video->sh); + if(mpxp_context().engine().xp_core->video) sh_video=static_cast<sh_video_t*>(mpxp_context().engine().xp_core->video->sh); int free_buf, vbuf_size, pref_buf; unsigned len=0; @@ -426,7 +426,7 @@ any_t* a_dec_ahead_routine( any_t* arg ) { mpxp_thread_t* priv=reinterpret_cast<mpxp_thread_t*>(arg); - sh_audio_t* sh_audio=reinterpret_cast<sh_audio_t*>(priv->dae->sh); + sh_audio_t* sh_audio=static_cast<sh_audio_t*>(priv->dae->sh); Demuxer_Stream *d_audio=sh_audio->ds; int ret; Modified: mplayerxp/xmpcore/xmp_aplayer.cpp =================================================================== --- mplayerxp/xmpcore/xmp_aplayer.cpp 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/xmpcore/xmp_aplayer.cpp 2012-12-11 14:15:08 UTC (rev 538) @@ -134,10 +134,10 @@ any_t* audio_play_routine( any_t* arg ) { mpxp_thread_t* priv=reinterpret_cast<mpxp_thread_t*>(arg); - sh_audio_t* sh_audio=reinterpret_cast<sh_audio_t*>(priv->dae->sh); + sh_audio_t* sh_audio=static_cast<sh_audio_t*>(priv->dae->sh); Demuxer_Stream *d_audio=sh_audio->ds; Demuxer *demuxer=d_audio->demuxer; - sh_video_t* sh_video=reinterpret_cast<sh_video_t*>(demuxer->video->sh); + sh_video_t* sh_video=static_cast<sh_video_t*>(demuxer->video->sh); int eof = 0; struct timeval now; Modified: mplayerxp/xmpcore/xmp_core.cpp =================================================================== --- mplayerxp/xmpcore/xmp_core.cpp 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/xmpcore/xmp_core.cpp 2012-12-11 14:15:08 UTC (rev 538) @@ -71,7 +71,7 @@ unsigned xmp_register_main(sig_handler_t sigfunc) { unsigned idx=0; - mpxp_context().engine().xp_core->mpxp_threads[idx]=(mpxp_thread_t*)mp_mallocz(sizeof(mpxp_thread_t)); + mpxp_context().engine().xp_core->mpxp_threads[idx]=new(zeromem) mpxp_thread_t; mpxp_context().engine().xp_core->mpxp_threads[idx]->p_idx=idx; mpxp_context().engine().xp_core->mpxp_threads[idx]->pid=getpid(); mpxp_context().engine().xp_core->main_pth_id=mpxp_context().engine().xp_core->mpxp_threads[idx]->pth_id=pthread_self(); @@ -110,10 +110,10 @@ it->num_decoded_frames=0; } -void dae_init(dec_ahead_engine_t* it,unsigned nframes,any_t* sh) +void dae_init(dec_ahead_engine_t* it,unsigned nframes,Opaque* sh) { it->nframes=nframes; - it->frame = (xmp_frame_t*)mp_malloc(sizeof(xmp_frame_t)*nframes); + it->frame = new(zeromem) xmp_frame_t[nframes]; it->sh=sh; dae_reset(it); } @@ -243,7 +243,7 @@ { mpxp_context().engine().xp_core->flags=xmp_engine_compute_model(shv,sha); if(shv) { - mpxp_context().engine().xp_core->video=(dec_ahead_engine_t*)mp_mallocz(sizeof(dec_ahead_engine_t)); + mpxp_context().engine().xp_core->video=new(zeromem) dec_ahead_engine_t; dae_init(mpxp_context().engine().xp_core->video,mpxp_context().engine().xp_core->num_v_buffs,shv); } if(sha) { @@ -262,7 +262,7 @@ min_reserv = (float)min_reserv * (float)o_bps / (float)sha->o_bps; init_audio_buffer(asize+min_reserv,min_reserv+MIN_BUFFER_RESERV,asize/(sha->audio_out_minsize<10000?sha->audio_out_minsize:4000)+100,sha); } - mpxp_context().engine().xp_core->audio=(dec_ahead_engine_t*)mp_mallocz(sizeof(dec_ahead_engine_t)); + mpxp_context().engine().xp_core->audio=new(zeromem) dec_ahead_engine_t; dae_init(mpxp_context().engine().xp_core->audio,mpxp_context().engine().xp_core->num_a_buffs,sha); } return 0; @@ -302,7 +302,7 @@ /* requires root privelegies */ pthread_attr_setschedpolicy(&attr,SCHED_FIFO); #endif - mpxp_context().engine().xp_core->mpxp_threads[idx]=(mpxp_thread_t*)mp_mallocz(sizeof(mpxp_thread_t)); + mpxp_context().engine().xp_core->mpxp_threads[idx]=new(zeromem) mpxp_thread_t; mpxp_context().engine().xp_core->mpxp_threads[idx]->p_idx=idx; mpxp_context().engine().xp_core->mpxp_threads[idx]->name=name; Modified: mplayerxp/xmpcore/xmp_core.h =================================================================== --- mplayerxp/xmpcore/xmp_core.h 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/xmpcore/xmp_core.h 2012-12-11 14:15:08 UTC (rev 538) @@ -10,6 +10,7 @@ #include <inttypes.h> #include <pthread.h> +#include "mp_config.h" #include "osdep/mplib.h" using namespace mpxp; @@ -38,7 +39,7 @@ volatile unsigned decoder_idx; /* index of frame which is currently decoded */ unsigned nframes; /* number of frames in buffer */ xmp_frame_t* frame; /* frame related attributes */ - any_t* sh; /* corresponded sh_audio_t or sh_video_t */ + Opaque* sh; /* corresponded sh_audio_t or sh_video_t */ int eof; /* EOF for stream */ /* methods */ func_new_frame_priv_t new_priv; @@ -132,7 +133,7 @@ int xmp_run_players( void ); void xmp_reset_sh_video(sh_video_t* shv); - void dae_init(dec_ahead_engine_t* it,unsigned nframes,any_t* sh); + void dae_init(dec_ahead_engine_t* it,unsigned nframes,Opaque* sh); void dae_uninit(dec_ahead_engine_t* it); void dae_reset(dec_ahead_engine_t* it); /* after mpxp_seek */ Modified: mplayerxp/xmpcore/xmp_vdecoder.cpp =================================================================== --- mplayerxp/xmpcore/xmp_vdecoder.cpp 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/xmpcore/xmp_vdecoder.cpp 2012-12-11 14:15:08 UTC (rev 538) @@ -116,7 +116,7 @@ any_t* xmp_video_decoder( any_t* arg ) { mpxp_thread_t* priv=reinterpret_cast<mpxp_thread_t*>(arg); - sh_video_t* sh_video=reinterpret_cast<sh_video_t*>(priv->dae->sh); + sh_video_t* sh_video=static_cast<sh_video_t*>(priv->dae->sh); Demuxer_Stream *d_video=sh_video->ds; Demuxer* demuxer=d_video->demuxer; Demuxer_Stream* d_audio=demuxer->audio; Modified: mplayerxp/xmpcore/xmp_vplayer.cpp =================================================================== --- mplayerxp/xmpcore/xmp_vplayer.cpp 2012-12-11 13:30:51 UTC (rev 537) +++ mplayerxp/xmpcore/xmp_vplayer.cpp 2012-12-11 14:15:08 UTC (rev 538) @@ -273,10 +273,10 @@ any_t* xmp_video_player( any_t* arg ) { mpxp_thread_t* priv=reinterpret_cast<mpxp_thread_t*>(arg); - sh_video_t* sh_video=reinterpret_cast<sh_video_t*>(priv->dae->sh); + sh_video_t* sh_video=static_cast<sh_video_t*>(priv->dae->sh); Demuxer_Stream *d_video=sh_video->ds; Demuxer *demuxer=d_video->demuxer; - sh_audio_t* sh_audio=reinterpret_cast<sh_audio_t*>(demuxer->audio->sh); + sh_audio_t* sh_audio=static_cast<sh_audio_t*>(demuxer->audio->sh); priv->state=Pth_Run; priv->dae->eof = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |