[Closed] sorting a .srt file for vlc player



  • I've created a .srt file using
    QTextStream out(AjayFileD);
    out<<"\n"<<strc<<",000"<<"-->"<<strc<<",999"<<"\n";
    and const char *strc has the pause time.If i pause at 1 min 42 seconds,the first line is written to a .srt and at 16 min 59 seconds,the second line is written to a .srt file
    00:01:42,000-->00:01:42,999
    00:16:59,000-->00:16:59,999

    now if i go back and pause at 10 minutes,this line is written
    00:10:00,000-->00:10:00,999

    and the entire file looks like this
    00:01:42,000-->00:01:42,999
    00:16:59,000-->00:16:59,999
    00:10:00,000-->00:10:00,999

    but i want it to look like this
    00:01:42,000-->00:01:42,999
    00:10:00,000-->00:10:00,999
    00:16:59,000-->00:16:59,999

    i want all the 'pause time' to be sorted in ascending order in the .srt file.
    however,I'm not able to sort them in ascending order,please suggest some method to sort contents of .srt file in qt.

    EDIT: Please, don't double post your questions. They can be moved, if they are located in the wrong forum. As this one is a more specific forum, then "the other post,":http://qt-project.org/forums/viewthread/15197/ I close this topic. Gerolf


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.