Changeset 24138
- Timestamp:
- 10/08/13 19:32:24 (9 years ago)
- Location:
- titan/titan
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/titan/struct.h
r23983 r24138 211 211 int serviceid; 212 212 int16_t subtitlepid; 213 int16_t subtitleid2; 213 214 struct lastsubtitle* next; 214 215 }; … … 1025 1026 { 1026 1027 char* name; 1028 int16_t subtype; 1027 1029 int16_t pid; 1028 1030 int16_t type; … … 1340 1342 int subthreadaktion; 1341 1343 int subthreadpid; 1344 int subthreadid2; 1342 1345 // epg thread pointer 1343 1346 struct stimerthread* epgthread; -
titan/titan/subtitle.h
r23286 r24138 1561 1561 pthread_attr_destroy(&status.subthreadattr); 1562 1562 if(flag == 0) 1563 { 1563 1564 status.subthreadpid = 0; 1565 status.subthreadid2 = 0; 1566 } 1564 1567 1565 1568 return 0; … … 1611 1614 if(node->pid == status.subthreadpid) 1612 1615 { 1616 if(node->subtype == 2 || (node->subtype == 1 && node->id2 == status.subthreadid2)) 1613 1617 changeinput(tmp, _("running")); 1614 1618 treffer = 1; … … 1650 1654 if(checksubtitle(status.aktservice->channel, (struct subtitle*)listbox->select->handle) != NULL) 1651 1655 { 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) 1653 1657 { 1654 1658 clearscreen(subtitle); 1655 1659 drawscreen(skin, 0, 0); 1656 1660 if(subtitlestart((struct subtitle*)listbox->select->handle) == 0) 1661 { 1657 1662 status.subthreadpid = ((struct subtitle*)listbox->select->handle)->pid; 1663 status.subthreadid2 = ((struct subtitle*)listbox->select->handle)->id2; 1664 } 1658 1665 1659 1666 if(status.autosubtitle == 1 && status.aktservice->channel != NULL) … … 1667 1674 tmpstr = ostrcat(tmpstr, "#", 1, 0); 1668 1675 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); 1669 1678 addlastsubtitle(tmpstr, 1, NULL); 1670 1679 free(tmpstr); tmpstr = NULL; 1671 1680 } 1672 1681 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); 1674 1683 } 1675 1684 1676 1685 } 1677 1686 else 1687 { 1678 1688 status.subthreadpid = 0; 1689 status.subthreadid2 = 0; 1690 } 1679 1691 } 1680 1692 else 1693 { 1681 1694 status.subthreadpid = 0; 1695 status.subthreadid2 = 0; 1696 } 1682 1697 m_unlock(&status.subtitlemutex, 8); 1683 1698 } … … 1711 1726 memset(newnode, 0, sizeof(struct subtitle)); 1712 1727 1728 newnode->subtype = subtype; 1713 1729 newnode->pid = pid; 1714 1730 newnode->type = type; … … 1810 1826 while(node != NULL) 1811 1827 { 1812 if(node->pid == lsnode->subtitlepid )1828 if(node->pid == lsnode->subtitlepid && node->id2 == lsnode->subtitleid2) 1813 1829 break; 1814 1830 node = node->next; … … 1820 1836 { 1821 1837 status.subthreadpid = node->pid; 1838 status.subthreadid2 = node->id2; 1822 1839 ret = 0; 1823 1840 } … … 1829 1846 } 1830 1847 1831 void changelastsubtitle(struct lastsubtitle* lsnode, int pid )1848 void changelastsubtitle(struct lastsubtitle* lsnode, int pid, int id2) 1832 1849 { 1833 1850 if(lsnode == NULL) return; 1834 1851 1835 if(lsnode->subtitlepid != pid )1852 if(lsnode->subtitlepid != pid || lsnode->subtitleid2 != id2) 1836 1853 { 1837 1854 lsnode->subtitlepid = pid; 1855 lsnode->subtitleid2 = id2; 1838 1856 status.writelastsubtitle = 1; 1839 1857 } … … 1868 1886 } 1869 1887 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) 1872 1890 { 1873 1891 if(count > 0) … … 2006 2024 while(node != NULL) 2007 2025 { 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); 2009 2027 if(ret < 0) 2010 2028 {
Note: See TracChangeset
for help on using the changeset viewer.