문제

Well ,I'm working on a bittorent client and I'm trying to generate thumbnails of video files by downloading a specific piece and extracting an image from it , yet I haven't been able to figure out a way to do so. Thanks

도움이 되었습니까?

해결책

I take you you mean to download specific pieces of a torrent.

First, you probably want to map the beginning of a file to a range of pieces. You can do that with the torrent_info::map_file().

Then you can select which pieces to download by torrent_handle::prioritize_pieces(). Setting the priority of a piece to 0, means not to download it.

see libtorrent documentation

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top