Click here to Skip to main content
15,914,642 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
What should i do to make IWMReader call methods of IWMReaderCallbackAdvanced in my filter?
Posted
Comments
[no name] 21-Dec-10 5:52am    
Now IWMReaderCallbackAdvanced::OnStreamSample is called only with wStreamNum = 1.
I have used hr = m_pReaderAdvanced->SetReceiveStreamSamples(i+1,TRUE);
What should i also do?

I try to use program from
http://social.msdn.microsoft.com/Forums/en-US/windowsdirectshowdevelopment/thread/b20bcfec-2204-474c-bdb7-e2abf1498ce4/[^]

And for my file situation is like there has been described: GUID_NULL for first video pin, and does not draw data from last video pin.

Did somebody used this filter?
For first pin isaw, that not GUID_NULL was set. When getting back it is GUID_NULL.
Can you help me?
 
Share this answer
 
Comments
[no name] 22-Dec-10 5:35am    
I have changed std::map to std::list<PAIR_TYPE> to prevent sorting. Now intellegent connection works fine, manual causes exception.
[no name] 22-Dec-10 7:01am    
Now the is no exception! Everything works fine! I had shoud not change intellegent pointer to ordinary.
CSS
class LIST_DATA
{
public:
    WORD first;
    WMFOutputPinPtr second;
};

typedef list<LIST_DATA> PinMap;

;
        // create the pin with a unique name
        WORD wStrLen = 0;
        pStream->GetStreamName(NULL, &wStrLen);
        smart_array<WCHAR>awch = new WCHAR[wStrLen];
        pStream->GetStreamName(awch, &wStrLen);
        WMFOutputPin *pin = new WMFOutputPin(this, &m_csFilter, &hr, awch);
		LIST_DATA local_stream_data;
		local_stream_data.first = wStream;
		local_stream_data.second = pin;
        // insert in map, using wStream as index
        m_Outputs.push_back(local_stream_data);
        // get the compressed media type from the profile for this stream
        IWMMediaPropsPtr pProps = pStream;
;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900