maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   Understanding Maemo Mime handling (https://talk.maemo.org/showthread.php?t=15194)

qole 2008-03-30 01:02

Re: Understanding Maemo Mime handling
 
Quote:

Originally Posted by YoDude (Post 162012)
Works like a charm... You guys are the best!

Most excellent application.

Well, it plays mms streams from the browser; I wouldn't say it "works like a charm."

MPlayer makes a bit of a hash of the WMV and the aspect ratio is all wrong. The aspect ratio can be fixed by adding another parameter to the mplayer command line: "-aspect 16:9" ... but that really should be some kind of dialog: "what aspect ratio? [ ] 4:3 [ ] 16:9 (WS)"

YoDude 2008-03-30 01:40

Re: Understanding Maemo Mime handling
 
It does what I wanted. :)

After a year and some months my N800 now has no more limitations. That is, as far as net usage, I can no longer pick it up and say "If only it did...".

I'm sure my needs will change in the future but for now, for the first time, I'm ahead of the curve.

pipeline 2008-03-30 01:45

Re: Understanding Maemo Mime handling
 
Thanks guys... i think qole can take it from here :) just kidding (unless of course... )

i'll mostly leave it as is for awhile too see if i need any more updates.

qole 2008-03-31 04:05

Re: Understanding Maemo Mime handling
 
I have a question. Suppose one wanted to use dbus-switchboard to route requests for non-cli applications? I was wondering if I could send stuff to the built-in Media Player via the Switchboard, via "/usr/bin/mediaplayer-ui <params>", but it looks like that doesn't work.

So, the switchboard is for non-hildon apps only?

tme 2008-04-07 11:55

Re: Understanding Maemo Mime handling
 
just an idea: could we use a modified libhildonmime to do this instead
of the dbus switchboard?

it strikes me that this should automatically do much of what must be manually
configured for switchboard by looking at the standard package mime
definitions.

checking the source, libhildonmime is based on standard gnome-vfs-mime
but will only launch apps for which there is a dbus service entry. we
could modify this to also launch command line apps. similarly for uri
handling.

to open files and uris from command line, a simple "gnome-open" like app
that uses hildon_mime_open_file and hildon_uri_open would be fairly
straight forward.

any takers?

qole 2008-06-18 16:37

Re: Understanding Maemo Mime handling
 
Pipeline has taken this idea and expanded it. He has a much more robust mime-handler system in this thread. He started a new thread and I didn't notice. This is why it is important to put a forwarding address at the end of the old thread when you're starting a new one!

luis 2009-04-27 15:30

Re: Understanding Maemo Mime handling
 
Quote:

Originally Posted by qole (Post 162658)
I was wondering if I could send stuff to the built-in Media Player via the Switchboard, via "/usr/bin/mediaplayer-ui <params>", but it looks like that doesn't work.

How did you solve this issue? I would like to play songs directly from command line, but indeed "mediaplayer-ui /path/to/song" does not work...

Thanks,
L.

qole 2009-04-27 16:22

Re: Understanding Maemo Mime handling
 
Quote:

Originally Posted by luis (Post 282359)
How did you solve this issue?

I didn't :(

qwerty12 2009-04-27 16:24

Re: Understanding Maemo Mime handling
 
Code:

/usr/bin/dbus-send --type=signal --dest=com.nokia.mediaplayer /com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:"file//<path to file (with trailing slash included)>"
If doing this from a C program, the function "hildon_mime_open_file" works to open the default program assigned to a file type with a file and you can use osso_rpc_run(_with_defaults) to call the mime_open method of a specific program directly...

luis 2009-04-27 21:28

Re: Understanding Maemo Mime handling
 
Quote:

Originally Posted by qwerty12 (Post 282376)
Code:

/usr/bin/dbus-send --type=signal --dest=com.nokia.mediaplayer /com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:"file//<path to file (with trailing slash included)>"

I am doing something wrong, because this does not work. It just opens the mediaplayer in the "Now playing list" (old stuff) but doesn't play the new file.

This is what I did:

Code:

Nokia-N800-43-7:~> ls -la /home/user/Coereba_flaveola_16.mp3
-rw-r-----    1 user    users      253514 Apr 27 16:33 /home/user/Coereba_flaveola_16.mp3
Nokia-N800-43-7:~> /usr/bin/dbus-send --type=signal --dest=com.nokia.mediaplayer /com/nokia/mediaplayer com.nokia.mediaplayer.mime_open string:"file///home/user/Coereba_flaveola_16.mp3"

Any idea what is happening?

Thanks!!!!

L.


All times are GMT. The time now is 20:45.

vBulletin® Version 3.8.8