public VideoChannel (AVAssetReaderOutput readerOutput, AVAssetWriterInput writerInput, IVideoTransformer transformer)
			: base(readerOutput, writerInput)
		{
			if (transformer == null)
				throw new ArgumentNullException ("transformer");

			this.transformer = transformer;

			var adaptorAttrs = new CVPixelBufferAttributes {
				PixelFormatType = CVPixelFormatType.CV32BGRA
			};
			adaptor = new AVAssetWriterInputPixelBufferAdaptor (WriterInput, adaptorAttrs);
		}
Beispiel #2
0
        public VideoChannel(AVAssetReaderOutput readerOutput, AVAssetWriterInput writerInput, IVideoTransformer transformer)
            : base(readerOutput, writerInput)
        {
            if (transformer == null)
            {
                throw new ArgumentNullException("transformer");
            }

            this.transformer = transformer;

            var adaptorAttrs = new CVPixelBufferAttributes {
                PixelFormatType = CVPixelFormatType.CV32BGRA
            };

            adaptor = new AVAssetWriterInputPixelBufferAdaptor(WriterInput, adaptorAttrs);
        }
		public ReadWriteSampleBufferChannel (AVAssetReaderOutput localAssetReaderOutput,
			AVAssetWriterInput localAssetWriterInput,
			bool useAdaptor)
		{
			_assetReaderOutput = localAssetReaderOutput;
			_assetWriterInput = localAssetWriterInput;
			_useAdaptor = useAdaptor;

			if (_useAdaptor) {
				var adaptorAttrs = new CVPixelBufferAttributes {
					PixelFormatType = CVPixelFormatType.CV32BGRA
				};
				_adaptor = AVAssetWriterInputPixelBufferAdaptor.FromInput (localAssetWriterInput, adaptorAttrs.Dictionary);
			}

			_serializationQueue = new DispatchQueue ("ReadWriteSampleBufferChannel queue");
		}
Beispiel #4
0
        public ReadWriteSampleBufferChannel(AVAssetReaderOutput localAssetReaderOutput,
                                            AVAssetWriterInput localAssetWriterInput,
                                            bool useAdaptor)
        {
            _assetReaderOutput = localAssetReaderOutput;
            _assetWriterInput  = localAssetWriterInput;
            _useAdaptor        = useAdaptor;

            if (_useAdaptor)
            {
                var adaptorAttrs = new CVPixelBufferAttributes {
                    PixelFormatType = CVPixelFormatType.CV32BGRA
                };
                _adaptor = AVAssetWriterInputPixelBufferAdaptor.FromInput(localAssetWriterInput, adaptorAttrs.Dictionary);
            }

            _serializationQueue = new DispatchQueue("ReadWriteSampleBufferChannel queue");
        }