Abstract:
A video recorder connected to a plurality of cameras and a plurality of client devices and a method of controlling the video recorder are provided. The method includes: setting a plurality of buffers, in a memory of the video recorder, corresponding to the plurality of cameras, respectively, and setting a plurality of positions in at least one buffer of the buffers for loading image data input from a corresponding camera of the plurality of cameras; loading, in the at least one buffer, the image data on given positions of the plurality of positions; and transmitting the loaded image data to the plurality of client devices so that each of the plurality of client devices receives the image data input from a same corresponding camera.

Description:
CROSS-REFERENCE TO RELATED PATENT APPLICATIONS 
     This application claims priority from Korean Patent Application No. 10-2009-0049476, filed on Jun. 4, 2009, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein in its entirety by reference. 
     SUMMARY 
     Methods and apparatuses consistent with the exemplary embodiments concept relate to a video recorder and controlling the same, and more particularly, to a video recorder which stores and transmits frame data received by channels while the frame data is loaded on a volatile memory, and a method of controlling the same. 
     A network video recorder (NVR) is an example of a video recorder having a main control unit and a volatile memory, and storing and transmitting frame data received by channels while loading the frame data on the volatile memory. For the network video recorder, monitoring cameras are set by channels and the frame data transmitted from each monitoring camera is received through a network. The frame data received by channels is stored and transmitted while being loaded on the volatile memory for buffering. For example, the frame data loaded on the volatile memory by channels is transmitted to client computers connected to a network, as transmission targets. Also, the frame data loaded on the volatile memory by channels is stored in a hard disk drive (HDD). 
     According to one or more exemplary embodiments of the present inventive concept, there is provided a method for controlling a video recorder, by which moving picture data of the same channel is effectively transmitted to a plurality of client computers and also the amount of data loaded on a volatile memory is efficiently reduced. 
     According to an aspect of an exemplary embodiment, there is provided a method for controlling a video recorder including a memory and connected to a plurality of cameras and a plurality of client devices. The method may include: setting a plurality of buffers, in the memory, corresponding to the plurality of cameras, respectively, and setting a plurality of positions in at least one buffer of the buffers for loading image data input from a corresponding camera of the cameras; in the at least one buffer, loading the image data on given positions of the positions; and transmitting the loaded image data to the client devices so that each of the client devices receives the image data input from the same corresponding camera. 
     According to an aspect of an exemplary embodiment, there is provided a video recorder connected to a plurality of cameras and a plurality of client devices. The video recorder may include: a memory comprising a plurality of buffers, corresponding to the plurality of cameras, respectively, at least one of which buffers comprises a plurality of positions where image data input from a corresponding camera of the cameras is loaded; and a control unit which loads the image data on given positions of the positions, and transmits the loaded image data to the client devices so that each of the client devices receives the image data input from the same corresponding camera. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       The above and other aspects will become more apparent by describing in detail exemplary embodiments with reference to the attached drawings in which: 
         FIG. 1  illustrates a monitoring system using a network video recorder that is used as a video recorder according to an exemplary embodiment; 
         FIG. 2  is a block diagram showing the internal structure of the network video recorder of  FIG. 1 , according to an exemplary embodiment; 
         FIG. 3  is a block diagram showing layers of communication control used by a CPU as the main control unit of  FIG. 1 , according to an exemplary embodiment; 
         FIG. 4  illustrates a method for controlling a RAM as a volatile memory by the main control unit of  FIG. 2 , according to an exemplary embodiment; and 
         FIG. 5  is a flowchart for explaining a control algorithm of the main control unit of  FIG. 2 , including the control method of  FIG. 4 , according to an exemplary embodiment. 
     
    
    
     DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS 
     Hereinafter, exemplary embodiments will be described in detail with reference to the attached drawings. Like reference numerals in the drawings denote like elements. 
       FIG. 1  illustrates a monitoring system using a network video recorder  2  that is used as a video recorder according to an exemplary embodiment. In  FIG. 1 , a reference numeral D IMA  denotes moving picture data channels in which moving picture data output from each of monitoring cameras  1   a ,  1   b , and  1   c  is input to a network  4 , for example, the Internet, and moving picture data output from the network  4  is input to each of client computers  3   a ,  3   n , and  3   c . Reference label D COM  denotes communication channels between each of the monitoring cameras  1   a ,  1   b , and  1   c  and the network  4 , and between the network  4  and each of the client computers  3   a ,  3   b , and  3   c . Reference label D IMAT  denotes a compound moving picture data channel in which compound moving picture data is input from the network  4  to the video recorder  2 , and compound moving picture data is output from the video recorder  2  to the network  4 . Reference label D COMT  denotes a compound communication channel between the video recorder  2  and the network  4 . 
     Referring to  FIG. 1 , the video recorder  2  is connected to the monitoring cameras  1   a ,  1   b , and  1   c  and the client computers  3   a ,  3   b , and  3   c  as transmission targets, via the network  4 , for example, the Internet. The monitoring cameras  1   a ,  1   b , and  1   c  communicate with the video recorder  2  through the communication channel D COM  and transmit moving picture data in live-view to the video recorder  2  through the moving picture data channels D IMA . That is, since the monitoring cameras  1   a ,  1   b , and  1   c  are set by channels, the frame data from each of the monitoring cameras  1   a ,  1   b , and  1   c  is periodically input to the video recorder  2  via the network  4 , for example, the Internet. 
     The video recorder  2  according to the present exemplary embodiment includes a main control unit and a volatile memory, and stores and transmits frame data received by channels while loading the frame data on the volatile memory. That is, the video recorder  2  transmits moving picture data loaded on the volatile memory by channels to the client computers  3   a ,  3   b , and  3   c  as transmission targets, and also stores the moving picture data on a hard disk drive as a recording medium. 
       FIG. 2  is a block diagram showing the internal structure of the video recorder  2  of  FIG. 1 . Referring to  FIG. 2 , the video recorder  2  according to the present exemplary embodiment includes an input interface  201 , a central processing unit (CPU)  202 , a random access memory (RAM)  203  as the volatile memory, an output interface  204 , a hard disk drive (HDD) interface  205 , and an HDD  206 . 
     Referring to  FIGS. 1 and 2 , in the internal structure and operation of the video recorder  2  according to the present exemplary embodiment, the compound moving picture data channel D IMAT  and the compound communication channel D COMT  input from the monitoring cameras  1   a ,  1   b , and  1   c  through the network  4  are input to the CPU  202  via the input interface  201 . 
     While loading frame data received by channels on the RAM  203 , the CPU  202  stores and transmits the frame data. That is, the CPU  202  transmits motion picture data loaded on the RAM  203  by channels, to the client computers  3   a ,  3   b , and  3   c  via the output interface  204 , and also stores the moving picture data on the HDD  206  via the HDD interface  205 . The HDD interface  205  adopts a well-known serial advanced technology attachment (SATA) standard. 
     According to an exemplary embodiment, the CPU  202  sets a ring buffer, in which loading positions of the frame data form a circular ring, by channels, so that the frame data may circularly move in the RAM  203  provided as the volatile memory. The CPU  202  also sets transmission targets by loading positions in the ring buffer, and a reference time during which any one frame data can exist on the RAM  203 . The reference time is set to be longer than a period for storing the frame data in the HDD  206 . 
     When there is frame data for which transmission and storing are completed, and a loading time during which the frame data exists in the ring buffer exceeds the reference time, the CPU  202  removes the frame data from the ring buffer. 
     Referring to  FIG. 3 , layers of communication control used in the CPU  202  as the main control unit of  FIG. 2  include a network connection layer  311 , an Internet protocol (IP) layer  312 , a transport layer  313 , and an application layer  314 . That is, the CPU  202  performs communication by using four layers according to transmission control protocol/Internet protocol (TCP/IP). 
     Referring to  FIGS. 2 and 3 , the network connection layer  311  forms a frame by adding a frame header and a trailer for cyclic redundancy check (CRC) to a packet from an upper layer, that is, the IP layer  312 . The frame is converted into a bit stream to be input to the output interface  204 . The IP layer  312  adds an IP header for routing to a segment from an upper layer, that is, the transport layer  313 . The IP header includes information about a source route or a destination route. The transport layer  313  divides data from an upper layer, that is, the application layer  314  into segments having appropriate sizes and provides session between communications. The transport layer  313  performs start, maintenance or termination of connection between communications. The application layer  314  provides a standard interface so that an application may provide a network service. 
       FIG. 4  illustrates a method for controlling the RAM  203  as the volatile memory by the CPU  202  as the main control unit of  FIG. 2 . Referring to  FIGS. 2 and 4 , the CPU  202  sets ring buffers A-Z, by channels, in which loading positions ID 1 -ID 15  of frame data form a circular ring so that the frame data may circularly move in the RAM  203  as the volatile memory. That is, the ring buffers A-Z are set to correspond to respective monitoring cameras, connected to the video recorder  2 , including the monitoring cameras  1   a ,  1   b , and  1   c.    
     Although each of the ring buffers A-Z is set to have 15 loading positions ID 1 -ID 15 , more loading positions may be set. Also, although the ring buffer A and the ring buffer Z are set to be identical to each other in  FIG. 4 , the ring buffer A and the ring buffer Z may be set to be different from each other. In the ring buffers A-Z, periodical frame data of moving picture corresponding to each of the ring buffers is set to be input to the 15 th  loading position ID 15  through the moving picture channels D IMA . 
     Also, the CPU  202  sets transmission targets by loading positions of the ring buffers A-Z by a user. For example, in the ring buffer A, the 1 st  to 4 th  client computers are set as the transmission targets respectively to the 10 th  to 13 th  loading positions ID 10 -ID 13 . Also, in the ring buffer Z, the 1 st  to 4 th  client computers are set as the transmission targets respectively to the 10 th  to 13 th  loading positions ID 10 -ID 13 . As described above, although the ring buffer A and the ring buffer Z are set to be identical to each other, the ring buffer A and the ring buffer Z may be set to be different from each other. 
     Accordingly, in the transmission of moving picture data of the same channel to a plurality of client computers, since the moving picture data may be individually transmitted at the different loading positions ID 10 -ID 13  due to the movement of the position of the loaded frame data, the transmission rate of the moving picture data may be accurately determined with respect to each of the client computers. Thus, the moving picture data of the same channel may be effectively transmitted to a plurality of client computers. 
     The CPU  202  sets the reference time during which any one frame data exists on the RAM  203 , by the user. As described above, the reference time is set to be longer than a period for storing the frame data in the HDD  206 . When there is frame data for which transmission and storing are completed, and a loading time during which the frame data exists in the ring buffer exceeds the reference time, the CPU  202  removes the frame data from the ring buffers A-Z. 
     Referring to  FIG. 4 , the frame data input at the 15 th  loading position ID 15  circularly moves in a direction indicated by an arrow, that is, clockwise, and that the data moved from the 8 th  loading position ID 8  to the 7 th  loading position ID 7  is removed. Since the frame data is sequentially removed, no frame data exist at the 1 st  to 7 th  loading positions ID 1 -ID 7 . Thus, the amount of data loaded on the volatile memory may be efficiently reduced. 
       FIG. 5  is a flowchart for explaining a control algorithm of the CPU  202  as the main control unit of  FIG. 2 , including the control method of  FIG. 4 . Referring to  FIGS. 2 ,  4  and  5 , in the control algorithm of the CPU  202 , when frame data of a channel is input (S 51 ), the CPU  202  loads the frame data at the 15 th  loading position ID 15  that is a reference position in a ring buffer, for example, the ring buffer A, corresponding to the channel (S 52 ). 
     Next, the CPU  202  moves all frame data loaded at the respective positions ID 1 -ID 15  in a ring buffer, for example, the ring buffer A, corresponding to the channel, to next positions circularly in a direction indicated by an arrow of  FIG. 4 , that is, clockwise (S 53 ). The CPU  202  transmits the frame data of the positions ID 10 -ID 13 , where transmission targets are set, in a ring buffer, for example, the ring buffer A, to the transmission target (S 54 ). 
     Next, the CPU  202  stores all frame data on the RAM  203  subject to storing, in the HDD  206  via the HDD interface  205  at a periodic storage time point (S 55  and S 56 ). When there is frame data for which transmission and storing are completed, and a loading time during which the frame data exists in the ring buffers exceeds the reference time, the CPU  202  removes the frame data from the ring buffers A-Z (S 57  and S 58 ). 
     Thus, the amount of data loaded on the volatile memory may be efficiently reduced. All operations are repeated until a termination signal is generated (S 59 ). 
     As described above, in the method for controlling a video recorder and a video recorder adopting the method according to the exemplary embodiments, the ring buffers in which the loading positions of frame data form a circular ring are set by channels so that the frame data may circularly move in the volatile memory, and transmission targets are set by loading positions in each ring buffer. 
     Accordingly, when moving picture data of the same channel is transmitted to a plurality of client computers, the moving picture data may be individually transmitted from different loading positions due to the movement of the position of the loaded frame data so that the transmission rate of the moving picture data can be individually and accurately determined with respect to each of the client computers. Thus, the moving picture data of the same channel can be effectively transmitted to the client computers. 
     Also, when there is frame data for which transmission and storing are completed, and a loading time during which the frame data exists in the ring buffer exceeds the reference time, the frame data is removed from the ring buffer. Thus, the amount of data loaded on the volatile memory may be efficiently reduced. 
     While exemplary embodiments have been particularly shown and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the inventive concept as defined by the appended claims.