Resolution Managment

Moderator: Moderator

parti02
veteran
Posts: 232
Joined: Sat Jun 16, 2007 5:52 pm

Resolution Managment

Postby parti02 » Thu Apr 17, 2008 3:43 pm

Hi,
is it possible to integrate a basic resolution managment?
Perhaps add a new switch into the config file for example:

# Resolution
#
Set resolution: manual or automatic

When set to manual mms use
h_res = 1280
v_res = 720

When set to automatic mms try to get the
current resolution from xrandr.

xrandr output:
Screen 1: minimum 320 x 200, current 1024 x 768, maximum 1024 x 768
default connected 1024x768+0+0 0mm x 0mm
1024x768 50.0*
800x600 51.0
720x480 52.0
640x480 53.0
640x400 54.0
512x384 55.0
400x300 56.0
320x240 57.0
320x200 58.0


Reason:
When i watch films, i want to use my beamer, but sometimes i want only hear musik and look photos, so i take my TV to handle mms.

When i start my pc and the beamer is on, x runs automatically with
1280x720.
When i start my pc and the tv is on, x runs automatically with 1024x786,
the only thing i must do by hand every time, is to change the resulution
in the /etc/mms/Config.

What are you thinking about? Is it hard to implement?

Gruß
Dirk

User avatar
arj
Site Admin
Posts: 2316
Joined: Thu Dec 01, 2005 8:51 pm
Location: Denmark
Contact:

Postby arj » Thu Apr 17, 2008 4:08 pm

I need something similar. I have actually done some hacking to get it working. My situation is that I also have a beamer and then the nokia n800 for music. So I have a startmenu entry that will allow you to change resolution while mms is running. Sadly it depends on the new-ui and some more so I havn't gotten around to fixing it up 100%. But I did a proof and concept and it worked. I really need this as well so it will be here sooner rather than later :)

parti02
veteran
Posts: 232
Joined: Sat Jun 16, 2007 5:52 pm

Postby parti02 » Thu Apr 17, 2008 4:18 pm

sounds realy good.

Gruß
Dirk

User avatar
arj
Site Admin
Posts: 2316
Joined: Thu Dec 01, 2005 8:51 pm
Location: Denmark
Contact:

Postby arj » Wed May 14, 2008 10:07 pm

Added as revno 1637. Enable with --enable-res-switch. Acmelabs could you do an icon? :)

This adds a menu item to startmenu where one can change between the two resolutions defined in config.

Lorenzodes: Could you look into implementing it for opengl also? It's the switch_mode function in sdlout.cpp :)

Thanks

User avatar
acmelabs
Overlord
Posts: 2365
Joined: Mon Feb 20, 2006 9:18 pm
Location: Germany
Contact:

Postby acmelabs » Thu May 15, 2008 4:59 am

arj wrote:Added as revno 1637. Enable with --enable-res-switch. Acmelabs could you do an icon? :)

This adds a menu item to startmenu where one can change between the two resolutions defined in config.

Lorenzodes: Could you look into implementing it for opengl also? It's the switch_mode function in sdlout.cpp :)

Thanks

Ok. I'll try it tonight.

Btw. The line spacing in the message boxes (EPG, IMDB, WebRadio missing server connection, etc) at 1920x1080 is far too small. The text lines glue together.

Regards,
Andreas

User avatar
meinanwalt
Posts: 3
Joined: Fri Feb 29, 2008 12:14 am
Location: Germany
Contact:

Postby meinanwalt » Thu May 15, 2008 8:48 am

arj wrote:I need something similar. I have actually done some hacking to get it working. My situation is that I also have a beamer and then the nokia n800 for music. So I have a startmenu entry that will allow you to change resolution while mms is running. Sadly it depends on the new-ui and some more so I havn't gotten around to fixing it up 100%. But I did a proof and concept and it worked. I really need this as well so it will be here sooner rather than later :)


hello arj,

why not take the scaling feature of x11vnc? My mms is at 1024x768 on tv. and for remote control i use a wlan enabled pda with a simple vnc client. the mms machine runs x11vnc with scaling 0.4 and so i have mms 320x240 fullscreen on my pda:

/usr/bin/x11vnc -desktop mmsPDA -forever -shared -rfbport 5900 -bg -o /var/log/x11vnc -rfbauth /home/musikbox/.vnc/passwd -httpdir /usr/share/java -httpport 5800 -scale 0.4

and you can run multiple x11vncs for different resolutions.

greets,

meinanwalt

User avatar
arj
Site Admin
Posts: 2316
Joined: Thu Dec 01, 2005 8:51 pm
Location: Denmark
Contact:

Postby arj » Thu May 15, 2008 9:48 am

Because 800/480 != 1280/720. Or can you have different resolutions, not just scaling on both devices? It's not a bad idea, but I also need to change input from lirc to keyboard when doing this, but I'll make mms work with multiple input devices to make this work (the most requested enhancement in the bug db btw :)).

parti02
veteran
Posts: 232
Joined: Sat Jun 16, 2007 5:52 pm

Postby parti02 » Thu May 15, 2008 11:09 am

nice thx :D

Gruß
Dirk

User avatar
castorinop
veteran
Posts: 331
Joined: Wed Jun 07, 2006 6:34 pm
Location: Argentina
Contact:

Postby castorinop » Thu May 15, 2008 12:03 pm

arj wrote:I need something similar. I have actually done some hacking to get it working. My situation is that I also have a beamer and then the nokia n800 for music. So I have a startmenu entry that will allow you to change resolution while mms is running. Sadly it depends on the new-ui and some more so I havn't gotten around to fixing it up 100%. But I did a proof and concept and it worked. I really need this as well so it will be here sooner rather than later :)


@arj: this is the moment for implementing this feature http://bugs.mymediasystem.org/?do=details&task_id=611.

feature plugins ---> themeEngine

example code for header

Code: Select all

theme->engine->print_header("icon","text");
and into themeEngine.:print_header() you can do anything !! and all plugins show same header (position, size, etc).

if themeEngine is a pluggeable, something one can change the complete engine, without change code into feature plugins.

the posible api for this, (or like to me)

Code: Select all

#ifndef THEME_ENGINE_HPP
#define THEME_ENGINE_HPP

#include "startmenu.hpp"

class ThemeEngine {

public:
  ThemeEngine() {}

  // for startmenu
  virtual void print_startmenu(std::list<startmenu_row> startmenu, const startmenu_row& row, const startmenu_item& current_item);
  virtual void handle_startmenu();

  // All Plugins, maybe needs some parametrers
  virtual void print_header();

  virtual void print_grid(); 
  virtual void handle_gird();

  virtual void print_list();
  virtual void handle_list();

  virtual void print_audio_player(string album, string artist, string, title, int track, int total, string state);

};

#endif

lorenzodes
master
Posts: 772
Joined: Sun Mar 11, 2007 4:50 pm
Location: move.l 4.w,a6

Postby lorenzodes » Thu May 15, 2008 12:11 pm

arj wrote:Added as revno 1637. Enable with --enable-res-switch. Acmelabs could you do an icon? :)

This adds a menu item to startmenu where one can change between the two resolutions defined in config.

Lorenzodes: Could you look into implementing it for opengl also? It's the switch_mode function in sdlout.cpp :)

Thanks


Ok, will look into it :)
"I’m not frightened of dying, anytime will do, I don’t mind. Why should I be frightened of dying? There’s no reason for it, you gotta go sometime"

User avatar
magicamun
master
Posts: 688
Joined: Thu Feb 28, 2008 7:42 am
Location: Germany

Postby magicamun » Thu May 15, 2008 1:28 pm

@castorinop: as far as i have understood things it is not that easy

unless there is no interface to functions for list-boxes of different object-types (Text, Picture, Rectangel) and other gui-elements this approach would fail i guess.
it would be a huge step ahead, if there were a common scheme for calculating font-sizes , horizontal and vertical spacings etc and not having code to handle this in every plug. i am as you probably now currently working on the epg-plug and have fought some hours with making this fully scaleable and more flexible to changes in layout (Channel-Logos and stuff). The amount of code reuseable by other plugins is small compared to the lines of code especially required for the purpose of that plugin.

User avatar
castorinop
veteran
Posts: 331
Joined: Wed Jun 07, 2006 6:34 pm
Location: Argentina
Contact:

Postby castorinop » Thu May 15, 2008 2:12 pm

magicamun wrote:@castorinop: as far as i have understood things it is not that easy

unless there is no interface to functions for list-boxes of different object-types (Text, Picture, Rectangel) and other gui-elements this approach would fail i guess.
it would be a huge step ahead, if there were a common scheme for calculating font-sizes , horizontal and vertical spacings etc and not having code to handle this in every plug. i am as you probably now currently working on the epg-plug and have fought some hours with making this fully scaleable and more flexible to changes in layout (Channel-Logos and stuff). The amount of code reuseable by other plugins is small compared to the lines of code especially required for the purpose of that plugin.


but, the headers, grids, lists should be same in all features, the epg plug or weather plug are special cases.

User avatar
acmelabs
Overlord
Posts: 2365
Joined: Mon Feb 20, 2006 9:18 pm
Location: Germany
Contact:

Postby acmelabs » Thu May 15, 2008 2:45 pm

arj wrote:Because 800/480 != 1280/720. Or can you have different resolutions, not just scaling on both devices? It's not a bad idea, but I also need to change input from lirc to keyboard when doing this, but I'll make mms work with multiple input devices to make this work (the most requested enhancement in the bug db btw :)).

Anyway,

here's the icon:

Image

User avatar
magicamun
master
Posts: 688
Joined: Thu Feb 28, 2008 7:42 am
Location: Germany

Postby magicamun » Thu May 15, 2008 2:46 pm

@castorinop i am with you regarding headers and lists, but be careful - a list has two dimensions and in the x-axis of the/a list consists of heterogenous elements - and some of them may be "squeezed" to give space to other elements, so the structure of the elements of that list has to be thought of very carefully - to prevent developers from coding their own "features"

basically - i like the idea of stricter layouts and more common code and less "flexibility" - the gui becomes more consistant that way - not saying that it is not currently.

User avatar
magicamun
master
Posts: 688
Joined: Thu Feb 28, 2008 7:42 am
Location: Germany

Postby magicamun » Thu May 15, 2008 3:08 pm

acmelabs: great icon - as always


Return to “feature requests”

Who is online

Users browsing this forum: No registered users and 2 guests