6

I need to write what I think is a display driver for OS X. It's like those "Use your iPad as a second monitor!" apps, but I need to write the OS X software that will register another display with OS X, and give me the pixel data so I can use it for my various needs.

Where do I get started? I've read about IOKit, but I don't quite understand what I need to do to tell OS X that I'm a monitor, and then what the pixel data is going to look like.

A few links to the classes/headers/etc that I'm going to have to read through would be fine as well, but if anyone has done this and knows the particulars it would be very helpful.

Also, will this have to be a kernel extension, or is it possible to write a userspace IOKit driver that gives a second monitor to OS X?

Lastly, to be clear, I just want the pixel data that would be sent to a second monitor (either mirrored or extended) - I'm not actually attaching a monitor on, or an I/O device.

Adam Davis
  • 91,931
  • 60
  • 264
  • 330
  • How the device will be connected to the Mac? – CharlesB Apr 29 '11 at 17:10
  • 1
    @Charles For the purpose of this question, let's assume there is no device, and I'm writing the data to a TCP/IP port, or the disk. In other words, where the display data goes is not important - what's important is how do I register a monitor with OS X and how does OS X give me the display data. – Adam Davis Apr 29 '11 at 17:18
  • Have you considered using the built-in VNC server support that already allows the display to be mirrored? – Ned Deily Apr 29 '11 at 18:59
  • @Ned I need higher performance than VNC can provide. – Adam Davis Apr 29 '11 at 19:07

2 Answers2

2

you could take a look at: http://code.google.com/p/ioproxyvideofamily/

maybe as a starting point.

Grady Player
  • 14,399
  • 2
  • 48
  • 76
2

CoreGraphics. Display Services

and you probably want to look at the Quartz Display Services Reference

Cœur
  • 37,241
  • 25
  • 195
  • 267
kent
  • 6,286
  • 4
  • 27
  • 32