Changeset 25693


Ignore:
Timestamp:
01/17/14 13:26:14 (10 years ago)
Author:
gost
Message:

[titan] marker auto seek.... autostart

Location:
titan/titan
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/marker.h

    r25681 r25693  
    381381        unsigned long long startpos = 0;
    382382        off64_t prosec = 0, diff = 0;
     383       
     384        if(status.autoseek == 2)
     385        {
     386                sleep(2);
     387                status.autoseek = 1;
     388        }
    383389       
    384390        struct service* snode = getservice(RECORDPLAY, 0);
  • titan/titan/play.h

    r25645 r25693  
    12671267                        unlink(epgfilename);
    12681268                        free(epgfilename); epgfilename = NULL;
     1269                        epgfilename = changefilenameext(file, ".as");
     1270                        unlink(epgfilename);
     1271                        free(epgfilename); epgfilename = NULL;
    12691272                }
    12701273                ret = 1;
     
    16011604                               
    16021605                                if(rcret == getrcconfigint("rcmenu", NULL)) {
     1606                                        char* asfile = changefilenameext(file, ".as");
    16031607                                        if(status.autoseek == 0) {
    16041608                                                status.autoseek = 1;
    16051609                                                textbox(_("Message"), _("Marker autoseek is started"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 10, 0);
    16061610                                                addtimer(&markerautoseek_thread, START, 10000, 1, NULL, NULL, NULL);
     1611                                                FILE* testseek = fopen(asfile, "w");
     1612                                                if(testseek != NULL)
     1613                                                {
     1614                                                        fprintf(testseek,"autoseek is started\n");
     1615                                                        fclose(testseek);
     1616                                                }
    16071617                                        }
    16081618                                        else {
    16091619                                                status.autoseek = 0;
    16101620                                                textbox(_("Message"), _("Marker autoseek is stopped"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 10, 0);
     1621                                                unlink(asfile);
    16111622                                        }
     1623                                        free(asfile); asfile = NULL;
    16121624                                }
    16131625                        }
  • titan/titan/player.h

    r25645 r25693  
    4444        int serviceid = 0;
    4545        int supermagic = -1;
     46        int lastpos = 0;
    4647        struct channel* chnode = NULL;
    4748        struct service* snode = NULL;
     
    8990                }
    9091               
     92                lastpos = 0;
    9193                if(flag == 0 && getconfigint("showlastpos", NULL) == 1)
    9294                {
     
    105107                                                seekpos = seekpos - (seekpos % tssize);
    106108                                                lseek64(fd, atoll(skip1), SEEK_SET);
     109                                                lastpos = 1;
    107110                                        }
    108111                                        free(skip1); skip1 = NULL;
     
    123126                }
    124127               
     128                if(status.playmarker != NULL)
     129                {
     130                        char* testfile = changefilenameext(file, ".as");
     131                        FILE* testseek = fopen(testfile, "r");
     132                        if(testseek != NULL)
     133                        {
     134                                if(lastpos == 0)
     135                                        lseek64(fd, status.playmarker->pos, SEEK_SET);
     136                                status.autoseek = 2;
     137                                addtimer(&markerautoseek_thread, START, 10000, 1, NULL, NULL, NULL);
     138                                fclose(testseek);
     139                        }
     140                        free(testfile); testfile = NULL;
     141                }
     142                               
    125143                delchannel(serviceid, 0, 1);
    126144                chnode = createchannel("player", 0, 0, serviceid, 99, 0, -1, -1, -1, -1, 0, -1);
Note: See TracChangeset for help on using the changeset viewer.