Beispiel #1
0
        private void timerConvert_Tick(object sender, EventArgs e)
        {
            if (mConverter == null || mThreadCount <= 0)
            {
                return;
            }
            int i = 0;

            for (i = 0; i < mConverter.TasksCount; i++)
            {
                ICProgressInfo progressInfo = null;

                progressInfo = mConverter.get_ProgressInfo(i);
                OnProgressInfo(progressInfo);

                ICTerminateInfo terminateInfo = null;

                terminateInfo = mConverter.get_TerminateInfo(i);
                OnTerminateInfo(terminateInfo);

                ICCustomHookInfo customHookInfo = null;

                customHookInfo = mConverter.get_CustomHookInfo(i);
                OnCustomHookInfo(customHookInfo);
            }
        }
Beispiel #2
0
        private void OnProgressInfo(ICProgressInfo progressInfo)
        {
            int  taskIndex       = progressInfo.TaskIndex;
            long currentDuration = progressInfo.CurrentDuration;
            long totalDuration   = progressInfo.TotalDuration;
            long currentFPS      = progressInfo.FPS;
            long convertedSize   = progressInfo.CurrentSize;

            if (taskIndex < 0)
            {
                //OnConvertCompleted();
                return;
            }
            if (totalDuration > 0)
            {
                listViewTask.Items[taskIndex].SubItems[COLUMN_INDEX_CONVERT_PROGRESS].Text = (currentDuration * 100 / totalDuration).ToString() + "%";
            }
            else
            {
                listViewTask.Items[taskIndex].SubItems[COLUMN_INDEX_CONVERT_PROGRESS].Text = "N/A";
            }

            if (currentFPS > 0)
            {
                listViewTask.Items[taskIndex].SubItems[COLUMN_INDEX_FPS].Text = currentFPS.ToString();
            }

            listViewTask.Items[taskIndex].SubItems[COLUMN_INDEX_CONVERTED_TIME].Text      = (currentDuration / 1000000).ToString();
            listViewTask.Items[taskIndex].SubItems[COLUMN_INDEX_CONVERTED_FILE_SIZE].Text = convertedSize.ToString();
        }
Beispiel #3
0
        private void OnProgressInfo(ICProgressInfo progressInfo)
        {
            int taskIndex = progressInfo.TaskIndex;
            long currentDuration = progressInfo.CurrentDuration;
            long totalDuration = progressInfo.TotalDuration;
            long currentFPS = progressInfo.FPS;
            long convertedSize = progressInfo.CurrentSize;

            if (taskIndex < 0)
            {
                //OnConvertCompleted();
                return;
            }
            if (totalDuration > 0)
            {
                listViewTask.Items[taskIndex].SubItems[COLUMN_INDEX_CONVERT_PROGRESS].Text = (currentDuration * 100 / totalDuration).ToString() + "%";
            }
            else
            {
                listViewTask.Items[taskIndex].SubItems[COLUMN_INDEX_CONVERT_PROGRESS].Text = "N/A";
            }

            if (currentFPS > 0)
            {
                listViewTask.Items[taskIndex].SubItems[COLUMN_INDEX_FPS].Text = currentFPS.ToString();
            }

            listViewTask.Items[taskIndex].SubItems[COLUMN_INDEX_CONVERTED_TIME].Text = (currentDuration / 1000000).ToString();
            listViewTask.Items[taskIndex].SubItems[COLUMN_INDEX_CONVERTED_FILE_SIZE].Text = convertedSize.ToString();
        }