Ejemplo n.º 1
0
        public void ProcessVideo()
        {
            while (true)
            {
                while (videoBuffer.IsComplete == false)
                {
                    curVideoItem = videoBuffer.Get();

                    if (curVideoItem != null)
                    {
                        using (Bitmap bitmap = new Bitmap(inVideoParams.Width, inVideoParams.Height, curVideoItem.Size, PixelFormat.Format24bppRgb, curVideoItem.Data))
                        {
                            OnShowVideo(bitmap);
                        }
                    }

                    if (Break == true)
                    {
                        break;
                    }
                }
                Thread.Sleep(33);
                //Thread.Yield();
                if (Break == true)
                {
                    break;
                }
            }
        }
Ejemplo n.º 2
0
        //public void ProcessAudio()
        //{
        //    while (true)
        //    {
        //        //audioEvent.WaitOne();

        //        if (/*(audioBuffer.Count == 0) && */(audioBuffer.IsComplete == true))
        //            break;
        //        curAudioItem = audioBuffer.Get();
        //        if (curAudioItem != null)//audioBuffer.TryGet(out curAudioItem) == true)
        //        {
        //            //lock (ffmpegMedia)
        //            //{
        //            //    ffmpegMedia.WriteAudioDataToFile(curAudioItem.Data, curAudioItem.Size, curAudioItem.Time, 0);
        //            //}

        //            OnPlayAudio(curAudioItem.Data, curAudioItem.Size);
        //            //videoForm.PlayAudio(curAudioItem.Data, curAudioItem.Size);

        //        }
        //    }

        //}

        public void ProcessAudio()
        {
            while (true)
            {
                while (audioBuffer.IsComplete == false)
                {
                    curAudioItem = audioBuffer.Get();

                    if (curAudioItem != null)
                    {
                        OnPlayAudio(curAudioItem.Data, curAudioItem.Size);
                    }

                    if (Break == true)
                    {
                        break;
                    }
                }

                Thread.Sleep(33);
                //Thread.Yield();

                if (Break == true)
                {
                    break;
                }
            }
        }
Ejemplo n.º 3
0
        public void ProcessVideo()
        {
            while (true)
            {
                while (videoBuffer.IsComplete == false)
                {
                    curVideoItem = videoBuffer.Get();

                    if (curVideoItem != null)
                    {
                        using (Bitmap bitmap = new Bitmap(inVideoParams.Width, inVideoParams.Height, curVideoItem.Size, PixelFormat.Format24bppRgb, curVideoItem.Data))
                        {
                            OnShowVideo(bitmap);
                        }
                    }

                    if (Break == true) break;
                }
                Thread.Sleep(33);
                //Thread.Yield();
                if (Break == true) break;
            }
        }
Ejemplo n.º 4
0
        //public void ProcessAudio()
        //{
        //    while (true)
        //    {
        //        //audioEvent.WaitOne();
        //        if (/*(audioBuffer.Count == 0) && */(audioBuffer.IsComplete == true))
        //            break;
        //        curAudioItem = audioBuffer.Get();
        //        if (curAudioItem != null)//audioBuffer.TryGet(out curAudioItem) == true)
        //        {
        //            //lock (ffmpegMedia)
        //            //{
        //            //    ffmpegMedia.WriteAudioDataToFile(curAudioItem.Data, curAudioItem.Size, curAudioItem.Time, 0);
        //            //}
        //            OnPlayAudio(curAudioItem.Data, curAudioItem.Size);
        //            //videoForm.PlayAudio(curAudioItem.Data, curAudioItem.Size);
        //        }
        //    }
        //}
        public void ProcessAudio()
        {
            while (true)
            {
                while (audioBuffer.IsComplete == false)
                {
                    curAudioItem = audioBuffer.Get();

                    if (curAudioItem != null)
                    {
                        OnPlayAudio(curAudioItem.Data, curAudioItem.Size);
                    }

                    if (Break == true) break;
                }

                Thread.Sleep(33);
                //Thread.Yield();

                if (Break == true) break;
            }
        }