示例#1
0
        void LoadFiles(MOVIE_PLAY_CONTROL_OBJECT command)
        {
            // distribute the files over the virtual channels
            int c = 0;

            for (c = 0; c < m_AppData.MAX_VIRTUAL_CHANNELS; c++)
            {
                vChans[c].Clear();
            }

            c = 0;
            foreach (string file in command.filesToPlay)
            {
                vChans[c].AddFile(file);
                m_MasterFileList.Add(file, c);
                c++;
                if (c >= m_AppData.MAX_VIRTUAL_CHANNELS)
                {
                    c = 0;
                }

                if (m_Stop)
                {
                    break;
                }
            }
        }
示例#2
0
        void ProcessLoop()
        {
            while (!m_Stop)
            {
                Thread.Sleep(1);

                MOVIE_PLAY_CONTROL_OBJECT command = m_PlayCommandsQ.Dequeue();

                if (command == null)
                {
                    continue;
                }

                switch (command.command)
                {
                case MOVIE_PLAY_COMMANDS.Stop:

                    break;


                // crazy windows architecture - you get an illegal cross thread op if you try and start a directshow player on a panel
                // from the UI from any other thread.

                //case MOVIE_PLAY_COMMANDS.PlayAll:
                //    PlayAll();
                //    break;

                case MOVIE_PLAY_COMMANDS.Load:
                    LoadFiles(command);

                    break;
                }
            }
        }
示例#3
0
        public void StopPlay()
        {
            lock (MovieControlSingleton)
            {
                MOVIE_PLAY_CONTROL_OBJECT command = new MOVIE_PLAY_CONTROL_OBJECT();

                command.command = MOVIE_PLAY_COMMANDS.Stop;
                m_PlayCommandsQ.Enqueue(command);
            }
        }
示例#4
0
        public void LoadFiles(string[] files)
        {
            if (files.Length > m_AppData.MAX_MOVIE_FILES_TO_LOAD)
            {
                MessageBox.Show("too many files to load, max number of files is: " + m_AppData.MAX_MOVIE_FILES_TO_LOAD.ToString());
                return;
            }

            lock (MovieControlSingleton)
            {
                MOVIE_PLAY_CONTROL_OBJECT command = new MOVIE_PLAY_CONTROL_OBJECT();
                command.command     = MOVIE_PLAY_COMMANDS.Load;
                command.filesToPlay = files;
                m_PlayCommandsQ.Enqueue(command);
            }
        }
示例#5
0
        void LoadFiles(MOVIE_PLAY_CONTROL_OBJECT command)
        {
            // distribute the files over the virtual channels
            int c = 0;
            for (c = 0; c < m_AppData.MAX_VIRTUAL_CHANNELS; c++)
            {
                vChans[c].Clear();
            }

            c = 0;
            foreach (string file in command.filesToPlay)
            {
                vChans[c].AddFile(file);
                m_MasterFileList.Add(file, c);
                c++;
                if (c >= m_AppData.MAX_VIRTUAL_CHANNELS) c = 0;

                if (m_Stop) break;
            }
        }
示例#6
0
        public void StopPlay()
        {
            lock (MovieControlSingleton)
            {
                MOVIE_PLAY_CONTROL_OBJECT command = new MOVIE_PLAY_CONTROL_OBJECT();

                command.command = MOVIE_PLAY_COMMANDS.Stop;
                m_PlayCommandsQ.Enqueue(command);
            }
        }
示例#7
0
        public void LoadFiles(string[] files)
        {
            if (files.Length > m_AppData.MAX_MOVIE_FILES_TO_LOAD)
            {
                MessageBox.Show("too many files to load, max number of files is: " + m_AppData.MAX_MOVIE_FILES_TO_LOAD.ToString());
                return;
            }

            lock (MovieControlSingleton)
            {
                MOVIE_PLAY_CONTROL_OBJECT command = new MOVIE_PLAY_CONTROL_OBJECT();
                command.command = MOVIE_PLAY_COMMANDS.Load;
                command.filesToPlay = files;
                m_PlayCommandsQ.Enqueue(command);
             }
        }