WindowsMediaNet Library

The purpose of this library is to allow access to Windows Media Format functionality from within .NET. Additionally, it provides definitions for the waveIn*, waveOut*, mixer* and MMIO* methods of the Windows Multimedia SDK.

Reviewing the source code in this library will show that there is very little executable code in this library. There are a few helper functions (mostly in WMUtils.cs), but everything else in the library is just definitions. Although there are ~106 interfaces defined in the source code, only some of them have been tested to ensure that they are working (see below).

WindowsMediaNet Samples

This is the current list of samples along with a short description. See the readme.txt in the individual samples for more details. Note that these samples should not be considered commercial quality, but can form the basis of your own code.

AsfCreate - Creates an Asf or WMV file from a collection of bitmaps

AsfNet - Sends the output of DirectShow capture graphs to a network port to be read by Windows Media Player

AudioPlayer - Play the audio portion of a windows media file

DESCombine- Join and split files, outputting data to a WM file.

DrmHeader - Show the DRM attributes of a file

GenerateLa - Builds (and plays) a wave buffer that contains a beep.

ReadFromStream - Walk the samples in a file where the source is an IStream

RecordWav - Record audio data from a microphone to a .wav file

WMProp - Show file properties for WM files

WMVCopy - Code to copy a file

Interfaces

Tested interfaces ready to use:

IConfigAsfWriterIWMMetadataEditorIWMReaderTypeNegotiation
INSNetSourceCreatorIWMMetadataEditor2IWMRegisterCallback
INSSBufferIWMMutualExclusionIWMSInternalAdminNetSource
INSSBuffer2IWMMutualExclusion2IWMSInternalAdminNetSource2
INSSBuffer3IWMOutputMediaPropsIWMSInternalAdminNetSource3
INSSBuffer4IWMPacketSizeIWMStatusCallback
IWMAddressAccessIWMPacketSize2IWMStreamConfig
IWMAddressAccess2IWMPlayerHookIWMStreamConfig2
IWMBackupRestorePropsIWMProfileIWMStreamConfig3
IWMBandwidthSharingIWMProfile2IWMStreamList
IWMClientConnectionsIWMProfile3IWMStreamPrioritization
IWMClientConnections2IWMProfileManagerIWMSyncReader
IWMCodecInfoIWMProfileManager2IWMSyncReader2
IWMCodecInfo2IWMProfileManagerLanguageIWMVideoMediaProps
IWMCodecInfo3IWMPropertyVaultIWMWriter
IWMCredentialCallbackIWMReaderIWMWriterAdvanced
IWMDRMEditorIWMReaderAdvancedIWMWriterAdvanced2
IWMHeaderInfoIWMReaderAdvanced2IWMWriterAdvanced3
IWMHeaderInfo2IWMReaderAdvanced3IWMWriterFileSink
IWMHeaderInfo3IWMReaderAdvanced4IWMWriterFileSink2
IWMIndexerIWMReaderAdvanced5IWMWriterFileSink3
IWMIndexer2IWMReaderAllocatorExIWMWriterNetworkSink
IWMInputMediaPropsIWMReaderCallbackIWMWriterPostView
IWMIStreamPropsIWMReaderCallbackAdvancedIWMWriterPostViewCallback
IWMLanguageListIWMReaderNetworkConfigIWMWriterPreprocess
IWMLicenseBackupIWMReaderNetworkConfig2IWMWriterPushSink
IWMLicenseRestoreIWMReaderPlaylistBurnIWMWriterSink
IWMMediaPropsIWMReaderStreamClock 

These methods are also defined in the library:

WMCreateBackupRestorermmioAdvancewaveInAddBufferwaveOutBreakLoopmixerClose
WMCreateEditormmioAscendwaveInClosewaveOutClosemixerGetControlDetails
WMCreateIndexermmioClosewaveInGetDevCapswaveOutGetDevCapsmixerGetDevCaps
WMCreateProfileManagermmioCreateChunkwaveInGetErrorTextwaveOutGetErrorTextmixerGetID
WMCreateReadermmioDescendwaveInGetNumDevswaveOutGetNumDevsmixerGetLineControls
WMCreateSyncReadermmioFlushwaveInGetPositionwaveOutGetPitchmixerGetLineInfo
WMCreateWritermmioGetInfowaveInMessagewaveOutGetPlaybackRatemixerGetNumDevs
WMCreateWriterFileSinkmmioOpenwaveInOpenwaveOutGetPositionmixerMessage
WMCreateWriterNetworkSinkmmioReadwaveInPrepareHeaderwaveOutGetVolumemixerOpen
WMCreateWriterPushSinkmmioRenamewaveInResetwaveOutMessagemixerSetControlDetails
WMIsAvailableOfflinemmioSeekwaveInStartwaveOutOpen
WMIsContentProtectedmmioSendMessagewaveInStopwaveOutOpen
WMCheckURLExtensionmmioSetBufferwaveInUnprepareHeaderwaveOutPause
WMCheckURLSchememmioSetInfo waveOutPrepareHeader
WMValidateDatammioWrite waveOutReset
   waveOutRestart
   waveOutSetPitch
   waveOutSetPlaybackRate
   waveOutSetVolume
   waveOutUnprepareHeader
   waveOutWrite

These interfaces are in the source code, but are deprecated, undocumented or otherwise untestable:

These 3 interfaces are only useful when writing a DirectShow filter (see http://msdn.microsoft.com/en-us/library/dd798058.aspx). Since you can't do that in c#, there's no reason (in fact, no way) to test these.

Get Windows Media .NET at SourceForge.net. Fast, secure and Free Open Source software downloads