From 0132b1064f4f710969c78456047cb0ce76f60c4b Mon Sep 17 00:00:00 2001 From: smorlat Date: Fri, 10 Oct 2008 20:35:13 +0000 Subject: [PATCH] updated scripts, try rgb inversion with copy git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@79 3f6dc0c8-ddfe-455d-9043-3cd528dc4637 --- linphone/coreapi/liblinphone.dev | 38 +++++++++---------- linphone/gtk-glade/linphone.dev | 2 +- linphone/gtk-glade/linphone.iss | 4 +- .../include/mediastreamer2/msvideo.h | 3 +- .../mediastreamer2/plugins/msx264/msx264.iss | 2 +- linphone/mediastreamer2/src/msvideo.c | 15 ++++++++ linphone/mediastreamer2/src/winvideo.c | 20 +++++++++- 7 files changed, 58 insertions(+), 26 deletions(-) diff --git a/linphone/coreapi/liblinphone.dev b/linphone/coreapi/liblinphone.dev index 5242625b2..73409274a 100755 --- a/linphone/coreapi/liblinphone.dev +++ b/linphone/coreapi/liblinphone.dev @@ -14,7 +14,7 @@ ProfilesCount=1 ProfileIndex=0 [Unit1] -FileName=..\coreapi\sdphandler.h +FileName=sdphandler.h CompileCpp=0 Folder=liblinphone Compile=1 @@ -24,7 +24,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit2] -FileName=..\coreapi\authentication.c +FileName=authentication.c CompileCpp=0 Folder=liblinphone Compile=1 @@ -34,7 +34,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit3] -FileName=..\coreapi\chat.c +FileName=chat.c CompileCpp=0 Folder=liblinphone Compile=1 @@ -44,7 +44,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit4] -FileName=..\coreapi\enum.c +FileName=enum.c CompileCpp=0 Folder=liblinphone Compile=1 @@ -54,7 +54,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit5] -FileName=..\coreapi\enum.h +FileName=enum.h CompileCpp=0 Folder=liblinphone Compile=1 @@ -64,7 +64,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit6] -FileName=..\coreapi\exevents.c +FileName=exevents.c CompileCpp=0 Folder=liblinphone Compile=1 @@ -74,7 +74,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit7] -FileName=..\coreapi\exevents.h +FileName=exevents.h CompileCpp=0 Folder=liblinphone Compile=1 @@ -84,7 +84,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit8] -FileName=..\coreapi\friend.c +FileName=friend.c CompileCpp=0 Folder=liblinphone Compile=1 @@ -94,7 +94,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit9] -FileName=..\coreapi\linphonecore.c +FileName=linphonecore.c CompileCpp=0 Folder=liblinphone Compile=1 @@ -104,7 +104,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit10] -FileName=..\coreapi\linphonecore.h +FileName=linphonecore.h CompileCpp=0 Folder=liblinphone Compile=1 @@ -114,7 +114,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit11] -FileName=..\coreapi\lpconfig.c +FileName=lpconfig.c CompileCpp=0 Folder=liblinphone Compile=1 @@ -124,7 +124,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit12] -FileName=..\coreapi\lpconfig.h +FileName=lpconfig.h CompileCpp=0 Folder=liblinphone Compile=1 @@ -134,7 +134,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit13] -FileName=..\coreapi\misc.c +FileName=misc.c CompileCpp=0 Folder=liblinphone Compile=1 @@ -144,7 +144,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit14] -FileName=..\coreapi\presence.c +FileName=presence.c CompileCpp=0 Folder=liblinphone Compile=1 @@ -154,7 +154,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit15] -FileName=..\coreapi\private.h +FileName=private.h CompileCpp=0 Folder=liblinphone Compile=1 @@ -164,7 +164,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit16] -FileName=..\coreapi\proxy.c +FileName=proxy.c CompileCpp=0 Folder=liblinphone Compile=1 @@ -174,7 +174,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit17] -FileName=..\coreapi\sdphandler.c +FileName=sdphandler.c CompileCpp=0 Folder=liblinphone Compile=1 @@ -184,7 +184,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit18] -FileName=..\coreapi\general_state.c +FileName=general_state.c CompileCpp=1 Folder=liblinphone Compile=1 @@ -228,7 +228,7 @@ Linker= PreprocDefines= CompilerSettings=0000000000010000000000 Icon= -ExeOutput=..\win32 +ExeOutput= ObjectOutput=Default Profile OverrideOutput=0 OverrideOutputName=liblinphone.lib diff --git a/linphone/gtk-glade/linphone.dev b/linphone/gtk-glade/linphone.dev index 26e11570b..05041255d 100755 --- a/linphone/gtk-glade/linphone.dev +++ b/linphone/gtk-glade/linphone.dev @@ -115,7 +115,7 @@ ProfileName=Mingw 3.4.2 Type=0 ObjFiles= Includes=../../gtk+2.12\include\gtk-2.0;../../gtk+2.12\include\libglade-2.0;../coreapi;../../gtk+2.12\include\cairo;..\..\gtk+2.12\include\pango-1.0;..\..\gtk+2.12\include\glib-2.0;..\..\gtk+2.12\lib\glib-2.0\include;..\..\gtk+2.12\lib\gtk-2.0\include;..\..\gtk+2.12\include\atk-1.0;../../linphone-deps/include;../oRTP/include;../mediastreamer2/include;..\..\gtk+2.12\include -Libs=../win32;../../gtk+2.12/lib;../mediastreamer2/build/win32native;../oRTP/build/win32native;../../linphone-deps/lib +Libs=../coreapi;../../gtk+2.12/lib;../mediastreamer2/build/win32native;../oRTP/build/win32native;../../linphone-deps/lib ResourceIncludes= MakeIncludes= Compiler=-ggdb -O2_@@_-DENABLE_NLS_@@__@@_ diff --git a/linphone/gtk-glade/linphone.iss b/linphone/gtk-glade/linphone.iss index 60250b8b2..7413f8a37 100755 --- a/linphone/gtk-glade/linphone.iss +++ b/linphone/gtk-glade/linphone.iss @@ -3,7 +3,7 @@ [Setup] AppName=Linphone -AppVerName=Linphone for windows 2.99.5 (gtk/glade interface based on liblinphone) +AppVerName=Linphone for windows 3.0.0 (gtk/glade interface based on liblinphone) AppPublisher=linphone.org AppPublisherURL=http://www.linphone.org AppSupportURL=http://www.linphone.org @@ -11,7 +11,7 @@ AppUpdatesURL=http://www.linphone.org DefaultDirName={pf}\Linphone DefaultGroupName=Linphone LicenseFile=..\COPYING -InfoBeforeFile=..\README +;InfoBeforeFile=..\README OutputBaseFilename=setup Compression=lzma SolidCompression=yes diff --git a/linphone/mediastreamer2/include/mediastreamer2/msvideo.h b/linphone/mediastreamer2/include/mediastreamer2/msvideo.h index e3f1aa111..82bbdcb0b 100644 --- a/linphone/mediastreamer2/include/mediastreamer2/msvideo.h +++ b/linphone/mediastreamer2/include/mediastreamer2/msvideo.h @@ -106,7 +106,8 @@ void yuv_buf_copy(uint8_t *src_planes[], const int src_strides[], uint8_t *dst_planes[], const int dst_strides[3], MSVideoSize roi); void yuv_buf_mirror(YuvBuf *buf); void rgb24_revert(uint8_t *buf, int w, int h, int linesize); - +void rgb24_copy_revert(uint8_t *dstbuf, int dstlsz, + const uint8_t *srcbuf, int srclsz, MSVideoSize roi); #ifdef __cplusplus } #endif diff --git a/linphone/mediastreamer2/plugins/msx264/msx264.iss b/linphone/mediastreamer2/plugins/msx264/msx264.iss index 4c874e15a..5fd0f4d54 100755 --- a/linphone/mediastreamer2/plugins/msx264/msx264.iss +++ b/linphone/mediastreamer2/plugins/msx264/msx264.iss @@ -3,7 +3,7 @@ [Setup] AppName=msx264 -AppVerName=msx264 H.264 plugin for linphone. Plugin version is 1.1.3. +AppVerName=msx264 version 1.1.4., an H.264 plugin for linphone. AppPublisher=linphone.org AppPublisherURL=http://www.linphone.org AppSupportURL=http://www.linphone.org diff --git a/linphone/mediastreamer2/src/msvideo.c b/linphone/mediastreamer2/src/msvideo.c index 813a0d87e..e70387c35 100644 --- a/linphone/mediastreamer2/src/msvideo.c +++ b/linphone/mediastreamer2/src/msvideo.c @@ -171,3 +171,18 @@ void rgb24_revert(uint8_t *buf, int w, int h, int linesize){ } } +void rgb24_copy_revert(uint8_t *dstbuf, int dstlsz, + const uint8_t *srcbuf, int srclsz, MSVideoSize roi){ + int i,j; + const uint8_t *psrc; + uint8_t *pdst; + psrc=srcbuf; + pdst=dstbuf+(dstlsz*roi.height); + for(i=0;istarted=FALSE; s->autostarted=FALSE; s->invert_rgb=FALSE; + s->reverted=NULL; #ifdef AMD_HACK2 /* avoid bug with USB vimicro cards: How can I detect that this problem exist? @@ -432,6 +433,9 @@ static void v4w_uninit(MSFilter *f){ ms_message("v4w: capture window destroyed"); s->capvideo=NULL; } + if (s->reverted){ + freemsg(s->reverted); + } #ifdef AMD_HACK2 ms_cond_destroy(&s->thread_cond); ms_mutex_destroy(&s->thread_lock); @@ -512,7 +516,18 @@ static void v4w_process(MSFilter * obj){ om=m; } if (om!=NULL){ - if (s->invert_rgb) rgb24_revert(om->b_rptr,s->vsize.width,s->vsize.height,s->vsize.width*3); + if (s->invert_rgb){ + MSVideoSize roi; + if (s->reverted==NULL){ + s->reverted=allocb(om->b_wptr-om->b_rptr,0); + s->reverted->b_wptr=s->reverted->b_datap->db_lim; + } + roi=s->vsize; + rgb24_copy_revert(s->reverted->b_rptr,roi.width*3, + om->b_rptr,roi.width*3,roi); + freemsg(om); + om=dupb(s->reverted); + } } }else { mblk_t *nowebcam = v4w_make_nowebcam(s); @@ -652,6 +667,7 @@ static void ms_v4w_detect(MSWebCamManager *obj){ capDriverDisconnect(hwnd); DestroyWindow(hwnd); } + capGetDriverDescription(i, dev, sizeof (dev),ver, sizeof (ver)); snprintf(name, sizeof(name), "%s/%s",dev,ver); cam=ms_web_cam_new(&ms_v4w_cam_desc); cam->data=(void*)i;/*store the device index */