Changeset dff434365d951b38be69859dc8c3b210c82e019f

Show
Ignore:
Timestamp:
04/11/08 10:53:45 (5 months ago)
Author:
Jean-Paul Saman <jean-paul.saman@m2x.nl>
git-committer:
Jean-Paul Saman <jean-paul.saman@m2x.nl> 1207904025 +0200
git-parent:

[c72f2f9dcdcdb330488f01317758086f612b3044], [87db766dfd95376030367483c6f9fbd2286de167]

git-author:
Jean-Paul Saman <jean-paul.saman@m2x.nl> 1207904025 +0200
Message:

Merge branch 'master' of git@git.videolan.org:vlc

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • bindings/java/core/src/main/java/org/videolan/jvlc/MediaList.java

    rbf1292e r87db766  
    134134 
    135135    /** 
    136      * @param media The media descriptor mrl. 
     136     * @param mrl The media descriptor mrl. 
    137137     */ 
    138138    public boolean removeMedia(String mrl) 
  • bindings/java/core/src/test/java/org/videolan/jvlc/VLMTest.java

    r8f257fe ree8a709  
    3939    private String mrl = getClass().getResource("/raffa_voice.ogg").getFile(); 
    4040     
     41    private String mediaName = "test"; 
     42     
    4143    @Before 
    4244    public void setup() 
     
    6365    { 
    6466        VLM vlm = jvlc.getVLM(); 
    65         vlm.addBroadcast("test", "file://" + mrl, "", null, true, false); 
     67        vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false); 
    6668    } 
    6769     
     
    7072    { 
    7173        VLM vlm = jvlc.getVLM(); 
    72         vlm.addBroadcast("test", "file://" + mrl, "", null, true, false); 
    73         vlm.showMedia("test"); 
     74        vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false); 
     75        vlm.showMedia(mediaName); 
    7476    } 
    7577     
     78    @Test 
     79    public void testDisableMedia() 
     80    { 
     81        VLM vlm = jvlc.getVLM(); 
     82        vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false); 
     83        vlm.disableMedia(mediaName); 
     84    } 
    7685     
     86    @Test 
     87    public void testPlayMedia() 
     88    { 
     89        VLM vlm = jvlc.getVLM(); 
     90        vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false); 
     91        vlm.playMedia(mediaName); 
     92    } 
    7793     
     94    @Test 
     95    public void testPauseMedia() 
     96    { 
     97        VLM vlm = jvlc.getVLM(); 
     98        vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false); 
     99        vlm.playMedia(mediaName); 
     100        vlm.pauseMedia(mediaName); 
     101    } 
     102 
     103    @Test 
     104    public void testStopMedia() 
     105    { 
     106        VLM vlm = jvlc.getVLM(); 
     107        vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false); 
     108        vlm.playMedia(mediaName); 
     109        vlm.stopMedia(mediaName); 
     110    } 
     111 
     112    @Test 
     113    public void testSeekMedia() 
     114    { 
     115        VLM vlm = jvlc.getVLM(); 
     116        vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false); 
     117        vlm.playMedia(mediaName); 
     118        vlm.seekMedia(mediaName, 0.3f); 
     119    } 
    78120     
     121    @Test 
     122    public void testAddMediaInput() 
     123    { 
     124        VLM vlm = jvlc.getVLM(); 
     125        vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false); 
     126        vlm.addMediaInput(mediaName, "file://" + mrl); 
     127    } 
     128     
     129    @Test 
     130    public void testEnableMedia() 
     131    { 
     132        VLM vlm = jvlc.getVLM(); 
     133        vlm.addBroadcast(mediaName, "file://" + mrl, "", null, false, false); 
     134        vlm.enableMedia(mediaName); 
     135    } 
     136     
     137    @Test 
     138    public void testDeleteMedia() 
     139    { 
     140        VLM vlm = jvlc.getVLM(); 
     141        vlm.addBroadcast(mediaName, "file://" + mrl, "", null, false, false); 
     142        vlm.deleteMedia(mediaName); 
     143    } 
     144     
     145    @Test 
     146    public void testMediaLoop() 
     147    { 
     148        VLM vlm = jvlc.getVLM(); 
     149        vlm.addBroadcast(mediaName, "file://" + mrl, "", null, false, false); 
     150        vlm.setMediaLoop(mediaName, true); 
     151    } 
    79152} 
  • modules/access/http.c

    r7e269d8 r770f7eb  
    128128    int i_nonce; 
    129129    char *psz_cnonce; 
    130     char *psz_A1; /* stored A1 value if algorithm = "MD5-sess" */ 
     130    char *psz_HA1; /* stored H(A1) value if algorithm = "MD5-sess" */ 
    131131} http_auth_t; 
    132132 
     
    210210static void AuthReply( access_t *p_acces, const char *psz_prefix, 
    211211                       vlc_url_t *p_url, http_auth_t *p_auth ); 
     212static int AuthCheckReply( access_t *p_access, const char *psz_header, 
     213                           vlc_url_t *p_url, http_auth_t *p_auth ); 
    212214static void AuthReset( http_auth_t *p_auth ); 
    213215 
     
    13611363        else if( !strcasecmp( psz, "authentication-info" ) ) 
    13621364        { 
    1363             msg_Dbg( p_access, "Authentication info: %s", p ); 
    1364             /* FIXME: use */ 
     1365            msg_Dbg( p_access, "Authentication Info header: %s", p ); 
     1366            if( AuthCheckReply( p_access, p, &p_sys->url, &p_sys->auth ) ) 
     1367                goto error; 
     1368        } 
     1369        else if( !strcasecmp( psz, "proxy-authentication-info" ) ) 
     1370        { 
     1371            msg_Dbg( p_access, "Proxy Authentication Info header: %s", p ); 
     1372            if( AuthCheckReply( p_access, p, &p_sys->proxy, &p_sys->proxy_auth ) ) 
     1373                goto error; 
    13651374        } 
    13661375 
     
    15121521        psz_header += strlen( psz_what ); 
    15131522        psz_end = strchr( psz_header, '"' ); 
    1514         if( !psz_end ) 
    1515         { 
    1516             psz_end = psz_header; 
    1517             while( *psz_end ) psz_end++; 
    1518         } 
     1523        if( !psz_end ) /* Invalid since we should have a closing quote */ 
     1524            return strdup( psz_header ); 
    15191525        return strndup( psz_header, psz_end - psz_header ); 
    15201526    } 
     
    15271533static char *AuthGetParamNoQuotes( const char *psz_header, const char *psz_param ) 
    15281534{ 
    1529     char psz_what[strlen(psz_param)+3]; 
     1535    char psz_what[strlen(psz_param)+2]; 
    15301536    sprintf( psz_what, "%s=", psz_param ); 
    15311537    psz_header = strstr( psz_header, psz_what ); 
     
    15351541        psz_header += strlen( psz_what ); 
    15361542        psz_end = strchr( psz_header, ',' ); 
    1537         if( !psz_end ) 
    1538         { 
    1539             psz_end = psz_header; 
    1540             while( *psz_end ) psz_end++; 
    1541         } 
     1543        /* XXX: Do we need to filter out trailing space between the value and 
     1544         * the comma/end of line? */ 
     1545        if( !psz_end ) /* Can be valid if this is the last parameter */ 
     1546            return strdup( psz_header ); 
    15421547        return strndup( psz_header, psz_end - psz_header ); 
    15431548    } 
     
    15771582        p_auth->psz_qop = AuthGetParam( psz_header, "qop" ); 
    15781583        p_auth->i_nonce = 0; 
    1579         /* printf("realm: %s\ndomain: %s\nnonce: %s\nopaque: %s\nstale: %s\nalgorithm: %s\nqop: %s\n",p_auth->psz_realm,p_auth->psz_domain,p_auth->psz_nonce,p_auth->psz_opaque,p_auth->psz_stale,p_auth->psz_algorithm,p_auth->psz_qop); */ 
     1584        /* printf("realm: |%s|\ndomain: |%s|\nnonce: |%s|\nopaque: |%s|\n" 
     1585                  "stale: |%s|\nalgorithm: |%s|\nqop: |%s|\n", 
     1586                  p_auth->psz_realm,p_auth->psz_domain,p_auth->psz_nonce, 
     1587                  p_auth->psz_opaque,p_auth->psz_stale,p_auth->psz_algorithm, 
     1588                  p_auth->psz_qop); */ 
    15801589        if( !p_auth->psz_realm ) 
    15811590            msg_Warn( p_access, "Digest Access Authentication: " 
     
    15841593            msg_Warn( p_access, "Digest Access Authentication: " 
    15851594                      "Mandatory 'nonce' parameter is missing" ); 
    1586         if( p_auth->psz_qop ) /* FIXME */ 
     1595        if( p_auth->psz_qop ) /* FIXME: parse the qop list */ 
    15871596        { 
    15881597            char *psz_tmp = strchr( p_auth->psz_qop, ',' ); 
     
    15931602    { 
    15941603        const char *psz_end = strchr( psz_header, ' ' ); 
    1595         if( !psz_end ) 
    1596         { 
    1597             psz_end = psz_header; 
    1598             while( *psz_end ) psz_end++; 
    1599         } 
    1600         msg_Warn( p_access, "Unknown authentication scheme: '%*s'", 
    1601                   psz_end - psz_header, psz_header ); 
    1602     } 
    1603 
    1604  
    1605 static char *AuthAlgoMD5( const char *psz_data ) 
    1606 
     1604        if( psz_end ) 
     1605            msg_Warn( p_access, "Unknown authentication scheme: '%*s'", 
     1606                      psz_end - psz_header, psz_header ); 
     1607        else 
     1608            msg_Warn( p_access, "Unknown authentication scheme: '%s'", 
     1609                      psz_header ); 
     1610    } 
     1611
     1612 
     1613static char *AuthDigest( access_t *p_access, vlc_url_t *p_url, 
     1614                         http_auth_t *p_auth, const char *psz_method ) 
     1615
     1616    (void)p_access; 
     1617    const char *psz_username = p_url->psz_username ?: ""; 
     1618    const char *psz_password = p_url->psz_password ?: ""; 
     1619 
     1620    char *psz_HA1 = NULL; 
     1621    char *psz_HA2 = NULL; 
     1622    char *psz_response = NULL; 
    16071623    struct md5_s md5; 
    1608     char *psz_md5; 
     1624 
     1625    /* H(A1) */ 
     1626    if( p_auth->psz_HA1 ) 
     1627    { 
     1628        psz_HA1 = strdup( p_auth->psz_HA1 ); 
     1629        if( !psz_HA1 ) goto error; 
     1630    } 
     1631    else 
     1632    { 
     1633        InitMD5( &md5 ); 
     1634        AddMD5( &md5, psz_username, strlen( psz_username ) ); 
     1635        AddMD5( &md5, ":", 1 ); 
     1636        AddMD5( &md5, p_auth->psz_realm, strlen( p_auth->psz_realm ) ); 
     1637        AddMD5( &md5, ":", 1 ); 
     1638        AddMD5( &md5, psz_password, strlen( psz_password ) ); 
     1639        EndMD5( &md5 ); 
     1640 
     1641        psz_HA1 = psz_md5_hash( &md5 ); 
     1642        if( !psz_HA1 ) goto error; 
     1643 
     1644        if( p_auth->psz_algorithm 
     1645            && !strcmp( p_auth->psz_algorithm, "MD5-sess" ) ) 
     1646        { 
     1647            InitMD5( &md5 ); 
     1648            AddMD5( &md5, psz_HA1, 32 ); 
     1649            free( psz_HA1 ); 
     1650            AddMD5( &md5, ":", 1 ); 
     1651            AddMD5( &md5, p_auth->psz_nonce, strlen( p_auth->psz_nonce ) ); 
     1652            AddMD5( &md5, ":", 1 ); 
     1653            AddMD5( &md5, p_auth->psz_cnonce, strlen( p_auth->psz_cnonce ) ); 
     1654            EndMD5( &md5 ); 
     1655 
     1656            psz_HA1 = psz_md5_hash( &md5 ); 
     1657            if( !psz_HA1 ) goto error; 
     1658            p_auth->psz_HA1 = strdup( psz_HA1 ); 
     1659            if( !p_auth->psz_HA1 ) goto error; 
     1660        } 
     1661    } 
     1662 
     1663    /* H(A2) */ 
    16091664    InitMD5( &md5 ); 
    1610     AddMD5( &md5, psz_data, strlen( psz_data ) ); 
     1665    if( *psz_method ) 
     1666        AddMD5( &md5, psz_method, strlen( psz_method ) ); 
     1667    AddMD5( &md5, ":", 1 ); 
     1668    if( p_url->psz_path ) 
     1669        AddMD5( &md5, p_url->psz_path, strlen( p_url->psz_path ) ); 
     1670    else 
     1671        AddMD5( &md5, "/", 1 ); 
     1672    if( p_auth->psz_qop && !strcmp( p_auth->psz_qop, "auth-int" ) ) 
     1673    { 
     1674        char *psz_ent; 
     1675        struct md5_s ent; 
     1676        InitMD5( &ent ); 
     1677        AddMD5( &ent, "", 0 ); /* XXX: entity-body. should be ok for GET */ 
     1678        EndMD5( &ent ); 
     1679        psz_ent = psz_md5_hash( &ent ); 
     1680        if( !psz_ent ) goto error; 
     1681        AddMD5( &md5, ":", 1 ); 
     1682        AddMD5( &md5, psz_ent, 32 ); 
     1683        free( psz_ent ); 
     1684    } 
    16111685    EndMD5( &md5 ); 
    1612     psz_md5 = psz_md5_hash( &md5 ); 
    1613     return psz_md5; 
    1614 
     1686    psz_HA2 = psz_md5_hash( &md5 ); 
     1687    if( !psz_HA2 ) goto error; 
     1688 
     1689    /* Request digest */ 
     1690    InitMD5( &md5 ); 
     1691    AddMD5( &md5, psz_HA1, 32 ); 
     1692    AddMD5( &md5, ":", 1 ); 
     1693    AddMD5( &md5, p_auth->psz_nonce, strlen( p_auth->psz_nonce ) ); 
     1694    AddMD5( &md5, ":", 1 ); 
     1695    if( p_auth->psz_qop 
     1696        && ( !strcmp( p_auth->psz_qop, "auth" ) 
     1697             || !strcmp( p_auth->psz_qop, "auth-int" ) ) ) 
     1698    { 
     1699        char psz_inonce[9]; 
     1700        snprintf( psz_inonce, 9, "%08x", p_auth->i_nonce ); 
     1701        AddMD5( &md5, psz_inonce, 8 ); 
     1702        AddMD5( &md5, ":", 1 ); 
     1703        AddMD5( &md5, p_auth->psz_cnonce, strlen( p_auth->psz_cnonce ) ); 
     1704        AddMD5( &md5, ":", 1 ); 
     1705        AddMD5( &md5, p_auth->psz_qop, strlen( p_auth->psz_qop ) ); 
     1706        AddMD5( &md5, ":", 1 ); 
     1707    } 
     1708    AddMD5( &md5, psz_HA2, 32 ); 
     1709    EndMD5( &md5 ); 
     1710    psz_response = psz_md5_hash( &md5 ); 
     1711 
     1712    error: 
     1713        free( psz_HA1 ); 
     1714        free( psz_HA2 ); 
     1715        return psz_response; 
     1716
     1717 
    16151718 
    16161719static void AuthReply( access_t *p_access, const char *psz_prefix, 
     
    16261729    { 
    16271730        /* Digest Access Authentication */ 
    1628         char *psz_response = NULL; 
    1629         char *psz_A1 = NULL; 
    1630         char *psz_A2 = NULL; 
    1631         char *psz_secret = NULL; 
    1632         char *psz_data = NULL; 
    1633         char * (*pf_algo)( const char * ); 
    1634  
    1635         if(    p_auth->psz_algorithm == NULL 
    1636             || !strcmp( p_auth->psz_algorithm, "MD5" ) 
    1637             || !strcmp( p_auth->psz_algorithm, "MD5-sess" ) ) 
    1638         { 
    1639             pf_algo = AuthAlgoMD5; 
    1640         } 
    1641         else 
     1731        char *psz_response; 
     1732 
     1733        if(    p_auth->psz_algorithm 
     1734            && strcmp( p_auth->psz_algorithm, "MD5" ) 
     1735            && strcmp( p_auth->psz_algorithm, "MD5-sess" ) ) 
    16421736        { 
    16431737            msg_Err( p_access, "Digest Access Authentication: " 
    16441738                     "Unknown algorithm '%s'", p_auth->psz_algorithm ); 
    1645         } 
    1646         if( !pf_algo ) return; 
    1647  
    1648         if( p_auth->psz_qop
     1739            return; 
     1740        } 
     1741 
     1742        if( p_auth->psz_qop || !p_auth->psz_cnonce
    16491743        { 
    16501744            /* FIXME: needs to be really random to prevent man in the middle 
     
    16551749        p_auth->i_nonce ++; 
    16561750 
    1657         if( p_auth->psz_algorithm && !strcmp( p_auth->psz_algorithm, "MD5-sess" ) ) 
    1658         { 
    1659             if( !p_auth->psz_A1 ) 
    1660             { 
    1661                 char *psz_tmp = NULL; 
    1662                 if( asprintf( &psz_A1, "%s:%s:%s", psz_username, 
    1663                               p_auth->psz_realm, psz_password ) < 0 ) 
    1664                     goto error; 
    1665                 psz_tmp = pf_algo( psz_A1 ); 
    1666                 free( psz_A1 ); psz_A1 = NULL; 
    1667                 if( !psz_tmp ) goto error; 
    1668                 if( asprintf( &psz_A1, "%s:%s:%s", psz_tmp, p_auth->psz_nonce, 
    1669                     p_auth->psz_cnonce ) < 0 ) 
    1670                 { 
    1671                     free( psz_tmp ); 
    1672                     goto error; 
    1673                 } 
    1674                 p_auth->psz_A1 = strdup( psz_A1 ); 
    1675             } 
    1676             else 
    1677             { 
    1678                 psz_A1 = strdup( p_auth->psz_A1 ); 
    1679             } 
    1680         } 
    1681         else 
    1682         { 
    1683             if( asprintf( &psz_A1, "%s:%s:%s", psz_username, p_auth->psz_realm, 
    1684                           psz_password ) < 0 ) goto error; 
    1685         } 
    1686  
    1687         if( !p_auth->psz_qop || !strcmp( p_auth->psz_qop, "auth" ) ) 
    1688         { 
    1689             if( asprintf( &psz_A2, "%s:%s", "GET", p_url->psz_path ?: "/" ) 
    1690                 < 0 ) goto error; 
    1691         } 
    1692         else 
    1693         { 
    1694             char *psz_tmp = pf_algo( "FIXME entity-body" ); /* FIXME */ 
    1695             if( asprintf( &psz_A2, "%s:%s:%s", "GET", p_url->psz_path ?: "/", 
    1696                 psz_tmp ) < 0 ) 
    1697             { 
    1698                 free( psz_tmp ); 
    1699                 goto error; 
    1700             } 
    1701             free( psz_tmp ); 
    1702         } 
    1703  
    1704         psz_secret = pf_algo( psz_A1 ); 
    1705  
    1706         if( p_auth->psz_qop 
    1707             && ( !strcmp( p_auth->psz_qop, "auth" ) 
    1708                  || !strcmp( p_auth->psz_qop, "auth-int" ) ) ) 
    1709         { 
    1710             char *psz_tmp = pf_algo( psz_A2 ); 
    1711             if( !psz_tmp ) goto error; 
    1712             if( asprintf( &psz_data, "%s:%08x:%s:%s:%s", 
    1713                           p_auth->psz_nonce, p_auth->i_nonce, 
    1714                           p_auth->psz_cnonce, p_auth->psz_qop, psz_tmp ) < 0 ) 
    1715             { 
    1716                 free( psz_tmp ); 
    1717                 goto error; 
    1718             } 
    1719             free( psz_tmp ); 
    1720         } 
    1721         else 
    1722         { 
    1723             char *psz_tmp = pf_algo( psz_A2 ); 
    1724             if( !psz_tmp ) goto error; 
    1725             if( asprintf( &psz_data, "%s:%s", p_auth->psz_nonce, psz_tmp ) < 0 ) 
    1726             { 
    1727                 free( psz_tmp ); 
    1728                 goto error; 
    1729             } 
    1730             free( psz_tmp ); 
    1731         } 
    1732  
    1733         if( psz_secret && psz_data ) 
    1734         { 
    1735             char *psz_tmp = NULL; 
    1736             if( asprintf( &psz_tmp, "%s:%s", psz_secret, psz_data ) < 0 ) 
    1737                 goto error; 
    1738             psz_response = pf_algo( psz_tmp ); 
    1739             free( psz_tmp ); 
    1740             if( !psz_response ) 
    1741                 goto error; 
    1742         } 
    1743         else 
    1744         { 
    1745             goto error; 
    1746         } 
     1751        psz_response = AuthDigest( p_access, p_url, p_auth, "GET" ); 
     1752        if( !psz_response ) return; 
    17471753 
    17481754        net_Printf( VLC_OBJECT(p_access), p_sys->fd, pvs, 
     
    17861792                  ); 
    17871793 
    1788     error: 
    17891794        free( psz_response ); 
    1790         free( psz_A1 ); 
    1791         free( psz_A2 ); 
    1792         free( psz_secret ); 
    1793         free( psz_data ); 
    17941795    } 
    17951796    else 
     
    18091810        } 
    18101811    } 
     1812} 
     1813 
     1814static int AuthCheckReply( access_t *p_access, const char *psz_header, 
     1815                           vlc_url_t *p_url, http_auth_t *p_auth ) 
     1816{ 
     1817    int i_ret = VLC_EGENERIC; 
     1818    char *psz_nextnonce = AuthGetParam( psz_header, "nextnonce" ); 
     1819    char *psz_qop = AuthGetParamNoQuotes( psz_header, "qop" ); 
     1820    char *psz_rspauth = AuthGetParam( psz_header, "rspauth" ); 
     1821    char *psz_cnonce = AuthGetParam( psz_header, "cnonce" ); 
     1822    char *psz_nc = AuthGetParamNoQuotes( psz_header, "nc" ); 
     1823 
     1824    if( psz_cnonce ) 
     1825    { 
     1826        char *psz_digest; 
     1827 
     1828        if( strcmp( psz_cnonce, p_auth->psz_cnonce ) ) 
     1829        { 
     1830            msg_Err( p_access, "HTTP Digest Access Authentication: server replied with a different client nonce value." ); 
     1831            goto error; 
     1832        } 
     1833 
     1834        if( psz_nc ) 
     1835        { 
     1836            int i_nonce; 
     1837            i_nonce = strtol( psz_nc, NULL, 16 ); 
     1838            if( i_nonce != p_auth->i_nonce ) 
     1839            { 
     1840                msg_Err( p_access, "HTTP Digest Access Authentication: server replied with a different nonce count value." ); 
     1841                goto error; 
     1842            } 
     1843        } 
     1844 
     1845        if( psz_qop && p_auth->psz_qop && strcmp( psz_qop, p_auth->psz_qop ) ) 
     1846            msg_Warn( p_access, "HTTP Digest Access Authentication: server replied using a different 'quality of protection' option" ); 
     1847 
     1848        /* All the clear text values match, let's now check the response 
     1849         * digest */ 
     1850        psz_digest = AuthDigest( p_access, p_url, p_auth, "" ); 
     1851        if( strcmp( psz_digest, psz_rspauth ) ) 
     1852        { 
     1853            msg_Err( p_access, "HTTP Digest Access Authentication: server replied with an invalid response digest (expected value: %s).", psz_digest ); 
     1854            free( psz_digest ); 
     1855            goto error; 
     1856        } 
     1857        free( psz_digest ); 
     1858    } 
     1859 
     1860    if( psz_nextnonce ) 
     1861    { 
     1862        free( p_auth->psz_nonce ); 
     1863        p_auth->psz_nonce = psz_nextnonce; 
     1864        psz_nextnonce = NULL; 
     1865    } 
     1866 
     1867    i_ret = VLC_SUCCESS; 
     1868    error: 
     1869        free( psz_nextnonce ); 
     1870        free( psz_qop ); 
     1871        free( psz_rspauth ); 
     1872        free( psz_cnonce ); 
     1873        free( psz_nc ); 
     1874 
     1875    return i_ret; 
    18111876} 
    18121877 
     
    18221887    p_auth->i_nonce = 0; 
    18231888    FREENULL( p_auth->psz_cnonce ); 
    1824     FREENULL( p_auth->psz_A1 ); 
    1825 } 
     1889    FREENULL( p_auth->psz_HA1 ); 
     1890} 
  • modules/codec/faad.c

    rd2bd568 rc86adb0  
    267267            p_dec->fmt_out.audio.i_rate = i_rate; 
    268268            p_dec->fmt_out.audio.i_channels = i_channels; 
     269            p_dec->fmt_out.audio.i_physical_channels 
     270                = p_dec->fmt_out.audio.i_original_channels 
     271                = pi_channels_guessed[i_channels]; 
     272 
    269273            aout_DateInit( &p_sys->date, i_rate ); 
    270274        } 
     
    287291        p_dec->fmt_out.audio.i_rate = i_rate; 
    288292        p_dec->fmt_out.audio.i_channels = i_channels; 
     293        p_dec->fmt_out.audio.i_physical_channels 
     294            = p_dec->fmt_out.audio.i_original_channels 
     295            = pi_channels_guessed[i_channels]; 
    289296        aout_DateInit( &p_sys->date, i_rate ); 
    290297    } 
     
    363370        p_dec->fmt_out.audio.i_rate = frame.samplerate; 
    364371        p_dec->fmt_out.audio.i_channels = frame.channels; 
     372        p_dec->fmt_out.audio.i_physical_channels 
     373            = p_dec->fmt_out.audio.i_original_channels 
     374            = pi_channels_guessed[frame.channels]; 
    365375 
    366376        /* Adjust stream info when dealing with SBR/PS */ 
  • modules/stream_out/rtsp.c

    rdbddc5a reee1922  
    602602 
    603603            psz_session = httpd_MsgGet( query, "Session" ); 
     604#if 0 
     605            /* FIXME: This breaks totem, mplayer and quicktime at least */ 
    604606            if( httpd_MsgGet( query, "Range" ) != NULL ) 
    605607            { 
     
    607609                break; 
    608610            } 
    609  
     611#endif 
    610612            vlc_mutex_lock( &rtsp->lock ); 
    611613            ses = RtspClientGet( rtsp, psz_session ); 
  • modules/video_output/x11/xcommon.c

    r78e39f0 rb6cdf13  
    427427    msg_Dbg(p_vout, "Crop = %d", p_vout->p_sys->xvmc_crop_style); 
    428428 
    429     if( !checkXvMCCap( p_vout )
     429    if( checkXvMCCap( p_vout ) == VLC_EGENERIC
    430430    { 
    431431        msg_Err( p_vout, "no XVMC capability found" ); 
  • modules/video_output/x11/xvmc.c

    r8d06898 r8655e09  
    149149 
    150150    set_description( _("XVMC extension video output") ); 
    151     set_capability( "video output", 160 ); 
     151    set_capability( "video output", 10 ); 
    152152    set_callbacks( E_(Activate), E_(Deactivate) ); 
    153153vlc_module_end(); 
     
    475475{ 
    476476    xvmc_surface_handler_t *handler = &p_vout->p_sys->xvmc_surf_handler; 
    477     unsigned int index = surf - handler->surfaces; 
     477    unsigned long index = surf - handler->surfaces; 
    478478    int ret; 
    479479 
    480     if (index >= XVMC_MAX_SURFACES
     480    if( index >= XVMC_MAX_SURFACES
    481481        return 0; 
    482482    pthread_mutex_lock(&handler->mutex); 
     
    746746 
    747747    /* 
    748     * Try to create a direct rendering context. This will fail if we are not 
    749     * on the displaying computer or an indirect context is not available. 
    750     */ 
     748    * Try to create a direct rendering context. This will fail if we are not 
     749    * on the displaying computer or an indirect context is not available. 
     750    */ 
    751751    XVMCUNLOCKDISPLAY( p_vout->p_sys->p_display ); 
    752752    curCap = p_vout->p_sys->xvmc_cap; 
     
    755755                                      curCap->max_width, 
    756756                                      curCap->max_height, 
    757                                       XVMC_DIRECT, &c) ) 
    758     { 
    759             p_vout->p_sys->context_flags = XVMC_DIRECT; 
     757                                      XVMC_DIRECT, &c ) ) 
     758    { 
     759        msg_Dbg( p_vout, "using direct XVMC rendering context" ); 
     760        p_vout->p_sys->context_flags = XVMC_DIRECT; 
    760761    } 
    761762    else if( Success == XvMCCreateContext( p_vout->p_sys->p_display, i_xvport, 
     
    763764                                           curCap->max_width, 
    764765                                           curCap->max_height, 
    765                                            0, &c) ) 
    766     { 
     766                                           0, &c ) ) 
     767    { 
     768        msg_Dbg( p_vout, "using default XVMC rendering context" ); 
    767769        p_vout->p_sys->context_flags = 0; 
    768770    } 
     
    779781    XVMCLOCKDISPLAY( p_vout->p_sys->p_display ); 
    780782    XvMCDestroyContext( p_vout->p_sys->p_display, &c ); 
    781     xxmc_xvmc_surface_handler_construct(p_vout ); 
     783    xxmc_xvmc_surface_handler_construct( p_vout ); 
    782784    /*  p_vout->p_sys->capabilities |= VO_CAP_XXMC; */ 
    783785    XVMCUNLOCKDISPLAY( p_vout->p_sys->p_display ); 
     
    961963        { 
    962964            handler->surfInUse[i] = 1; 
     965            msg_Dbg( p_vout, "reusing surface %d", i ); 
    963966            xxmc_xvmc_dump_surfaces( p_vout ); 
    964967            pthread_mutex_unlock( &handler->mutex ); 
     
    11181121    xvmc_context_reader_lock( &p_vout->p_sys->xvmc_lock ); 
    11191122 
    1120     if( ! xxmc_xvmc_surface_valid( p_vout, picture->p_sys->xvmc_surf)) { 
     1123    if( !xxmc_xvmc_surface_valid( p_vout, picture->p_sys->xvmc_surf ) ) 
     1124    { 
    11211125        msg_Dbg(p_vout, "xvmc_flushsync 1 : %d", picture->p_sys->xxmc_data.result ); 
    11221126        picture->p_sys->xxmc_data.result = 128; 
     
    13971401    xvmc_context_reader_lock( &p_vout->p_sys->xvmc_lock ); 
    13981402 
    1399     if( ! xxmc_xvmc_surface_valid( p_vout, picture->p_sys->xvmc_surf) ) 
     1403    if( !xxmc_xvmc_surface_valid( p_vout, picture->p_sys->xvmc_surf ) ) 
    14001404    { 
    14011405        picture->p_sys->xxmc_data.result = 128; 
  • po/sl.po

    r59ccae2 r9a18adb  
    55"Project-Id-Version: vlc 0.9.0\n" 
    66"Report-Msgid-Bugs-To: vlc-devel@videolan.org\n" 
    7 "POT-Creation-Date: 2008-03-28 17:27+0000\n" 
    8 "PO-Revision-Date: 2008-03-21 17:16+0100\n" 
     7"POT-Creation-Date: 2008-04-10 22:37+0100\n" 
     8"PO-Revision-Date: 2008-04-10 07:55+0100\n" 
    99"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n" 
    1010"Language-Team: Slovenian <sl@li.org>\n" 
     
    3434msgstr "Splošno" 
    3535 
    36 #: include/vlc_config_cat.h:43 modules/gui/macosx/simple_prefs.m:169 
     36#: include/vlc_config_cat.h:43 modules/gui/macosx/simple_prefs.m:167 
    3737#: modules/gui/qt4/components/simple_preferences.cpp:73 
    3838#: modules/misc/dummy/dummy.c:67 
     
    6565 
    6666#: include/vlc_config_cat.h:54 include/vlc_config_cat.h:55 
    67 #: modules/gui/macosx/simple_prefs.m:189 
     67#: modules/gui/macosx/simple_prefs.m:187 
    6868msgid "Hotkeys settings" 
    6969msgstr "Nastavitve hitrih tipk" 
    7070 
    71 #: include/vlc_config_cat.h:58 src/input/es_out.c:2040 
    72 #: src/libvlc-module.c:1415 modules/gui/beos/InterfaceWindow.cpp:284 
     71#: include/vlc_config_cat.h:58 src/input/es_out.c:2045 
     72#: src/libvlc-module.c:1417 modules/gui/beos/InterfaceWindow.cpp:284 
    7373#: modules/gui/macosx/extended.m:69 modules/gui/macosx/intf.m:710 
    7474#: modules/gui/macosx/output.m:170 modules/gui/macosx/playlistinfo.m:107 
    75 #: modules/gui/macosx/simple_prefs.m:173 modules/gui/macosx/wizard.m:378 
     75#: modules/gui/macosx/simple_prefs.m:171 modules/gui/macosx/wizard.m:378 
    7676#: modules/gui/qt4/components/info_panels.cpp:519 
    7777#: modules/gui/qt4/components/simple_preferences.cpp:75 
     
    9393 
    9494#: include/vlc_config_cat.h:64 include/vlc_config_cat.h:89 
    95 #: src/video_output/video_output.c:435 
     95#: src/video_output/video_output.c:434 
    9696msgid "Filters" 
    9797msgstr "Filtri" 
     
    118118msgstr "Splošne nastavitve za enote odvajanja zvoka." 
    119119 
    120 #: include/vlc_config_cat.h:75 src/libvlc-module.c:1797 
     120#: include/vlc_config_cat.h:75 src/libvlc-module.c:1799 
    121121#: modules/gui/qt4/ui/sout.ui:758 
    122122#: modules/gui/wxwidgets/dialogs/streamout.cpp:578 
     
    129129msgstr "Različne nastavitve zvoka in enot" 
    130130 
    131 #: include/vlc_config_cat.h:79 src/input/es_out.c:2068 
    132 #: src/libvlc-module.c:1463 modules/gui/macosx/extended.m:68 
     131#: include/vlc_config_cat.h:79 src/input/es_out.c:2073 
     132#: src/libvlc-module.c:1465 modules/gui/macosx/extended.m:68 
    133133#: modules/gui/macosx/intf.m:723 modules/gui/macosx/output.m:160 
    134 #: modules/gui/macosx/playlistinfo.m:96 modules/gui/macosx/simple_prefs.m:177 
     134#: modules/gui/macosx/playlistinfo.m:96 modules/gui/macosx/simple_prefs.m:175 
    135135#: modules/gui/macosx/wizard.m:379 
    136136#: modules/gui/qt4/components/info_panels.cpp:520 
     
    248248msgstr "Splošne nastavitve dovajanja. Uporabite previdno." 
    249249 
    250 #: include/vlc_config_cat.h:135 src/libvlc-module.c:1723 
     250#: include/vlc_config_cat.h:135 src/libvlc-module.c:1725 
    251251#: modules/gui/qt4/dialogs/sout.cpp:44 
    252252#: modules/gui/wxwidgets/dialogs/streamout.cpp:152 
     
    359359msgstr "Dopolnilo VLC programa za predvajanje Videa na zahtevo" 
    360360 
    361 #: include/vlc_config_cat.h:186 src/libvlc-module.c:1859 
    362 #: src/playlist/engine.c:114 modules/demux/playlist/playlist.c:66 
     361#: include/vlc_config_cat.h:186 src/libvlc-module.c:1861 
     362#: src/playlist/engine.c:116 modules/demux/playlist/playlist.c:66 
    363363#: modules/demux/playlist/playlist.c:67 
    364364#: modules/gui/beos/InterfaceWindow.cpp:233 
     
    398398"seznam predvajanja." 
    399399 
    400 #: include/vlc_config_cat.h:197 src/libvlc-module.c:1682 
     400#: include/vlc_config_cat.h:197 src/libvlc-module.c:1684 
    401401#: modules/gui/macosx/prefs.m:125 
    402402msgid "Advanced" 
     
    428428 
    429429#: include/vlc_config_cat.h:207 modules/gui/macosx/open.m:164 
    430 #: modules/gui/macosx/open.m:413 modules/gui/macosx/simple_prefs.m:249 
     430#: modules/gui/macosx/open.m:413 modules/gui/macosx/simple_prefs.m:247 
    431431#: modules/gui/pda/pda_interface.c:546 modules/gui/qt4/ui/sprefs_input.ui:46 
    432432#: modules/gui/wxwidgets/dialogs/open.cpp:507 
     
    555555#: modules/gui/macosx/intf.m:1687 modules/gui/macosx/playlist.m:438 
    556556#: modules/gui/pda/pda_interface.c:260 modules/gui/pda/pda_interface.c:261 
    557 #: modules/gui/qt4/components/interface_widgets.cpp:552 
    558 #: modules/gui/qt4/components/interface_widgets.cpp:734 
    559 #: modules/gui/qt4/menus.cpp:505 modules/gui/qt4/menus.cpp:509 
     557#: modules/gui/qt4/components/interface_widgets.cpp:555 
     558#: modules/gui/qt4/components/interface_widgets.cpp:738 
     559#: modules/gui/qt4/menus.cpp:508 modules/gui/qt4/menus.cpp:512 
    560560#: modules/gui/wxwidgets/dialogs/playlist.cpp:280 
    561561#: modules/gui/wxwidgets/dialogs/playlist.cpp:289 
     
    607607msgstr "Odpri mapo ..." 
    608608 
    609 #: include/vlc_intf_strings.h:64 src/libvlc-module.c:1101 
     609#: include/vlc_intf_strings.h:64 src/libvlc-module.c:1103 
    610610msgid "Repeat all" 
    611611msgstr "Ponovi vse" 
     
    619619msgstr "Brez ponavljanja" 
    620620 
    621 #: include/vlc_intf_strings.h:68 src/libvlc-module.c:1306 
     621#: include/vlc_intf_strings.h:68 src/libvlc-module.c:1308 
    622622#: modules/gui/macosx/controls.m:919 modules/gui/macosx/intf.m:697 
    623623msgid "Random" 
     
    687687msgstr "Pomnoževanje slike" 
    688688 
    689 #: include/vlc_intf_strings.h:96 modules/gui/qt4/ui/video_effects.ui:332 
     689#: include/vlc_intf_strings.h:96 modules/gui/qt4/ui/video_effects.ui:440 
    690690msgid "Magnification" 
    691691msgstr "Povečevanje" 
     
    698698"Povečevanje dela slike. Izberete lahko kateri del slike naj bo povečan." 
    699699 
    700 #: include/vlc_intf_strings.h:100 modules/gui/qt4/ui/video_effects.ui:446 
     700#: include/vlc_intf_strings.h:100 modules/gui/qt4/ui/video_effects.ui:545 
    701701msgid "Waves" 
    702702msgstr "Valovanje" 
     
    800800"html>" 
    801801 
    802 #: include/vlc_meta.h:167 modules/gui/macosx/playlist.m:1092 
     802#: include/vlc_meta.h:167 modules/gui/macosx/playlist.m:1093 
    803803msgid "Meta-information" 
    804804msgstr "Meta-podrobnosti" 
     
    806806#: include/vlc_meta.h:169 modules/access/cdda/info.c:329 
    807807#: modules/access/cdda/info.c:397 modules/gui/macosx/playlist.m:128 
    808 #: modules/gui/qt4/components/playlist/playlist_item.cpp:131 
    809808msgid "Duration" 
    810809msgstr "Trajanje" 
     
    834833 
    835834#: src/audio_output/input.c:94 src/audio_output/input.c:138 
    836 #: src/input/es_out.c:447 src/libvlc-module.c:548 
    837 #: src/video_output/video_output.c:412 modules/codec/ffmpeg/postprocess.c:98 
     835#: src/input/es_out.c:447 src/libvlc-module.c:550 
     836#: src/video_output/video_output.c:411 modules/codec/ffmpeg/postprocess.c:98 
    838837msgid "Disable" 
    839838msgstr "Onemogoči" 
     
    887886#: modules/codec/subtitles/subsdec.c:99 modules/codec/zvbi.c:98 
    888887#: modules/control/gestures.c:91 modules/gui/fbosd.c:167 
    889 #: modules/gui/qt4/ui/video_effects.ui:590 
    890 #: modules/gui/qt4/ui/video_effects.ui:758 modules/video_filter/logo.c:99 
     888#: modules/gui/qt4/ui/video_effects.ui:352 
     889#: modules/gui/qt4/ui/video_effects.ui:861 
     890#: modules/gui/qt4/ui/video_effects.ui:929 modules/video_filter/logo.c:99 
    891891#: modules/video_filter/marq.c:133 modules/video_filter/mosaic.c:171 
    892892#: modules/video_filter/osdmenu.c:84 modules/video_filter/rss.c:168 
     
    899899#: modules/codec/subtitles/subsdec.c:99 modules/codec/zvbi.c:98 
    900900#: modules/control/gestures.c:91 modules/gui/fbosd.c:167 
    901 #: modules/video_filter/logo.c:99 modules/video_filter/marq.c:133 
    902 #: modules/video_filter/mosaic.c:171 modules/video_filter/osdmenu.c:84 
    903 #: modules/video_filter/rss.c:168 
     901#: modules/gui/qt4/ui/video_effects.ui:369 modules/video_filter/logo.c:99 
     902#: modules/video_filter/marq.c:133 modules/video_filter/mosaic.c:171 
     903#: modules/video_filter/osdmenu.c:84 modules/video_filter/rss.c:168 
    904904msgid "Right" 
    905905msgstr "Desno" 
     
    921921msgstr "boolean" 
    922922 
    923 #: src/config/file.c:559 src/libvlc-common.c:1527 
     923#: src/config/file.c:559 src/libvlc-common.c:1554 
    924924msgid "integer" 
    925925msgstr "celo število" 
    926926 
    927 #: src/config/file.c:568 src/libvlc-common.c:1554 
     927#: src/config/file.c:568 src/libvlc-common.c:1581 
    928928msgid "float" 
    929929msgstr "plavajoče" 
    930930 
    931 #: src/config/file.c:591 src/libvlc-common.c:1508 
     931#: src/config/file.c:591 src/libvlc-common.c:1535 
    932932msgid "string" 
    933933msgstr "niz" 
    934934 
    935 #: src/control/media_list.c:227 src/playlist/engine.c:128 
     935#: src/control/media_list.c:227 src/playlist/engine.c:130 
    936936#: src/playlist/loadsave.c:147 
    937937msgid "Media Library" 
     
    10131013#: src/input/decoder.c:164 src/input/decoder.c:176 src/input/decoder.c:378 
    10141014#: modules/codec/ffmpeg/encoder.c:226 modules/codec/ffmpeg/encoder.c:234 
    1015 #: modules/codec/ffmpeg/encoder.c:246 modules/codec/ffmpeg/encoder.c:653 
    1016 #: modules/codec/ffmpeg/encoder.c:662 modules/stream_out/es.c:370 
     1015#: modules/codec/ffmpeg/encoder.c:246 modules/codec/ffmpeg/encoder.c:658 
     1016#: modules/codec/ffmpeg/encoder.c:667 modules/stream_out/es.c:370 
    10171017#: modules/stream_out/es.c:384 
    10181018msgid "Streaming / Transcoding failed" 
     
    10401040 
    10411041#: src/input/es_out.c:659 src/input/es_out.c:661 src/input/var.c:132 
    1042 #: src/libvlc-module.c:581 modules/gui/macosx/intf.m:703 
     1042#: src/libvlc-module.c:583 modules/gui/macosx/intf.m:703 
    10431043#: modules/gui/macosx/intf.m:704 
    10441044msgid "Program" 
     
    10611061msgstr "Zaprt naslov 4" 
    10621062 
    1063 #: src/input/es_out.c:2027 modules/codec/faad.c:37
     1063#: src/input/es_out.c:2032 modules/codec/faad.c:38
    10641064#, c-format 
    10651065msgid "Stream %d" 
    10661066msgstr "Predvajanje %d" 
    10671067 
    1068 #: src/input/es_out.c:2029 modules/gui/macosx/wizard.m:383 
     1068#: src/input/es_out.c:2034 modules/gui/macosx/wizard.m:383 
    10691069#: modules/gui/qt4/ui/sout.ui:562 modules/gui/qt4/ui/sout.ui:641 
    10701070#: modules/gui/wxwidgets/dialogs/wizard.cpp:822 
     
    10731073msgstr "Kodek" 
    10741074 
    1075 #: src/input/es_out.c:2032 src/input/meta.c:58 src/libvlc-module.c:168 
     1075#: src/input/es_out.c:2037 src/input/meta.c:60 src/libvlc-module.c:168 
    10761076#: modules