mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 05:38:14 +00:00
fix pro 9000 bug
git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@100 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
parent
82d9ac031a
commit
6c8b9bdb6a
2 changed files with 7 additions and 6 deletions
|
|
@ -156,12 +156,12 @@ MSPixFmt ms_fourcc_to_pix_fmt(uint32_t fourcc){
|
|||
void rgb24_revert(uint8_t *buf, int w, int h, int linesize){
|
||||
uint8_t *p,*pe;
|
||||
int i,j;
|
||||
uint8_t *end=buf+(h*linesize);
|
||||
uint8_t *end=buf+((h-1)*linesize);
|
||||
uint8_t exch;
|
||||
p=buf;
|
||||
pe=end-1;
|
||||
for(i=0;i<h/2;++i){
|
||||
for(j=0;i<w*3;++j){
|
||||
for(j=0;j<w*3;++j){
|
||||
exch=p[i];
|
||||
p[i]=pe[-i];
|
||||
pe[-i]=exch;
|
||||
|
|
@ -177,10 +177,10 @@ void rgb24_copy_revert(uint8_t *dstbuf, int dstlsz,
|
|||
const uint8_t *psrc;
|
||||
uint8_t *pdst;
|
||||
psrc=srcbuf;
|
||||
pdst=dstbuf+(dstlsz*roi.height);
|
||||
pdst=dstbuf+(dstlsz*(roi.height-1));
|
||||
for(i=0;i<roi.height;++i){
|
||||
for(j=0;j<roi.width;++j){
|
||||
pdst[roi.width-1-j]=psrc[j];
|
||||
for(j=0;j<roi.width*3;++j){
|
||||
pdst[(roi.width*3)-1-j]=psrc[j];
|
||||
}
|
||||
pdst-=dstlsz;
|
||||
psrc+=srclsz;
|
||||
|
|
|
|||
|
|
@ -218,6 +218,7 @@ static int v4w_open_videodevice(V4wState *s)
|
|||
if (s->pix_fmt==MS_RGB24){
|
||||
s->invert_rgb=(videoformat.bmiHeader.biHeight>0);
|
||||
}else s->invert_rgb=FALSE;
|
||||
|
||||
if (!capSetCallbackOnVideoStream(s->capvideo, VideoStreamCallback))
|
||||
{
|
||||
ms_error("v4w: fail to set capture callback");
|
||||
|
|
@ -664,10 +665,10 @@ static void ms_v4w_detect(MSWebCamManager *obj){
|
|||
DestroyWindow(hwnd);
|
||||
break;
|
||||
}else{
|
||||
capGetDriverDescription(i, dev, sizeof (dev),ver, sizeof (ver));
|
||||
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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue