Changeset 3655

Show
Ignore:
Timestamp:
26/10/08 21:06:19 (2 months ago)
Author:
dmeyer
Message:

doc update

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/metadata/doc/usage.rst

    r3620 r3655  
    2323------- 
    2424 
    25 The parse result has the following functions: 
     25The result behaves like a read-only dict in Python with some 
     26additional methods depending on the parser used. The following 
     27methods are available. 
    2628 
    2729.. automethod:: metadata.core.Media.get 
     
    3133.. automethod:: metadata.core.Media.convert 
    3234 
     35The list of keys the Media object supports depends on the type of 
     36parser. E.g. a video parser supports the attribute audio for the audio 
     37track information while an image parser does not provide that 
     38information. 
     39 
     40 
    3341Attributes / Keys 
    3442----------------- 
    3543 
    36 The list of keys the Media object supports depends on the type of 
    37 parser. E.g. a video parser supports the attribute audio for the audio 
    38 track information while an image parser does not provide that 
    39 information. The following is a (possible incomplete) list of keys 
    40 available. 
     44.. attribute:: Media.table 
    4145 
    42     * artist 
    43     * bitrate 
    44     * caption 
    45     * chapters 
    46     * comment 
    47     * copyright 
    48     * country 
    49     * delay 
    50     * encoder 
    51     * filename 
    52     * genre 
    53     * image 
    54     * keywords 
    55     * language 
    56     * length 
    57     * media 
    58     * mime 
    59     * mpeg_version 
    60     * producer 
    61     * product 
    62     * rating 
    63     * sequence_header_offset 
    64     * size 
    65     * software 
    66     * starring 
    67     * start 
    68     * studio 
    69     * subtype 
    70     * table_mapping 
    71     * timestamp 
    72     * title 
    73     * trackno 
    74     * trackof 
    75     * type 
    76     * url 
    77     * writer  
     46  Some parsers add additional information in the `tables` attribute of 
     47  the result. This variable contains he EXIF header for JPEG images, 
     48  the full list of ID3 tags for mp3 files and much more. The tables 
     49  depend on the parsers and on the files parsed. 
    7850 
    79 Arrays, e.g. info.video[0].width  
     51.. attribute:: Media.media 
    8052 
    81     * audio 
    82     * subtitles 
    83     * video  
     53  Defines the basic media type. 
     54 
     55Based on the media type the object has additional member 
     56variables. These are also the keys in the dict. If you checked `media` 
     57to be MEDIA_IMAGE, you can be sure that the object has an attribute 
     58`people` (but it may be None). 
     59 
     60**Media Core**: Basic sets of attributes most media objects have 
     61 
     62  Attributes: `title`, `caption`, `comment`, `size`, `type`, 
     63  `subtype`, `timestamp`, `keywords`, `country`, `language`, 
     64  `langcode`, `url`, `media`, `artist`, `mime` 
     65 
     66**MEDIA_IMAGE**: Image file 
     67 
     68  Attributes: Core attributes, `description`, `people`, `location`, 
     69  `event`, `width`, `height`, `thumbnail`, `software`, `hardware`, 
     70  `dpi`, `city`, `rotation`, `author` 
     71 
     72**MEDIA_AUDIO** Audio file or stream: 
     73 
     74  Attributes: Core attributes, `channels`, `samplerate`, `length`, 
     75  `encoder`, `codec`, `format`, `samplebits`, `bitrate`, `fourcc`, 
     76  `trackno`, `id`, `userdate` 
     77 
     78  Additional attributes for stand-alone audio files not inside a 
     79  container: `trackof`, `album`, `genre`, `discs`, `thumbnail` 
     80 
     81**MEDIA_AV**: A/V container with audio and video content 
     82 
     83  Attributes: Core attributes, `length`, `encoder`, `trackno`, 
     84  `trackof`, `copyright`, `product`, `genre`, `writer`, `producer`, 
     85  `studio`, `rating`, `starring`, `thumbnail`, `delay`, `image`, 
     86  `video`, `audio`, `subtitles`, `chapters`, `software` 
     87 
     88  The attributes `video`, `audio`, `subtitles` and `chapters` are 
     89  lists with additional media objects of different types. 
     90 
     91  **MEDIA_VIDEO**: Video stream inside MEDIA_AV 
     92 
     93    Attributes: Core attributes, `length`, `encoder`, `bitrate`, 
     94    `samplerate`, `codec`, `format`, `samplebits`, `width`, `height`, 
     95    `fps`, `aspect`, `trackno`, `fourcc`, `id` 
     96 
     97  **MEDIA_CHAPTER**: Chapter in a container (e.g. MEDIA_AV) 
     98 
     99    Attributes: `name`, `pos`, `enabled`, `id` 
     100 
     101  **MEDIA_SUBTITLE**: Subtitle stream inside MEDIA_AV 
     102 
     103    Attributes: `language`, `trackno`, `title`, `id` 
     104 
     105**MEDIA_DISC**: Disc (dvd, audio disc, etc) 
     106 
     107 DVD rips on hard-disc in iso file, as directory with a VIDEO_TS 
     108 subtree or VCD cue/bin files are also of this type. 
     109 
     110 Basic disc attributes: `id`, `tracks`, `mixed`, `label` 
     111 
     112 Additional DVD attributes: `length` 
     113 
     114 Additional DVD title (MEDIA_AV) attributes: `angles` 
     115 
     116**MEDIA_DIRECTORY**: Directory 
     117 
     118  Attributes: Core attributes 
     119 
     120**MEDIA_GAME**: Game file on hard-disc 
     121 
     122  Attributes: Core attributes 
    84123 
    85124mminfo