Changeset 24138


Ignore:
Timestamp:
10/08/13 19:32:24 (9 years ago)
Author:
nit
Message:

[titan] update dvbsubtitel

Location:
titan/titan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/struct.h

    r23983 r24138  
    211211        int serviceid;
    212212        int16_t subtitlepid;
     213        int16_t subtitleid2;
    213214        struct lastsubtitle* next;
    214215};
     
    10251026{
    10261027        char* name;
     1028        int16_t subtype;
    10271029        int16_t pid;
    10281030        int16_t type;
     
    13401342        int subthreadaktion;
    13411343        int subthreadpid;
     1344        int subthreadid2;
    13421345        // epg thread pointer
    13431346        struct stimerthread* epgthread;
  • titan/titan/subtitle.h

    r23286 r24138  
    15611561        pthread_attr_destroy(&status.subthreadattr);
    15621562        if(flag == 0)
     1563        {
    15631564                status.subthreadpid = 0;
     1565                status.subthreadid2 = 0;
     1566        }
    15641567
    15651568        return 0;
     
    16111614                                if(node->pid == status.subthreadpid)
    16121615                                {
     1616                                        if(node->subtype == 2 || (node->subtype == 1 && node->id2 == status.subthreadid2))
    16131617                                        changeinput(tmp, _("running"));
    16141618                                        treffer = 1;
     
    16501654                                if(checksubtitle(status.aktservice->channel, (struct subtitle*)listbox->select->handle) != NULL)
    16511655                                {
    1652                                         if(((struct subtitle*)listbox->select->handle)->pid != status.subthreadpid)
     1656                                        if(((struct subtitle*)listbox->select->handle)->pid != status.subthreadpid || ((struct subtitle*)listbox->select->handle)->id2 != status.subthreadid2)
    16531657                                        {
    16541658                                                clearscreen(subtitle);
    16551659                                                drawscreen(skin, 0, 0);
    16561660                                                if(subtitlestart((struct subtitle*)listbox->select->handle) == 0)
     1661                                                {
    16571662                                                        status.subthreadpid = ((struct subtitle*)listbox->select->handle)->pid;
     1663                                                        status.subthreadid2 = ((struct subtitle*)listbox->select->handle)->id2;
     1664                                                }
    16581665
    16591666                                                if(status.autosubtitle == 1 && status.aktservice->channel != NULL)
     
    16671674                                                                tmpstr = ostrcat(tmpstr, "#", 1, 0);
    16681675                                                                tmpstr = ostrcat(tmpstr, oitoa(((struct subtitle*)listbox->select->handle)->pid), 1, 1);
     1676                                                                tmpstr = ostrcat(tmpstr, "#", 1, 0);
     1677                                                                tmpstr = ostrcat(tmpstr, oitoa(((struct subtitle*)listbox->select->handle)->id2), 1, 1);
    16691678                                                                addlastsubtitle(tmpstr, 1, NULL);
    16701679                                                                free(tmpstr); tmpstr = NULL;
    16711680                                                        }
    16721681                                                        else
    1673                                                                 changelastsubtitle(lsnode, ((struct subtitle*)listbox->select->handle)->pid);
     1682                                                                changelastsubtitle(lsnode, ((struct subtitle*)listbox->select->handle)->pid, ((struct subtitle*)listbox->select->handle)->id2);
    16741683                                                }
    16751684
    16761685                                        }
    16771686                                        else
     1687                                        {
    16781688                                                status.subthreadpid = 0;
     1689                                                status.subthreadid2 = 0;
     1690                                        }
    16791691                                }
    16801692                                else
     1693                                {
    16811694                                        status.subthreadpid = 0;
     1695                                        status.subthreadid2 = 0;
     1696                                }
    16821697                                m_unlock(&status.subtitlemutex, 8);
    16831698                        }
     
    17111726        memset(newnode, 0, sizeof(struct subtitle));
    17121727
     1728  newnode->subtype = subtype;
    17131729        newnode->pid = pid;
    17141730        newnode->type = type;
     
    18101826                        while(node != NULL)
    18111827                        {
    1812                                 if(node->pid == lsnode->subtitlepid)
     1828                                if(node->pid == lsnode->subtitlepid && node->id2 == lsnode->subtitleid2)
    18131829                                        break;
    18141830                                node = node->next;
     
    18201836                                {
    18211837                                        status.subthreadpid = node->pid;
     1838                                        status.subthreadid2 = node->id2;
    18221839                                        ret = 0;
    18231840                                }
     
    18291846}
    18301847
    1831 void changelastsubtitle(struct lastsubtitle* lsnode, int pid)
     1848void changelastsubtitle(struct lastsubtitle* lsnode, int pid, int id2)
    18321849{
    18331850        if(lsnode == NULL) return;
    18341851
    1835         if(lsnode->subtitlepid != pid)
     1852        if(lsnode->subtitlepid != pid || lsnode->subtitleid2 != id2)
    18361853        {
    18371854                lsnode->subtitlepid = pid;
     1855                lsnode->subtitleid2 = id2;
    18381856                status.writelastsubtitle = 1;
    18391857        }
     
    18681886        }
    18691887
    1870         ret = sscanf(line, "%llu#%d#%"SCNu16"", &newnode->transponderid, &newnode->serviceid, &newnode->subtitlepid);
    1871         if(ret != 3)
     1888        ret = sscanf(line, "%llu#%d#%"SCNu16"#%"SCNu16"", &newnode->transponderid, &newnode->serviceid, &newnode->subtitlepid, &newnode->subtitleid2);
     1889        if(ret != 4)
    18721890        {
    18731891                if(count > 0)
     
    20062024        while(node != NULL)
    20072025        {
    2008                 ret = fprintf(fd, "%llu#%d#%d\n", node->transponderid, node->serviceid, node->subtitlepid);
     2026                ret = fprintf(fd, "%llu#%d#%d#%d\n", node->transponderid, node->serviceid, node->subtitlepid, node->subtitleid2);
    20092027                if(ret < 0)
    20102028                {
Note: See TracChangeset for help on using the changeset viewer.