Logo Search packages:      
Sourcecode: kdenlive version File versions

DocClipBase::DocClipBase ( ClipManager clipManager,
QDomElement  xml,
const QString &  id 
)

this enum determines the types of "feed" available within this clip. types must be non-exclusive

  • e.g. if you can have audio and video separately, it should be possible to combin the two, as is done here. If a new clip type is added then it should be possible to combine it with both audio and video.

Definition at line 42 of file docclipbase.cpp.

References m_id, m_metadata, m_placeHolder, m_properties, name(), setDuration(), and slotCreateAudioTimer().

                                                                                     :
        QObject(),
        m_audioFrameCache(),
        m_refcount(0),
        m_baseTrackProducers(),
        m_audioTrackProducers(),
        m_videoOnlyProducer(NULL),
        m_snapMarkers(QList < CommentedTime >()),
        m_duration(),
        m_audioTimer(NULL),
        m_thumbProd(NULL),
        m_audioThumbCreated(false),
        m_id(id),
        m_placeHolder(xml.hasAttribute("placeholder")),
        m_properties()
{
    int type = xml.attribute("type").toInt();
    m_clipType = (CLIPTYPE) type;
    if (m_placeHolder) xml.removeAttribute("placeholder");
    QDomNamedNodeMap attributes = xml.attributes();
    for (int i = 0; i < attributes.count(); i++) {
        QString name = attributes.item(i).nodeName();
        if (name.startsWith("meta.attr.")) {
            m_metadata.insert(name.section('.', 2, 3), attributes.item(i).nodeValue());
        } else m_properties.insert(name, attributes.item(i).nodeValue());
    }

    if (xml.hasAttribute("cutzones")) {
        QStringList cuts = xml.attribute("cutzones").split(";", QString::SkipEmptyParts);
        for (int i = 0; i < cuts.count(); i++) {
            QString z = cuts.at(i);
            addCutZone(z.section('-', 0, 0).toInt(), z.section('-', 1, 1).toInt(), z.section('-', 2, 2));
        }
    }

    KUrl url = KUrl(xml.attribute("resource"));
    if (!m_properties.contains("file_hash") && !url.isEmpty()) getFileHash(url.path());

    if (xml.hasAttribute("duration")) {
        setDuration(GenTime(xml.attribute("duration").toInt(), KdenliveSettings::project_fps()));
    } else {
        int out = xml.attribute("out").toInt();
        int in = xml.attribute("in").toInt();
        setDuration(GenTime(out - in, KdenliveSettings::project_fps()));
    }

    if (!m_properties.contains("name")) m_properties.insert("name", url.fileName());

    m_thumbProd = new KThumb(clipManager, url, m_id, m_properties.value("file_hash"));
    if (m_clipType == AV || m_clipType == AUDIO || m_clipType == PLAYLIST) slotCreateAudioTimer();
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index