Video call with QQ or any messenger

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
babykarma
Newbie
Newbie
Posts: 4
Joined: Mon Jun 21, 2010 5:38 am

Video call with QQ or any messenger

Post by babykarma »

Hi everyone,

I'm a newbie to wine, and am working on QQ or any other messengers in wine.
My environment is : ubuntu 10.04, installed wine 1.1.42, QQ2009. And during my debugging, I also check some source code from latest wine 1.2-rc4.

Although QQ's level is "garbage", but fortunately it works almost fine under wine, including login, text chat, ..... But the video call can only partially work.
I can see my friend's(he's under windows of course) video, while I can't see my preview video, of course he cannot see mine video too.

As a comparison, I run GraphEdt to check what's wrong with video capture and rendering, when I 'use clock', the same thing happens, no video rendering at all, but when I DONOT 'use clock', video rendering works fine.

Then I read the source code and find out one problem(maybe right, maybe wrong), when wine/dlls/qcap/v4l.c send media samples to downstream filters, it do not set any timestamp on it. Thus if I use VideoRenderer as I did in GraphEdt, the video render got wrong start and stop reference time for media sample, and then the synchronisation result will be very strange. So I modify the v4l.c and set proper timestamp on media sample. Good result, even when I 'use clock', the capture+render graph works find in GraphEdt.

But when I turn to QQ, my video capture+preview+encoding graph still seems don't work. Can anyone give me some advice? Thanks a lot in advance.
babykarma
Newbie
Newbie
Posts: 4
Joined: Mon Jun 21, 2010 5:38 am

Post by babykarma »

According to msdn:
"Video frames from a preview pin (as opposed to a capture pin) are not time stamped. Because of graph latency, a video frame that is stamped with the capture time will always arrive late at the video renderer. This may cause the renderer to drop frames, in an attempt at quality control."

"Quality control is a mechanism for adjusting the rate of data flow through the filter graph in response to run-time performance. If a renderer filter is receiving too much data or too little data, it can send a quality message. The quality message requests an adjustment in the data rate. By default, quality messages travel upstream from the renderer until they reach a filter that can respond (if any)."

I've cheked winedbg log, QQ's filter graph looks like:
vfw capture filter + QQ's own video render filter + ... + ddraw/d3d7 rendering.
QQ did not use smarttee, preview pin, standard VideoRender or VideoRenderDefault or VideoMixingRender9(because QQ never query their id). Instead, I guess QQ write a video render filter by itself, and in QQ's render filter, it directly use ddraw/d3d7 surface to render, and maybe it does something similar to smarttee, to output to render/preview and encoding/network sending at the same time.

Since QQ did not use preview pin directly, at first I guess maybe 'not time stamped' is not correct, so I add some timestamp to capture output video frame, still no preview occurs, but result in continuous IQualityControl query, but even latest wine-1.2-rc4 has not implemented IQualityControl, so I guess, still something wrong in timestamp synchronisation, and QQ's video render want to use IQualityControl to fix it which wine doesn't support, so maybe every frame is dropped, this result in my black preview video window.

I read from wine docs/wiki, once before windows messenger (8.1?) worked fine in wine, I guess since Maarten Lankhorst has written qcap/vfwcapture, of course somebody has used wine for camera+preview+maybe encoding before, why it succeeded by then, but fail now?
Is there anything wrong for me?

Thanks a lot
Is there anyone can give me some advice?
Locked