Exemplo n.º 1
0
void VLCWindowsManager::LibVlcDetach()
{
    if( _HolderWnd )
        _HolderWnd->LibVlcDetach();

    if( _vp ) {
        VlcEvents( false );
        _vp = 0;
    }
}
Exemplo n.º 2
0
void VLCWindowsManager::LibVlcAttach( vlc_player* vp )
{
    if( !_HolderWnd )
        return; //VLCWindowsManager::CreateWindows was not called

    if( vp && _vp != vp ) {
        LibVlcDetach();
    }

    if( !_vp ) {
        _vp = vp;
        VlcEvents( true );
    }

    _HolderWnd->LibVlcAttach();
}
Exemplo n.º 3
0
void FBVLC::vlc_close()
{
    get_player().stop();

    if ( get_player().is_open() && isWindowless() ) {
        vlc::vmem::close();
    }

    if ( get_player().is_open() ) {
        VlcEvents(false);
        get_player().close();
    }

    if ( m_libvlc ) {
        libvlc_free(m_libvlc);
        m_libvlc = 0;
    }
}
Exemplo n.º 4
0
void FBVLC::vlc_open()
{
    if( get_player().is_open() )
        return ;

    init_vlc_player_options();

    if( !m_libvlc ) {
        /* prepare VLC command line */
        std::vector<std::string> libvlc_options;
        init_libvlc_options( &libvlc_options );

        std::vector<const char*> libvlc_c_opts;
        libvlc_c_opts.push_back("--no-video-title-show");
        /*** add static libvlc options here ***/

        std::vector<std::string>::const_iterator i     = libvlc_options.begin();
        std::vector<std::string>::const_iterator end_i = libvlc_options.end();
        for( ; i != end_i; ++i ) {
            libvlc_c_opts.push_back( i->c_str() );
        }

        m_libvlc = libvlc_new( libvlc_c_opts.size(),
                               libvlc_c_opts.empty() ? 0 : &libvlc_c_opts[0] );
    }

    if ( m_libvlc && !get_player().is_open() ) {
        get_player().open(m_libvlc);
        VlcEvents(true);
    }

    if ( get_player().is_open() && isWindowless() ) {
        vlc::vmem::open();
    }

    process_startup_options();
}