Windows Media Player 11 SDK About the Conversion ProcessĀ
Previous | Next |
About the Conversion Process
After Windows Media Player instantiates the conversion plug-in, the process proceeds as follows:
- The Player calls IWMPConvert::ConvertFile.
- The plug-in converts the file provided in the bstrInputFile parameter into an ASF format.
- If the conversion fails for some reason, the plug-in returns an appropriate failure code and the process stops.
- If the conversion succeeds, the plug-in places the converted file into the folder provided in the bstrDestinationFolder parameter and returns the fully qualified path to the converted file through the pbstrOutputFile parameter.
- The plug-in returns a success code from ConvertFile.
- The Player copies the converted file to a folder in the user's music folder hierarchy. Exactly where the Player copies the file to depends on content. As part of this process, the Player might rename the file.
- The Player copies the original (unconverted) file to a folder in the user's music folder hierarchy. As part of this process, the Player might rename the file. This is the copy of the file that the Player uses when the user syncs the content from the computer to a device that requires the original file format. This file is called a shadow file.
- The Player adds information about the converted file to the library. This includes setting the value for the ShadowFilePath attribute to the new location where the shadow file is saved.
If you need to work with the converted file, you can query the library to retrieve the content by using the ContentDistributor and WM/UniqueFileIdentifier attributes. If you need to work with the shadow file, you must still retrieve the Media object for the converted file and then query for the ShadowFilePath attribute. See Adding Metadata to Converted Files.
See Also
- About Conversion Plug-ins
- Adding Metadata to Converted Files
- Reading Attribute Values
- ShadowFilePath Attribute
- WM/ContentDistributor Attribute
- WM/UniqueFileIdentifier Attribute
Previous | Next |