Hi,
According to http://msdn.microsoft.com/library/default.asp url=/library/en-us/medfound/html/82db6f32-ad94-4563-b8bd-8a5072c5b221.asp, "To create the copy, call IMFPresentationDescriptor::Clone".
Could anyone tell me why we need to call the member function Clone instead of AddRef

IMFPresentationDescriptor::Clone
NewToVba
shifter
Say you're implementing IMFMediaSource::CreatePresentationDescriptor. You may not want to give the application a pointer to the same instance of the Presentation Descriptor that you are using internally, since you likely don't want to be randomly affected e.g. by whatever calls to SelectStream/DeselectStream or changing around attributes that they're making in their code. Cloning the Presentation Descriptor gives them their own copy of the Presentation Descriptor that they can use as they please.
We have a known issue that this is a shallow copy; when you call IMFPresentationDescriptor::Clone, the IMFStreamDescriptors (and their media types) do not get cloned; you simply get references to the same Stream Descriptor objects.
Jay K