Пример #1
0
        private void setMaxFrameCountForOverlayItems()
        {
            mMaxFrameCountForOverlayItems = 0;
            int lNumFrameOverlayItems = mFrameOverlayItemList.Count;

            for (int lIndex = 0; lIndex < lNumFrameOverlayItems; lIndex++)
            {
                FrameOverlayItem lOverlayItem = mFrameOverlayItemList[lIndex];
                if (lOverlayItem.FrameNumber + lOverlayItem.OverlayDuration > mMaxFrameCountForOverlayItems)
                {
                    mMaxFrameCountForOverlayItems = lOverlayItem.FrameNumber + lOverlayItem.OverlayDuration;
                }
            }
        }
Пример #2
0
        public void loadFrameOverlayData(int pVideoWidth, int pVideoHeight)
        {
            try
            {
                CSVFileParser l_Parser = new CSVFileParser();
                l_Parser.startParsingCSVData(mVideoInfoFilepath, 0, 0);

                string[] row;


                //Skip 6 Row
                l_Parser.getNextRow(0);
                l_Parser.getNextRow(0);
                l_Parser.getNextRow(0);
                l_Parser.getNextRow(0);
                l_Parser.getNextRow(0);
                l_Parser.getNextRow(0);

                while ((row = l_Parser.getNextRow(0)) != null)
                {
                    FrameOverlayItem lFrameOverlayItem = new FrameOverlayItem(this, row, pVideoWidth, pVideoHeight);
                    mFrameOverlayItemList.Add(lFrameOverlayItem);

                    if (lFrameOverlayItem.FrameEvent)
                    {
                        mFrameMilestoneEventList.Add(lFrameOverlayItem.FrameEventName);
                    }
                }

                l_Parser.close();

                setMaxFrameCountForOverlayItems();
                createFrameOverlayStructure();
            }
            catch (CSVFileException e)
            {
                throw e;
            }
        }
Пример #3
0
        private void createFrameOverlayStructure()
        {
            int lNumFrameOverlayItems = mFrameOverlayItemList.Count;

            for (int lFrameCount = 0; lFrameCount < mMaxFrameCountForOverlayItems; lFrameCount++)
            {
                FrameOverlayDisplayItems lOverlayDisplayItems = new FrameOverlayDisplayItems();
                for (int lIndex = 0; lIndex < lNumFrameOverlayItems; lIndex++)
                {
                    FrameOverlayItem lOverlayItem = mFrameOverlayItemList[lIndex];

                    if (lOverlayItem.isDisplayOn(lFrameCount))
                    {
                        lOverlayDisplayItems.add(lOverlayItem);
                    }
                }

                if (lOverlayDisplayItems.Count > 0)
                {
                    mFrameOverlayStorage.Add(lFrameCount, lOverlayDisplayItems);
                }
            }
        }
Пример #4
0
 public void add(FrameOverlayItem pFrameOverlayItem)
 {
     mOverlayDisplayItems.Add(pFrameOverlayItem);
 }
 public void add(FrameOverlayItem pFrameOverlayItem)
 {
     mOverlayDisplayItems.Add(pFrameOverlayItem);
 }
        public void loadFrameOverlayData(int pVideoWidth,int pVideoHeight)
        {
            try
            {
                CSVFileParser l_Parser = new CSVFileParser();
                l_Parser.startParsingCSVData(mVideoInfoFilepath, 0, 0);

                string[] row;

                //Skip 6 Row
                l_Parser.getNextRow(0);
                l_Parser.getNextRow(0);
                l_Parser.getNextRow(0);
                l_Parser.getNextRow(0);
                l_Parser.getNextRow(0);
                l_Parser.getNextRow(0);

                while ((row = l_Parser.getNextRow(0)) != null)
                {
                    FrameOverlayItem lFrameOverlayItem = new FrameOverlayItem(this, row, pVideoWidth, pVideoHeight);
                    mFrameOverlayItemList.Add(lFrameOverlayItem);

                    if (lFrameOverlayItem.FrameEvent)
                        mFrameMilestoneEventList.Add(lFrameOverlayItem.FrameEventName);

                }

                l_Parser.close();

                setMaxFrameCountForOverlayItems();
                createFrameOverlayStructure();
            }
            catch (CSVFileException e)
            {
                throw e;
            }
        }