MCPcopy Create free account
hub / github.com/danielpaulus/quicktime_video_hack / NewMessageProcessor

Function NewMessageProcessor

screencapture/messageprocessor.go:38–41  ·  view source on GitHub ↗

NewMessageProcessor creates a new MessageProcessor that will write answers to the given UsbWriter, forward extracted CMSampleBuffers to the CMSampleBufConsumer and wait for the stopSignal.

(usbWriter UsbWriter, stopSignal chan interface{}, consumer CmSampleBufConsumer, audioOnly bool)

Source from the content-addressed store, hash-verified

36//NewMessageProcessor creates a new MessageProcessor that will write answers to the given UsbWriter,
37// forward extracted CMSampleBuffers to the CMSampleBufConsumer and wait for the stopSignal.
38func NewMessageProcessor(usbWriter UsbWriter, stopSignal chan interface{}, consumer CmSampleBufConsumer, audioOnly bool) MessageProcessor {
39 clockBuilder := func(ID uint64) coremedia.CMClock { return coremedia.NewCMClockWithHostTime(ID) }
40 return NewMessageProcessorWithClockBuilder(usbWriter, stopSignal, consumer, clockBuilder, audioOnly)
41}
42
43//NewMessageProcessorWithClockBuilder lets you inject a clockBuilder for the sake of testability.
44func NewMessageProcessorWithClockBuilder(usbWriter UsbWriter, stopSignal chan interface{}, consumer CmSampleBufConsumer, clockBuilder func(uint64) coremedia.CMClock, audioOnly bool) MessageProcessor {

Calls 2

NewCMClockWithHostTimeFunction · 0.92