Originally posted by: Chris Poile
This is very strange... I downloaded this code, and it works fine, except for rendering all frames upside down.
I am running VC++ 6.0 with DX 6.1 and DXM 6.0. Maybe has there been a change to the libraries that would cause this effect?
If not, then what would I be able to do? I have thought about rotating 180 degrees, but that would take some proccessor time I'm not willing to give up.
Any ideas? Thanks!
Chris.
Originally posted by: jo Spil�
I'm working on a particle and object detector wich act upon a live video feed (from a camera!!!)
I would like to read from/write on the stream before rendering it.
So I would like to pretty much do the same thing you did in your MovieMFC sample
but using data comming out of the overlay(preview) pin of my capture filter
How should I connect the all thing considering i'm gonna use
IAMMultiMediaStream to make a filtergraph and that i'm gonna pass it to ICaptureGraphBuilder.
or is there a better way to do this.
Right know I've got a working version of my app wich treats a normal preview mode stream. But it's too
slow
I've got about 6 images a second on a PII 350Mhz.
And trying to modify the TransInPlaceFilter I did, to make it work with IOverlay brought me nothing than
pain in the head.
So I'm considering working with DirectDraw.
It Would be very gentle from you(S.Rodriguez) or from anybody reading this to help me on this
spile@wol.be
Originally posted by: Robin Colclough
Using this sample, I noticed that video playback quality was degraded compared to straight ActiveMovie playback, causing the video to drop resolution/interpolation quality.
I think this occurs because the DirectX video renderer performs run-time performance analysis to achieve the best playback, and when this app draws between frame updates to produce the overlay rectangle, the video renderer sees that it is running out of time to run at a higher res. or interpolate, and so drops quality.
An improved method to perform overlay would be to only redraw the overlay items, a rectangle in this case, when it changes position or shape, and not every frame. By redrawing the overlay graphic every frame, the cpu is getting overloaded, and video rendering quality drops.
The video renderer must work fast to produce quality video playback, even on a PII 266. During rendering it must be using a mask plane to avoid overwriting toplevel windows/popups, etc., so Microsoft must have implemented a methodology for overlay control already.
As such, it would be better to be able to write directly to the renderer's mask plane, protecting the pixels required to maintain/protect the video overlay graphics, and then update the graphics and mask plane as and when needed.
The question is how to do it?
One way to do it would be to use a transparent window - the sort that Microsoft Spy must use when it produces that target crosshair with circle that you can position over a window to select it. But that seems a roundabout way of solving the problem.
Comments welcome!
(The sample also seemed to ignore the Margi DVD/Mpeg decoder card in my PC : P266 64 MB DRAM
Reply
Originally posted by: Robin Colclough
However, after modifiying the sample using (*pAMStream).AddRef() as suggested, when quiting the program, I
got a GPF exception at the following line in Atlbase.h:
template <class T>
Using VC 6.0 sp3 on Windows 98, I compiled and ran the sample and it worked well, although video quality when
scaling an mpeg1 file to fullscreen was not as good as ActiveMovie; perhaps there are parameters that need
setting?
class CComPtr
{
public:
typedef T _PtrClass;
CComPtr()
{
p=NULL;
}
CComPtr(T* lp)
{
if ((p = lp) != NULL)
p->AddRef();
}
CComPtr(const CComPtr<T>& lp)
{
if ((p = lp.p) != NULL)
p->AddRef();
}
~CComPtr()
{
if (p)
p->Release(); // BANG! GPF after this point.
Any idea how to get around this VC6.0 related issue?