Trolltech Home | Qtopia-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qtopia-interest Archive, October 2007
Adding MIME types to media player


Message 1 in thread

Hello,
I'd like to play .wav audio in the 4.3.0 media player application
configured with gstreamer.

It looks like just mp3 type is added in the constructor in
src/applications/mediaplayer/mediabrowser.cpp where the "musicfilter"
variable is initialized.  As an experiment, I added the type
"audio/x-wav" and now .wav files are selectable in the media player, but 
when selected, I get the error "The media system is not configured to 
handle this request."

What's the right way to add a new MIME type?  The QtopiaMediaProvider 
class in which this error is generated does not seem to be documented.

Thanks!
,
John

--
 [ signature omitted ] 

Message 2 in thread

Hi,

>I'd like to play .wav audio in the 4.3.0 media player application
>configured with gstreamer.

The media player application can play wave files already, but as you have 
discovered it is not set up to browse those files - due to lack of meta-data. 
If you select a wave file from the documents list the media player will play 
the file.

>It looks like just mp3 type is added in the constructor in
>src/applications/mediaplayer/mediabrowser.cpp where the "musicfilter"
>variable is initialized.  As an experiment, I added the type
>"audio/x-wav" and now .wav files are selectable in the media player, but
>when selected, I get the error "The media system is not configured to
>handle this request."

The media framework used to play the file, via the Qtopia integration, needs 
to register the mime types it is capable of using, the GStreamer engine 
should register audio/x-wav. Have you tested other media types? It is most 
likely the GStreamer engine is not loading correctly, you may want to make 
sure that all you GStreamer libraries are in the right places.

A quick and easy way to see what engines are actually loaded is to use 
the "vsexplorer"  tool while Qtopia is running, located in your <image>/bin 
path. "ls Media/Engines" should list the engines (framework integrations) 
loaded. Further exploration can provide you with other information about the 
state of the media subsystem.  For e.g., "ls Library/Info/Simple/GStreamer",  
should tell you the URI schemes and mime types handled by the GStreamer 
integration, if GStreamer has loaded correctly.

- Justin

--
 [ signature omitted ] 

Message 3 in thread

Justin McPherson wrote:
> Hi,

Hi,

> 
>> I'd like to play .wav audio in the 4.3.0 media player application
>> configured with gstreamer.
> 
> The media player application can play wave files already, but as you have 
> discovered it is not set up to browse those files - due to lack of meta-data. 
> If you select a wave file from the documents list the media player will play 
> the file.

I get the same error message if I try to play a .wav file in the 
documents list, and also the Asteroids game plays no sounds.

> 
>> It looks like just mp3 type is added in the constructor in
>> src/applications/mediaplayer/mediabrowser.cpp where the "musicfilter"
>> variable is initialized.  As an experiment, I added the type
>> "audio/x-wav" and now .wav files are selectable in the media player, but
>> when selected, I get the error "The media system is not configured to
>> handle this request."
> 
> The media framework used to play the file, via the Qtopia integration, needs 
> to register the mime types it is capable of using, the GStreamer engine 
> should register audio/x-wav. Have you tested other media types? It is most 
> likely the GStreamer engine is not loading correctly, you may want to make 
> sure that all you GStreamer libraries are in the right places.

I have tried .mp3 with gst-launch from the command line, but CPU is 100% 
and no sound plays; I think this is due to the resampling in gst and not 
a qpe problem, which is why I am avoiding .mp3 for now.  I can play .wav 
files from the command line using gst-launch.  Does that mean that qpe 
should have all the right gstreamer parts it needs?

> 
> A quick and easy way to see what engines are actually loaded is to use 
> the "vsexplorer"  tool while Qtopia is running, located in your <image>/bin 
> path. "ls Media/Engines" should list the engines (framework integrations) 
> loaded. Further exploration can provide you with other information about the 
> state of the media subsystem.  For e.g., "ls Library/Info/Simple/GStreamer",  
> should tell you the URI schemes and mime types handled by the GStreamer 
> integration, if GStreamer has loaded correctly.


-sh-2.05b# bin/vsexplorer
/ > ls Media/Engines
GStreamer/
Registered/                     '1' (int)
/ > ls Media/Library/Info/Simple/GStreamer
uriSchemes/                     'file, http' (QStringList)
mimeTypes/                      'audio/x-wav, audio/mpeg, 
video/x-msvideo, video/mpeg, video/mp4, audio/ogg, video/o
gg, audio/ogg+vorbis' (QStringList)
/ >


Does that look right?


Thanks,
John

--
 [ signature omitted ]