Пример #1
0
        public void Connect(ArchiveEncoderOutputSlot source, ArchiveEncoderInputSlot target)
        {
            if (source == null)
                throw new ArgumentNullException(nameof(source));

            if (target == null)
                throw new ArgumentNullException(nameof(target));

            if (source.Definition != this)
                throw new ArgumentException("Data source belongs to a different encoder definition.", nameof(source));

            if (target.Definition != this)
                throw new ArgumentException("Data target belongs to a different encoder definition.", nameof(target));

            if (source.IsConnected)
                throw new ArgumentException("Data source is already connected.", nameof(source));

            if (target.IsConnected)
                throw new ArgumentException("Data target is already connected.", nameof(target));

            CheckComplete();

            source.ConnectTo(target);
            target.ConnectTo(source);
        }
Пример #2
0
        internal EncoderNodeDefinition(EncoderDefinition definition, int index, EncoderSettings settings)
        {
            mDefinition = definition;
            mIndex      = index;
            mSettings   = settings;

            mInputSlots = new ArchiveEncoderInputSlot[settings.GetInputSlots()];
            for (int i = 0; i < mInputSlots.Length; i++)
            {
                mInputSlots[i] = new ArchiveEncoderInputSlot(this, i);
            }

            mOutputSlots = new ArchiveEncoderOutputSlot[settings.GetOutputSlots()];
            for (int i = 0; i < mOutputSlots.Length; i++)
            {
                mOutputSlots[i] = new ArchiveEncoderOutputSlot(this, i);
            }
        }
Пример #3
0
        public void Connect(ArchiveEncoderOutputSlot source, ArchiveEncoderInputSlot target)
        {
            if (source == null)
            {
                throw new ArgumentNullException(nameof(source));
            }

            if (target == null)
            {
                throw new ArgumentNullException(nameof(target));
            }

            if (source.Definition != this)
            {
                throw new ArgumentException("Data source belongs to a different encoder definition.", nameof(source));
            }

            if (target.Definition != this)
            {
                throw new ArgumentException("Data target belongs to a different encoder definition.", nameof(target));
            }

            if (source.IsConnected)
            {
                throw new ArgumentException("Data source is already connected.", nameof(source));
            }

            if (target.IsConnected)
            {
                throw new ArgumentException("Data target is already connected.", nameof(target));
            }

            CheckComplete();

            source.ConnectTo(target);
            target.ConnectTo(source);
        }
Пример #4
0
 internal void ConnectTo(ArchiveEncoderOutputSlot source)
 {
     mSource = source;
 }
Пример #5
0
 public EncoderDefinition()
 {
     mContent  = new ArchiveEncoderOutputSlot(this);
     mEncoders = new List <EncoderNodeDefinition>();
     mStorage  = new List <ArchiveEncoderInputSlot>();
 }
Пример #6
0
 internal void ConnectTo(ArchiveEncoderOutputSlot source)
 {
     mSource = source;
 }
Пример #7
0
        internal EncoderNodeDefinition(EncoderDefinition definition, int index, EncoderSettings settings)
        {
            mDefinition = definition;
            mIndex = index;
            mSettings = settings;

            mInputSlots = new ArchiveEncoderInputSlot[settings.GetInputSlots()];
            for (int i = 0; i < mInputSlots.Length; i++)
                mInputSlots[i] = new ArchiveEncoderInputSlot(this, i);

            mOutputSlots = new ArchiveEncoderOutputSlot[settings.GetOutputSlots()];
            for (int i = 0; i < mOutputSlots.Length; i++)
                mOutputSlots[i] = new ArchiveEncoderOutputSlot(this, i);
        }
Пример #8
0
 public EncoderDefinition()
 {
     mContent = new ArchiveEncoderOutputSlot(this);
     mEncoders = new List<EncoderNodeDefinition>();
     mStorage = new List<ArchiveEncoderInputSlot>();
 }