Changeset 840

Show
Ignore:
Timestamp:
2005-02-04 19:48:24 (4 years ago)
Author:
conrad
Message:

rename --codec-name long option to more generic --content-type in oggzrip

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • liboggz/trunk/doc/oggzrip.1

    r697 r840  
    8888starting at 0.  
    8989  
    90 .IP "-c \fBcodec-name\fR --codec-name \fBcodec-name\fR" 10  
    91 Filter by codec-name.  The following codecs  
     90.IP "-c \fBcontent-type\fR --content-type \fBcontent-type\fR" 10  
     91Filter by content-type.  The following codec names  
    9292are currently detected: "theora",  
    9393"vorbis", "speex", "annodex"  
     
    105105\fBoggzdump\fP\fB(1)\fP,  
    106106\fBoggzdiff\fP\fB(1)\fP       
    107 .\" created by instant / docbook-to-man, Sat 22 Jan 2005, 14:09  
     107.\" created by instant / docbook-to-man, Sat 05 Feb 2005, 15:44  
  • liboggz/trunk/doc/oggzrip.1.sgml

    r697 r840  
    126126        </varlistentry> 
    127127        <varlistentry> 
    128           <term>-c <parameter>codec-name</parameter> --codec-name <parameter>codec-name</parameter></term> 
    129           <listitem><para>Filter by codec-name.  The following codec
     128          <term>-c <parameter>content-type</parameter> --content-type <parameter>content-type</parameter></term> 
     129          <listitem><para>Filter by content-type.  The following codec name
    130130                         are currently detected: "theora", 
    131131                         "vorbis", "speex", "annodex" 
  • liboggz/trunk/src/tools/oggzrip.c

    r659 r840  
    6868  int num_streamids; 
    6969  long streamids[MAX_FILTER]; 
    70   int num_codec_names; 
    71   const char *codec_names[MAX_FILTER]; 
     70  int num_content_types; 
     71  const char *content_types[MAX_FILTER]; 
    7272} ORData; 
    7373 
     
    7575  long serialno; 
    7676  int streamid; 
    77   const char *codec_name; 
     77  const char *content_type; 
    7878  int bos; 
    7979} ORStream; 
     
    8282  const char *bos_str; 
    8383  int bos_str_len; 
    84   const char *codec_name; 
     84  const char *content_type; 
    8585} ORCodecIdent; 
    8686 
     
    114114  printf ("                         streams in the order of their BOS pages,\n"); 
    115115  printf ("                         starting at 0.\n"); 
    116   printf ("  -c codec-name --codec-name codec-name\n"); 
    117   printf ("                         Filter by codec-name.  The following codecs\n"); 
    118   printf ("                         are currently detected: \"theora\",\n"); 
     116  printf ("  -c content-type --content-type content-type\n"); 
     117  printf ("                         Filter by content-type.  The following codec\n"); 
     118  printf ("                         names are currently detected: \"theora\",\n"); 
    119119  printf ("                         \"vorbis\", \"speex\", \"annodex\"\n"); 
    120120  printf ("\n"); 
     
    167167  } 
    168168 
    169   for (i = 0; i < ordata->num_codec_names; i++) { 
    170     if (strcmp (ordata->codec_names[i], stream->codec_name) == 0) 
     169  for (i = 0; i < ordata->num_content_types; i++) { 
     170    if (strcmp (ordata->content_types[i], stream->content_type) == 0) 
    171171      return 1; 
    172172  } 
     
    185185  stream->serialno = serialno; 
    186186  stream->streamid = streamid_count++; 
    187   stream->codec_name = "unknown"; 
     187  stream->content_type = "unknown"; 
    188188 
    189189  /* try to identify stream codec name by looking at the first bytes of the 
     
    196196    if (og->body_len >= ident->bos_str_len && 
    197197        memcmp (og->body, ident->bos_str, ident->bos_str_len) == 0) { 
    198       stream->codec_name = ident->codec_name; 
     198      stream->content_type = ident->content_type; 
    199199      break; 
    200200    } 
     
    204204    fprintf (stderr,  
    205205             "New logical stream, serialno %li, id %i, codec %s, will be %s\n", 
    206              stream->serialno, stream->streamid, stream->codec_name, 
     206             stream->serialno, stream->streamid, stream->content_type, 
    207207             (filter_stream_p (ordata, stream, og, serialno) ?  
    208208              "copied" :"dropped")); 
     
    340340      {"serialno", required_argument, 0, 's'}, 
    341341      {"streamid", required_argument, 0, 'i'}, 
    342       {"codec-name", required_argument, 0, 'c'}, 
     342      {"content-type", required_argument, 0, 'c'}, 
    343343      {0,0,0,0} 
    344344    }; 
     
    385385                       &ordata->streamids[ordata->num_streamids++])) 
    386386        goto exit_err; 
    387     case 'c': /* codec-name */ 
    388       if (ordata->num_codec_names >= MAX_FILTER) { 
    389         fprintf (stderr, "ERROR: too many codec-names on command line\n"); 
     387    case 'c': /* content-type */ 
     388      if (ordata->num_content_types >= MAX_FILTER) { 
     389        fprintf (stderr, "ERROR: too many content-types on command line\n"); 
    390390        goto exit_err; 
    391391      } 
    392       ordata->codec_names[ordata->num_codec_names++] = optarg;              
     392      ordata->content_types[ordata->num_content_types++] = optarg;          
    393393      break; 
    394394