Beispiel #1
0
        public bool Start(deviceio.Profile profile)
        {
            if (isConnected == true && isStreaming == false)
            {
                mediaDevice.ONVIF.CurrentMediaProfile = profile;
                presenter = new PresenterThread(mediaDevice);

                presenter.VideoFrameReadyEventHandler+=new EventHandler<VideoFrameRecievedEventArgs>(presenter_VideoFrameReadyEventHandler);
                presenter.AudioFrameReadyEventHandler+=new EventHandler<AudioFrameRecievedEventArgs>(presenter_AudioFrameReadyEventHandler);

                isStreaming = mediaDevice.Start();

                presenter.Start();

                //mediaDevice.Decoder.AudioFrameRecievedEventHandler+=new EventHandler<AudioFrameRecievedEventArgs>(Decoder_AudioFrameRecievedEventHandler);
                //mediaDevice.Decoder.VideoFrameRecievedEventHandler+=new EventHandler<VideoFrameRecievedEventArgs>(Decoder_VideoFrameRecievedEventHandler);

                //mediaDevice.AVProcessor.ShowVideo += AVProcessor_ShowVideo;
                //mediaDevice.AVProcessor.PlayAudio += AVProcessor_PlayAudio;

                OnCaptureStarted();
            }

            return isStreaming;
        }
 public MediaClientProfilesForm(deviceio.Profile[] profiles)
 {
     mediaProfiles = profiles;
     InitializeComponent();
     MediaProfilesTreeViewInit();
 }
Beispiel #3
0
        private CodecType GetVideoCodecType(deviceio.VideoEncoding type)
        {
            switch (CurrentMediaProfile.VideoEncoderConfiguration.Encoding)
            {
                case deviceio.VideoEncoding.JPEG:
                    return CodecType.JPEG;

                case deviceio.VideoEncoding.H264:
                    return CodecType.H264;

                case deviceio.VideoEncoding.MPEG4:
                    return CodecType.MPEG4;

                default:
                    return CodecType.JPEG;
            }
        }