gmyth/tests/gmyth_test_vlc.c
author morphbr
Sat Feb 10 20:01:54 2007 +0000 (2007-02-10)
branchtrunk
changeset 349 7005e696052c
parent 329 818deb9ae65d
child 350 ff82d527d26a
permissions -rw-r--r--
[svn r351] - Bug fix in gmyth_util.c: included support for time without seconds in gmyth_util_string_to_time_val_fmt (XML format from backend)
- Bug fix in gmyth_http.c: fixed bug when there are no channels
- gmyth_vlc.c/h: included support to specify a port when connecting to VLC
- tests: fixed vlc test file regarding the fix above
created script to compile http test app
     1 #include <glib-object.h>
     2 #include "gmyth.h"
     3 #include <glib.h>
     4 
     5 int
     6 main (int args, const char **argv)
     7 {
     8     GMythBackendInfo *backend_info;
     9     g_type_init();
    10     //g_thread_init(NULL);
    11 
    12     backend_info = gmyth_backend_info_new ();
    13 
    14     GMythVlc vlc;
    15     vlc.n_inputs = 0;
    16     vlc.n_outputs = 0;
    17 
    18     gmyth_backend_info_set_hostname (backend_info, "192.168.3.137");
    19     gmyth_backend_info_set_port (backend_info, 6543);
    20     
    21     int res = gmyth_vlc_connect(&vlc, backend_info, "admin", 4212);
    22     
    23     if ( res >= 0 )
    24     {
    25     	gmyth_vlc_create_channel(&vlc, "broadcast", 8080);
    26         gmyth_vlc_create_input(&vlc, 0, "/tmp/grande.nuv");
    27         gmyth_vlc_control_input(&vlc, 0, "play");
    28         gmyth_vlc_disconnect(&vlc);
    29     }
    30 
    31     //gchar* teste = gmyth_http_retrieve_setting(backend_info, "RecordFilePrefix", "hmelo-desktop");
    32 
    33 
    34     return 0;    
    35 }