1. Field of the Invention
The present invention relates to a stream data recorder for recording stream data of video, sound, etc., in a recording medium, such as an optical disc (e.g., a removal DVD), a flash memory, or the like, and specifically to a stream data recorder capable of recording a series of stream data of, e.g., a lengthy TV program, over a plurality of recording media.
2. Description of the Prior Art
Conventionally, to continuously record/reproduce a stream data which has a data amount larger than a single recording medium, an autochanger for automatically changing recording media, or the like, is used.
A recording/reproduction device designed in consideration of avoiding loss of data during replacement of recording media has been known wherein the device includes a removable main disk and a sub-disk stored in the device. For example, in this device, data is recorded in the sub-disk in the device during the replacement of the main disk, and data is temporarily accumulated in a buffer memory during a transfer of a pickup (see, for example, Japanese Laid-Open Patent Publication No. 10-106152). In this device, in a recording mode, a recording start address and a recording end address for each disk are stored in an information memory and, in a reproduction mode, data is continuously reproduced according to these addresses.
An AV data recorder which uses a DVD-RAM has been realized wherein smooth and continuous reproduction of AV data is secured by an AV data management file (see, for example, Japanese Laid-Open Patent Publication No. 2002-94945).
In the case where data is recorded in the sub-disk during replacement of the main disk as described above, continuous reproduction is possible so long as the data is reproduced by the recording/reproduction device. However, in the case where the main disk is removed from the recording/reproduction device and the data stored therein is reproduced in another device, there is missing part (which is stored in the sub-disk), which disables continuous reproduction. The same would occur in the device which uses the AV data management file.
The present invention was conceived in view of the above circumstances. An objective of the present invention is to reproduce stream data having a large data amount, without any loss of data, using a device different from one used for recording the stream data.
To achieve the above objective, the present invention provides a stream data recorder for recording stream data in a recording medium, comprising: a primary recording section for recording stream data in a removable recording medium; a free space detector for detecting that a free space of a removable first recording medium in which data is being recorded runs out; a shunt recording section for shunting stream data input during replacement of the first recording medium with a removable second recording medium into a shunt recording medium; and a transfer recording controller for instructing the primary recording section to transfer the stream data shunted into the shunt recording medium to the second recording medium.
With the above structure, stream data input during replacement of a recording medium with a new one can be safely recorded in the new recording medium. Therefore, it is readily possible to reproduce the stream data without any data loss using a different device.
In the above stream data recorder, the transfer recording controller may instruct the primary recording medium to record, in the second recording medium, stream data which is input after the replacement with the second recording medium prior to the transfer of the shunted stream data to the second recording medium.
With the above feature, it is readily possible to record the shunted stream data without any restriction on the recording speed, etc.
The primary recording section may record, in the second recording medium, management information indicative of that the shunted stream data is reproduced prior to the stream data which is input after the replacement with the second recording medium.
With the above feature, it is readily possible to reproduce the data in an appropriate order of elapsed time irrespective of the order of recording or the physical arrangement.
The above stream data recorder further comprises a reservation section for reserving in the second recording medium a region in which the shunted stream data is to be recorded, wherein the primary recording section records stream data which is input after the replacement with the second recording medium in a region physically subsequent to the reserved region in the second recording medium.
In this case, the data is recorded in the subsequent region in the order of elapsed time. Therefore, it is readily possible to reproduce the data in an appropriate order of elapsed time.
The primary recording section may record the shunted stream data in a region at a trailing end of a free space in the second recording medium while recording the stream data which is input after the replacement with the second recording medium in a region at the leading end of the free space.
With the above feature, it is readily possible to perform these recording operations independently or in parallel.
Recording of the shunted stream data may be carried out based on a DMA scheme.
With this feature, the processing load on a CPU can readily be decreased.
A plurality of shunt recording media may be used in a predetermined order of priority.
With this feature, the stream data which is input during the replacement of a recording medium can be shunted flexibly while the increase in circuit scale is suppressed.
Hereinafter, embodiments of the present invention will be described with reference to the drawings. It should be noted that, in the embodiments described below, like elements are denoted by like reference numerals, and detailed descriptions thereof are omitted.
The video/audio signal recorder 100 includes an encoder 101, an IDE controller 102, a frame memory 103, a stream buffer 104, a stream shunt memory 105, and a CPU 111. The video/audio signal recorder 100 records stream data in, for example, a disk 120 which is a removable recording medium.
The encoder 101 compresses video/sound data taken in the frame memory 103 into video and sound packets according to, for example, MPEG-2 (Moving Picture Experts Group-2) and writes resultant video/sound data (AV data) in the stream buffer 104 by the predetermined units, for example, on a GOP by GOP basis, each GOP (Group Of Pictures) having a length of about 0.5 seconds. The CPU 111 is notified about completion of encoding and writing of each GOP (events) by a signal transmitted via a bus or an interruption signal. The CPU 111 reads the AV data written in the stream buffer 104 and writes the read AV data in the disk 120 or stream shunt memory 105. Every time encoding of a GOP (writing of a GOP in the stream buffer 104) is completed, the encoder 101 notifies the CPU 111 about the number of packets of the GOP.
The IDE controller 102 writes AV data in the disk (removable recording medium) 120 through a driver (not shown).
If the free space in the disk 120 has run out, the stream shunt memory 105 stores AV data till replacement of the disk 120 with a new one is completed as will be described later. The stream shunt memory 105 may be any type of storage, for example, a semiconductor memory, a hard disk drive, or the like.
The CPU 111 executes predetermined programs to function as a disk end detector 106, a disk recordability detector 107, a stream recording location controller 108, a management information generator 109, and a shunted stream write-back section 110.
The disk end detector 106 detects that the free space in the disk 120 runs out. Specifically, every time the CPU 111 is notified about the number of packets of a GOP encoded by the encoder 101 as described above, the disk end detector 106 calculates the size of the free space in the disk (for example, the size of a free space in an entire disk or the size of a free space in an area which is reserved for recording AV data) based on the free space in the disk 120 which has been stored in advance.
When the disk 120 is replaced with a new one, the disk recordability detector 107 detects whether or not the new disk 120 becomes recordable.
The stream recording location controller 108 determines in which of the disk 120 and the stream shunt memory 105 the AV data stored in the stream buffer 104 is to be recorded.
At the time of completing recording of AV data in the disk 120 or the stream shunt memory 105, the management information generator 109 generates management information used for reproduction of the AV data, for example, AV data management information indicative of the relationship between the times with predetermined intervals and the addresses of the disk 120 in which AV data for the times are written. The management information is written in an exclusive area different from those reserved for the AV data.
The shunted stream write-back section 110 transfers AV data which has been stored in the stream shunt memory 105 during the replacement of the disk 120, as described above, to the disk 120.
Next, an operation of the video/audio signal recorder 100 having the above structure is described with reference to
(S101) In response to an event, for example, depression of a recording key (not shown), the CPU 111 instructs the encoder 101 to start encoding.
(S102) An AV data file, which is to be used for writing AV data in the first disk 120, is opened.
(S103) It is determined whether or not a recording completion notice has been issued by, for example, a user's operation. If not issued, the process proceeds to step S104.
(S104) The disk end detector 106 determines whether or not it is immediately after the first disk 120 (in the process of recording) has just become full. If not, the process proceeds to step S105.
(S105) When the first disk 120 becomes full, the disk 120 is replaced with the second one, and the disk recordability detector 107 determines whether or not the second disk 120 becomes writable. If the first disk 120 is not yet full or if the second disk 120 is not writable, the process proceeds to step S106.
(S106) Every time an encoding completion notice for each GOP is issued from the encoder 101, the AV data stored in the stream buffer 104 is written in a recording position indicated by the stream recording location controller 108, specifically, in the first or second disk 120 or in the stream shunt memory 105.
Thereafter, steps S103 to S106 are repeated, whereby the AV data is written in the disk(s) 120.
(S107) If the disk end detector 106 determines at step S104 that it is immediately after the first disk 120 has just become full, the AV data file is first closed.
(S108) A file used for writing AV data in the stream shunt memory 105 is opened. (It should be noted that the recording format in the stream shunt memory 105 is not limited to any particular one. For example, when a file system is not employed, the process of opening the file is not necessary.)
(S109) When the disk 120 in which data is being recorded becomes full, the stream recording location controller 108 switches the location in which the AV data is to be written from the disk 120 (IDE controller 102) to the stream shunt memory 105.
(S110) The management information generator 109 generates AV data management information about AV data recorded in the first disk 120 (or the stream shunt memory 105 during the replacement of the disk 120 as will be described later) and writes the AV data management information in the first disk 120 (or the stream shunt memory 105).
Thereafter, it is monitored whether or not the second disk 120 becomes writable while steps S103 to S106 are repeated to write the AV data in the stream shunt memory 105.
(S111) If the disk recordability detector 107 determines at step S105 that the next disk 120 is writable, the AV data file written in the stream shunt memory 105 is closed.
(S112) A file used for writing AV data in the next disk 120 is opened.
(S109) The stream recording location controller 108 switches the location in which the AV data is to be written from the stream shunt memory 105 to the next disk 120.
(S110) The management information generator 109 generates AV data management information about AV data in the stream shunt memory 105 and stores the AV data management information in the stream shunt memory 105. The AV data management information includes, for example, information indicative of the relationship between the times with predetermined intervals and the addresses of the disk 120 in which data for the times are written. If the addresses are relative addresses with respect to an address of the disk 120 at which the leading end of the AV data of the stream shunt memory 105 is written, for example, the addresses can be determined before the writing is actually started.
Thereafter, steps S103 to S106 are repeated, whereby the AV data is written in the new disk 120.
(S113) If it is determined at step S103 that a recording completion notice has been issued, the encoding is stopped, and the following processes are performed.
(S114) First, the AV data file of the disk 120 in which the AV data has been written is closed.
(S115) The management information generator 109 generates AV data management information about AV data written in the disk 120 and writes the AV data management information in the disk 120.
(S116) It is determined whether or not the stream shunt memory 105 has been used, i.e., whether or not the disk 120 has been replaced. If not, the process is simply ended. If used (replaced), the process proceeds to step S117.
(S117) The shunted stream write-back section 110 transfers the AV data file which has been stored in the stream shunt memory 105 during the replacement of the disk 120 and the AV data management information file to a disk 120 installed in the recorder at this point in time.
As described above, the AV data input during the replacement of the disk 120 is first stored in the stream shunt memory 105 and then written in a new disk 120. Thus, it is readily possible to safely store the entire AV data in a plurality of disks 120.
Although in the above-described example data is recorded over two disks 120, the data can be recorded over three or more disks by repeating the above procedure.
In embodiment 2, an example of a stream data recorder which uses a DVD-RAM as a recording medium and which records stream data using a management scheme based on the DVD-VR standards is described.
Referring to
A TAMP (time map information) which is stored in the TMAP storage section 201 is a table for converting time code information to address information as described in embodiment 1 as to the AV data management information. In the video/audio signal recorder 200 of embodiment 2, the TAMP is based on the DVD-VR standards.
After AV data and AV data management information stored in the stream shunt memory 105 has been transferred to a disk 120 at the time of completion of recording, the PGC information converter 202 converts PGC information included in the AV data management information such that the AV data can be reproduced in a correct order. Details of conversion of the PGC information will be described later.
Now, a management structure of AV data recorded in the disk 120 by the video/audio signal recorder 200 of embodiment 2 is described on the assumption that the DVD-VR standards are employed.
The AV data management file 4000 has a title search pointer table 1000, an AV file management table 2000, and a PGC information table 3000.
The title search pointer table 1000 is a table which includes a list of titles recorded in a DVD-RAM. The title is, for example, a title attached to a program that a user recorded in the recorder or a title editorially generated by the user. Title search pointers (1100, 1200, . . . ) included in the title search pointer table 1000 points at PGC information 3100 in the PGC information table 3000 which correspond to the titles. Herein, a PGC means a series of AV data formed by logically-linked segments of VOB. The PGC information 3100 is information indicative of logical linkage between segments of VOB.
The AV file management table 2000 is information which represents the relationship between the play times and the recording positions of VOBs in an AV data file. In the AV file management table 2000, a number of VOB information (2100, 2200, . . . ) which is the same as the number of VOBs are recorded. Each of the VOB information (2100, 2200, . . . ) includes VOB general information 2101 (not shown in
The PGC information table 3000 includes a plurality of pieces of PGC information (3100, 3200, . . . ). The PGC information (3100, 3200, . . . ) is a table where information indicative of video segments which are designated by combination of the start time and the end time (referred to as “cell(s)”) in a VOB are arranged in the order of play time. The PGC information represents a series of AV data obtained by logically linking the video sections indicated in the cells (3101, 3102, . . . ) in the order of arrangement. Each of the cells (3101, 3102, . . . ) includes, in the form of a pointer, an ID (identifier) of each time map table 2102a in the VOB information (2100, 2200, . . . ) in the AV file management table 2000. The ID is converted as will be described later such that reproduction is readily carried out in an appropriate order.
Next, an example of physical arrangement of AV data (including AV data management information) recorded in the disk 120 (DVD-RAM) is described.
In a sector region of logical blocks Nos. 0 to 79, a sector management table 6002 which shows the data allocation status for each sector is recorded.
As shown in the third layer (right), a space bit map 6003 shows, as to all of the sectors in the partition space, whether or not each sector has been allocated. In this example, the space bit map 6003 is such that the allocation status (allocated or not allocated) of one sector is expressed by one bit. For example, the blocks of logical block Nos. 0 to 79 are allocated to the space bit map 6003 itself, so that the bits corresponding to these blocks are “0 (allocated)”.
The continuous recording region management table 6004 is recorded as a non-AV file. Therefore, the continuous recording region management table 6004 is not recorded in a fixed region but in any free space in the disk 120 as a normal file.
As shown in the third layer, the continuous recording region management table 6004 shows regions which have already been allocated as the continuous recording regions in the partition space 6001. In
Next, an operation of the video/audio signal recorder 200 having the above structure is described. Referring to
For example, it is determined at step S103 that a record completion notice has been issued, and the recording operation is stopped. At step S116, it is determined that the stream shunt memory 105 has been used (i.e., the disk 120 has been replaced). At step S117, an AV data file stored in the stream shunt memory 105 and AV data management information including TMAP stored in the TMAP storage section 201 are transferred to and recorded (copied) in the disk 120. Thereafter, at step S201, the PGC information converter 202 converts PGC information such that the AV data can be reproduced in an appropriate order. More specifically, for example, as shown in
Thus, if the AV data is reproduced in the order of the cell 3101 (cell #1) and the cell 3102 (cell #2), the AV data is reproduced in an appropriate time order. For example, as shown in
Referring to
The stream shunt memory usage amount storage section 301 stores the data amount of AV data stored in the stream shunt memory 105 during the replacement of the disk 120. The method for calculating the data amount is not limited to any particular method. For example, the data amount may be the difference in address between the start and end of the storage in the stream shunt memory 105.
At the time of starting recording in the second disk 120, the continuous region reservation section 302 reserves a continuous region capable of accommodating an amount of data recorded in the stream shunt memory 105 as a reserved region.
The disk reservation area address storage section 303 stores the leading address of the reserved continuous region.
In the video/audio signal recorder 300, referring to
As described in embodiment 1, it is determined at step S105 that the new disk 120 replaced has become writable. At step S111, an AV data file written in the stream shunt memory 105 is closed. Thereafter, at step S301, the amount of the used space in the stream shunt memory 105 is calculated and stored in the stream shunt memory usage amount storage section 301. Then, at the start of recording in the second disk 120, a continuous recording region is allocated according to the amount of the used space in the stream shunt memory 105. Specifically, for example, as shown in
At step S302, for example, the PGC information 3100 in the AV data management file 4000 is generated such that the AV data is read from the region of sector numbers 6848 to 23232 and the region of sector numbers 23233 to 31983 in this order, and recorded in the disk 120. (More specifically, for example, a TMAP of AV data recorded in the second disk 120 in a realtime manner is generated by shifting the address of a VOBU by the amount of data shunted to the shunt memory. The PGC information is generated such that one cell corresponds to AV data recorded in the region of sector numbers 6848 to 31983.) That is, the AV data is recorded such that the AV data can be reproduced in the order of physical arrangement of the disk 120.
When a region is reserved as described above, the AV information of the stream shunt memory 105 and the AV information of the second disk 120 can be combined into one VOB. By doing so, continuous reproduction of two streams is realized as if they had been recorded through a single recording operation even when the two streams are reproduced by a general reproduction device which cannot interpret AV stream management information generated in the recorder of embodiment 2 (management information similar to that obtained when the start and stop of recording are repeated so that two VOBs are generated). (It should be noted that, alternatively, a VOB may be divided into pieces which are then separately recorded even when a region is reserved as described above.)
The present invention is not limited to an example where stream data newly input and encoded after the replacement of the disk 120 and the AV data stored in the stream shunt memory 105 are recorded in a region reserved as described above and a region subsequent to the reserved region. For example, the new stream data and the AV data may be recorded in the leading-end and trailing-end parts of a free space in the second disk 120. In this case, a recording region can readily be secured without the above-described reservation process.
Referring to
In the video/audio signal recorder 400, as illustrated in
(S401) It is determined whether or not a recording completion notice has been issued by, for example, a user's operation. If issued, the process returns to the main routine to perform an encoding end process and other relevant processes. If not issued, the process proceeds to step S402.
(S402) It is determined whether or not the encoder 101 has completed the GOP-by-GOP encoding, for example, to give a notice to the CPU 111. If no notice, the process proceeds to step S403. If a notice has been given, the process proceeds to step S404.
(S403) If the GOP-by-GOP encoding has not been completed, the stream recording location/reading location controller 401 sets the reading location of AV data (the location from which AV data is to be read) to a region of an address in the stream shunt memory 105 which is indicated by the suspension address storage section 403 and, meanwhile, instructs the IDE controller 102 to set the recording location of AV data (the location in which AV data is to be recorded) to a sector of a shunted AV data write region in the disk 120 which is indicated by the write sector switching section 402. Then, the shunted AV data is transferred to and written in the disk 120. When the transfer of a predetermined amount of shunted AV data has been completed, the suspension address storage section 403 and the write sector switching section 402 store the read address and the write sector at this point in time. When there is no AV data stored in the stream shunt memory 105, i.e., when the first disk 120 is in the recorder or when the transfer of the AV data shunted during the replacement of the disk 120 has been completed although the second disk 120 is in the recorder, the process just returns to step S401 without doing anything.
(S404) If the GOP-by-GOP encoding has been completed, the stream recording location/reading location controller 401 sets the reading location of AV data to a region of an address in the stream buffer 104 which is indicated by the suspension address storage section 403 and, meanwhile, instructs the IDE controller 102 to set the recording location of AV data to a sector of a region in the disk 120 in which a newly-encoded AV data is to be written, the sector being indicated by the write sector switching section 402. Then, the encoded AV data is transferred to and written in the disk 120. When the GOP-by-GOP transfer of the AV data has been completed, the suspension address storage section 403 and the write sector switching section 402 store the read address and the write sector at this point in time.
The present invention is not limited to the writing of data based on the above-described determinations. For example, a writing process may be carried out in an event-driven fashion every time an interrupt occurs.
Referring to
The DMA circuit 501 reads the AV data stored in the stream shunt memory 105 without the intervention of the CPU 111 and transfers the read data to the IDE controller 102.
By deactivating the FIFO buffer 502, the AV data accumulated in the stream buffer 104 can be transferred to the IDE controller 102 on a priority basis. It should be noted that the FIFO buffer 502 is not necessarily provided. In such a case, the operation of the DMA circuit 501 may be controlled by any other means.
The video/audio signal recorder 500 performs the operation illustrated in
(S501) It is determined whether or not the stream shunt memory 105 is empty. If empty, the process skips step S502 and proceeds to step S503.
(S502) If it is determined at step S501 that the stream shunt memory 105 is not empty, the start and end addresses of a region in which the AV data is stored are set in the DMA circuit 501, and DMA transfer is started. The AV data stored in the stream shunt memory 105 is transferred to the FIFO buffer 502 and then written in the disk 120.
(S503) It is determined whether or not a recording completion notice has been issued by, for example, a user's operation. If issued, the process proceeds to step S506. If not issued, the process proceeds to step S504.
(S504) It is determined whether or not the encoder 101 has stopped the GOP-by-GOP encoding, for example, to notify the CPU 111 about the completion of writing in the stream buffer 104. If not notified, the process returns to step S503, and the determination processes at step S503 and step S504 are repeated. If notified, the process proceeds to step S505.
(S505) After the FIFO buffer 502 has been deactivated to stop the DMA transfer from the stream shunt memory 105 to the IDE controller 102, the stream recording location/reading location controller 401 sets the reading location of AV data to a region of an address in the stream buffer 104 which is indicated by the suspension address storage section 403 and, meanwhile, instructs the IDE controller 102 to set the recording location of AV data to a sector of a region in the disk 120 in which a newly-encoded AV data is to be written, the sector being indicated by the write sector switching section 402. Then, the encoded AV data is transferred to and written in the disk 120. When the GOP-by-GOP transfer of the AV data has been completed, the suspension address storage section 403 and the write sector switching section 402 store the read address and the write sector at this point in time. Further, a sector of the shunted AV data write region which is indicated by the disk reservation area address storage section 303 (or the write sector switching section 402) is set in the IDE controller 102. The FIFO buffer 502 is activated to carry out the DMA transfer so that the AV data from the stream shunt memory 105 is written in the IDE controller 102. Then, the process returns to step S503, and steps S503, S504 and S505 are repeated.
(S506) If it is determined at step S503 that a recording completion notice has been issued by, for example, a user's operation, the status of the DMA transfer is monitored to repeatedly determine whether or not transfer of the AV data from the stream shunt memory 105 has been completed. If completed, the process returns to the main routine to perform an encoding end process and other relevant processes.
Referring to
The video/audio signal recorder 600 further includes a stream shunt memory manager 601 for managing (retaining) shunt memory management information indicative of the priority of use among the plurality of stream shunt memories 105 and a stream shunt location controller 602 for determining the stream shunt memory 105 in which AV data is to be stored based on the shunt memory management information.
The shunt memory management information is, specifically as shown in
In the video/audio signal recorder 600, when the trailing end of the first disk 120 is detected, the stream shunt memory manager 601 is referred to, and a stream shunt memory 105 with the highest priority is selected. The start address of the selected stream shunt memory 105 is set to the transfer destination. Till the second disk 120 becomes recordable, the process of
(S601) When the encoder 101 completes the GOP-by-GOP encoding, for example, to notify the CPU 111 about the completion of writing in the stream buffer 104, the size of the remaining free space in the (current) stream shunt memory 105 which is currently used is calculated to check whether or not the stream shunt memory 105 has a free space (full or not). If not full, the writing of data in the stream shunt memory 105 is continued.
(S602) When the free space in the stream shunt memory 105 runs out before the second disk 120 becomes recordable, the AV data file written in the stream shunt memory 105 is closed.
(S603) The stream shunt location controller 602 refers to the stream shunt memory manager 601 to search for the stream shunt memory 105 of the next priority.
(S604) The start address of the found stream shunt memory 105 is set to the transfer destination, and the write location of the AV data from the stream buffer 104 (the location in which the AV data from the stream buffer 104 is written) is switched. In this case, for example, the priority and free space size of the stream shunt memory 105 which is full of data is updated to “−1” and “0”, respectively, so that the stream shunt memory 105 is prohibited to be used thereafter.
(S605) An AV data management file and relevant data are generated and recorded in the stream shunt memory 105 before switched to another.
When the next disk 120 becomes recordable while the AV data are in the process of shunting as described above (or after completion of recording has been instructed), the shunted data are written in the disk 120 in the same order of priority as that of the shunting. For example, when the DVD-VR standards are followed as described in embodiment 2, a VOB(s) and an AV data management file of each stream shunt memory 105 are recorded in the disk 120. The AV data management file is generated at the time of generating PGC information such that the cells (cell#1, cell#2, . . . ) correspond to VOBs shunted to the stream shunt memories 105 in the order of priority: specifically, cell#1 corresponds to the stream shunt memories 105 of the highest priority; cell#2 corresponds to the stream shunt memories 105 of the second highest priority; the same applies to the subsequent cells; and the last cell corresponds to a VOB directly recorded in the disk 120. Herein, if, as to the stream shunt memories 105 used, the value of priority which is stored in the stream shunt memory manager 601 is changed to “−1”, the value of priority for writing data in the disk 120 may be stored separately. Alternatively, the values of priority and free space size are not changed to “−1” or “0”, and information indicative of that the memory 105 has been used may be added separately.
As described above, according to the present invention, stream data having a large data amount can be reproduced, without any loss of data, even with a device different from one used for recording the stream data.
Number | Date | Country | Kind |
---|---|---|---|
2005-061554 | Mar 2005 | JP | national |