func configurateForRecording() { for outputs in captureSession.outputs { if let videoOutput = outputs as? AVCaptureVideoDataOutput {// adding self as delegate and store rtc as externalSampleBufferDelegate
externalSampleBufferDelegate = videoOutput.sampleBufferDelegate; videoOutput.setSampleBufferDelegate(self, queue: recordQueue) } } }
func captureOutput(captureOutput: AVCaptureOutput!, didOutputSampleBuffer sampleBuffer: CMSampleBuffer!, fromConnection connection: AVCaptureConnection!) { // write here with AVAssetWriter to File writeSampleBuffer(sampleBuffer, type: AVMediaTypeVideo)
// send sampelBuffer to RTC externalSampleBufferDelegate?.captureOutput!(captureOutput, didOutputSampleBuffer: sampleBuffer, fromConnection: connection) }externalSampleBufferDelegate ?
&
From where should exactly get this captureSession, I am using appRTC lib.
& while creating localVidoeTrackForBackCamera like this -
_recordCaptureSession = [[RTCAVFoundationVideoSource alloc] initWithFactory:_factory constraints:mediaConstraints];
_recordCaptureSession.useBackCamera = YES;
Please tell me where I am wrong I am able to export the video with this too but the local preview of my device gets freezes on remote end ?--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/fd5910e3-890f-4bbe-8d62-89ba3b6a3224%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/64276acb-e5c5-453c-9a77-5f92ef1dedf1n%40googlegroups.com.