Changeset 07b147145c51cc38146ee25348c6f205cfca5a65
- Timestamp:
- 26/03/06 00:10:43
(3 years ago)
- Author:
- Christophe Mutricy <xtophe@videolan.org>
- git-committer:
- Christophe Mutricy <xtophe@videolan.org> 1143328243 +0000
- git-parent:
[57dd32ab1e6a75a45b06f2845f5f72efb9731fc0]
- git-author:
- Christophe Mutricy <xtophe@videolan.org> 1143328243 +0000
- Message:
misc/*: 2nd lecture. refs #438
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r2cb472d |
r07b1471 |
|
| 50 | 50 | #endif |
|---|
| 51 | 51 | |
|---|
| 52 | | msg_Info( p_intf, "Using the dummy interface module..." ); |
|---|
| | 52 | msg_Info( p_intf, "using the dummy interface module..." ); |
|---|
| 53 | 53 | |
|---|
| 54 | 54 | p_intf->pf_run = Run; |
|---|
| r6da5d90 |
r07b1471 |
|
| 110 | 110 | #define EFFECT_TEXT N_("Font Effect") |
|---|
| 111 | 111 | #define EFFECT_LONGTEXT N_("It is possible to apply effects to the rendered" \ |
|---|
| 112 | | "text to improve rendering." ) |
|---|
| | 112 | "text to improve its readability." ) |
|---|
| 113 | 113 | |
|---|
| 114 | 114 | #define EFFECT_BACKGROUND 1 |
|---|
| … | … | |
| 881 | 881 | if( i_error ) |
|---|
| 882 | 882 | { |
|---|
| 883 | | msg_Err( p_filter, "Unable to render text (FT_Load_Glyph returned" |
|---|
| | 883 | msg_Err( p_filter, "unable to render text FT_Load_Glyph returned" |
|---|
| 884 | 884 | " %d", i_error ); |
|---|
| 885 | 885 | goto error; |
|---|
| … | … | |
| 888 | 888 | if( i_error ) |
|---|
| 889 | 889 | { |
|---|
| 890 | | msg_Err( p_filter, "Unable to render text (FT_Get_Glyph returned " |
|---|
| | 890 | msg_Err( p_filter, "unable to render text FT_Get_Glyph returned " |
|---|
| 891 | 891 | "%d", i_error ); |
|---|
| 892 | 892 | goto error; |
|---|
| … | … | |
| 1055 | 1055 | if( i_size <= 0 ) |
|---|
| 1056 | 1056 | { |
|---|
| 1057 | | msg_Warn( p_filter, "Invalid fontsize, using 12" ); |
|---|
| | 1057 | msg_Warn( p_filter, "invalid fontsize, using 12" ); |
|---|
| 1058 | 1058 | i_size = 12; |
|---|
| 1059 | 1059 | } |
|---|
| 1060 | 1060 | |
|---|
| 1061 | | msg_Dbg( p_filter, "Using fontsize: %i", i_size ); |
|---|
| | 1061 | msg_Dbg( p_filter, "using fontsize: %i", i_size ); |
|---|
| 1062 | 1062 | } |
|---|
| 1063 | 1063 | |
|---|
| rf0ffeb1 |
r07b1471 |
|
| 449 | 449 | if( dir == NULL ) |
|---|
| 450 | 450 | { |
|---|
| 451 | | msg_Warn( p_this, "Cannot open directory (%s): %s", psz_dirname, |
|---|
| | 451 | msg_Warn( p_this, "cannot open directory (%s): %s", psz_dirname, |
|---|
| 452 | 452 | strerror( errno ) ); |
|---|
| 453 | 453 | return VLC_EGENERIC; |
|---|
| … | … | |
| 519 | 519 | if( i < 0 ) |
|---|
| 520 | 520 | { |
|---|
| 521 | | msg_Warn( p_this, "Cannot add x509 credentials (%s): %s", |
|---|
| | 521 | msg_Warn( p_this, "cannot add x509 credentials (%s): %s", |
|---|
| 522 | 522 | psz_path, gnutls_strerror( i ) ); |
|---|
| 523 | 523 | return VLC_EGENERIC; |
|---|
| … | … | |
| 525 | 525 | else |
|---|
| 526 | 526 | { |
|---|
| 527 | | msg_Dbg( p_this, "Added x509 credentials (%s)", |
|---|
| | 527 | msg_Dbg( p_this, "added x509 credentials (%s)", |
|---|
| 528 | 528 | psz_path ); |
|---|
| 529 | 529 | return VLC_SUCCESS; |
|---|
| … | … | |
| 533 | 533 | { |
|---|
| 534 | 534 | msg_Dbg( p_this, |
|---|
| 535 | | "Looking recursively for x509 credentials in %s", |
|---|
| | 535 | "looking recursively for x509 credentials in %s", |
|---|
| 536 | 536 | psz_path ); |
|---|
| 537 | 537 | return gnutls_Addx509Directory( p_this, cred, psz_path, b_priv); |
|---|
| … | … | |
| 539 | 539 | } |
|---|
| 540 | 540 | else |
|---|
| 541 | | msg_Warn( p_this, "Cannot add x509 credentials (%s): %s", |
|---|
| | 541 | msg_Warn( p_this, "cannot add x509 credentials (%s): %s", |
|---|
| 542 | 542 | psz_path, strerror( errno ) ); |
|---|
| 543 | 543 | return VLC_EGENERIC; |
|---|
| … | … | |
| 588 | 588 | if( i_val != 0 ) |
|---|
| 589 | 589 | { |
|---|
| 590 | | msg_Err( p_tls, "Cannot allocate X509 credentials: %s", |
|---|
| | 590 | msg_Err( p_tls, "cannot allocate X509 credentials: %s", |
|---|
| 591 | 591 | gnutls_strerror( i_val ) ); |
|---|
| 592 | 592 | goto error; |
|---|
| … | … | |
| 636 | 636 | if( i_val != 0 ) |
|---|
| 637 | 637 | { |
|---|
| 638 | | msg_Err( p_tls, "Cannot initialize TLS session: %s", |
|---|
| | 638 | msg_Err( p_tls, "cannot initialize TLS session: %s", |
|---|
| 639 | 639 | gnutls_strerror( i_val ) ); |
|---|
| 640 | 640 | gnutls_certificate_free_credentials( p_sys->x509_cred ); |
|---|
| … | … | |
| 645 | 645 | if( i_val < 0 ) |
|---|
| 646 | 646 | { |
|---|
| 647 | | msg_Err( p_tls, "Cannot set ciphers priorities: %s", |
|---|
| | 647 | msg_Err( p_tls, "cannot set ciphers priorities: %s", |
|---|
| 648 | 648 | gnutls_strerror( i_val ) ); |
|---|
| 649 | 649 | gnutls_deinit( p_sys->session.session ); |
|---|
| … | … | |
| 656 | 656 | if( i_val < 0 ) |
|---|
| 657 | 657 | { |
|---|
| 658 | | msg_Err( p_tls, "Cannot set certificate type priorities: %s", |
|---|
| | 658 | msg_Err( p_tls, "cannot set certificate type priorities: %s", |
|---|
| 659 | 659 | gnutls_strerror( i_val ) ); |
|---|
| 660 | 660 | gnutls_deinit( p_sys->session.session ); |
|---|
| … | … | |
| 668 | 668 | if( i_val < 0 ) |
|---|
| 669 | 669 | { |
|---|
| 670 | | msg_Err( p_tls, "Cannot set TLS session credentials: %s", |
|---|
| | 670 | msg_Err( p_tls, "cannot set TLS session credentials: %s", |
|---|
| 671 | 671 | gnutls_strerror( i_val ) ); |
|---|
| 672 | 672 | gnutls_deinit( p_sys->session.session ); |
|---|
| … | … | |
| 824 | 824 | if( i_val != 0 ) |
|---|
| 825 | 825 | { |
|---|
| 826 | | msg_Err( p_server, "Cannot initialize TLS session: %s", |
|---|
| | 826 | msg_Err( p_server, "cannot initialize TLS session: %s", |
|---|
| 827 | 827 | gnutls_strerror( i_val ) ); |
|---|
| 828 | 828 | goto error; |
|---|
| … | … | |
| 834 | 834 | if( i_val < 0 ) |
|---|
| 835 | 835 | { |
|---|
| 836 | | msg_Err( p_server, "Cannot set ciphers priorities: %s", |
|---|
| | 836 | msg_Err( p_server, "cannot set ciphers priorities: %s", |
|---|
| 837 | 837 | gnutls_strerror( i_val ) ); |
|---|
| 838 | 838 | gnutls_deinit( session ); |
|---|
| … | … | |
| 844 | 844 | if( i_val < 0 ) |
|---|
| 845 | 845 | { |
|---|
| 846 | | msg_Err( p_server, "Cannot set TLS session credentials: %s", |
|---|
| | 846 | msg_Err( p_server, "cannot set TLS session credentials: %s", |
|---|
| 847 | 847 | gnutls_strerror( i_val ) ); |
|---|
| 848 | 848 | gnutls_deinit( session ); |
|---|
| … | … | |
| 919 | 919 | if( val < 0 ) |
|---|
| 920 | 920 | { |
|---|
| 921 | | msg_Err( p_server, "Cannot add trusted CA (%s): %s", psz_ca_path, |
|---|
| | 921 | msg_Err( p_server, "cannot add trusted CA (%s): %s", psz_ca_path, |
|---|
| 922 | 922 | gnutls_strerror( val ) ); |
|---|
| 923 | 923 | return VLC_EGENERIC; |
|---|
| … | … | |
| 951 | 951 | if( val < 0 ) |
|---|
| 952 | 952 | { |
|---|
| 953 | | msg_Err( p_server, "Cannot add CRL (%s): %s", psz_crl_path, |
|---|
| | 953 | msg_Err( p_server, "cannot add CRL (%s): %s", psz_crl_path, |
|---|
| 954 | 954 | gnutls_strerror( val ) ); |
|---|
| 955 | 955 | return VLC_EGENERIC; |
|---|
| … | … | |
| 975 | 975 | int val; |
|---|
| 976 | 976 | |
|---|
| 977 | | msg_Dbg( p_tls, "Creating TLS server" ); |
|---|
| | 977 | msg_Dbg( p_tls, "creating TLS server" ); |
|---|
| 978 | 978 | |
|---|
| 979 | 979 | p_sys = (tls_server_sys_t *)malloc( sizeof(struct tls_server_sys_t) ); |
|---|
| … | … | |
| 1017 | 1017 | if( val != 0 ) |
|---|
| 1018 | 1018 | { |
|---|
| 1019 | | msg_Err( p_server, "Cannot allocate X509 credentials: %s", |
|---|
| | 1019 | msg_Err( p_server, "cannot allocate X509 credentials: %s", |
|---|
| 1020 | 1020 | gnutls_strerror( val ) ); |
|---|
| 1021 | 1021 | goto error; |
|---|
| … | … | |
| 1031 | 1031 | if( val < 0 ) |
|---|
| 1032 | 1032 | { |
|---|
| 1033 | | msg_Err( p_server, "Cannot set certificate chain or private key: %s", |
|---|
| | 1033 | msg_Err( p_server, "cannot set certificate chain or private key: %s", |
|---|
| 1034 | 1034 | gnutls_strerror( val ) ); |
|---|
| 1035 | 1035 | gnutls_certificate_free_credentials( p_sys->x509_cred ); |
|---|
| … | … | |
| 1044 | 1044 | if( val >= 0 ) |
|---|
| 1045 | 1045 | { |
|---|
| 1046 | | msg_Dbg( p_server, "Computing Diffie Hellman ciphers parameters" ); |
|---|
| | 1046 | msg_Dbg( p_server, "computing Diffie Hellman ciphers parameters" ); |
|---|
| 1047 | 1047 | val = gnutls_dh_params_generate2( p_sys->dh_params, |
|---|
| 1048 | 1048 | get_Int( p_tls, "gnutls-dh-bits" ) ); |
|---|
| … | … | |
| 1050 | 1050 | if( val < 0 ) |
|---|
| 1051 | 1051 | { |
|---|
| 1052 | | msg_Err( p_server, "Cannot initialize DH cipher suites: %s", |
|---|
| | 1052 | msg_Err( p_server, "cannot initialize DH cipher suites: %s", |
|---|
| 1053 | 1053 | gnutls_strerror( val ) ); |
|---|
| 1054 | 1054 | gnutls_certificate_free_credentials( p_sys->x509_cred ); |
|---|
| 1055 | 1055 | goto error; |
|---|
| 1056 | 1056 | } |
|---|
| 1057 | | msg_Dbg( p_server, "Ciphers parameters computed" ); |
|---|
| | 1057 | msg_Dbg( p_server, "ciphers parameters computed" ); |
|---|
| 1058 | 1058 | |
|---|
| 1059 | 1059 | gnutls_certificate_set_dh_params( p_sys->x509_cred, p_sys->dh_params); |
|---|
| rf0ffeb1 |
r07b1471 |
|
| 52 | 52 | /***************************************************************************** |
|---|
| 53 | 53 | * Module descriptor |
|---|
| 54 | | ***************************************************************************** |
|---|
| 55 | | * This module should be used on windows with MSN (i think that you need to |
|---|
| 56 | | * have MSN 7 or newer) to "advertise" what you are playing in VLC. |
|---|
| 57 | | * You need to enable the "What I'm Listening To" option in MSN. |
|---|
| 58 | | *****************************************************************************/ |
|---|
| | 54 | ****************************************************************************/ |
|---|
| 59 | 55 | #define SERVER_DEFAULT "127.0.0.1" |
|---|
| 60 | 56 | #define SERVER_TEXT N_("Growl server") |
|---|
| … | … | |
| 70 | 66 | set_category( CAT_INTERFACE ); |
|---|
| 71 | 67 | set_subcategory( SUBCAT_INTERFACE_CONTROL ); |
|---|
| 72 | | set_shortname( N_( "growl" ) ); |
|---|
| | 68 | set_shortname( N_( "Growl" ) ); |
|---|
| 73 | 69 | set_description( _("Growl Notification Plugin") ); |
|---|
| 74 | 70 | |
|---|
| rc159168 |
r07b1471 |
|
| 139 | 139 | change_string_list( mode_list, mode_list_text, 0 ); |
|---|
| 140 | 140 | |
|---|
| 141 | | add_string( "rrd-file", NULL, NULL, N_("RRD output file") , |
|---|
| 142 | | N_("Output data for RRDTool in this file" ), VLC_TRUE ); |
|---|
| | 141 | add_file( "rrd-file", NULL, NULL, N_("RRD output file") , |
|---|
| | 142 | N_("Output data for RRDTool in this file." ), VLC_TRUE ); |
|---|
| 143 | 143 | |
|---|
| 144 | 144 | set_capability( "interface", 0 ); |
|---|
| … | … | |
| 155 | 155 | |
|---|
| 156 | 156 | CONSOLE_INTRO_MSG; |
|---|
| 157 | | msg_Info( p_intf, "Using logger..." ); |
|---|
| | 157 | msg_Info( p_intf, "using logger..." ); |
|---|
| 158 | 158 | |
|---|
| 159 | 159 | /* Allocate instance and initialize some members */ |
|---|
| … | … | |
| 206 | 206 | if( !psz_homedir ) |
|---|
| 207 | 207 | { |
|---|
| 208 | | msg_Err( p_this, "Unable to find home directory" ); |
|---|
| | 208 | msg_Err( p_this, "unable to find home directory" ); |
|---|
| 209 | 209 | return -1; |
|---|
| 210 | 210 | } |
|---|
| rf0ffeb1 |
r07b1471 |
|
| 206 | 206 | "\\0Music\\01\\0%s\\0%s\\0%s\\0%s\\0\\0\\0", |
|---|
| 207 | 207 | p_intf->p_sys->psz_format, |
|---|
| 208 | | //FORMAT_DEFAULT, |
|---|
| 209 | 208 | psz_title, |
|---|
| 210 | 209 | psz_artist, |
|---|
| re68d9e1 |
r07b1471 |
|
| 115 | 115 | hints.ai_flags = AI_PASSIVE; |
|---|
| 116 | 116 | |
|---|
| 117 | | msg_Dbg( p_obj, "Resolving %s:%d...", psz_address, i_port ); |
|---|
| | 117 | msg_Dbg( p_obj, "resolving %s:%d...", psz_address, i_port ); |
|---|
| 118 | 118 | i_val = vlc_getaddrinfo( p_obj, psz_address, i_port, &hints, &res ); |
|---|
| 119 | 119 | if( i_val ) |
|---|
| r1571b67 |
r07b1471 |
|
| 375 | 375 | else |
|---|
| 376 | 376 | { |
|---|
| 377 | | msg_Err( p_this, "%s: bad IPv6 interface spefication", |
|---|
| | 377 | msg_Err( p_this, "%s: bad IPv6 interface specification", |
|---|
| 378 | 378 | psz_mif ); |
|---|
| 379 | 379 | close( i_handle ); |
|---|
| rc17290d |
r07b1471 |
|
| 47 | 47 | int i, j; |
|---|
| 48 | 48 | |
|---|
| 49 | | msg_Dbg(p_playlist, "Saving using M3U format"); |
|---|
| | 49 | msg_Dbg(p_playlist, "saving using M3U format"); |
|---|
| 50 | 50 | |
|---|
| 51 | 51 | /* Write header */ |
|---|
| r2cb472d |
r07b1471 |
|
| 49 | 49 | int i; |
|---|
| 50 | 50 | |
|---|
| 51 | | msg_Dbg(p_playlist, "Saving using old format"); |
|---|
| | 51 | msg_Dbg(p_playlist, "saving using old format"); |
|---|
| 52 | 52 | |
|---|
| 53 | 53 | /* Write header */ |
|---|
| rf0ffeb1 |
r07b1471 |
|
| 194 | 194 | else |
|---|
| 195 | 195 | { |
|---|
| 196 | | msg_Dbg( p_this, "Reading %ld bytes from template %s", |
|---|
| | 196 | msg_Dbg( p_this, "reading %ld bytes from template %s", |
|---|
| 197 | 197 | (unsigned long)s.st_size, psz_filename ); |
|---|
| 198 | 198 | |
|---|
| r27268d4 |
r07b1471 |
|
| 65 | 65 | #define COLOR_TEXT N_("Text default color") |
|---|
| 66 | 66 | #define COLOR_LONGTEXT N_("The color of the text that will be rendered on "\ |
|---|
| 67 | | "the video. This must be an hexadecimal (like HTML colors). The first two "\ "chars are for red, then green, then blue. #000000 = black, #FF0000 = red,"\ " #00FF00 = green, #FFFF00 = yellow (red + green), #FFFFFF = white" ) |
|---|
| | 67 | "the video. This must be an hexadecimal (like HTML colors). The first two "\ |
|---|
| | 68 | "chars are for red, then green, then blue. #000000 = black, #FF0000 = red,"\ |
|---|
| | 69 | " #00FF00 = green, #FFFF00 = yellow (red + green), #FFFFFF = white" ) |
|---|
| 68 | 70 | #define FONTSIZER_TEXT N_("Relative font size") |
|---|
| 69 | 71 | #define FONTSIZER_LONGTEXT N_("This is the relative default size of the " \ |
|---|
| … | … | |
| 411 | 413 | if( i_size <= 0 ) |
|---|
| 412 | 414 | { |
|---|
| 413 | | msg_Warn( p_filter, "Invalid fontsize, using 12" ); |
|---|
| | 415 | msg_Warn( p_filter, "invalid fontsize, using 12" ); |
|---|
| 414 | 416 | i_size = 12; |
|---|
| 415 | 417 | } |
|---|
| 416 | 418 | |
|---|
| 417 | | msg_Dbg( p_filter, "Using fontsize: %i", i_size ); |
|---|
| | 419 | msg_Dbg( p_filter, "using fontsize: %i", i_size ); |
|---|
| 418 | 420 | } |
|---|
| 419 | 421 | |
|---|
| rf0ffeb1 |
r07b1471 |
|
| 128 | 128 | if( !p_libxml_reader ) |
|---|
| 129 | 129 | { |
|---|
| 130 | | msg_Err( p_xml, "failed to create xml parser" ); |
|---|
| | 130 | msg_Err( p_xml, "failed to create XML parser" ); |
|---|
| 131 | 131 | return 0; |
|---|
| 132 | 132 | } |
|---|