[libdvdcss-devel] [PATCH] Document some DVD-related abbreviations.

Jean-Baptiste Kempf jb at videolan.org
Fri Nov 14 15:55:22 CET 2014


OK, except the 2-lines strings, if they break MSVC.

On 14 Nov, Diego Biurrun wrote :
> Also fix some small typos in drive-by mode.
> ---
>  README            |  2 +-
>  src/css.c         | 51 ++++++++++++++++++++++++++++-----------------------
>  src/ioctl.c       |  2 +-
>  src/libdvdcss.c   |  2 +-
>  test/dvd_region.c |  7 ++++---
>  5 files changed, 35 insertions(+), 29 deletions(-)
> 
> diff --git a/README b/README
> index 61b0987..0ac5c1f 100644
> --- a/README
> +++ b/README
> @@ -42,7 +42,7 @@ Troubleshooting
>  ===============
>  
>  A mailing-list has been set up for support and discussion about
> -libdvdcss. Its address is :
> +libdvdcss. Its address is:
>  
>     <libdvdcss-devel at videolan.org>
>  
> diff --git a/src/css.c b/src/css.c
> index ca9e0a4..699bd66 100644
> --- a/src/css.c
> +++ b/src/css.c
> @@ -97,7 +97,8 @@ static int  dvdcss_titlekey ( dvdcss_t, int, dvd_key );
>   *   1: DVD is scrambled but can be read
>   *   0: DVD is not scrambled and can be read
>   *  -1: could not get "copyright" information
> - *  -2: could not get RPC information (reading the disc might be possible)
> + *  -2: could not get RPC (Regional Playback Control) information
> + *      (reading the disc might be possible)
>   *  -3: drive is RPC-II, region is not set, and DVD is scrambled: the RPC
>   *      scheme will prevent us from reading the scrambled data
>   *****************************************************************************/
> @@ -141,7 +142,8 @@ int dvdcss_test( dvdcss_t dvdcss )
>  
>      if( i_ret < 0 )
>      {
> -        print_error( dvdcss, "css error: could not get RPC status. Assuming RPC-I drive." );
> +        print_error( dvdcss, "css error: could not get RPC (Regional Playback "
> +                     "Control) status. Assuming RPC-I drive." );
>          i_type = i_mask = i_rpc = 0;
>      }
>  
> @@ -149,7 +151,7 @@ int dvdcss_test( dvdcss_t dvdcss )
>      {
>          case 0: psz_rpc = "RPC-I"; break;
>          case 1: psz_rpc = "RPC-II"; break;
> -        default: psz_rpc = "unknown RPC scheme"; break;
> +        default: psz_rpc = "unknown RPC (Regional Playback Control) scheme"; break;
>      }
>  
>      switch( i_type )
> @@ -245,14 +247,16 @@ int dvdcss_title ( dvdcss_t dvdcss, int i_block )
>          }
>      }
>  
> -    /* Crack or decrypt CSS title key for current VTS */
> +    /* Crack or decrypt Content Scrambling System (CSS) title key
> +     * for current Video Title Set (VTS). */
>      if( i_ret < 0 )
>      {
>          i_ret = dvdcss_titlekey( dvdcss, i_block, p_title_key );
>  
>          if( i_ret < 0 )
>          {
> -            print_error( dvdcss, "fatal error in VTS CSS key" );
> +            print_error( dvdcss, "fatal error in Video Title Set (VTS) "
> +                                 "Content Scrambling System (CSS) key" );
>              return i_ret;
>          }
>  
> @@ -454,7 +458,7 @@ static int dvdcss_titlekey( dvdcss_t dvdcss, int i_pos, dvd_key p_title_key )
>          {
>              case -1:
>                  /* An error getting the ASF status, something must be wrong. */
> -                print_debug( dvdcss, "lost ASF requesting title key" );
> +                print_debug( dvdcss, "lost authentication success flag (ASF), requesting title key" );
>                  ioctl_InvalidateAgid( dvdcss->i_fd, &dvdcss->css.i_agid );
>                  i_ret = -1;
>                  break;
> @@ -462,7 +466,7 @@ static int dvdcss_titlekey( dvdcss_t dvdcss, int i_pos, dvd_key p_title_key )
>              case 0:
>                  /* This might either be a title that has no key,
>                   * or we encountered a region error. */
> -                print_debug( dvdcss, "lost ASF requesting title key" );
> +                print_debug( dvdcss, "lost authentication success flag (ASF), requesting title key" );
>                  break;
>  
>              case 1:
> @@ -533,8 +537,8 @@ static int dvdcss_titlekey( dvdcss_t dvdcss, int i_pos, dvd_key p_title_key )
>  /*****************************************************************************
>   * dvdcss_unscramble: does the actual descrambling of data
>   *****************************************************************************
> - * sec : sector to unscramble
> - * key : title key for this sector
> + * sec: sector to unscramble
> + * key: title key for this sector
>   *****************************************************************************/
>  int dvdcss_unscramble( dvd_key p_key, uint8_t *p_sec )
>  {
> @@ -579,12 +583,12 @@ int dvdcss_unscramble( dvd_key p_key, uint8_t *p_sec )
>  /* Following functions are local */
>  
>  /*****************************************************************************
> - * GetBusKey : Go through the CSS Authentication process
> + * GetBusKey: Go through the Content Scrambling System (CSS) authentication process
>   *****************************************************************************
>   * It simulates the mutual authentication between logical unit and host,
>   * and stops when a session key (called bus key) has been established.
>   * Always do the full auth sequence. Some drives seem to lie and always
> - * respond with ASF=1. For instance the old DVD-ROMs on Compaq Armada says
> + * respond with ASF=1. For instance the old DVD-ROMs on Compaq Armada say
>   * that ASF=1 from the start and then later fail with a 'read of scrambled
>   * block without authentication' error.
>   *****************************************************************************/
> @@ -599,12 +603,13 @@ static int GetBusKey( dvdcss_t dvdcss )
>      int       i_ret = -1;
>      int       i;
>  
> -    print_debug( dvdcss, "requesting AGID" );
> +    print_debug( dvdcss, "requesting authentication grant ID (AGID)" );
>      i_ret = ioctl_ReportAgid( dvdcss->i_fd, &dvdcss->css.i_agid );
>  
>      /* We might have to reset hung authentication processes in the drive
> -     * by invalidating the corresponding AGID'.  As long as we haven't got
> -     * an AGID, invalidate one (in sequence) and try again. */
> +     * by invalidating the corresponding authentication grant ID (AGID)'.
> +     * As long as we haven't got an AGID, invalidate one (in sequence)
> +     * and try again. */
>      for( i = 0; i_ret == -1 && i < 4 ; ++i )
>      {
>          print_debug( dvdcss, "ioctl ReportAgid failed, "
> @@ -724,7 +729,7 @@ static int GetBusKey( dvdcss_t dvdcss )
>  }
>  
>  /*****************************************************************************
> - * PrintKey : debug function that dumps a key value
> + * PrintKey: debug function that dumps a key value
>   *****************************************************************************/
>  static void PrintKey( dvdcss_t dvdcss, const char *prefix, const uint8_t *data )
>  {
> @@ -733,9 +738,9 @@ static void PrintKey( dvdcss_t dvdcss, const char *prefix, const uint8_t *data )
>  }
>  
>  /*****************************************************************************
> - * GetASF : Get Authentication success flag
> + * GetASF: Get authentication success flag (ASF)
>   *****************************************************************************
> - * Returns :
> + * Returns:
>   *  -1 on ioctl error,
>   *  0 if the device needs to be authenticated,
>   *  1 either.
> @@ -753,22 +758,22 @@ static int GetASF( dvdcss_t dvdcss )
>  
>      if( i_asf )
>      {
> -        print_debug( dvdcss, "GetASF authenticated, ASF=1" );
> +        print_debug( dvdcss, "authentication success flag set, ASF=1" );
>      }
>      else
>      {
> -        print_debug( dvdcss, "GetASF not authenticated, ASF=0" );
> +        print_debug( dvdcss, "authentication success flag not set, ASF=0" );
>      }
>  
>      return i_asf;
>  }
>  
>  /*****************************************************************************
> - * CryptKey : shuffles bits and unencrypt keys.
> + * CryptKey: shuffle bits and decrypt keys.
>   *****************************************************************************
>   * Used during authentication and disc key negotiation in GetBusKey.
> - * i_key_type : 0->key1, 1->key2, 2->buskey.
> - * i_variant : between 0 and 31.
> + * i_key_type: 0->key1, 1->key2, 2->buskey.
> + * i_variant: between 0 and 31.
>   *****************************************************************************/
>  static void CryptKey( int i_key_type, int i_variant,
>                        const uint8_t *p_challenge, uint8_t *p_key )
> @@ -1614,7 +1619,7 @@ static int CrackTitleKey( dvdcss_t dvdcss, int i_pos, int i_len,
>  
>      if( i_success > 0 /* b_stop_scanning */ )
>      {
> -        print_debug( dvdcss, "vts key initialized" );
> +        print_debug( dvdcss, "Video Title Set (VTS) key initialized" );
>          return 1;
>      }
>  
> diff --git a/src/ioctl.c b/src/ioctl.c
> index d30df78..7219017 100644
> --- a/src/ioctl.c
> +++ b/src/ioctl.c
> @@ -1203,7 +1203,7 @@ int ioctl_SendKey2( int i_fd, const int *pi_agid, const uint8_t *p_key )
>  }
>  
>  /*****************************************************************************
> - * ioctl_ReportRPC: get RPC status for the drive
> + * ioctl_ReportRPC: get RPC (Regional Playback Control) status for the drive
>   *****************************************************************************/
>  int ioctl_ReportRPC( int i_fd, int *p_type, int *p_mask, int *p_scheme )
>  {
> diff --git a/src/libdvdcss.c b/src/libdvdcss.c
> index 1a7d42a..89bf6fd 100644
> --- a/src/libdvdcss.c
> +++ b/src/libdvdcss.c
> @@ -417,7 +417,7 @@ static void create_cache_subdir( dvdcss_t dvdcss )
>      /* Pointer to the filename we will use. */
>      dvdcss->psz_block = dvdcss->psz_cachefile + i;
>  
> -    print_debug( dvdcss, "using CSS key cache dir: %s",
> +    print_debug( dvdcss, "Content Scrambling System (CSS) key cache dir: %s",
>                   dvdcss->psz_cachefile );
>      return;
>  
> diff --git a/test/dvd_region.c b/test/dvd_region.c
> index 4a2806f..30e2421 100644
> --- a/test/dvd_region.c
> +++ b/test/dvd_region.c
> @@ -206,13 +206,14 @@ static int print_region(int fd)
>    printf("RPC Scheme: ");
>    switch( rpc_scheme ) {
>    case 0:
> -    printf("The Logical Unit does not enforce Region " \
> -           "Playback Controls( RPC)\n");
> +    printf("The Logical Unit does not enforce Regional " \
> +           "Playback Control (RPC).\n");
>      break;
>    case 1:
>      printf("The Logical Unit _shall_ adhere to the "
>             "specification and all requirements of the " \
> -           "CSS license agreement concerning RPC\n");
> +           "Content Scrambling System (CSS) license "
> +           "agreement concerning RPC.\n");
>      break;
>    default:
>      printf("Reserved( %x)\n", rpc_scheme);
> -- 
> 2.1.0
> 
> _______________________________________________
> libdvdcss-devel mailing list
> libdvdcss-devel at videolan.org
> https://mailman.videolan.org/listinfo/libdvdcss-devel

-- 
With my kindest regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device


More information about the libdvdcss-devel mailing list