In this paper we introduce a new software platform for the realization of intelligent video-surveillance applications and, more generally, of real-time video stream processing systems. The platform is implemented as a middleware, providing general purpose services, and a collection of dynamically loaded modules carrying out domain-specific tasks. The architecture of the platform follows a data-flow paradigm, where the application is organized as a processing network whose nodes are activated by the middleware as soon as their inputs are available and a processor is ready. This architecture is beneficial both with respect to the development process, simplifying the module implementation and favoring the reuse of software components, and with respect to the performance, since the middleware can automatically parallelize the processing using the available processors or cores. The platform has been validated by converting an existing video surveillance application, demonstrating both the improvement in the development process and the performance increment.