Beispiel #1
0
void
ImageClipWorkflow::initVlcOutput()
{
    char    buffer[32];

    m_vlcMedia->addOption( ":no-audio" );
    m_vlcMedia->addOption( ":no-sout-audio" );
    m_vlcMedia->addOption( ":sout=#transcode{}:smem" );
    m_vlcMedia->setVideoDataCtx( this );
    m_vlcMedia->setVideoLockCallback( reinterpret_cast<void*>( getLockCallback() ) );
    m_vlcMedia->setVideoUnlockCallback( reinterpret_cast<void*>( getUnlockCallback() ) );
    m_vlcMedia->addOption( ":sout-transcode-vcodec=RV24" );
    m_vlcMedia->addOption( ":sout-smem-time-sync" );

    sprintf( buffer, ":sout-transcode-width=%i",
             MainWorkflow::getInstance()->getWidth() );
    m_vlcMedia->addOption( buffer );
    sprintf( buffer, ":sout-transcode-height=%i",
             MainWorkflow::getInstance()->getHeight() );
    m_vlcMedia->addOption( buffer );
    sprintf( buffer, ":sout-transcode-fps=%f", (float)Clip::DefaultFPS );
    m_vlcMedia->addOption( buffer );
    sprintf( buffer, ":fake-duration=%d", 1000 );
    m_vlcMedia->addOption( buffer );
    sprintf( buffer, ":fake-fps=%f", m_clip->getParent()->fps() );
    m_vlcMedia->addOption( buffer );
}
Beispiel #2
0
void
WorkflowRenderer::setupRenderer( quint32 width, quint32 height, double fps )
{
    m_source->setWidth( width );
    m_source->setHeight( height );
    m_source->setFps( fps );
    m_source->setAspectRatio( qPrintable( aspectRatio() ) );
    m_source->setNumberChannels( m_nbChannels );
    m_source->setSampleRate( m_rate );
    m_esHandler->fps = fps;


    delete m_sourceRenderer;
    m_sourceRenderer = m_source->createRenderer( m_eventWatcher );
    m_sourceRenderer->setName( "WorkflowRenderer" );
    m_sourceRenderer->enableMemoryInput( m_esHandler, getLockCallback(), getUnlockCallback() );
    m_sourceRenderer->setOutputWidget( (void *) static_cast< RenderWidget* >( m_renderWidget )->id() );
}
Beispiel #3
0
QString
VideoClipWorkflow::createSoutChain() const
{
    QString chain = ":sout=#transcode{vcodec=RV32,fps=";

    chain += QString::number( VLMC_PROJECT_GET_DOUBLE( "video/VLMCOutputFPS" ) )
            % ",width=" % QString::number( m_width ) % ",height="
            % QString::number( m_height )
            % "}:smem{";
    if ( m_fullSpeedRender == false )
        chain += "time-sync";
    else
        chain += "no-time-sync";
    chain += ",video-data=" % QString::number( reinterpret_cast<intptr_t>( this ) )
            % ",video-prerender-callback="
            % QString::number( reinterpret_cast<intptr_t>( getLockCallback() ) )
            % ",video-postrender-callback="
            % QString::number( reinterpret_cast<intptr_t>( getUnlockCallback() ) )
            % '}';

    return chain;
}