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

Function startWithConsumer

main.go:383–402  ·  view source on GitHub ↗
(consumer screencapture.CmSampleBufConsumer, device screencapture.IosDevice, audioOnly bool)

Source from the content-addressed store, hash-verified

381}
382
383func startWithConsumer(consumer screencapture.CmSampleBufConsumer, device screencapture.IosDevice, audioOnly bool) {
384 var err error
385 device, err = screencapture.EnableQTConfig(device)
386 if err != nil {
387 printErrJSON(err, "Error enabling QT config")
388 return
389 }
390
391 adapter := screencapture.UsbAdapter{}
392 stopSignal := make(chan interface{})
393 waitForSigInt(stopSignal)
394
395 mp := screencapture.NewMessageProcessor(&adapter, stopSignal, consumer, audioOnly)
396
397 err = adapter.StartReading(device, &mp, stopSignal)
398 consumer.Stop()
399 if err != nil {
400 printErrJSON(err, "failed connecting to usb")
401 }
402}
403
404func startWithConsumerDump(consumer screencapture.CmSampleBufConsumer, device screencapture.IosDevice, dumpPath string) {
405 var err error

Callers 6

recordAudioGstFunction · 0.85
runDiagnosticsFunction · 0.85
recordAudioWavFunction · 0.85
startGStreamerFunction · 0.85
recordFunction · 0.85

Calls 6

StartReadingMethod · 0.95
EnableQTConfigFunction · 0.92
NewMessageProcessorFunction · 0.92
printErrJSONFunction · 0.85
waitForSigIntFunction · 0.85
StopMethod · 0.65

Tested by

no test coverage detected