views:

14

answers:

1

I'm reading Apple's documentation on using QTKit to capture streaming audio and video from input sources. I read that the central class QTCaptureSession handles the input and sends it to every possible output (QTCaptureOutput). The documentation lists six subclasses of QTCaptureOutput (e.g., QTCaptureMovieFileOutput).

I would like to create a subclass of QTCaptureOutput to write to an NSSocket so I could send the video stream over to another machine.

Any ideas would be appreciated.

A: 

QTCaptureOutput does not strike me as a class designed to be subclassed outside of QTKit. Instead, you can try dumping the data to a local domain socket in the file system using a QTCaptureFileOutput object, and simultaneously pulling the data from that local domain socket and sending it over to the remote machine.

Jeremy W. Sherman
That's it! Thanks. You said QTCaptureFileOutput, but could I use QTCaptureVideoFileOutput? (i'm only interested in the video)
gvalero87
I don't see why you couldn't.
Jeremy W. Sherman
Now that I'm reading your answer I see that you say to use local socket (using QTCaptureFileOutput) and then pulling data from that socket and sending to the remote machine. Couldn't I just use QTCaptureFileOutput to dump data on a remote socket?
gvalero87
If you can convince `QTCaptureFileOutput` that the remote socket is, in fact, a file. Unfortunately, it expects a file URL, not an `NSOutputStream`.
Jeremy W. Sherman