Ejemplo n.º 1
0
void MythCCExtractorPlayer::Ingest708Captions(void)
{
    // For each window of each service of each video...
    CC708Info::const_iterator it = m_cc708_info.begin();
    for (; it != m_cc708_info.end(); ++it)
    {
        for (uint serviceIdx = 1; serviceIdx < k708MaxServices; ++serviceIdx)
        {
            CC708Service *service = (*it).reader->GetService(serviceIdx);
            for (uint windowIdx = 0; windowIdx < 8; ++windowIdx)
            {
                CC708Window &win = service->windows[windowIdx];
                if (win.GetChanged())
                {
                    vector<CC708String*> strings;
                    if (win.GetVisible())
                    {
                        strings = win.GetStrings();
                        Ingest708Caption(it.key(), serviceIdx, windowIdx,
                                         win.pen.row, win.pen.column,
                                         win, strings);
                        win.DisposeStrings(strings);
                    }
                    service->windows[windowIdx].ResetChanged();
                }
            }
        }
    }
}
Ejemplo n.º 2
0
void MythCCExtractorPlayer::Ingest708Captions(void)
{
    // For each window of each service of each video...
    CC708Info::const_iterator it = m_cc708_info.begin();
    for (; it != m_cc708_info.end(); ++it)
    {
        for (uint serviceIdx = 1; serviceIdx < 64; ++serviceIdx)
        {
            CC708Service *service = (*it).reader->GetService(serviceIdx);
            for (uint windowIdx = 0; windowIdx < 8; ++windowIdx)
            {
                CC708Window &win = service->windows[windowIdx];
                if (win.changed)
                {
                    vector<CC708String*> strings;
                    if (win.visible)
                        strings = win.GetStrings();
                    Ingest708Caption(it.key(), serviceIdx, windowIdx,
                                     win.pen.row, win.pen.column, strings);
                    while (!strings.empty())
                    {
                        delete strings.back();
                        strings.pop_back();
                    }
                    service->windows[windowIdx].changed = false;
                }
            }
        }
    }
}