6

I have a custom hardware device sending a video stream.

How can make this stream available to a QuickTime application ?

Long story: On Windows, I create a DirectShow filter, so any DirectShow-compatible application can stream from my device. I'd like to do the same on Mac OS X. I guess QuickTime is the way to go, but I can't find the accurate answer on the apple developer web site.

Peter Hosey
  • 95,783
  • 15
  • 211
  • 370
Julien
  • 1,181
  • 10
  • 31
  • I believe what you're looking for is the CoreMedia.framework introduced in 10.7 Lion and iOS4. More details here along with API and samples - http://developer.apple.com/library/IOs/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/04_MediaCapture.html#//apple_ref/doc/uid/TP40010188-CH5-SW2. – Saurabh G Dec 29 '11 at 13:06
  • 1
    @SaurabhG: Which parts of that are relevant to someone implementing support for a device, rather than application usage of a device? – Peter Hosey Dec 29 '11 at 13:17
  • And the corresponding guide for OSX - http://developer.apple.com/library/mac/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/00_Introduction.html#//apple_ref/doc/uid/TP40010188-CH1-SW3 Please comment if this helps! – Saurabh G Dec 29 '11 at 13:19
  • @PeterHosey: I believe AVCaptureDevice class (http://developer.apple.com/library/mac/#documentation/AVFoundation/Reference/AVCaptureDevice_Class/Reference/Reference.html#//apple_ref/occ/cl/AVCaptureDevice) is what someone would use to enumerate (and configure) available AV capture devices in an application. I wouldn't think the specs for implementing support for a device on a lower level would be out in the open, anyway. – Saurabh G Dec 29 '11 at 13:21
  • 1
    @SaurabhG: This question is about implementing support for a device. – Peter Hosey Dec 29 '11 at 13:31
  • 1
    @PeterHosey: That does make it somewhat dicey to answer the question, since there really is no good documentation on writing device drivers for the new (or even old, QTKit) AVFoundation framework. That said, I would suggest looking around in the CoreMediaIO framework. There's absolutely zero public documentation, though. If you have a Mac developer program subscription, you can find some sample code for writing a Lion user space video capture driver using CoreMediaIO.framework in this forum thread - https://devforums.apple.com/message/530074 At this point, I think it's best to contact ADC. – Saurabh G Dec 29 '11 at 15:16
  • Another idea is to do an tool on /System/Library/Frameworks/CoreMediaIO.framework/Versions/Current and see if it leads to something interesting. – Saurabh G Dec 29 '11 at 15:23

2 Answers2

4

With Mac OS 10.7 Apple made the CoreMediaIO.framework public.
CoreMediaIO is a device abstraction layer (DAL) for multimedia hardware. It replaces the traditional QuickTime VDIG component API.
There is a small section about this framework in the "Media Layer" chapter of the Mac OS X Technology Overview.

Unfortunately CoreMediaIO isn't showing up in Apple's documentation yet, but it has some very detailed header files.
They are located in:

/System/Library/Frameworks/CoreMediaIO.framework/Headers

CMIOHardware seems to be a good starting point (from the "Overview" section in the header):

The CoreMediaIO device abstraction layer (DAL) provides an abstraction through which applications can access media hardware. To do this, the DAL provides a small set of objects that provide access to the various pieces of the system. The base class for all CoreMediaIO objects is the class CMIOObject. Other important classes include CMIOSystemObject, CMIODevice, CMIOStream, and CMIOControl.


If you have to support older versions of OS X, you could also take a look at what the Developer Library has to offer.
VDIG Components are deprecated and 32bit-only.

Thomas Zoechling
  • 34,177
  • 3
  • 81
  • 112
0

hope you check out HTTP live streaming

Allen
  • 6,505
  • 16
  • 19
  • How does that help add support in QuickTime for a new kind of video input device? – Peter Hosey Jan 01 '12 at 21:33
  • Hey, Peter, when you mention video stream, is the device send out stream over network? or it's just a capture device? – Allen Jan 01 '12 at 21:49
  • I didn't mention video streams. As far as I can tell, the question is asking about adding support for a custom device that's meant to be plugged in locally, not a stream source on the network. Even if it is networked, that doesn't necessarily mean it's an HTTP server or that the questioner can modify its content to support HTTP Live Streaming. – Peter Hosey Jan 01 '12 at 22:13
  • in the original question, it is a device sending a video stream. Peter, what is your question? without knowing what kind data source it is, how could we determine the solution? if the device is plugged in locally, then is is a device driver issue, better check out macam project at http://webcam-osx.sourceforge.net/ – Allen Jan 01 '12 at 22:23
  • You're asking questions of me that it would be better to ask of the questioner. And yes, I know the question says “device sending a video stream”, but it doesn't say it's sending it over a network and other elements of the question imply that it is not necessarily a stream in the network sense. – Peter Hosey Jan 01 '12 at 22:33
  • Hope we understand video stream correctly. http://en.wikipedia.org/wiki/Streaming_media – Allen Jan 01 '12 at 22:49
  • Yes, that is indeed one sense of the word “stream”. I don't think it's the one the questioner was using. – Peter Hosey Jan 01 '12 at 22:54