2 * Copyright (C) 2009,2010 Toni Gundogdu <legatvs@gmail.com>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 * simple.c -- a simplistic libquvi example.
22 * Ignores errors, see src/quvi.c for a more complete example.
26 #include <quvi/quvi.h>
28 static int status_callback(long param
, void *data
)
30 quvi_word status
, type
;
32 status
= quvi_loword(param
);
33 type
= quvi_hiword(param
);
35 printf("status: %d, type: %d\n", status
, type
);
40 int main(int argc
, char **argv
)
42 quvi_t q
; /* library handle */
43 quvi_video_t v
; /* video handle */
44 char *lnk
; /* holds parsed video link */
47 quvi_setopt(q
, QUVIOPT_STATUSFUNCTION
, &status_callback
);
48 quvi_parse(q
, "http://vimeo.com/1485507", &v
);
49 quvi_getprop(v
, QUVIPROP_VIDEOURL
, &lnk
);
57 /* vim: set ts=2 sw=2 tw=72 expandtab: */