Hi,
I have a problem when i try to get the stream-info from the element playbin. I use the function g_object_get (G_OBJECT (playbin), "stream-info",&streaminfo, NULL); when the state changed from ready to paused.But the result then is just a glist with only one element (type). This is a piece of my code in my bus function ************************************************************************* case GST_MESSAGE_STATE_CHANGED: { GstState old, newState, pending; GList *theStreaminfo; gst_message_parse_state_changed(message, &old, &newState, &pending); gPlayerState = newState; if(old == GST_STATE_READY && newState == GST_STATE_PAUSED) { if(playbin !=NULL) { GList *streaminfo = NULL; g_object_get (G_OBJECT (playbin), "stream-info",&streaminfo, NULL); if(streaminfo != NULL) { theStreaminfo=(GList *)theGinfoList; g_list_foreach( streaminfo, print_Streaminfo, NULL); printf("length of glist \n",g_list_length (streaminfo)); } } } **************************************************************************** And this is the function that I call for each glist **************************************************************************** static void print_Streaminfo(const gpointer list, gpointer unused) { printf("print_Streaminfo \n"); gint streamtype; GstCaps *gcaps; gchar codec,decoder; g_object_get(G_OBJECT(list), "type", &streamtype, NULL); if(streamtype !=NULL) { //get the caps g_object_get(G_OBJECT(list), "caps", &gcaps, NULL); if(gcaps !=NULL){ printf("caps :%s \n",gst_caps_to_string(gcaps)); } else printf("caps is NULL \n"); //get the codec g_object_get(G_OBJECT(list), "codec", &codec, NULL); if(codec !=NULL) printf("codec :%s \n", codec); else printf("codec is NULL \n"); //get the decoder g_object_get(G_OBJECT(list), "decoder", &decoder, NULL); if(decoder !=NULL) printf("decoder :%s \n",&decoder); else printf("decoder is NULL \n"); } } **************************************************************************** I am sorry for my bad English but please help me ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |