Exemplo n.º 1
0
            public void Close()
            {
                if (FileDecoder == null)
                {
                    return;
                }

                FileDecoder.Dispose();
                FileDecoder = null;
            }
Exemplo n.º 2
0
            void PlayFile(string file)
            {
                lock (singleton)
                {
                    if (AllFilesDone)
                    {
                        return;
                    }

                    try
                    {
                        // is this a directory of jpegs or a video file?
                        if (Directory.Exists(file))
                        {
                            // this is a directory of jpegs
                            FileDecoder = new PlayJpegsInBatchMode(AppData, Panel, (Form)AppData.MoviePlayerParentForm, Chan);
                        }
                        else
                        {
                            FileDecoder = new DSFileDecoder(AppData, Panel, (Form)AppData.MoviePlayerParentForm, Chan);
                        }

                        FileDecoder.OnNewFrame       += new FrameGeneratorLib.OnNewFrameEvent(fileDecoder_OnNewFrame);
                        FileDecoder.OnEndOfFileEvent += new FrameGeneratorLib.OnEndOfFile(fileDecoder_OnEndOfFileEvent);
                        FileDecoder.Start(file);

                        if (OnStatusUpdate != null)
                        {
                            OnStatusUpdate(file, PLAY_STATUS_UPDATE.PLAYING, null);
                        }

                        Playing = true;
                    }
                    catch (Exception ex) { ((ErrorLog)AppData.Logger).Trace(ex, ErrorLog.LOG_TYPE.FATAL); }
                }
            }
Exemplo n.º 3
0
            void PlayFile(string file)
            {
                lock (singleton)
                {
                    if (AllFilesDone) return;

                    try
                    {

                        // is this a directory of jpegs or a video file?
                        if (Directory.Exists(file))
                        {
                            // this is a directory of jpegs
                            FileDecoder = new PlayJpegsInBatchMode(AppData, Panel, (Form)AppData.MoviePlayerParentForm, Chan);
                        }
                        else
                        {
                            FileDecoder = new DSFileDecoder(AppData, Panel, (Form)AppData.MoviePlayerParentForm, Chan);
                        }

                        FileDecoder.OnNewFrame += new FrameGeneratorLib.OnNewFrameEvent(fileDecoder_OnNewFrame);
                        FileDecoder.OnEndOfFileEvent += new FrameGeneratorLib.OnEndOfFile(fileDecoder_OnEndOfFileEvent);
                        FileDecoder.Start(file);

                        if (OnStatusUpdate != null)
                            OnStatusUpdate(file, PLAY_STATUS_UPDATE.PLAYING, null);

                        Playing = true;
                    }
                    catch (Exception ex) { ((ErrorLog)AppData.Logger).Trace(ex, ErrorLog.LOG_TYPE.FATAL); }
                }
            }
Exemplo n.º 4
0
            public void Close()
            {
                if (FileDecoder == null) return;

                FileDecoder.Dispose();
                FileDecoder = null;
            }