URI: 
       youtube.h - frontends - front-ends for some sites (experiment)
  HTML git clone git://git.codemadness.org/frontends
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
       youtube.h (2002B)
       ---
            1 /* prefix for members-only in titles */
            2 #define MEMBERS_ONLY "[Members only] "
            3 
            4 struct item {
            5         enum LinkType { Unknown = 0, Channel, Movie, Playlist, Video } linktype;
            6         char id[32];
            7         char title[1024];
            8         char channeltitle[1024];
            9         char channelid[256];
           10         char userid[256];
           11         char publishedat[32]; /* "human-friendly" string */
           12         char viewcount[32]; /* view count string, formatted */
           13         char duration[32]; /* duration string */
           14         char shortdescription[4096];
           15         int membersonly; /* members only videos */
           16 };
           17 
           18 #define MAX_VIDEOS 50
           19 struct search_response {
           20         struct item items[MAX_VIDEOS + 1];
           21         size_t nitems;
           22         char channeltitle[1024];
           23         char channelid[256];
           24 };
           25 
           26 struct video_format {
           27         long itag;
           28         char url[2048];
           29         char signaturecipher[2048]; /* encrypted stream */
           30         char mimetype[256]; /* mime-type and video codecs, etc */
           31         long bitrate;
           32         long averagebitrate;
           33         long width; /* pixel width */
           34         long height; /* pixel width */
           35         long fps; /* frames-per-second */
           36         char qualitylabel[64];
           37         char quality[64];
           38         long long contentlength; /* content length in bytes */
           39         long lastmodified; /* timestamp */
           40         long audiosamplerate;
           41         long audiochannels;
           42 };
           43 
           44 #define MAX_FORMATS 50
           45 struct video_response {
           46         char id[32]; /* video id */
           47         char title[1024];
           48         char author[1024]; /* channel name / title */
           49         char channelid[256];
           50         char publishdate[32]; /* YYYY-mm-dd */
           51         char uploaddate[32]; /* YYYY-mm-dd */
           52         long viewcount;
           53         long lengthseconds;
           54         char shortdescription[4096 * 4];
           55         char category[256];
           56         int isfamilysafe;
           57         int isunlisted;
           58         char playabilitystatus[64];
           59         char playabilityreason[256];
           60 
           61         int isfound;
           62 
           63         /* expiration for URLs in video formats */
           64         long expiresinseconds;
           65         struct video_format formats[MAX_FORMATS + 1];
           66         int nformats;
           67 };
           68 
           69 struct search_response *youtube_search(const char *rawsearch, const char *page, const char *order);
           70 struct search_response *youtube_channel_videos(const char *channelid);
           71 struct search_response *youtube_user_videos(const char *user);
           72 struct video_response *youtube_video(const char *videoid);