gmyth/tests/gmyth_test_vlc.c
author morphbr
Sat Feb 10 22:12:54 2007 +0000 (2007-02-10)
branchtrunk
changeset 351 c331f4639111
parent 350 ff82d527d26a
child 564 1b897f699097
permissions -rw-r--r--
[svn r353] - Fixed memory leak inside gmyth_http.c (http_request)
morphbr@329
     1
#include <glib-object.h>
morphbr@329
     2
#include "gmyth.h"
morphbr@329
     3
#include <glib.h>
morphbr@329
     4
morphbr@329
     5
int
morphbr@329
     6
main (int args, const char **argv)
morphbr@329
     7
{
morphbr@329
     8
    GMythBackendInfo *backend_info;
morphbr@329
     9
    g_type_init();
morphbr@329
    10
    //g_thread_init(NULL);
morphbr@329
    11
morphbr@329
    12
    backend_info = gmyth_backend_info_new ();
morphbr@329
    13
morphbr@329
    14
    GMythVlc vlc;
morphbr@329
    15
    vlc.n_inputs = 0;
morphbr@329
    16
    vlc.n_outputs = 0;
morphbr@329
    17
morphbr@329
    18
    gmyth_backend_info_set_hostname (backend_info, "192.168.3.137");
morphbr@329
    19
    gmyth_backend_info_set_port (backend_info, 6543);
morphbr@329
    20
    
morphbr@349
    21
    int res = gmyth_vlc_connect(&vlc, backend_info, "admin", 4212);
morphbr@349
    22
    
morphbr@349
    23
    if ( res >= 0 )
morphbr@349
    24
    {
morphbr@350
    25
    	gmyth_vlc_create_channel(&vlc, "broadcast", 8080, THEORA);
morphbr@351
    26
        gmyth_vlc_create_input(&vlc, 0, "/tmp/mpg/bad_day.mpg");
morphbr@349
    27
        gmyth_vlc_control_input(&vlc, 0, "play");
morphbr@349
    28
        gmyth_vlc_disconnect(&vlc);
morphbr@349
    29
    }
morphbr@349
    30
morphbr@349
    31
    //gchar* teste = gmyth_http_retrieve_setting(backend_info, "RecordFilePrefix", "hmelo-desktop");
morphbr@349
    32
morphbr@329
    33
morphbr@329
    34
    return 0;    
morphbr@329
    35
}