Changeset 25492


Ignore:
Timestamp:
01/06/14 21:31:24 (9 years ago)
Author:
gost
Message:

[intern] add new getcurrentpos

Location:
titan/titan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/header.h

    r25482 r25492  
    927927int jumpmarker(char* timetext);
    928928void screenmarker();
    929 
     929off64_t getcurrentpos(struct service* snode);
    930930
    931931#endif
  • titan/titan/marker.h

    r25489 r25492  
    327327}
    328328
     329off64_t getcurrentpos(struct service* snode)
     330{
     331        unsigned long long aktpts = 0;
     332        int ret = 0;
     333        off64_t posn = -1;
     334               
     335        off64_t pos = lseek64(snode->recsrcfd, 0, SEEK_CUR);
     336
     337        ret = videogetpts(status.aktservice->videodev, &aktpts);
     338        if(ret == 0)
     339        {
     340                posn = playergetptspos(aktpts, pos, -1, 4, 0, 0, NULL);
     341                if(posn < -1)
     342                        posn = playergetptspos(aktpts, pos - (posn *-1), -1, 4, 0, 0, NULL);
     343                if(posn < -1)
     344                        posn = playergetptspos(aktpts, pos - (posn *-2), -1, 4, 0, 0, NULL);
     345                if(posn < -1)
     346                        posn = playergetptspos(aktpts, pos - (posn *-3), -1, 4, 0, 0, NULL);
     347                if(posn < -1)
     348                        posn = playergetptspos(aktpts, pos - (posn *-4), -1, 4, 0, 0, NULL);
     349        }
     350        return posn;
     351}
     352               
     353
     354
    329355#endif
Note: See TracChangeset for help on using the changeset viewer.