objective c - AVCaptureScreenInput and kCGWindowListOptionOnScreenBelowWindow -


i doing screen capture avcapturescreeninput. app has window configuration options.

i want record screen not record window in recorder application. quicktime if screen recording, example.

i think found it, i'm not sure how or if can used together.

kcgwindowlistoptiononscreenbelowwindow found in cgwindow.h in core graphics framework. avcapturescreeninput part of avcaptureinput.h in avfoundation framework.

if taking single screenshot, can pass kcgwindowlistoptiononscreenbelowwindow , windowid windows below window's level captured. can accomplish goal setting capture app's window high level if works.

i'm relatively new objective-c ands not clear me if possible use kcgwindowlistoptiononscreenbelowwindow avcapturescreeninput. if is, provide tips on resulting code needs like?

how access pixel buffer of nswindow in osx?

as far know, there no way exclude specific windows os x's built-in display recording apis:

  • avfoundation's avcapturescreeninput (10.7+)
  • core graphics cgdisplaystream (10.8+)

both above methods seem grab screen content after compositing, when final screen output has been composited together.
excluding recording window require use api allows composite windows , later append custom frames avassetwriterinput.

quartz window services allow take snapshots of single windows via cgwindowlistcreateimage. sample project shows how composite multiple window shots son of grab.

after retrieving stitched shot, you'd have append avassetwriterinput. avfoundation provides convenience class append custom pixel buffers movie: avassetwriterinputpixelbufferadaptor.

especially avfoundation part become frustrating , might run performance problems compositing slower os x's built-in compositor, overall should possible to achieve want.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -