Ejemplo n.º 1
0
void CommBreakMap::GetMap(frm_dir_map_t &map) const
{
    QMutexLocker locker(&commBreakMapLock);
    map.clear();
    map = commBreakMap;
    map.detach();
}
Ejemplo n.º 2
0
void PrePostRollFlagger::GetCommercialBreakList(frm_dir_map_t &marks)
{
    LOG(VB_COMMFLAG, LOG_INFO, "PrePostRollFlagger::GetCommBreakMap()");
    marks.clear();

    long long end = 0;
    if(closestAfterPre && closestBeforePre)
    {
        //choose closest
        if(closestAfterPre - preRoll < preRoll - closestBeforePre)
            end = closestAfterPre;
        else
            end = closestBeforePre;
    }
    else if(closestBeforePre)
        end = closestBeforePre;
    else if(closestAfterPre)
        end = closestAfterPre;
    else
        end = preRoll;

    if(end)
    {
        marks[0] = MARK_COMM_START;
        marks[end] = MARK_COMM_END;
    }

    long long start = 0;
    if(closestAfterPost && closestBeforePost)
    {
        //choose closest
        if(closestAfterPost - postRoll < postRoll - closestBeforePost)
            start = closestAfterPost;
        else
            start = closestBeforePost;
    }
    else if(closestBeforePost)
        start = closestBeforePost;
    else if(closestAfterPost)
        start = closestAfterPost;
    else if(postRoll)
        start = myTotalFrames - postRoll;

    if(start)
    {
        marks[start] = MARK_COMM_START;
        marks[myTotalFrames] = MARK_COMM_END;
    }
}
Ejemplo n.º 3
0
void CommBreakMap::GetMap(frm_dir_map_t &map) const
{
    QMutexLocker locker(&m_commBreakMapLock);
    map.clear();
    map = m_commBreakMap;
}