private void ProcessFormatChangedEvent(MMALBufferImpl buffer, int outputPort = 0) { MMALLog.Logger.Info("Received MMAL_EVENT_FORMAT_CHANGED event"); var ev = MMALEventFormat.GetEventFormat(buffer); MMALLog.Logger.Info("-- Event format changed from -- "); this.LogFormat(new MMALEventFormat(this.Outputs[outputPort].Format), this.Outputs[outputPort]); MMALLog.Logger.Info("-- To -- "); this.LogFormat(ev, null); buffer.Release(); this.Outputs[outputPort].DisablePort(); while (this.Outputs[outputPort].BufferPool.Queue.QueueLength() < this.Outputs[outputPort].BufferPool.HeadersNum) { MMALLog.Logger.Debug("Queue length less than buffer pool num"); MMALLog.Logger.Debug("Getting buffer via Queue.Wait"); var tempBuf = WorkingQueue.Wait(); tempBuf.Release(); } this.Outputs[outputPort].BufferPool.Dispose(); this.Outputs[outputPort].FullCopy(ev); this.ConfigureOutputPortWithoutInit(0, this.Outputs[outputPort].EncodingType); this.Outputs[outputPort].EnableOutputPort(false); }
private void ProcessFormatChangedEvent(IBuffer buffer) { MMALLog.Logger.LogInformation("Received MMAL_EVENT_FORMAT_CHANGED event"); var ev = MMALEventFormat.GetEventFormat(buffer); MMALLog.Logger.LogInformation("-- Event format changed from -- "); this.LogFormat(new MMALEventFormat(this.Format), this); MMALLog.Logger.LogInformation("-- To -- "); this.LogFormat(ev, null); MMALLog.Logger.LogDebug("Finished processing MMAL_EVENT_FORMAT_CHANGED event"); }