Changeset 41687


Ignore:
Timestamp:
01/12/18 22:07:42 (6 years ago)
Author:
gost
Message:

[plugins] lcdpearl new skin LCD_Music allowed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/plugins/lcdsamsung/lcdsamsung.c

    r41585 r41687  
    112112        struct skin* LCD_Standby = NULL;
    113113        struct skin* LCD_Play = NULL;
     114        struct skin* LCD_Music = NULL;
    114115       
    115116       
     
    173174        struct skin* sday3_d = NULL;
    174175        struct skin* sday3_dl = NULL;
    175        
    176176       
    177177        char* tmpstr = NULL, *tmpstr2 = NULL, *tmpstr3 = NULL, *timemerk = NULL, *sendermerk = NULL, *recmerk = NULL;
     
    322322        struct skin* slen = getscreennode(LCD_Play, "len");
    323323        struct skin* sreverse = getscreennode(LCD_Play, "reverse");
     324       
     325        if(ostrcmp(getconfig("lcd_samsung_plugin_type", NULL), "spf75h") == 0)
     326                LCD_Music = getscreen("LCD_spf75_Music");
     327        else if(ostrcmp(getconfig("lcd_samsung_plugin_type", NULL), "spf83h") == 0)
     328                LCD_Music = getscreen("LCD_spf83_Music");
     329        else if(ostrcmp(getconfig("lcd_samsung_plugin_type", NULL), "spf87h") == 0)
     330                LCD_Music = getscreen("LCD_spf87_Music");
     331        else if(ostrcmp(getconfig("lcd_samsung_plugin_type", NULL), "spf87hold") == 0)
     332                LCD_Music = getscreen("LCD_spf87_Music");
     333        else if(ostrcmp(getconfig("lcd_samsung_plugin_type", NULL), "spf105p") == 0)
     334                LCD_Music = getscreen("LCD_spf105_Music");
     335        else if(ostrcmp(getconfig("lcd_samsung_plugin_type", NULL), "spf107h") == 0)
     336                LCD_Music = getscreen("LCD_spf107_Music");
     337        else if(ostrcmp(getconfig("lcd_samsung_plugin_type", NULL), "spf72h") == 0)
     338                LCD_Music = getscreen("LCD_spf72_Music");
     339        else if(ostrcmp(getconfig("lcd_samsung_plugin_type", NULL), "spf85h") == 0)
     340                LCD_Music = getscreen("LCD_spf85_Music");
     341        else if(ostrcmp(getconfig("lcd_samsung_plugin_type", NULL), "spf85p") == 0)
     342                LCD_Music = getscreen("LCD_spf85_Music");
     343        else
     344                LCD_Music = getscreen("LCD_spf87_Music");
     345               
     346        struct skin* mthumb = getscreennode(LCD_Music, "thumb");
     347        struct skin* mtitle = getscreennode(LCD_Music, "title");
     348        struct skin* malbum = getscreennode(LCD_Music, "album");
     349        struct skin* mrealname = getscreennode(LCD_Music, "realname");
     350        struct skin* mgenre = getscreennode(LCD_Music, "genre");
     351        struct skin* myear = getscreennode(LCD_Music, "year");
     352        struct skin* makttimeplay = getscreennode(LCD_Music, "akttime");
     353        struct skin* mprogress = getscreennode(LCD_Music, "progress");
     354        struct skin* mtitle1 = getscreennode(LCD_Music, "title1");
     355        struct skin* mpos = getscreennode(LCD_Music, "pos");
     356        struct skin* mlen = getscreennode(LCD_Music, "len");
     357        struct skin* mreverse = getscreennode(LCD_Music, "reverse");
    324358               
    325359        if(ostrcmp(getconfig("lcd_samsung_plugin_type", NULL), "spf75h") == 0)
     
    481515                        type = 1;
    482516                }
     517                // Musik wird abgespielt
     518                else if((status.playspeed != 0 || status.play != 0 || status.pause != 0) && musicdat.act == 1 && LCD_Music != NULL)
     519                {
     520                        if(type == 999)
     521                                system("killall -3 fbread");
     522                        //status.write_png = 0;
     523                        loopcount++ ;
     524                        type = 3;
     525                }
    483526                // Aufzeichnung wird abgespielt
    484527                else if(status.playspeed != 0 || status.play != 0 || status.pause != 0)
     
    578621                        }
    579622                        else if(type == 2)
     623                        {
     624                                if(loopcount >= 15)
     625                                {
     626                                        put = 1;
     627                                        loopcount = 0;
     628                                }
     629                        }       
     630                        else if(type == 3)
    580631                        {
    581632                                if(loopcount >= 15)
     
    918969                                        m_unlock(&status.drawingmutex, 0);
    919970                                }
     971                                else if(type == 3)
     972                                {
     973                                        pos = playergetpts() / 90000;
     974                                        len = playergetlength();
     975                                        if(pos < 0) pos = 0;
     976                                        reverse = len - pos;
     977                                        if(len == 0)
     978                                                mprogress->progresssize = 0;
     979                                        else
     980                                                mprogress->progresssize = pos * 100 / len;
     981                                       
     982                                        tmpstr2 = convert_timesec(pos);
     983                                        changetext(mpos, tmpstr2);
     984                                        free(tmpstr2); tmpstr2 = NULL;
     985
     986                                        tmpstr2 = convert_timesec(len);
     987                                        changetext(mlen, tmpstr2);
     988                                        free(tmpstr2); tmpstr2 = NULL;
     989
     990                                        tmpstr2 = convert_timesec(reverse);
     991                                        changetext(mreverse, tmpstr2);
     992                                        free(tmpstr2); tmpstr2 = NULL;
     993                                       
     994                                        changetext(makttimeplay, tmpstr);
     995                                        changetext(mtitle1, basename(status.playfile));
     996                                       
     997                                        changetext(mtitle, musicdat.title);
     998                                        changetext(malbum, musicdat.album);
     999                                        changetext(mrealname, musicdat.realname);
     1000                                        changetext(mgenre, musicdat.genre);
     1001                                        changetext(myear, musicdat.year);
     1002                                       
     1003                                        changepic(mthumb, musicdat.thumb);
     1004                                       
     1005                                        m_lock(&status.drawingmutex, 0);
     1006                                        if(drawscreen(LCD_Music, 0, 2) == -2)
     1007                                                printf("nicht genug Speicher fuer drawscreen\n");
     1008                                        m_unlock(&status.drawingmutex, 0);
     1009                                }
    9201010                        }
    9211011                }
Note: See TracChangeset for help on using the changeset viewer.