Click here to Skip to main content
16,013,465 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: STL problem Pin
Dor26-Dec-02 16:20
Dor26-Dec-02 16:20 
GeneralRe: STL problem Pin
Taka Muraoka26-Dec-02 16:26
Taka Muraoka26-Dec-02 16:26 
GeneralRe: STL problem Pin
Dor26-Dec-02 16:51
Dor26-Dec-02 16:51 
GeneralRe: STL problem Pin
Taka Muraoka26-Dec-02 16:56
Taka Muraoka26-Dec-02 16:56 
GeneralRe: STL problem Pin
Dor26-Dec-02 17:08
Dor26-Dec-02 17:08 
GeneralAbout image of drag&drop. Pin
tianyang@vip.163.com26-Dec-02 15:27
susstianyang@vip.163.com26-Dec-02 15:27 
GeneralRe: About image of drag&drop. Pin
KaЯl26-Dec-02 23:41
KaЯl26-Dec-02 23:41 
QuestionHow to dynamically change media type with YV12 format frames in DirectShow? Pin
Bert_Chen26-Dec-02 15:02
Bert_Chen26-Dec-02 15:02 
Hi.

I want to display YV12 format frames by building a FilterGraph in DirectShow. Those frames are captured from a file. So, I create a source filter inherited from CSource and a output pin inherited from CDynamicOutputPin. Then, I connect this source filter with the Video Renderer filter which is supported by DirectX 8.0 (The CLSID of that filter is CLSID_VideoRenderer).

In DirectX 8.0 SDK, it emphasizes that the Video Renderer, when it is initially connected to the upstream filter, will always insist on a RGB format, so I should let the Video Renderer negotiate a dynamic format change to the appropriate YUV color space after the graph goes into a run state.

But, it only works in the RGB exchange (ex: RGB32 to RGB24). If I attempt to change the output formats into YV12, the return value of the function IPinConnection::DynamicQueryAccept running in CDynamicOutputPin::ChangeMediaType fails. Why??

I think that it could be the argument's problem. Before the output pin of my source filter calls the ChangeMediaType function, we should prepare a CMediaType argument for it. The CMediaType argument is filled with the new media type we want.

The following is my settings of the CMediaType:

  majortype = MEDIATYPE_Video;
  subtype = MEDIASUBTYPE_YV12;
  formattype = FORMAT_VideoInfo;
  pbFormat = (BYTE *)pVideoInfo;
  cbFormat = sizeof(VIDEOINFOHEADER);

How to setting up the data of VIDEOINFOHEADER will be fine for YV12 type??

And, the format type (FORMAT_VideoInfo) is correct??

Thanks.

Bert Chen
Generalproblem using tab control Pin
Member 11729326-Dec-02 13:08
Member 11729326-Dec-02 13:08 
GeneralRe: problem using tab control Pin
Dor26-Dec-02 15:32
Dor26-Dec-02 15:32 
GeneralRe: problem using tab control Pin
Member 11729327-Dec-02 5:21
Member 11729327-Dec-02 5:21 
GeneralRe: problem using tab control Pin
Dor27-Dec-02 11:47
Dor27-Dec-02 11:47 
GeneralRe: problem using tab control Pin
Mangesh Sardesai26-Dec-02 21:56
Mangesh Sardesai26-Dec-02 21:56 
GeneralWriteFile = slow; fwrite = fast; me = sad; Pin
Chris Losinger26-Dec-02 12:57
professionalChris Losinger26-Dec-02 12:57 
GeneralRe: WriteFile = slow; fwrite = fast; me = sad; Pin
Neville Franks26-Dec-02 13:13
Neville Franks26-Dec-02 13:13 
GeneralRe: WriteFile = slow; fwrite = fast; me = sad; Pin
Chris Losinger26-Dec-02 13:30
professionalChris Losinger26-Dec-02 13:30 
GeneralRe: WriteFile = slow; fwrite = fast; me = sad; Pin
Neville Franks26-Dec-02 13:46
Neville Franks26-Dec-02 13:46 
GeneralRe: WriteFile = slow; fwrite = fast; me = sad; Pin
Chris Losinger26-Dec-02 13:50
professionalChris Losinger26-Dec-02 13:50 
GeneralRe: WriteFile = slow; fwrite = fast; me = sad; Pin
Neville Franks26-Dec-02 13:57
Neville Franks26-Dec-02 13:57 
GeneralRe: WriteFile = slow; fwrite = fast; me = sad; Pin
Chris Losinger26-Dec-02 14:16
professionalChris Losinger26-Dec-02 14:16 
GeneralRe: WriteFile = slow; fwrite = fast; me = sad; Pin
Neville Franks26-Dec-02 14:39
Neville Franks26-Dec-02 14:39 
GeneralRe: WriteFile = slow; fwrite = fast; me = sad; Pin
Chris Losinger26-Dec-02 15:13
professionalChris Losinger26-Dec-02 15:13 
GeneralRe: WriteFile = slow; fwrite = fast; me = sad; Pin
Neville Franks26-Dec-02 15:50
Neville Franks26-Dec-02 15:50 
GeneralRe: WriteFile = slow; fwrite = fast; me = sad; Pin
Matt Gullett26-Dec-02 15:49
Matt Gullett26-Dec-02 15:49 
GeneralRe: WriteFile = slow; fwrite = fast; me = sad; Pin
Chris Losinger26-Dec-02 19:00
professionalChris Losinger26-Dec-02 19:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.