| |

VerySource

 Forgot password?
 Register
Search
View: 994|Reply: 1

How to get video data in directshow?

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-3-21 23:00:02
| Show all posts |Read mode
I want to write a transform filter, one of his input pins receives video data, and I perform image processing on these videos frame by frame (such as denoising), and then send it through the output pin

I intend to improve on the nullnull (minimal null filter) example in ds, may I ask:

How to get frame-by-frame video data and determine what format it is for processing?

Thank you! !! !!
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-6-29 19:15:01
| Show all posts
As far as the nullnull example is concerned:

You can decide what type of data input your filter accepts in CheckInputType, for example:

HRESULT CheckInputType(const CMediaType* mtIn)
{
if (mtIn->subtype == MEDIASUBTYPE_RGB565)
return S_OK;
return E_FAIL;
}

Only RGB565 type data input is accepted. In addition, there is a member m_mt on the input pin, which is used to save the media type for connection, you can refer to it.

The video image frame is passed to the Transform function when the filter graph is running.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list