Hello,
I want to play an audio file in Scratchbox (Fremantle-X86) . Below is the code
sample for the same. But this code doesnt work. When i checked the return value
it displays the message "Not playing".
Can anybody tell me whats going wrong in the code.
Code:
#include <gst/gst.h>
int main( int argc, char* argv[] )
{
gst_init (&argc,&argv);
GstElement *player;
GMainLoop* loop;
loop = g_main_loop_new (NULL, FALSE);
player = gst_element_factory_make ("playbin", "player");
g_assert (player != NULL);
g_object_set (G_OBJECT (player), "uri",
"/home/pallavi/MyDocs/.sounds/clip2.mp3", NULL);
int ret1 = gst_element_set_state (player, GST_STATE_PLAYING);
if(ret1 == GST_STATE_CHANGE_FAILURE )
g_print("\n Not Playing");
if(ret1 == GST_STATE_CHANGE_SUCCESS )
g_print("\n Playing");
g_main_loop_run(loop);
return 0;
}
Thanks.
_______________________________________________
maemo-developers mailing list
[email protected]
https://lists.maemo.org/mailman/listinfo/maemo-developers