Пример #1
0
        private void ProcessCommands(GpuContext gpu, ChCommand[] commands)
        {
            int methodOffset = 0;

            foreach (ChCommand command in commands)
            {
                switch (command.MethodOffset)
                {
                case MethSetMethod: methodOffset = command.Arguments[0]; break;

                case MethSetData:
                {
                    if (command.ClassId == ChClassId.NvDec)
                    {
                        _videoDecoder.Process(gpu, methodOffset, command.Arguments);
                    }
                    else if (command.ClassId == ChClassId.GraphicsVic)
                    {
                        _videoImageComposer.Process(gpu, methodOffset, command.Arguments);
                    }

                    break;
                }
                }
            }
        }