【问题标题】:Download specific piece using libtorrent使用 libtorrent 下载特定片段
【发布时间】:2012-12-19 13:05:10
【问题描述】:

嗯,我正在开发一个 bittorent 客户端,我正在尝试通过下载特定片段并从中提取图像来生成视频文件的缩略图,但我还没有找到一种方法所以。 谢谢

【问题讨论】:

    标签: c++ p2p bittorrent libtorrent


    【解决方案1】:

    我认为你的意思是下载某个 torrent 的特定片段。

    首先,您可能希望将文件的开头映射到一系列片段。您可以使用torrent_info::map_file() 来做到这一点。

    然后您可以通过torrent_handle::prioritize_pieces()选择要下载的作品。将一个片段的优先级设置为0,意味着不下载它。

    libtorrent documentation

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-03-04
      • 1970-01-01
      • 1970-01-01
      • 2021-09-04
      • 1970-01-01
      • 2019-09-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多