View
218
Download
0
Category
Tags:
Preview:
Citation preview
Windows Media SDK 7:Windows Media SDK 7:Under the HoodUnder the Hood7-4097-409
Chris CarperChris Carper
Program ManagerProgram Manager
Digital Media DivisionDigital Media Division
ccarper@microsoft.comccarper@microsoft.com
AgendaAgenda
Windows Media SDK RoadmapWindows Media SDK Roadmap Windows Media Format SDKWindows Media Format SDK
Audio, videoAudio, video Net streamingNet streaming EditingEditing Content managementContent management
Digital Rights ManagementDigital Rights Management
Window Media v7 SDK Window Media v7 SDK Component RoadmapComponent Roadmap Encoder SDK (Private Beta)Encoder SDK (Private Beta) Player SDK (Beta)Player SDK (Beta) Format SDK (Beta)Format SDK (Beta)
Replaces Audio SDKReplaces Audio SDK Reading and writing Windows MediaReading and writing Windows Media Windows Media Device Manager (WMDM)Windows Media Device Manager (WMDM)
Windows Media Format 7: Windows Media Format 7: OverviewOverviewRequirementsRequirements ExtensibleExtensible
Support new CODECs and media typesSupport new CODECs and media types ScalableScalable
Efficient local playbackEfficient local playback Support existing HTTP serversSupport existing HTTP servers Enable high capacity media serversEnable high capacity media servers
Author once; playback anywhereAuthor once; playback anywhere Stream thru 28.8 modems to broadband networksStream thru 28.8 modems to broadband networks Play on PCs, PDA, and Consumer Electronics Play on PCs, PDA, and Consumer Electronics
Car stereos, portable devices, etc.Car stereos, portable devices, etc.
Windows Media Format 7: Windows Media Format 7: OverviewOverview Second generation multimedia formatSecond generation multimedia format Supports streamed and local playbackSupports streamed and local playback Optimized for live and Optimized for live and
on-demand contenton-demand content Consists ofConsists of
CODECsCODECs Digital Rights Management (DRM)Digital Rights Management (DRM) File containerFile container
Windows Media ApplicationsWindows Media Applications
Based on current WM Based on current WM Audio SDK Audio SDK
PlayersPlayers Winamp (www.winamp.com)Winamp (www.winamp.com) Sonique Sonique
(www.sonique.com)(www.sonique.com) Personal JukeboxesPersonal Jukeboxes
Sonic Foundry SirenSonic Foundry Sirenwww.sonicfoundry.comwww.sonicfoundry.com
MusicMatch Jukebox MusicMatch Jukebox www.musicmatch.com www.musicmatch.com
RioPort Audio Manager RioPort Audio Manager www.rioport.comwww.rioport.com
Many more available at… Many more available at… http://www.microsoft.com/http://www.microsoft.com/windowsmedia/software/windowsmedia/software/jukeboxes/jukeboxes/
Windows Media Player v7 Windows Media Player v7 SDKSDK
Windows Media Player ActiveX Windows Media Player ActiveX ControlControl
Windows Media Player SkinsWindows Media Player Skins Windows Media Player Custom Windows Media Player Custom
VisualizationsVisualizations
Player SDK ComponentPlayer SDK ComponentArchitectureArchitecture
Browsers/Browsers/applicationsapplications
NetscapeNetscapePlug-inPlug-in
Player Player ControlControl
DirectShow Filter Graph ManagerDirectShow Filter Graph ManagerSource filter Source filter
(ASF, WAV, AVI, (ASF, WAV, AVI, etc.)etc.)
Transform Transform filterfilter
RenderRenderfilterfilter
Media Source Media Source (Internet or (Internet or
FileSys)FileSys)
DirectX FoundationDirectX Foundation
Media Destination Media Destination (Audio/Video Hardware)(Audio/Video Hardware)
COM COM InterfacesInterfaces
Player SDK ComponentPlayer SDK ComponentControl InterfacesControl Interfaces
MethodsMethods Player State: Play, Pause, Player State: Play, Pause,
Stop, FastForwardStop, FastForward CODECs: GetCodecInstalledCODECs: GetCodecInstalled ASX: GetMediaInfoStreamASX: GetMediaInfoStream Stream control: StreamSelectStream control: StreamSelect
EventsEvents Script Commands and URLsScript Commands and URLs Stream and playbackStream and playback Mouse and keyboardMouse and keyboard MarkerMarker Errors and warningsErrors and warnings TimerTimer
PropertiesProperties Display and appearanceDisplay and appearance Markers and scanningMarkers and scanning Stream playback rate Stream playback rate Media streamMedia stream FilterGraphFilterGraph Event registrationEvent registration Error handlingError handling Volume and MuteVolume and Mute Stream and playback Stream and playback
statsstats Stream statusStream status SAMI file, language, styleSAMI file, language, style
Player SDK componentPlayer SDK component
Windows Media VizualizationsWindows Media Vizualizations
Use C++ Wizard Use C++ Wizard Located in <SDK Install>\wizards\vizLocated in <SDK Install>\wizards\viz
Copy to: \Copy to: \Program Files\Microsoft Visual Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\IDEStudio\Common\MSDev98\Bin\IDE
Create Vizualization ProjectCreate Vizualization Project Modify Render functionModify Render function Build .dllBuild .dll
Getting StartedGetting Started
Windows Media VizualizationsWindows Media Vizualizations
effects.idl effects.idl projectproject.cpp .cpp projectprojectdll.cpp dll.cpp projectprojectdll.defdll.def projectprojectdll.rcdll.rc iiprojectproject.idl.idl StdAfx.cppStdAfx.cpp projectproject.h.h resource.hresource.h StdAfx.hStdAfx.h projectproject.rgs.rgs project.wmsproject.wms basetsd.hbasetsd.h effects.heffects.h iiprojectproject.h.h iiprojectproject.tlb.tlb
Files Files
WM Format SDK FeaturesWM Format SDK FeaturesAudio and VideoAudio and Video Read and write Windows Media filesRead and write Windows Media files Stream from net, stream to netStream from net, stream to net Content Management propertiesContent Management properties MarkersMarkers Scripts: Closed Captioning, URL flips, Scripts: Closed Captioning, URL flips,
Events, HTMLEvents, HTML In stream or in headerIn stream or in header
Digital Rights Management (DRM)Digital Rights Management (DRM) Portable Device SupportPortable Device Support
Windows Media Format SDK Windows Media Format SDK Data FlowData Flow
WM SDKWM SDK
WM FileWM File
WM StreamWM Stream WM SDKWM SDK
EncoderEncoder
CODECCODECDRMDRM
PlayerPlayer
CODECCODECDRMDRM
audio/video dataaudio/video data
Windows Media Format Windows Media Format SDK ObjectsSDK Objects
WriterWriter
ReaderReader
Metadata EditorMetadata Editor
File SinkFile Sink
Profile ManagerProfile Manager
IWMWriterNetworkSinkIWMWriterNetworkSink
IWMWriterIWMWriter
IWMReaderIWMReader
IWMEditorIWMEditor
IWMProfileManagerIWMProfileManager
IWMWriterFileSinkIWMWriterFileSink
Network SinkNetwork Sink
WM Format SDKWM Format SDK
Format OverviewFormat OverviewFile ContainerFile Container
Supports files as large as 17 million terabytesSupports files as large as 17 million terabytes Supports multi-bitrate-video streams in a fileSupports multi-bitrate-video streams in a file Stores media and metadata in one fileStores media and metadata in one file
MetadataMetadata Title, copyright, author, markers, script commands, etc.Title, copyright, author, markers, script commands, etc. ID3 v1, v2 music meta-informationID3 v1, v2 music meta-information
MediaMedia Audio, Video and Script Commands (URLs, CC)Audio, Video and Script Commands (URLs, CC)
HeaderHeader
AudioStreamAudioStream
IndexIndex
Video Stream #1Video Stream #1
Video Stream #nVideo Stream #n
Script StreamScript Stream
TimelineTimeline
Format OverviewFormat OverviewFile ContainerFile Container
Able to select a stream, based on available bandwidth Able to select a stream, based on available bandwidth Interleaved data is optimal for HTTPInterleaved data is optimal for HTTP Files can be read sequentially, avoiding Files can be read sequentially, avoiding
expensive seeksexpensive seeks Timeline based synchronizationTimeline based synchronization Bursty data can be smoothedBursty data can be smoothed
Send Timestamp Send Timestamp (milliseconds)(milliseconds)
Presentation Timestamp Presentation Timestamp (Rational time units)(Rational time units)
PresentationPresentationTimeTime
PresentationPresentationTimeTime
SendSendTimeTime
Format OverviewFormat OverviewFile ExtensionsFile Extensions
ObjectivesObjectives ISVs know the player’s rendering requirementsISVs know the player’s rendering requirements Content owners can target specialized player Content owners can target specialized player
(e.g. Jukebox vs Digital VCR)(e.g. Jukebox vs Digital VCR) .wma.wma
Audio-only contentAudio-only content Target application: JukeboxTarget application: Jukebox Metafile extensions: .waxMetafile extensions: .wax MIME: audio/x-ms-wma and -waxMIME: audio/x-ms-wma and -wax CODECs: Windows Media AudioCODECs: Windows Media Audio
Format OverviewFormat OverviewFile ExtensionsFile Extensions
.wmv.wmv Audio, Video, and/or Scripted contentAudio, Video, and/or Scripted content Target Application: Video Player, Video EditorTarget Application: Video Player, Video Editor Metafile extensions: .wvxMetafile extensions: .wvx MIME: video/x-ms-wmv and -wvxMIME: video/x-ms-wmv and -wvx CODECs: Uncompressed, Windows Media Audio, ACLEP.net CODECs: Uncompressed, Windows Media Audio, ACLEP.net
and/or MPEG4and/or MPEG4 .asf.asf
Legacy contentLegacy content Unbounded rendering requirementsUnbounded rendering requirements Metafile extensions: .asxMetafile extensions: .asx MIME: video/x-ms-asfMIME: video/x-ms-asf CODECs: Uncompressed, Windows Media Audio, ACLEP.net, CODECs: Uncompressed, Windows Media Audio, ACLEP.net,
MPEG4, MetaSound, MetaVoice, MP3, TrueMotionRT, MPEG4, MetaSound, MetaVoice, MP3, TrueMotionRT, ClearVideo, L&H, VDOWave, etc.ClearVideo, L&H, VDOWave, etc.
Format SDK ComponentFormat SDK ComponentUpgrading from the Audio SDKUpgrading from the Audio SDK
Jukebox applicationsJukebox applications Faster than real-time readFaster than real-time read Transfer content to portable devices Transfer content to portable devices
or storage media with WMDMor storage media with WMDM Live encoder applicationsLive encoder applications
Write-to-net via HTTP and MSBDWrite-to-net via HTTP and MSBD Support up to 50 direct connectionsSupport up to 50 direct connections Reports encoding statisticsReports encoding statistics
Format SDK ComponentFormat SDK ComponentUpgrading from the Audio SDKUpgrading from the Audio SDK
Video editing applicationsVideo editing applications Access to compressed and Access to compressed and
uncompressed bit-streamsuncompressed bit-streams Author single and multi-bit-rate video filesAuthor single and multi-bit-rate video files Author and edit script stream, scripts in Author and edit script stream, scripts in
header, markers in header, header header, markers in header, header attribute editingattribute editing
Auto-create index for seeking supportAuto-create index for seeking support Broader list of supported CODECs (MPEG4, Broader list of supported CODECs (MPEG4,
Windows Media Audio, ACELP.net)Windows Media Audio, ACELP.net) Author files larger than 2 gigabytesAuthor files larger than 2 gigabytes
Format SDK ComponentFormat SDK ComponentKeyingKeying
WMKey.LIB unlocks all SDK interfacesWMKey.LIB unlocks all SDK interfaces Vendor-specific keys in lib fileVendor-specific keys in lib file
ISV registers to download SDKISV registers to download SDK Server generates an individualized lib fileServer generates an individualized lib file Server emails lib to ISVServer emails lib to ISV ISV link lib file into appISV link lib file into app
CODEC keys are also in lib fileCODEC keys are also in lib file Allows for CODEC specific keyingAllows for CODEC specific keying Allows for new CODECs without changing the SDK Allows for new CODECs without changing the SDK
Key are passed down through middleware APIs Key are passed down through middleware APIs (e.g. DirectShow)(e.g. DirectShow)
ProfileProfile
Multi-bitrate video bands: declare frame Multi-bitrate video bands: declare frame size and bitrate for each bandsize and bitrate for each band
Persisted as XMLPersisted as XML SDK includes pre-defined system SDK includes pre-defined system
profiles in “windows\wmsysprf.Prx”profiles in “windows\wmsysprf.Prx” Take a look at profile settings… Take a look at profile settings…
Writing WM FileWriting WM File Create an Create an IWMWriterIWMWriter object by calling object by calling
WMCreateWriterWMCreateWriter Call Call SetProfileSetProfile to define the to define the
configuration. configuration. Set the outputs. Set the outputs.
Call Call SetOutputFilename SetOutputFilename on the writer. on the writer. Call Call GetInputCountGetInputCount and and GetInputPropsGetInputProps for for
each stream. Call each stream. Call WriteSampleWriteSample repeatedly, repeatedly, until finished. until finished.
Use Use AllocateSampleAllocateSample Call Call FlushFlush
Will write any buffered data as output, and Will write any buffered data as output, and update the header and index files.update the header and index files.
IWMWriterNetworkIWMWriterNetworkSinkOpenSinkOpen
Writing Windows Media FilesWriting Windows Media Files
Writer Writer ObjectObject
ApplicationApplication
WM SDKWM SDK
IWMWriterIWMWriterSetOutputFileNameSetOutputFileNameWriteSampleWriteSampleIWMProfileIWMProfile
AddStreamAddStream
Net SinkNet SinkProfile Profile ObjectObject
Reading a WM File Reading a WM File Create an Create an IWMReaderIWMReader object object Call Call OpenOpen with a URL (possibly a local with a URL (possibly a local
file name) file name) Asynchronous callAsynchronous call Wait for appropriate OnStatus calls to be sent to the Wait for appropriate OnStatus calls to be sent to the
callbackcallback Returns the WMT_OPENED status message to the Returns the WMT_OPENED status message to the
callbackcallback
Call Call GetOutputCountGetOutputCount and and GetOutputPropsGetOutputProps to get the format for to get the format for each outputeach output
Call Call StartStart Status messages and samples will then begin arriving Status messages and samples will then begin arriving
in the callback functionin the callback function
WM SDKWM SDK
Reading Windows Reading Windows Media FilesMedia Files
Reader ObjectReader Object
IWMReaderIWMReaderOpen(szURL)Open(szURL)Start(cnsStart)Start(cnsStart)
ApplicationApplication
IWMReaderCallbackIWMReaderCallbackOnSampleOnSampleOnStatusOnStatus
WM SDKWM SDK
Editing Windows Media FilesEditing Windows Media Files
Windows Media Format SDK allows Windows Media Format SDK allows editing without recompressionediting without recompression
Can obtain compressed data Can obtain compressed data from readerfrom reader
Can supply compressed data to writerCan supply compressed data to writer Compressed samples are handled Compressed samples are handled
separately from normal samples, on separately from normal samples, on advanced interfacesadvanced interfaces IWMWriterAdvancedIWMWriterAdvanced
Windows Media Rights ManagerWindows Media Rights ManagerDigital Rights Management (DRM)Digital Rights Management (DRM)
Allows copyright owners to encrypt content Allows copyright owners to encrypt content Users must acquire “license” to play Users must acquire “license” to play Content cannot be easily emailed, transferred, or Content cannot be easily emailed, transferred, or
copied with associated licensecopied with associated license Enables artists, publishers and distributors to Enables artists, publishers and distributors to
collect information and/or money collect information and/or money Designed to vastly reduce digital music piracyDesigned to vastly reduce digital music piracy Incorporated in Windows Media Player (WMP)Incorporated in Windows Media Player (WMP)
Also available in Window Media SDKAlso available in Window Media SDK Incorporated in many third-party playersIncorporated in many third-party players
Rights Manager Process FlowRights Manager Process Flow Building a streaming media businessBuilding a streaming media business
CreationCreation
DigitalDigitalContentContent
11 PackagerPackagerToolTool
22
DistributionDistribution
33
WindowsWindowsMedia Media ServerServer
WebWebServerServer
PackagedPackagedContentContent
44
PlaybackPlayback
55
WindowsWindowsMediaMediaPlayerPlayer
ClearingClearing
LicenseLicenseServerServer
66
LicenseLicense(Key)(Key)
77
Content ServerContent Server1.1. Encrypts contentEncrypts content
2.2. Allows downloadAllows download
License ServerLicense Server1.1. Authenticates clientAuthenticates client
2.2. Encrypts content keyEncrypts content key
3.3. Adds usage rulesAdds usage rules
4.4. Signs licenseSigns license
Consumer PCConsumer PC
Content (plaintext)Content (plaintext)
Content (encrypted)Content (encrypted)
License (key)License (key)
Shared secretShared secret WMPlayerWMPlayer
DRMDRM
License License storestore
Hardware Hardware bindingbinding
AuthenticationAuthentication
Parameter Parameter encryptionencryption
License requestLicense request
11
22
33
44
5566
77
Speaker/DisplaySpeaker/Display
License RightsLicense Rights
Right to play on a PCRight to play on a PC Expiration dateExpiration date Right to burn to redbook CDRight to burn to redbook CD Right to transfer to portable playerRight to transfer to portable player
One-time right to transfer to PDOne-time right to transfer to PD
Playing Protected ContentPlaying Protected Content
Sign license, return to MicrosoftSign license, return to Microsoft Receive wmdrmstub.LibReceive wmdrmstub.Lib #define SUPPORT_DRM#define SUPPORT_DRM Call WmCreateDrmReaderCall WmCreateDrmReader Handle WMT_NO_RIGHTS messageHandle WMT_NO_RIGHTS message
Playing Protected Content Playing Protected Content (Diagram)(Diagram)
WM SDKWM SDK
PlayerPlayer
CODECCODECDRMDRM
music.wmamusic.wma
music.licmusic.lic
WmDrmStub.libWmDrmStub.lib
PortablePortableDevice Device Service Service ProviderProvider
Windows Media SDKWindows Media SDKLicensing OverviewLicensing Overview Components of the OS, so there is no additional Components of the OS, so there is no additional
license feelicense fee Tools SDKTools SDK
Paper-copy redistribution licensePaper-copy redistribution license Redist component: wmtools.exe (4 Meg)Redist component: wmtools.exe (4 Meg)
Player SDKPlayer SDK Automated IEAK redistribution license processAutomated IEAK redistribution license process Redist component: mpfull.exe (4 Meg)Redist component: mpfull.exe (4 Meg)
Format SDKFormat SDK Automated license process for core functionalityAutomated license process for core functionality Paper-copy license for DRM functionalityPaper-copy license for DRM functionality Redist components: Redist components:
WMFAudioRedist.exe for Jukebox apps (0.8 Meg)WMFAudioRedist.exe for Jukebox apps (0.8 Meg) setupWMDM.exe for Jukebox apps (0.2 Meg)setupWMDM.exe for Jukebox apps (0.2 Meg) WMFRedist.exe for video editor or encoder apps (1 Meg)WMFRedist.exe for video editor or encoder apps (1 Meg)
Logo ProgramLogo ProgramPlays Windows Media™Plays Windows Media™
Use this logo if your product:Use this logo if your product: Integrates Windows Media technology to Integrates Windows Media technology to
reads (from net or local disk) Windows reads (from net or local disk) Windows Media files or renders Windows Media-Media files or renders Windows Media-based contentbased content
To request the logo license agreement, To request the logo license agreement, email us at: email us at: wmlogo@microsoft.comwmlogo@microsoft.com
Windows Media Windows Media Enabled SolutionsEnabled Solutions
Call To ActionCall To Action
Enable your existing product with Enable your existing product with Windows MediaWindows Media Audio/Video Players, Video Audio/Video Players, Video
editors, Gameseditors, Games Create new categories of applicationsCreate new categories of applications
Digital VCR, Conferencing Gateways, Digital VCR, Conferencing Gateways, Personal Broadcaster, Media IndexersPersonal Broadcaster, Media Indexers
Join our Partner ProgramsJoin our Partner Programs
Need More Information?Need More Information?
MSDN Developer CenterMSDN Developer Center http://msdn.microsoft.com/windowsmediahttp://msdn.microsoft.com/windowsmedia
JumpStartCDJumpStartCD Ongoing SeminarsOngoing Seminars
Recommended