Pumpkin Seed HQ
Saturday, 13. January 2007

Peter Gutmanns Cost Analysis of Microsoft Vista only scratches the surface of the whole problem of content capture and handling. A key problematic piece in this whole puzzle is a technology called DirectShow. Microsoft contracted Geraint Davies several years ago to create a component based media streaming system. It is really well designed, it has its kinks, but works sufficiently reliable. However it aged and seems to be abandoned now. Microsoft also disguised its existence with shuffling it around various times with a recent move out of DirectX into the Platform SDK. The developer library apparently also doesn't work with Visual Studio 2005 unless you are a black belt C/C++ programmer patching your way through the headers.

It seems strange to hide a good piece of software from the user and the developer one would think. But if you know the inner workings of it you realize it is not random nor is DirectShow a forgotten gem which needs to be rediscovered.

With DirectShow you can extend the pipeline with filters as you like. Projects like ffdshow demonstrate how you can actually use an excellent open source codec easily within the otherwise proprietary DirectShow pipeline. Another major problem is that you are able to intercept running pipelines with a tool called GraphEdit. This allows you to hook into a running pipeline (taking granted it will be announced in the so called ROT - but you can force it actually) and add filters and tee in order to see whats going on there.

So why I bring this up - it allows you to actually get raw access your preciouuuusss (sorry I couldn't resist) "premium" content you most probably paid with your first born and your own soul. DirectShow can't handle DRM and therefore publisher aren't really keen on it and desparetely waiting for Vista.

A glimpse in the documentation for the successor Windows Media Foundation reveals that it will solve all of these problems for Microsoftyou and you will never be bothered with the choice of having another copy or able to otherwise reuse your content.

A second glimpse, more deeply makes you aware that Microsoft doesn't want you to know how it works and how you can create components for it. And they also provide you a nice explanation (my comments in bold):

  • The pipeline in DirectShow tends to be static. Implementing dynamic graphs and major format changes is a complex task.Half Bogus: nice try, this only is true for the current state of DirectShow - if anybody would have spent a bit of time on it also could do dynamic graphs
  • The threading model for DirectShow filters is complex and requires a thorough understanding to implement correctly.Bogus: kids don't play with DirectShow - only grown up educated people who are willing to read a documentation
  • Filters cannot be used easily outside of a DirectShow graph, which ties them to the DirectShow pipeline. Utter bogus: Who expects a DirectShow component to be used outside of the filtergraph? Do you fly with your bicycle?
  • DirectShow does not readily support protected content.The only and real issue

Slightly lower in the list we have a better overview (from here with comments):

































































































































































































Feature
group
FeatureMedia
Foundation
DirectShow
Basic
functionality
Audio and video
rendering
YesYes
 Event
notification
YesYes

 Device
enumeration
NoYesCrippled (prevent abitrary
capture components to be selected)

 Component
enumeration
YesYes
 Synchronization
to reference clock
YesYes
 SeekingYesYes
 Improved stress
resilience
YesNoImprovement, however I
rarely seen an unresponsive DirectShow pipeline
Content
protection
Component
validation
YesNoCrippled - preventing
components like ffdshow within a Media Foundation graph
 Content
protection policy negotiation
YesNoCrippled - content
protection policies could be implemented in the filters
 Interoperability
between content protection technologies
YesNoCrippled - expect to sign
an NDA and several other documents before you will be able to hook into
the content protection - basically this is only for the big boys
 Protection
against kernel-mode and user-mode threats
YesNoImprovement: some weired
DirectShow components could bring down a whole system
 Component
revocation and renewal
YesNoCrippled - you can only
add components that behave - Microsoft will decide for you
 Video output
protection management
YesYes
Media tasksAudio captureNoYesCrippled: You dare to
capture audio? RIAA on your doorstep
 Video captureNoYesCrippled: You dare to
capture video? See audio and add the guys from Paramount and Co.
 Video editingNoYesCrippled: Mash Up with
your own funky software? Forget it! Windows Movie Maker Rulez!
 DVD playback and
navigation
NoYesCrippled - Evil DVDs -
that where the big boys loosing all their money
 MPEG-2 supportNoYesCrippled - Dead old tech
isn't it. Bloody DVDs
 ASF supportNoYesCrippled - Fortunately!
 TV technologiesNoYesCrippled - Who needs TV
anyway?
 Stream buffer
engine
NoYesCrippled - streaming video
probably later only with WMV
 Encoder APINoYesCrippled - cross coding
anybody?
Video rendererSubstream mixing
using per-pixel or planar alpha blending
YesYes
 Customizable
video composition
NoYesCrippled - you dare to
touch the preciouuus premium pixels?
 Support for
custom presenters
YesYes
 Windowless
rendering
YesYes
 Multimonitor
support
YesYes
 DXVAYesYes
 DirectDraw
exclusive mode
YesYes
 Backward
compatibility with existing applications
YesYes
 Accurate frame
stepping
YesYes
 Alpha blending
of image data
YesYes
 Glitch resilienceYesNoImprovement
 Enhanced video
fidelity
YesNoImprovement (Precious!)
 Enhanced content
protection robustness
YesNoHar har har!
 Standalone useYesNoRiding bicycles through
the air
 Standalone
mixing component
YesNodito
Transforms (MFT
or DMO)
Synchronous data
processing
YesYesImprovement
 Simple
programming model
YesYes
 Standalone useYesYes
 Multiple inputs
and multiple outputs
YesYes
 Dynamic number
of streams
YesNoImprovement
 Access to
sample-level metadata
YesNoImprovement
 In-place
processing
YesYes
 Dynamic format
changes
YesNoImprovement
 Quality
adjustment
YesNoImprovement (Precious on
VGA aint no good)
 Rate change YesNoImprovement

... comment

force register with ROT?

Thanks for your interesting article. I have done a small amount of directshow programming but would consider myself a beginner (haven't yet started building my own filters just link other filters up), is there anywhere (forum etc) you can recommend that I can learn more about directshow?

Specifically I am interested in forcing applications to register with the ROT so I can look at them within graphedit and reverse engineering filters so I can use interfaces without need of filter documentation which may not be available to me ;-)

Many thanks,

Seb

... Link

Well, I am by no means a guru as well but we needed to get some old DS filter stuff going. Basically you need to wrap various DirectShow DLLs in order to intercept the loading into the filtergraph. I am not covering here how to do it but I can tell you it is pretty easy and certainly not rocket science.

... link


... Comment

Online for 4734 days
Last update: 6/8/11 1:03 PM
status
Youre not logged in ... Login

recent updates
Ich bin ja auch manchmal
in Wien, da geht sich ja sicher was aus...
by retrakker (6/8/11 1:03 PM)
hätten sie mal eher was
gesagt. wir hätten uns im winter bei den suicide...
by kris (6/7/11 7:16 PM)
Pas(s)t! As some people asked
- last year July I pitched the tent of my...
by retrakker (6/7/11 9:46 AM)
RoundBox Webmail If your workplace
or personal webmail sucks - try RoundBox.
by retrakker (10/7/09 12:10 PM)
New CX Economy Seats Well,
I was forced to be mostly on OneWorld for the...
by retrakker (9/21/09 1:32 AM)
Na Herr Doktor ... Zum
Glück darf ich mit meinem PhD in Deutschland (und nur...
by retrakker (8/23/09 9:00 PM)
Towards a consistent Linux ABI
The Linux ABI Checker seems like a great tool. Ever...
by retrakker (8/21/09 11:44 AM)
Built-In Slowification people don't realize
how hindering all these automatic and uncontrollable functions in devices...
by retrakker (8/20/09 8:32 AM)
SIGPIPE 13 by Allan Odgaard
of TextMate While working on the successor to Textmate 1.5...
by retrakker (8/19/09 9:02 PM)
not so sure... ...about the
link you have there - don't you want to link...
by hofmann9 (8/18/09 8:47 PM)

RSS Feed

Made with Antville
Helma Object Publisher
Site Meter