You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

macakd

Beginner

  • "macakd" is male
  • "macakd" started this thread

Posts: 18

Location: brisbane

Occupation: electronic engineer

  • Send private message

1

Tuesday, May 4th 2004, 10:00am

MP3 Player

Hi !

I 'm new to Qt and i trying to create an mp3 player with multiple play list. I'm using QFileDialog to search for mp3 files (which works) but i'm having it problem how to add it to QListView box. I want to be able to perform specific tasks such as add dir, files, songs, sorting, searching of play list. Guy's i need help urgently as this is part of my assignment. Does anyone have source example or similar. Thank you very much everyone

macakd

e8johan

Professional

  • "e8johan" is male

Posts: 1,195

Location: Sweden

  • Send private message

2

Tuesday, May 4th 2004, 10:05am

RE: MP3 Player

Could you specify your tasks in a more structured way please. For example, add a filename to a listview, add all files ending with mp3 in a directory to a listview, etc.

You might find this article useful: http://doc.trolltech.com/qq/qq09-file-browser.html .

macakd

Beginner

  • "macakd" is male
  • "macakd" started this thread

Posts: 18

Location: brisbane

Occupation: electronic engineer

  • Send private message

3

Tuesday, May 4th 2004, 10:56pm

RE: MP3 Player

Thank you for your reply.

Simply, i use QFileDialog to look for a mp3 files. I don't need a browser, QFIleDialog does the job. When I click the file button Open file browser appears
The slot is:

void PlayList::openFile()
{

QString filename = QFileDialog::getOpenFileName(
"/home/macak/Desktop/Muzika",
"MP3's (*.mp3)",
this,
"open file dialog"
"Choose a file" );

}
This is the function i'm having a problem. No idea of doing it

void PlayList::loadFile(const QString &filename)
{

would like to put selected file in the QListView box in ascending order.
Also i would like to be able to search for a files, sort them, delete file.
The only thing i mahage to do it is to clear the list
listBox -> clear();


}

I appreciate for any help

e8johan

Professional

  • "e8johan" is male

Posts: 1,195

Location: Sweden

  • Send private message

4

Wednesday, May 5th 2004, 5:51am

RE: MP3 Player

Use QListView::setSorting for sorting and QListView::insertItem to put the items in the listview. The detailed section of the listview documentation describes how to do it: http://doc.trolltech.com/3.3/qlistview.html#details .

macakd

Beginner

  • "macakd" is male
  • "macakd" started this thread

Posts: 18

Location: brisbane

Occupation: electronic engineer

  • Send private message

5

Wednesday, May 5th 2004, 6:38am

RE: MP3 Player

How do you read mp3 fle information using a qt?
How do you implement decoder?I'm thinking of mplayer because it can give me multiple output?

e8johan

Professional

  • "e8johan" is male

Posts: 1,195

Location: Sweden

  • Send private message

6

Wednesday, May 5th 2004, 6:42am

RE: MP3 Player

JuK (which uses KDE, i.e. something very much like Qt) uses g-streamer. It has an ID3 tag library. You could always check it out.

Posts: 2,162

Location: Graz, Austria

Occupation: Student

  • Send private message

7

Wednesday, May 5th 2004, 4:41pm

RE: MP3 Player

Quoted

Originally posted by macakd
I'm thinking of mplayer because it can give me multiple output?

You could start mplayer with QProcess, mplayer has a commandline option for being controlled by another program (-slave or something similar)

Cheers,
_
Qt/KDE Developer
Debian User

macakd

Beginner

  • "macakd" is male
  • "macakd" started this thread

Posts: 18

Location: brisbane

Occupation: electronic engineer

  • Send private message

8

Thursday, May 6th 2004, 10:01am

RE: MP3 Player

how can you send mp3 play list to LCD. What's the techniques?
Thank's for your help

e8johan

Professional

  • "e8johan" is male

Posts: 1,195

Location: Sweden

  • Send private message

9

Thursday, May 6th 2004, 10:09am

RE: MP3 Player

How is the LCD connected? I'd recommend you to look at serial (rs232) communications since that is available as a Qt add-on.

macakd

Beginner

  • "macakd" is male
  • "macakd" started this thread

Posts: 18

Location: brisbane

Occupation: electronic engineer

  • Send private message

10

Thursday, May 6th 2004, 1:32pm

RE: MP3 Player

Thank you anda, excellent suggestion.
if i do
mplayer -ao oss:/dev/dsp0 -playlist file.m3u
I hope this should give me using QProcess desired audio output on one sound card. I just need to write GUI for it.
Let's say i have multiple sound cards (which is my project goal) and multiple play list. How can i control multiple playlist over one "control play toolbar" without effecting the other??
The project intention is to incorporate Linux MP3 server into home automation system. The server will need to run multiple soundcards to deliver simultaneous music to multiple zones. At the moment,I'm trying to develop music application with Qt and later on implement it to LCD over serial RS485 cable. Also i need to write device driver on Linux that will produce multiple output. Does anyone have any suggestions? I've looked some player and their source code, but is a bit hard to understand other people work, expecially if it's not commented. I'm not that excellent C++ programmer, since I'm coming from electronic and plain C background

Thank you ALL

11

Friday, November 9th 2007, 9:51am

Hi! I would like too create my own player (with some additional features I need for rpg sessions). I would like to use QTreeView (I want to have hierarchical tracks structure, which is exactly Soundtracks containing Parts, and they contain Tracks), which seems to allow both insertion and removal, but I need to move objects inside this playlist (just as it happens in XMMS or WinAmp). I have seen some pretty serious drag&drop effects and I wonder, whether I can combine functionality of QTreeView with them. Have anyone tried this?
Filip GruszczyDski

Swiat Mroku w serwisie Poltergeist