LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-17-2009, 12:01 PM   #1
DropSig
Member
 
Registered: Apr 2004
Location: Saskatchewan
Distribution: Ubuntu, Centos
Posts: 208

Rep: Reputation: 30
C++ xmms2 client stream buffer


Good day!
I am building an xmms2 client using c++ and qt4.
All is going good, except when i stream an mp3 over network.
I have a server that holds all the music. it use gnump3d to stream.
Xmms2 use curl_http for streaming and mpg123 to play it.
The problem is that it start playing immediatly and sometime my connection is not fast enough to keep up.
I want to be able to wait for a percent of the file to be buffered before starting playback.
From my research, this is not implemented in xmms2.
I have registered to the mailing list and will ask when i get a response back for the registration, but i figured i would ask here to, might reached some people that can help who are not on the mailing list.

My assumption is that it should be the mpg123 plugin for xmms2 that wait for a buffer size before starting playback.
I guess im asking where to start looking for the best solution, i dont want to hack code i dont fully understand like xmms2 source if there is already a way to do what i need, or maybe i could do it on the client side... But if it should be in xmms2 source i am more then willing to give it a shot.

Thank you for your time.
 
Old 12-18-2009, 04:37 PM   #2
AleLinuxBSD
Member
 
Registered: May 2006
Location: Italy
Distribution: Ubuntu, ArchLinux, Debian, SL, OpenBSD
Posts: 274

Rep: Reputation: 42
Perhaps an idea:

XMMS2 Using the application
Quote:
Listen to a shoutcast stream (assuming curl plugin is installed) using the direct url (ie NOT a playlist file, but the url inside the playlist file, the playlist importing code is currently disabled):

xmms2 add http://207.200.96.225:8020
xmms2 play
If you build a bash script where you start the command separately
(one for streaming and one for play) and you add:
a wait or sleep or a big loop state;
after the first command.

It's only an idea.
 
Old 12-19-2009, 05:24 PM   #3
DropSig
Member
 
Registered: Apr 2004
Location: Saskatchewan
Distribution: Ubuntu, Centos
Posts: 208

Original Poster
Rep: Reputation: 30
Thanks for the idea, but i really need to know how much has been buffered. I know there is no interface for this at this point. I am still wainting to get on the mailing list to discuss this issue with them.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to record a stream and start a new outputXXX.avi/mp3 for each new stream title ? frenchn00b Linux - General 4 08-04-2008 05:40 AM
Howto transcode & relay a MPEG stream to a WMV stream?? crazyivan Linux - Software 0 06-15-2007 03:18 AM
Stream buffer size of open file in GNU c library rajesh_b Programming 1 01-11-2007 02:06 AM
What is the difference between the free buffer and buffer in the buffer hash queue? Swagata Linux - Enterprise 0 05-25-2006 11:57 PM
[c] client <- server - how to know about recv buffer size? jb_li Programming 9 03-25-2004 07:13 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration