gmyth/tests/gmyth_test_vlc.c
author renatofilho
Fri May 18 19:36:49 2007 +0100 (2007-05-18)
branchtrunk
changeset 691 726550e48c21
parent 596 2097ef19ce9a
child 750 312d6bc514f3
permissions -rw-r--r--
[svn r697] removed debug messages
     1 #include <glib-object.h>
     2 #include <gmyth/gmyth.h>
     3 #include <glib.h>
     4 
     5 #include "common.h"
     6 
     7 int
     8 main (int args, const char **argv)
     9 {
    10     GMythBackendInfo *backend_info;
    11     g_type_init();
    12     g_thread_init(NULL);
    13 
    14     backend_info = gmyth_backend_info_new ();
    15 
    16     GMythVlc vlc;
    17     vlc.n_inputs = 0;
    18     vlc.n_outputs = 0;
    19 
    20     gmyth_backend_info_set_hostname (backend_info, "192.168.3.137");
    21     gmyth_backend_info_set_port (backend_info, 6543);
    22     
    23     int res = gmyth_vlc_connect(&vlc, backend_info, "admin", 4212);
    24     
    25     if ( res >= 0 )
    26     {
    27     	gmyth_vlc_create_channel(&vlc, "broadcast", 8080, THEORA);
    28         gmyth_vlc_create_input(&vlc, 0, "/tmp/mpg/bad_day.mpg");
    29         gmyth_vlc_control_input(&vlc, 0, "play");
    30         gmyth_vlc_disconnect(&vlc);
    31     }
    32 
    33     //gchar* teste = gmyth_http_retrieve_setting(backend_info, "RecordFilePrefix", "hmelo-desktop");
    34 
    35     fprintf(stdout, SYNC_STRING);
    36     fflush(NULL);
    37     getchar();
    38 
    39     if ( backend_info != NULL )
    40     	g_object_unref( backend_info );
    41 
    42     return(0);
    43 }