Example #1
0
File: help.c Project: 0xheart0/vlc
/*****************************************************************************
 * Version: print complete program version
 *****************************************************************************
 * Print complete program version and build number.
 *****************************************************************************/
static void Version( void )
{
    ShowConsole();
    printf(_("VLC version %s (%s)\n"), VERSION_MESSAGE, psz_vlc_changeset);
    printf(_("Compiled by %s on %s (%s)\n"), VLC_CompileBy(),
           VLC_CompileHost(), __DATE__" "__TIME__ );
    printf(_("Compiler: %s\n"), VLC_Compiler());
    fputs(LICENSE_MSG, stdout);
    PauseConsole();
}
Example #2
0
AboutDialog::AboutDialog( intf_thread_t *_p_intf)
            : QVLCDialog( (QWidget*)_p_intf->p_sys->p_mi, _p_intf )
{
    /* Build UI */
    ui.setupUi( this );
    ui.closeButtonBox->addButton(
        new QPushButton( qtr("&Close"), this ), QDialogButtonBox::RejectRole );

    setWindowTitle( qtr( "About" ) );
    setWindowRole( "vlc-about" );
    setMinimumSize( 600, 500 );
    resize( 600, 500 );
    setWindowModality( Qt::WindowModal );

    CONNECT( ui.closeButtonBox, rejected(), this, close() );
    ui.closeButtonBox->setFocus();

    ui.introduction->setText(
            qtr( "VLC media player" ) + qfu( " " VERSION_MESSAGE ) );

    if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY && var_InheritBool( p_intf, "qt-icon-change" ) )
        ui.iconVLC->setPixmap( QPixmap( ":/logo/vlc128-xmas.png" ) );
    else
        ui.iconVLC->setPixmap( QPixmap( ":/logo/vlc128.png" ) );

    /* Main Introduction */
    ui.infoLabel->setText(
            qtr( "VLC media player is a free media player, "
                "encoder and streamer that can read from files, "
                "CDs, DVDs, network streams, capture cards and even more!\n"
                "VLC uses its internal codecs and works on essentially every "
                "popular platform.\n\n" )
            + qtr( "This version of VLC was compiled by:\n " )
            + qfu( VLC_CompileBy() )+ " on " + qfu( VLC_CompileHost() ) +
            + " ("__DATE__" "__TIME__").\n"
            + qtr( "Compiler: " ) + qfu( VLC_Compiler() ) + ".\n"
            + qtr( "You are using the Qt Interface.\n\n" )
            + qtr( "Copyright (C) " ) + COPYRIGHT_YEARS
            + qtr( " by the VideoLAN Team.\n" )
            + "<a href=\"http://www.videolan.org\">http://www.videolan.org</a>" );

    /* Be translators friendly: Convert to rich text */
    ui.infoLabel->setText( ui.infoLabel->text().replace( "\n", "<br/>" ) );

    /* GPL License */
    ui.licenseEdit->setText( qfu( psz_license ) );

    /* People who helped */
    ui.thanksEdit->setText( qfu( psz_thanks ) );

    /* People who wrote the software */
    ui.authorsEdit->setText( qfu( psz_authors ) );
}
Example #3
0
File: core.c Project: Ackhuman/vlc
const char * libvlc_get_compiler(void)
{
    return VLC_Compiler();
}
Example #4
0
File: http.c Project: cobr123/qtVlc
static void ParseExecute( httpd_file_sys_t *p_args, char *p_buffer,
                          int i_buffer, char *p_request,
                          char **pp_data, int *pi_data )
{
    intf_sys_t *p_sys = p_args->p_intf->p_sys;
    int i_request = p_request != NULL ? strlen( p_request ) : 0;
    char *dst;
    char position[4]; /* percentage */
    char time[12]; /* in seconds */
    char length[12]; /* in seconds */
    audio_volume_t i_volume;
    char volume[5];
    const char *state;
    char stats[20];

    assert( p_sys->p_input == NULL );
    /* FIXME: proper locking anyone? */
    p_sys->p_input = playlist_CurrentInput( p_sys->p_playlist );
    if( p_sys->p_input )
    {
        snprintf( position, sizeof(position), "%d",
                  (int)(var_GetFloat( p_sys->p_input, "position" ) * 100.));
        snprintf( time, sizeof(time), "%"PRIi64,
                  var_GetTime( p_sys->p_input, "time" ) / CLOCK_FREQ );
        snprintf( length, sizeof(length), "%"PRIi64,
                  var_GetTime( p_sys->p_input, "length" ) / CLOCK_FREQ );

        switch( var_GetInteger( p_sys->p_input, "state" ) )
        {
            case PLAYING_S: state = "playing";            break;
            case OPENING_S: state = "opening/connecting"; break;
            case PAUSE_S:   state = "paused";             break;
            default:        state = "stop";               break;
        }
    }
    else
    {
        strcpy( position, "0" );
        strcpy( time, "0" );
        strcpy( length, "0" );
        state = "stop";
    }

    aout_VolumeGet( p_sys->p_playlist, &i_volume );
    snprintf( volume, sizeof(volume), "%d", (int)i_volume );

    p_args->vars = mvar_New( "variables", "" );
    mvar_AppendNewVar( p_args->vars, "url_param",
                           i_request > 0 ? "1" : "0" );
    mvar_AppendNewVar( p_args->vars, "url_value", p_request );
    mvar_AppendNewVar( p_args->vars, "version", VLC_Version() );
    mvar_AppendNewVar( p_args->vars, "copyright", COPYRIGHT_MESSAGE );
    mvar_AppendNewVar( p_args->vars, "vlc_compile_by", VLC_CompileBy() );
    mvar_AppendNewVar( p_args->vars, "vlc_compile_host",
                           VLC_CompileHost() );
    mvar_AppendNewVar( p_args->vars, "vlc_compiler", VLC_Compiler() );
    mvar_AppendNewVar( p_args->vars, "stream_position", position );
    mvar_AppendNewVar( p_args->vars, "stream_time", time );
    mvar_AppendNewVar( p_args->vars, "stream_length", length );
    mvar_AppendNewVar( p_args->vars, "volume", volume );
    mvar_AppendNewVar( p_args->vars, "stream_state", state );
    mvar_AppendNewVar( p_args->vars, "charset", "UTF-8" );

    /* Stats */
    if( p_sys->p_input )
    {
        /* FIXME: Workarround a stupid assert in input_GetItem */
        input_item_t *p_item = p_sys->p_input && p_sys->p_input->p
                               ? input_GetItem( p_sys->p_input )
                               : NULL;

        if( p_item )
        {
            vlc_mutex_lock( &p_item->p_stats->lock );
#define STATS_INT( n ) sprintf( stats, "%d", p_item->p_stats->i_ ## n ); \
                       mvar_AppendNewVar( p_args->vars, #n, stats );
#define STATS_FLOAT( n ) sprintf( stats, "%f", p_item->p_stats->f_ ## n ); \
                       mvar_AppendNewVar( p_args->vars, #n, stats );
            STATS_INT( read_bytes )
            STATS_FLOAT( input_bitrate )
            STATS_INT( demux_read_bytes )
            STATS_FLOAT( demux_bitrate )
            STATS_INT( decoded_video )
            STATS_INT( displayed_pictures )
            STATS_INT( lost_pictures )
            STATS_INT( decoded_audio )
            STATS_INT( played_abuffers )
            STATS_INT( lost_abuffers )
            STATS_INT( sent_packets )
            STATS_INT( sent_bytes )
            STATS_FLOAT( send_bitrate )
#undef STATS_INT
#undef STATS_FLOAT
            vlc_mutex_unlock( &p_item->p_stats->lock );
        }
    }

    SSInit( &p_args->stack );

    /* allocate output */
    *pi_data = i_buffer + 1000;
    dst = *pp_data = malloc( *pi_data );

    /* we parse executing all  <vlc /> macros */
    Execute( p_args, p_request, i_request, pp_data, pi_data, &dst,
                 &p_buffer[0], &p_buffer[i_buffer] );

    *dst     = '\0';
    *pi_data = dst - *pp_data;

    if( p_sys->p_input != NULL )
    {
        vlc_object_release( p_sys->p_input );
        p_sys->p_input = NULL;
    }
    SSClean( &p_args->stack );
    mvar_Delete( p_args->vars );
}
Example #5
0
File: help.cpp Project: Kafay/vlc
AboutDialog::AboutDialog( QWidget *parent, intf_thread_t *_p_intf)
            : QVLCDialog( parent, _p_intf )
{
    setWindowTitle( qtr( "About" ) );
    resize( 600, 500 );
    setMinimumSize( 600, 500 );

    QGridLayout *layout = new QGridLayout( this );
    QTabWidget *tab = new QTabWidget( this );

    QPushButton *closeButton = new QPushButton( qtr( "&Close" ) );
    closeButton->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
    closeButton->setDefault( true );

    QLabel *introduction = new QLabel(
            qtr( "VLC media player" ) + qfu( " " VERSION_MESSAGE ) );
    QLabel *iconVLC = new QLabel;
    if( QDate::currentDate().dayOfYear() >= 354 )
        iconVLC->setPixmap( QPixmap( ":/logo/vlc48-christmas.png" ) );
    else
        iconVLC->setPixmap( QPixmap( ":/logo/vlc48.png" ) );
    layout->addWidget( iconVLC, 0, 0, 1, 1 );
    layout->addWidget( introduction, 0, 1, 1, 7 );
    layout->addWidget( tab, 1, 0, 1, 8 );
    layout->addWidget( closeButton, 2, 6, 1, 2 );

    /* Main Introduction */
    QWidget *infoWidget = new QWidget( this );
    QHBoxLayout *infoLayout = new QHBoxLayout( infoWidget );
    QLabel *infoLabel = new QLabel(
            qtr( "VLC media player is a free media player, "
                "encoder and streamer that can read from files, "
                "CDs, DVDs, network streams, capture cards and even more!\n"
                "VLC uses its internal codecs and works on essentially every "
                "popular platform.\n\n" )
            + qtr( "This version of VLC was compiled by:\n " )
            + qfu( VLC_CompileBy() )+ "@" + qfu( VLC_CompileHost() ) + "."
            + qfu( VLC_CompileDomain() ) + ".\n"
            + qtr( "Compiler: " ) + qfu( VLC_Compiler() ) + ".\n"
            + qtr( "You are using the Qt4 Interface.\n\n" )
            + qtr( "Copyright (C) " ) + COPYRIGHT_YEARS
            + qtr( " by the VideoLAN Team.\n" )
            + "[email protected], http://www.videolan.org" );
    infoLabel->setWordWrap( infoLabel );

    QLabel *iconVLC2 = new QLabel;
    if( QDate::currentDate().dayOfYear() >= 354 )
        iconVLC2->setPixmap( QPixmap( ":/logo/vlc128-christmas.png" ) );
    else
        iconVLC2->setPixmap( QPixmap( ":/logo/vlc128.png" ) );
    infoLayout->addWidget( iconVLC2 );
    infoLayout->addWidget( infoLabel );

    /* GPL License */
    QTextEdit *licenseEdit = new QTextEdit( this );
    licenseEdit->setText( qfu( psz_license ) );
    licenseEdit->setReadOnly( true );

    /* People who helped */
    QWidget *thanksWidget = new QWidget( this );
    QVBoxLayout *thanksLayout = new QVBoxLayout( thanksWidget );

    QLabel *thanksLabel = new QLabel( qtr( "We would like to thank the whole "
                "VLC community, the testers, our users and the following people "
                "(and the missing ones...) for their collaboration to "
                "create the best free software." ) );
    thanksLabel->setWordWrap( true );
    thanksLayout->addWidget( thanksLabel );
    QTextEdit *thanksEdit = new QTextEdit( this );
    thanksEdit->setText( qfu( psz_thanks ) );
    thanksEdit->setReadOnly( true );
    thanksLayout->addWidget( thanksEdit );

    /* People who wrote the software */
    QTextEdit *authorsEdit = new QTextEdit( this );
    authorsEdit->setText( qfu( psz_authors ) );
    authorsEdit->setReadOnly( true );

    /* add the tabs to the Tabwidget */
    tab->addTab( infoWidget, qtr( "About" ) );
    tab->addTab( authorsEdit, qtr( "Authors" ) );
    tab->addTab( thanksWidget, qtr("Thanks") );
    tab->addTab( licenseEdit, qtr("License") );

    BUTTONACT( closeButton, close() );
}