Abstract:
An application may connect to a video stack through a separate server which uses a window in a separate address space from the video window used by the application to seek video services. If the application crashes, sufficient time will be available to allow the television capture card and the video stack to be shut down in an orderly fashion and to enable them to be reused by subsequent applications without requiring that the computer be rebooted.

Description:
BACKGROUND 
   This invention relates generally to systems that use video streams and particularly to techniques for maintaining access to those video streams even after an application using the video stream crashes. 
   Computer systems are often used to provide a television program on a television or monitor connected to the computer which may include a television tuner card. The combination of television and computer offers many advantages. The computer may provide software which facilitates selection of television programs, for example, using electronic program guides. In addition, the television may receive interactive broadcasts which include television programs with accompanying web content. The web content, which may be related to the television program, may provide additional information while allowing the user to respond to inquiries made during the television broadcast. In addition, links may be provided to enable the viewer to link to Internet web sites related to the broadcaster or the broadcast itself. 
   When an application program calls for television programming, the application program accesses a video stack, a software layer for handling video, which provides a video stream for the application. If the application crashes in the course of the video stream, the video stream may not be properly shut down. As a result, the video stack may not be accessible by another application which has not crashed. 
   For a subsequent application to access the television video after a crash, it is normally necessary to reboot the computer system to reset the video stack to enable subsequent applications to access that stack. This is awkward for many computer users since the computer user may have other processes ongoing on his or her computer system which then must be interrupted to reboot the computer. 
   Thus, there is a need for a television video stream system which allows access to the video stack, without rebooting, after an application using the video stack has crashed. 
   SUMMARY 
   In accordance with one embodiment, a method for accessing a video stream includes initializing the video stream using a video server when a first application requests video. If the first application crashes, access to the video stream is maintained for a second application through the video server. 

   
     DESCRIPTION OF THE DRAWING 
       FIG. 1  is a schematic depiction of the interaction of a pair of applications with a video server and a video stack in accordance with one embodiment of the present invention; 
       FIG. 2  is a flow chart showing the operation of the system shown in  FIG. 1 ; and 
       FIG. 3  is a block depiction of a computer implementing one embodiment of the present invention. 
   

   DETAILED DESCRIPTION 
   An application can access television video through a video server operating through a separate video window at a memory address space distinct from the memory address space of the video window used by the application itself, as indicated in  FIG. 1 . The video server could be a television video server or a digital video disk (DVD) server as examples. The application “A”, indicated by the block  10 , sets up a parent video window  14 . The parent video window  14  is passed to a video server  18  which then creates a child window  19  of the parent window  14 . In effect, then the parent window provides the handle to the child window which provides the handle to the video stack. 
   The server  18  then places the video in the child window  19 . The child window  19  handles the communication between the server  18  and the video stack  20 . The video stack  20  may, for example, be Video for Windows or DirectShow, both from Microsoft Corporation. Since the window  14  and the window  19  operate from separate and different address spaces in a computer&#39;s memory, if the application A crashes, as indicated in dashed lines in  FIG. 1 , the window  19  in the TV server  18  may be maintained. 
   In prior systems, when the application A crashed, the window  14 , which provided video services, crashed as well, leaving the video stack  20  in an unusable state. Thereafter, when a separate application, such as the application B in block  12 , attempted to access video services, it was unable to do so without rebooting the computer. 
   In the embodiment shown in  FIG. 1 , the application  12  may set up its own parent window  14  which then handles the video window  19  in the TV server  18 . The application B has immediate access the video stack through the server  18  despite the fact that the application A may have crashed and may no longer be operating. The settings on the server  18  and its video window  19  may continue to be maintained unaffected by the crash of the application A. 
   Referring now to  FIG. 2 , a software program for implementing an embodiment of the system described with respect to  FIG. 1 , begins at  28 . An application, such as the application A, connects to a TV server  18 , as indicated in block  30 . The application requests video (block  32 ) and an inquiry is made to determine whether video is initialized, as indicated in diamond  34 . If so, the video is deinitialized. This restores the video to a known, stable state. If not, the TV server initializes the video using the window provided by the application as the parent window (block  38 ). The application uses the video for such purposes as desired, as indicated in block  40 . 
   At diamond  42 , an inquiry is made to determine whether the application has crashed. The crash detection may be implemented, for example, by monitoring exception handler codes. The software may tie into the operating system and wait for a pre-set exception handler code indicative of a crash. When a particular code is detected, the software determines that a crash is occurring in the application program. In block  48 , the video stack is automatically shut down and in block  50  the TV tuner card is also automatically shut down upon detection of a crash. 
   If no crash is detected, the application eventually requests the TV server to close video when the application is done with the video, as indicated in block  44 . As long as the operating system is operating correctly, the application leaves the video initialized, as indicated in block  46 . 
   In the case of a crash, by shutting down the video stack and the TV tuner card quickly upon detecting the error condition, the video stack may be maintained in a usable state for a subsequent application, such as the application B illustrated in  FIG. 1 . Even though the parent video window  14  may be unusable, the TV server  18  is still running correctly and is able to access the video stack  20  because the server&#39;s parent window  19  is operating in a separate address space from the application&#39;s window  14 . 
   Video is activated in the windows using handles supplied by the server  18 . If there is a crash, the parent window  14  disappears, but the video stack is still connected to the TV server window  19 . When a new application starts, it requests video from the TV server  18  and the TV server, unaffected by the crash of the prior application, can then provide a connection to the video stack. 
   Referring now to  FIG. 3 , an exemplary computer system  51  for implementing an embodiment of the present invention, includes a processor  52  connected to a bridge  54 . The bridge  54  is in turn connected to system memory  56 . System memory  56  includes a plurality of address spaces including the address spaces  70  and  72 . One of the address spaces  70 ,  72  may be used for the window  19  and the other may be used for the window  14 . 
   The bridge  54  connects to a conventional bus  58 . A tuner card  62  may be connected to the bus  58 . A display  64  such as a television may be connected to the tuner card  62 . A bridge  60  is also connected to the bus  58 . The bridge  60  couples a hard disk drive  66  which may store a plurality of software programs including the software to implement the server  18  and video stack  20  as well as an application program  68 , which could correspond to the application A or the application B in  FIG. 1 . 
   While the present invention has been described with respect to a limited number of embodiments, those skilled in the art will appreciate numerous modifications and variations therefrom. It is intended that the present application cover all such modifications and variations that fall within the true spirit and scope of the present invention.