DirectShow ...How do i overlay a bitmap pic over a video source?
-
Hi,, Just wondering if anyone knows how do i overlay a bitmap or draw a frame onto a video source... I've created a Histogram filter, which inherites from CTransform filter. HRESULT CHistogram::Transform(IMediaSample *pIn, IMediaSample *pOut)
-
Hi,, Just wondering if anyone knows how do i overlay a bitmap or draw a frame onto a video source... I've created a Histogram filter, which inherites from CTransform filter. HRESULT CHistogram::Transform(IMediaSample *pIn, IMediaSample *pOut)
Retrieve a pointer to the input bitmap data by using IMediaSample::GetPointer and then you can convert that to a bitmap and draw with an API. Alternatively, you can write your own simple draw routines by moving around the buffer and changing individual pixels.
If you can keep you head when all about you Are losing theirs and blaming it on you; If you can dream - and not make dreams your master; If you can think - and not make thoughts you aim; Yours is the Earth and everything that's in it. Rudyard Kipling