linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] Mediastreamer build win64


From: Gregory H. Nietsky
Subject: [Linphone-developers] Mediastreamer build win64
Date: Wed, 22 Jan 2014 17:37:40 +0200
User-agent: Mozilla/5.0 (X11; Linux armv7l; rv:24.0) Gecko/20100101 Thunderbird/24.2.0


here 2 patches to allow mediastreamer to build with 64bit windows i have not had opportunity to test it or
review it fully.

1)SetWindowLong seems to be replaced by SetWindowLongPtr in win64 and likewise deprecated in win32

2)use intptr_t is required when storing a pointer this patch allows it to build but i need to verify if its correct looking at code for setDeviceIndex. i have not done any testing of this yet or checking if its valid passing a pointer cast as a int can lead to the dark side. if someone is familiar with this code comments are welcomed.


https://github.com/Distrotech/mediastreamere 2/commit/81c4edff92a1a6d54d1d7f6a2cabb65618c56f19

diff --git a/src/videofilters/drawdib-display.c b/src/videofilters/drawdib-display.c
index 13cb083..60c221c 100644
--- a/src/videofilters/drawdib-display.c
+++ b/src/videofilters/drawdib-display.c
@@ -245,7 +245,7 @@ static void dd_display_prepare(MSFilter *f){

        if (dd->window==NULL){
dd->window=create_window(dd->wsize.width,dd->wsize.height);
-           SetWindowLong(dd->window,GWL_USERDATA,(long)dd);
+         SetWindowLongPtr(dd->window,GWLP_USERDATA,(long)dd);
        }
        if (dd->ddh==NULL)
                dd->ddh=DrawDibOpen();
diff --git a/src/videofilters/msdscap-mingw.cc b/src/videofilters/msdscap-mingw.cc
index 18ddbdc..3c73000 100644
--- a/src/videofilters/msdscap-mingw.cc
+++ b/src/videofilters/msdscap-mingw.cc
@@ -943,7 +943,7 @@ static void ms_dshow_detect(MSWebCamManager *obj);
 static MSFilter * ms_dshow_create_reader(MSWebCam *obj){
        MSFilter *f=ms_filter_new_from_desc(&ms_dscap_desc);
        DSCapture *s=(DSCapture*)f->data;
-   s->setDeviceIndex((int)obj->data);
+ s->setDeviceIndex((intptr_t)obj->data);
        return f;
 }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]