# Written by Arno Bakker, Diego Rabaioli # see LICENSE.txt for license information # # Implements the BackgroundProcess, i.e. SwarmEngine for SwarmPlugin and # SwarmTransport=SwarmPlayer v2. See Plugin/SwarmEngine.py and Transport/SwarmEngine.py # for main startup. # # The BackgroundProcess shares a base class BaseApp with the SwarmPlayer v1, # which is a standalone P2P-based video player. # # # Notes: # - Implement play while hashcheck? # Not needed when proper shutdown & restart was done. # - load_checkpoint with DLSTATUS_DOWNLOADING for Plugin? # Nah, if we start BG when plugin started we have a video to play soon, # so start others in STOPPED state (rather than switching them all # to off and restart one in VOD mode just after) # # History: # # NSSA API 1.0.2 # # 1.0.2 Added STOP message to tell plugin to stop playing the current item # (needed to support new behaviour where control conn is not always # shutdown anymore to support input.set_p2ptarget. # # Added ERROR message to tell plugin NSSA won't be able to serve the # content requested via START (for