[gst-devel] Playing a queue and tags
yohann (yrc) coppel
yohann at varyoh.com
Tue Jan 10 08:41:16 CET 2006
Hello,
I'm writing (another ;-) ) player with gstreamer, and I have two
questions/problems....
The first is a problem that I have at the end of a song (or when I want
to play the next song in the playlist). I say to my player to stop:
[code]
gst_element_set_state (player->thread, GST_STATE_NULL);
gst_element_set_state (player->sink, GST_STATE_NULL);
[/code]
then (after getting the next song path) to play again:
[code]
g_object_set (G_OBJECT (player->source), "location", path, NULL);
gst_element_set_state (player->thread, GST_STATE_PLAYING);
[/code]
there is more in the complete file of course.... I'm sure that the path
value is ok.
The problem is that after that "next", my player is completely crazy. It
doesn't play anything, use 100% of CPU time.....
So, What is wrong ?
I've seen in other players that they build each time a new complete
pipeline :-o !? is-it the right and only way to do ?
// see more code in attachement
The second problem is during tag reading.
I read tags more or less like in a lot of applications i think. I've
read the code of Rhythmbox, Gamp and Jamboree, and I've tried both
solutions (I think I remember that Rhythmbox and Gamp use +/- the same
code).
But tags are not realy read properly.... sometimes they are, sometimes no...
when I parse a complete list of files, +/- 30% of the tags are read. if
I run again, 15% are read again, and 15 new % are also read... (numbers
are random....).
Well, I put 2 files of my program as attachment: player.c where I've the
"next" problem, and tagreader.c where I have the tag problem. If you
need / want more, tell me, it's of course GPL code...
WARNING: it's a developpement/debugging code, and I've tried a lot of
things before writing here, so the code may be not the cleanest you've
seen in your life :-) but it compiles.
Thank' for your help :-)
And congratulation for all the work done about GStreamer :-)
yohann.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: player.c
Type: text/x-csrc
Size: 6308 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20060110/772d88fe/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tagreader.c
Type: text/x-csrc
Size: 13941 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20060110/772d88fe/attachment-0001.c>
More information about the gstreamer-devel
mailing list