Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Http file url to not-sequential QIODevice
Forum Updated to NodeBB v4.3 + New Features

Http file url to not-sequential QIODevice

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 166 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dmitry87
    wrote on 4 Oct 2022, 14:40 last edited by Dmitry87 10 Apr 2022, 14:43
    #1

    Hello everyone. I have an URL to a huge video file stored on an https server. I need to access it using QIODevice in non-sequential mode i.e. read arbitrary pieces of the file. Does Qt provide any interface to implement this thing?
    I know QMediaPlayer can request pieces, but I don't see how it is implemented.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on 6 Oct 2022, 05:05 last edited by
      #2

      You do this with HTTP range requests (assuming the sending server supports it). You may need to manually add a Range header with QNetworkRequest::setRawHeader() because it is not exposed as a known header. Each response comes back to you as a QIODevice that you typically read sequentially.

      1 Reply Last reply
      3

      1/2

      4 Oct 2022, 14:40

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved