Skins and plugins.

  • Hi all.

    I want to make the plugin menu change depending on the skin. How to do it right? Should my plugin determine which skin is being used, or should the skin send a command to the plugin to change the interface? For example, I want to scale the video in the plugin menu, in the estuary4vdr and skinnopacity skins, but not in the skins with a transparent menu. Do I need to change the skin code for this, or do it in the plugin code?

  • Hallo,


    You mean skindesigner-skins?


    Usually you can only set the video size configureable in a skin's setup menu. Each skin has its own setup menu.

    You can find it there: menu -> setup -> plugins -> skindesigner -> skin setup

    You can add a option in skins setup.xml, for example estuary4vdr: skindesigner -> skins -> estuary4vdr -> setup.xml

    Then you also have to change the corresponding XML file in directory xmlfiles


    If you don't want it to be configurable, you can change the behavior of each skin directly in the corresponding XML file.


    Grüße

    kamel5

    VDR 2.5.2: ASUS Prime X470-PRO, Ryzen 7 2700, 64GB, 6TB HD, GT630, Fedora 33 Kernel 5.11 X86_64, Devicebonding 2 x 1 auf 2, TT6400, DVBSky S952 V3

    Git-Repo: gitlab.com/kamel5

  • OK, in general a skin doesnt know anything about a plugin. So, normally you cannot control a skin via the plugin.

    The only way to control a skin is to set a MenuCategory. So, if you define a new MenuCategory in the core-vdr...

    There may be other ways to let the skins know what you want. But with all these options, you have to customize each skin.


    If you can explain what you want to display, maybe there is a better way.


    Grüße

    kamel5

    VDR 2.5.2: ASUS Prime X470-PRO, Ryzen 7 2700, 64GB, 6TB HD, GT630, Fedora 33 Kernel 5.11 X86_64, Devicebonding 2 x 1 auf 2, TT6400, DVBSky S952 V3

    Git-Repo: gitlab.com/kamel5

  • If you want to know if the video is scaled if a skin is activ. I don't know if this information is possible at all, may be from the output device.

    You can't get this information from the skins.


    Possible approach:

    - Open a menu with a space sign

    - check if the video is scaled (from wherever)

    - Update your menu


    Grüße

    kamel5

    VDR 2.5.2: ASUS Prime X470-PRO, Ryzen 7 2700, 64GB, 6TB HD, GT630, Fedora 33 Kernel 5.11 X86_64, Devicebonding 2 x 1 auf 2, TT6400, DVBSky S952 V3

    Git-Repo: gitlab.com/kamel5

  • Normally the skin should do the scaling, but ...

    I want make a scaled video in this menu, but only in some skins.

    You may have a look at the recordingsmenu. If that is what you want set the menucategory to "mcRecording"

    VDR 2.5.2: ASUS Prime X470-PRO, Ryzen 7 2700, 64GB, 6TB HD, GT630, Fedora 33 Kernel 5.11 X86_64, Devicebonding 2 x 1 auf 2, TT6400, DVBSky S952 V3

    Git-Repo: gitlab.com/kamel5

  • I think I understand your concern. But you cant control all different skins, tomorrow there is a new skin and than.

    Let the skins do their job. If a skin scaled a video or not, the plugin shouldn't care.

    I would hide the menu after a while, maybe configureable. You can then return the menu with the press of a button if necessary.


    Grüße

    kamel5

    VDR 2.5.2: ASUS Prime X470-PRO, Ryzen 7 2700, 64GB, 6TB HD, GT630, Fedora 33 Kernel 5.11 X86_64, Devicebonding 2 x 1 auf 2, TT6400, DVBSky S952 V3

    Git-Repo: gitlab.com/kamel5

  • In this special case I would let your plugin decide what do do if it detects some special skins by itself (e.g. read out skin from VDR-settings).

    Otherwise all skins, which should support your plugin, have to implement the "talking" to your plugin themselves.
    Principially the skin should decide how big it renders a (background) video but it depends pretty much on what your plugin should do in another way if a specific skin is detected.

    MyVDR: yaVDR-Ansible (Ubuntu 18) - softhddevice-openglosd (ffmpeg 2.8) - epgd/epg2vdr - skindesigner estuary4vdr (adaptiert) - 1920x1080@50 Hz | kodi 18 - inputstream + amazon vod
    Aerocube M40 | 300W | ASRock H61M-GE | Intel G530 | Asus ENGT520 | 2 x TT-budget S2-3200 | ASRock Smart Remote (CIR) | 4 GB RAM | 120 GB SSD | 3 TB HDD

  • If your plugin "touches" enough VDR-users, I am sure there will be people who make the necessary adaptions to their favourite skins XML-files.

    Especially if there are some default-suggestions available. And if your plugin should generate a benefit, than you are interested in get it working at least with your favorite skin and there is the design template for your followers ;-)

    MyVDR: yaVDR-Ansible (Ubuntu 18) - softhddevice-openglosd (ffmpeg 2.8) - epgd/epg2vdr - skindesigner estuary4vdr (adaptiert) - 1920x1080@50 Hz | kodi 18 - inputstream + amazon vod
    Aerocube M40 | 300W | ASRock H61M-GE | Intel G530 | Asus ENGT520 | 2 x TT-budget S2-3200 | ASRock Smart Remote (CIR) | 4 GB RAM | 120 GB SSD | 3 TB HDD

  • Good point, but who creates the associated XML files for each skin.

    And for native skins a separate OSD must also be implemented.

    Exactly because of this reasons I decided to stop my VDR activities ;)

  • If your plugin "touches" enough VDR-users, I am sure there will be people who make the necessary adaptions to their favourite skins XML-files.

    In an ideal world yes, but in the real world there are 2 plugins Plex and TVguideng, which after years do not have XML-files for all skins.


    I want make a scaled video in this menu, but only in some skins.

    I think what you want is:

    plugin asks an skin: hey, do you have a transparent background? --> if no, then scale the video


    That is not possible at all, because no skin knows whether the background is transparent or not.

    Why: the background can be an color, an color gradient, an picture ...


    If you want a defined behavior you have to implement your own OSD like Plex or TVGuide.


    Grüße

    kamel5

    VDR 2.5.2: ASUS Prime X470-PRO, Ryzen 7 2700, 64GB, 6TB HD, GT630, Fedora 33 Kernel 5.11 X86_64, Devicebonding 2 x 1 auf 2, TT6400, DVBSky S952 V3

    Git-Repo: gitlab.com/kamel5

  • Exactly because of this reasons I decided to stop my VDR activities ;)

    An der Stelle unterscheidet sich der VDR aber nun wirklich nicht zu tvheadend. Mit dem Unterschied das zumindest ich das Gefühl habe das beim VDR noch Entwicklung stattfindet während das letzte Release von tvheadend über 2 Jahre zurück liegt. Und zwar nicht nur von Klaus direkt sondern man liest auch immer wieder andere Namen von Leuten die im Bereich DVB mit Linux schon viel gewirkt haben.


    Ich bastle auch nur weiter "rund um den VDR" weil ich ihn hinter Kodi laufen habe. Jetzt wo vnsiserver wieder weitergepflegt wird habe ich auch nicht mehr ganz so die Befürchtung damit auf's falsche Pferd zu setzen.

  • This is I would choose..


    write your Plugin.

    - read from VDR's actual setup settings which skin was choosen: Setup.OSDSkin should give the name of the current choosen Skin (if loaded!)

    - verify that a skin with this name is loaded/available

    - dont expect a skin to do any logic or communication. It's a skin, nothing more.


    If both is checked, you may react on it in your Plugin.