[Sumover-dev] Retrieving a user's video data

Thibault Daoulas thibault.daoulas at canterbury.ac.nz
Wed Nov 19 05:52:11 GMT 2008


Hi Piers,
    I had got indeed your previous mail, which put me on the right way, 
but I still have some things that I am not sure that I'm doing right, or 
understanding right. To take the colour-swscale.cpp as an example for 
testing, I should get the video data from the (u_char *) pixbuf_ 
attribute right? Then, one of the things I have tried, is to create in 
tcl a proc getTexData {texData}, which sets a global variable, to this 
texData, which is then called in my tcl3d loading texture function. As 
for the c++ side, I used a tcl.evalc("getTexData pixbuf_"), that I 
thought would transmit the pixbuf_ to texData.
Apparently I am wrong. My global variable is then set to the string 
"pixbuf_", and then unusable when it comes to load it as a texture.

I also tried with the tcl extension tclx to transfer the 
(u_char*)pixbuf_ from c++ to tcl, via a handle, but once again, I get 
the string representation of the data, and do not know how to use or 
convert it so that the tcl3d function (glTexImage2D) accepts it. (the 
format needed is a tcl3dVector, which seems to be a pointer to unsigned 
char : this is what I get when printing a newly created tcl3dVector 
GLubyte :_d8063409_p_unsigned_char).

I am sorry since I feel it is not that hard to do, but I have been stuck 
on this for a while, and I am wondering now if there is more than the 
tcl handles that I have confused!

Thanks for your help,

Thibault.

Piers O'Hanlon wrote:
> Hi Thibault,
>
> I'm not sure if you my previous email on this subject but here's some
> more info: Basically you need to obtain the data after it has been
> decompressed by the codec. The head_->video_data() data structure is
> not used in VIC's normal operation (it is only used when lip sync is
> in operation - It currently doesn't work properly). If you have a look
> at  (I've just added a new section on the renderers):
> http://frostie.cs.ucl.ac.uk/nets/mmedia/wiki/VicDev
> You can see what the normal course of events is function by function
> for receiving packets. As I mentioned I think the best approach would
> be to copy one of the existing renders - then ensure that it is chosen
> on start up by VIC (see my wiki page) or via some command line switch,
> vic resource, or environment variable etc. This render could just
> extract the video data and pass it to your tcl3d function.
>
> For testing you could just modify the colour-scale.cpp renderer to
> pass the video to the tcl3d function using tcl.evalc("your_3d_func"),
> though I wouldn't recommend it for proper use as it will slow things
> down.
>
> Piers.
>
>
>
> 2008/11/17 Thibault Daoulas <thibault.daoulas at canterbury.ac.nz>:
>   
>> Hi,
>>   I have a question about an issue I am quite stuck on for a while.
>> Basically I want to render each video streaming of each participant, frame
>> per frame, on an OpenGL texture. In order to do this, I want to get the
>> video frames of each source, so ideally there would be a method in the
>> rtp/Source class "getData()" which would return a u_char*, which I would
>> then transfer to the tcl interface, and finally map as a bitmap onto an
>> OpenGL (tcl3d in our case) texture.
>> The point is that I do not really understand how to get this data. The
>> method I thought adequate was "head_->video_data()", but each time I try to
>> access it, I get a segmentation fault, and actually I do not know if the
>> PacketData * head_ represents...
>> Can anyone help me about this?
>>
>> Thank you very much for any advice,
>>
>> Thibault.
>>
>> _______________________________________________
>> Sumover-dev mailing list
>> Sumover-dev at cs.ucl.ac.uk
>> http://oakham.cs.ucl.ac.uk/mailman/listinfo/sumover-dev
>>
>>     




More information about the Sumover-dev mailing list