The Player seek event callback, you need to operate the corresponding stream seek operation, You can refer to the definition of lseek() at https://man7.org/linux/man-pages/man2/lseek.2.html.
- Parameters
-
offset | the value of seek offset. |
whence | the postion of start seeking, the directive whence as follows: 0 - SEEK_SET : The file offset is set to offset bytes. 1 - SEEK_CUR : The file offset is set to its current location plus offset bytes. 2 - SEEK_END : The file offset is set to the size of the file plus offset bytes. 65536 - AVSEEK_SIZE : Optional. Passing this as the "whence" parameter to a seek function causes it to return the filesize without seeking anywhere. |
- Returns
- whence == 65536, return filesize if you need. whence >= 0 && whence < 3 , return offset value if succeed. return -1 if failed.