Example #1
0
        public void SetStereoscopicMode(int channel, StereoScopicMode mode)
        {
            using (MMAL_PARAMETER_STEREOSCOPIC_MODE_T_Wrapper stereo = new MMAL_PARAMETER_STEREOSCOPIC_MODE_T_Wrapper())
            {
                stereo.hdr.id = MMALParameterId.MMAL_PARAMETER_STEREOSCOPIC_MODE;
                stereo.mode   = mode.Mode;
                if (mode.Mode != MMAL_STEREOSCOPIC_MODE_T.MMAL_STEREOSCOPIC_MODE_NONE)
                {
                    stereo.decimate  = mode.Decimate;
                    stereo.swap_eyes = mode.SwapEyes;
                }

                MMAL_STATUS_T status = NativeMethods.PortParameterSet(this.HandleWrapper.output[channel], stereo);
                //MMAL_STATUS_T status = NativeMethods.PortParameterSet(this.HandleWrapper.GetOutput()[channel], stereo);
                if (status != MMAL_STATUS_T.MMAL_SUCCESS)
                {
                    throw new MMALException(status);
                }
            }
        }
Example #2
0
 public void SetStereoscopicMode(StereoScopicMode mode)
 {
     this.SetStereoscopicMode(0, mode);
     this.SetStereoscopicMode(1, mode);
     this.SetStereoscopicMode(2, mode);
 }