Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

Stream Phases

peplin edited this page Mar 18, 2011 · 1 revision

Phase 1

  • Receive on socket
  • Pass through to another socket, tell requesting client the port
  • Print this address in the web browser, i.e. return it when any node (or localhost) does GET /stream/:id

Phase 2

  • GET /stream/:id with video content-type opens a long-lived connection
  • When data comes in on an incoming stream, drop the data in a data structure that the long lived connection is waiting on
  • The GET will dump anything in that data structure to the open connection as soon as it comes in
  • Make sure it loops around to avoid buffering everything

Phase 3

  • Client opens 2 of these long lived connections
  • Read from each frame by frame to fill a (10 second or so) buffer
  • Passes gapless sections of buffer to media decoder
Clone this wiki locally