#!/usr/bin/env python
# Copyright (C) 2008-2009 AG Projects. See LICENSE for details.
#

from vlcw import VLCwrapper


class SIPVideoApplication(SIPApplication):

    def __init__(self):
        self.dev = None
        self.initialize()

    def enum_devices(self):
        """
        Enumerate video capable devices on the system like webcams.
        """
        pass
    
    def initialize(self):
        """
        Initialize the video application: create the VLC engine and select the appropiate devie using enum_devices function.
        """
        pass
    
    def run_cli(self):
        """
        Show a CLI like interface so that the user can start a video session or handle an incoming video session.
        """
        pass

    def start_video_session(self, ip, port):
        """
        Start streaming H.264 media from the specified IP and port number.
        """
        pass

    def stop_video_session(self):
        """
        Stop the video streaming.
        """
        pass

    def handle_incoming_session(self, ip, port):
        """
        Handle and incoming video session request on the given remote IP and port. A VLC player will be created for playing the incoming H.264 media stream.
        """
        pass


if __name__ == "__main__":
    app = SIPVideoApplication()
    app.run_cli()

