On Thursday 09 February 2006 12:15, Ruslan Popov wrote:
> I had downloaded kdenlive CVS. I have no internet access from home at this
> time except icq/irc via gprs. I will build new kdenlive and will take a
> look to export things. This evening. My ICQ is 32131845.


Ok. I just found some old stuff I had done to test dv export. I think you can 
use it with just a few changes. The emit signals can be used update a 
progress dialog.. 

regards


void KRender::render(QString url)
{
        m_mltConsumer->stop();
        Mlt::Consumer *dvexporter=new Mlt::Consumer("libdv");
        if (url.isEmpty()) url="/home/one/output.dv";
        dvexporter->set ("target",url); //home/one/preview.dv");
        dvexporter->connect(*m_mltProducer);
        m_mltProducer->seek(0);
        dvexporter->start();
        int vidLength = m_mltProducer->get_length()-1;
        int currPos;

        while (!dvexporter->is_stopped()) {
        qApp->processEvents();
        currPos=m_mltProducer->position();
        if (currPos>0) emit reportProgress((currPos*100)/vidLength);
        if (currPos>=vidLength) dvexporter->stop();
        }
        delete dvexporter;
        dvexporter=0;
        emit exportOver();
}


Reply via email to