locked
MF_METADATA_PROVIDER_SERVICE for MP4 file RRS feed

  • Question

  • Hello,

    I'm trying to query the MF_METADATA_PROVIDER_SERVICE service out of an IMFMediaSource interface for a MP4 file; is such a thing possible? The code always returns MF_E_UNSUPPORTED_SERVICE for MP4 files (when I switch the source to be a WMV from a MP4, the call works, however):

    	CComPtr<IMFWorkQueueServices> iMetaProvider; 
    	HRESULT hr = ::MFGetService(
    		iMediaSource, 
    		MF_METADATA_PROVIDER_SERVICE, 
    		IID_IMFMetadataProvider,
    		(LPVOID*)&iMetaProvider); 
    Am I missing something?

    I'm running this on Windows 7 64 bit; I guess I assumed that (since I'm able to decode the media streams and retrieve information from the streams such as bitrate/framerate, etc) I ought to be able to retrieve something as simple as metadata applied to the file....

    Thanks in advance,
    Friday, December 18, 2009 7:44 PM

Answers

  • To get metadata from the MP4 source you should actually get the IPropertyStore interface from the MF_PROPERTY_HANDLER_SERVICE service. MSDN is being updated to document this new method of retrieving metadata (it is currently only mentioned for the ASF source [here]). Apologies for the inconvenience.

    For info, the standard Shell property keys are documented here: http://msdn.microsoft.com/en-us/library/dd561977(VS.85).aspx
    • Marked as answer by Ben Rush Tuesday, December 22, 2009 7:33 PM
    Sunday, December 20, 2009 7:50 AM

All replies

  • To get metadata from the MP4 source you should actually get the IPropertyStore interface from the MF_PROPERTY_HANDLER_SERVICE service. MSDN is being updated to document this new method of retrieving metadata (it is currently only mentioned for the ASF source [here]). Apologies for the inconvenience.

    For info, the standard Shell property keys are documented here: http://msdn.microsoft.com/en-us/library/dd561977(VS.85).aspx
    • Marked as answer by Ben Rush Tuesday, December 22, 2009 7:33 PM
    Sunday, December 20, 2009 7:50 AM
  • Thank you sir!
    Tuesday, December 22, 2009 7:33 PM