Exemplo n.º 1
0
void KThumb::setProducer(Mlt::Producer *producer)
{
    if (m_producer) m_clipManager->stopThumbs(m_id);
    m_intraFramesQueue.clear();
    m_intra.waitForFinished();
    m_mutex.lock();
    m_producer = producer;
    // FIXME: the profile() call leaks an object, but trying to free
    // it leads to a double-free in Profile::~Profile()
    if (producer) {
        Mlt::Profile *profile = producer->profile();
        m_dar = profile->dar();
        m_ratio = (double) profile->width() / profile->height();
    }
    m_mutex.unlock();
}
Exemplo n.º 2
0
// static
MltVideoProfile ProfilesDialog::getVideoProfile(Mlt::Profile &profile)
{
    MltVideoProfile result;
    result.description = profile.description();
    result.frame_rate_num = profile.frame_rate_num();
    result.frame_rate_den = profile.frame_rate_den();
    result.width = profile.width();
    result.height = profile.height();
    result.progressive = profile.progressive();
    result.sample_aspect_num = profile.sample_aspect_num();
    result.sample_aspect_den = profile.sample_aspect_den();
    result.display_aspect_num = profile.display_aspect_num();
    result.display_aspect_den = profile.display_aspect_den();
    result.colorspace = profile.colorspace();
    return result;
}