shmid = -1;
break;
- case VFrame::SHMGET:
+ case VFrame::SHM_GET:
if(data)
shmdt(data);
data = 0;
this->v_offset = v_offset;
}
else if( shmid >= 0 ) {
- memory_type = VFrame::SHMGET;
+ memory_type = VFrame::SHM_GET;
this->data = (unsigned char*)shmat(shmid, NULL, 0);
if( this->data == (unsigned char*)-1 ) {
printf("VFrame::allocate_data %d could not attach"
else
if(shmid >= 0)
{
- memory_type = VFrame::SHMGET;
+ memory_type = VFrame::SHM_GET;
this->data = (unsigned char*)shmat(shmid, NULL, 0);
this->shmid = shmid;
}
else
if(shmid >= 0)
{
- memory_type = VFrame::SHMGET;
+ memory_type = VFrame::SHM_GET;
this->data = (unsigned char*)shmat(shmid, NULL, 0);
this->shmid = shmid;
}
else
free(data);
}
- else if( memory_type == VFrame::SHMGET ) {
+ else if( memory_type == VFrame::SHM_GET ) {
if( data ) shmdt(data);
}
// a (~alpha) transparency, 0x00==solid .. 0xff==transparent
void VFrame::set_pixel_color(int rgb, int a)
{
- pixel_rgb = (~a<<24) | (rgb&0xffffff);
+ pixel_rgb = (~(unsigned int)a<<24) | (rgb&0xffffff);
int ir = 0xff & (pixel_rgb >> 16);
int ig = 0xff & (pixel_rgb >> 8);
int ib = 0xff & (pixel_rgb >> 0);
YUV::yuv.rgb_to_yuv_8(ir, ig, ib);
- pixel_yuv = (~a<<24) | (ir<<16) | (ig<<8) | (ib<<0);
+ pixel_yuv = (~(unsigned int)a<<24) | (ir<<16) | (ig<<8) | (ib<<0);
}
void VFrame::set_stiple(int mask)