renatofilho@525: #include renatofilho@525: #include "gmyth-stream-client.h" renatofilho@525: renatofilho@525: int main (int argc, char** argv) renatofilho@525: { renatofilho@525: GMainLoop *mainloop = NULL; renatofilho@525: GMythStreamClient *cli = NULL; renatofilho@525: gint id = -1; renatofilho@525: renatofilho@525: g_type_init (); renatofilho@525: renatofilho@525: mainloop = g_main_loop_new (NULL, FALSE); renatofilho@525: renatofilho@525: cli = gmyth_stream_client_new (); renatofilho@525: if (!gmyth_stream_client_connect (cli, "localhost", 12345)) { renatofilho@525: g_warning ("Fail to connect"); renatofilho@525: return -1; renatofilho@525: } renatofilho@525: renatofilho@525: id = gmyth_stream_client_open_stream (cli, "/home/rfilho/Media/The.Pursuit.Of.Happyness[2006]DvDrip[Eng]-aXXo/The.Pursuit.Of.Happyness[2006]DvDrip[Eng]-aXXo.avi", renatofilho@525: "X", "X", 0, 0, "X", 0, 800, 600, 5000, "X"); renatofilho@525: if (id < 0) { renatofilho@525: g_printerr ("Fail to open stream"); renatofilho@525: return -1; renatofilho@525: } renatofilho@525: renatofilho@525: g_debug ("Strem created [%d]", id); renatofilho@525: renatofilho@525: if (!gmyth_stream_client_play_stream (cli, id)) { renatofilho@525: g_printerr ("Fail to play stream"); renatofilho@525: return -1; renatofilho@525: } renatofilho@525: renatofilho@525: g_debug ("started"); renatofilho@525: g_main_loop_run (mainloop); renatofilho@525: g_debug ("finished"); renatofilho@525: renatofilho@525: return 0; renatofilho@525: }