Re: [GnomeMeeting-list] Urgent:Multi-camera

Hi all,
    Could anyone tell me that why the video_buffer
size is height * width * 3 , 3 times the frame size?
    Also, why the amount write to and read from
video_buffer is this size too, as specified from
"video_channel->read (video_buffer, height*width*3)"
and "video_channel->write (video_buffer,
height*width*3)" in videograbber.cpp?
    I made two new buffers temp_buffer1 and
temp_buffer2 to store the data come from two cameras.
And then,I use the function from openmcu
VideoBuffer::Write(BYTE *data,PINDEX amount,PINDEX
posn) and 
VideoBuffer::Read(BYTE *data,PINDEX amount) to
integrate the two camera images into the original
video_buffer for gnomemeeting to display.
Below is the code I wrote:

videoBuffer.CombineImage ((BYTE *) video_buffer,(BYTE
                          (BYTE *) temp_buffer2,
height * width );

void VideoBuffer::CombineImage(BYTE * result_buffer,
BYTE * input_buffer1, BYTE * input_buffer2, PINDEX
  Write(input_buffer1, amount, 0);
  Write(input_buffer2, amount, 1);

After I compile it and then run gnomemeeting, the
screen is divided into 4,with green image,and then
hang up.I tried for different PINDEX amount for the
buffer to read from and write to,some hangs up and
some shows nothing. Could anyone help me?
Thanks alot!


浪漫鈴聲  情心連繫*

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