JP2006139439A - Information processor, method of processing information, and program - Google Patents
Information processor, method of processing information, and program Download PDFInfo
- Publication number
- JP2006139439A JP2006139439A JP2004327256A JP2004327256A JP2006139439A JP 2006139439 A JP2006139439 A JP 2006139439A JP 2004327256 A JP2004327256 A JP 2004327256A JP 2004327256 A JP2004327256 A JP 2004327256A JP 2006139439 A JP2006139439 A JP 2006139439A
- Authority
- JP
- Japan
- Prior art keywords
- file
- data
- information
- cluster
- header
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Abstract
Description
本発明は、記憶媒体に対してデータを記憶して管理するための情報処理装置とその方法に関する。また、このような情報処理装置が実行するプログラムに関する。 The present invention relates to an information processing apparatus and method for storing and managing data in a storage medium. The present invention also relates to a program executed by such an information processing apparatus.
例えば、パーソナルコンピュータなどに代表される各種の情報処理装置においては、
記憶媒体に記憶すべきファイルとしてのデータに対する操作の1つとして、ユーザインターフェイスに対する入力などに応じて新規に作成したファイルを、記憶媒体に対して書き込んで記憶(保存)させることが行われる。
このような新規ファイルの記憶媒体への記録については、例えば処理時間や記憶媒体容量などに関してできるだけ効率的に行われるようにすることが求められており、このための構成の1つが特許文献1に示されている。
For example, in various information processing apparatuses represented by personal computers,
As one of operations for data as a file to be stored in the storage medium, a newly created file is written to the storage medium and stored (saved) in response to an input to the user interface or the like.
Such a recording of a new file on a storage medium is required to be performed as efficiently as possible with respect to, for example, processing time and storage medium capacity, and one configuration for this is disclosed in
特許文献1では、例えば記憶媒体である磁気テープにファイルAが記憶済みとされている状態のもとで、ファイルBを追加的に書き込むようにしているが、ここで、ファイルBは、その冒頭部分についてはファイルAの後ろ側の一部と重複するようにして形成されてる形態が示されている。この場合において、ファイルAについては通常のFATなどのファイルシステムにより管理されるのに対して、ファイルBについては、開始/終了タイムコード、開始/終了巻径などによりファイルの記録位置を管理することで、上記のようなファイルBの追加記録を可能としている。
In
本発明としても、記憶媒体への新規ファイルの記録に関してこれまでよりも効率的なものとなることをその課題とする。
例えばファイルの実際としては、複数の情報体の集合から成る場合が通常である。あくまでも具体例であるが、或る動画ファイルなどは、先頭のヘッダ領域と、これに続くデータ領域、また、このデータ領域を形成する単位データをプレゼンテーションする情報などを格納するリソース領域との、3つの情報体を所定順に配列して形成される。本発明では、このような情報体の集合構造から成るファイルを対象として、効率的な新規ファイルの生成/保存、管理が行われるようにする。
It is an object of the present invention to be more efficient than before regarding the recording of a new file on a storage medium.
For example, a file is usually composed of a set of a plurality of information bodies. As a specific example to the last, a certain moving image file or the like includes a header area at the beginning, a data area following the header area, and a resource area for storing information for presenting unit data forming the data area. Two information bodies are formed in a predetermined order. In the present invention, efficient generation / storage and management of a new file are performed for a file having such an information body aggregate structure.
そこで本発明としては、情報処理装置として次のように構成する。
本発明の情報処理装置は、所定の複数の情報部により形成される形式を有し、記憶媒体に記憶済みとされていたファイルである原ファイルを基として、この原ファイルにおける所要の情報部の内容について変更することにより、新規のファイルである新規ファイルとしての内容を生成する新規ファイル生成手段と、この新規ファイル生成手段により生成された新規ファイルの内容を記憶媒体に書き込んで記憶させる書き込み手段と、記憶媒体に記憶されるファイルについて管理する管理手段とを備える。
そして、上記書き込み手段は、新規ファイルを形成する所定の情報部のうちで、原ファイルの内容からの変更が無かったとされる未変更情報部がある場合には、新規ファイルを形成する情報部のうちで、この未変更情報部以外の情報部である書込対象情報部を記憶媒体に書き込むようにされる。また、上記管理手段は、書き込み手段により書き込まれた書込対象情報部と、原ファイルにおいて未変更情報部と同一とされる内容を有する情報部である引用情報部とにより、新規ファイルが形成されるものとして管理するようにされる。
Therefore, the present invention is configured as an information processing apparatus as follows.
The information processing apparatus according to the present invention has a format formed by a plurality of predetermined information units, and based on an original file that is a file stored in a storage medium, a required information unit in the original file New file generating means for generating contents as a new file which is a new file by changing the contents, and writing means for writing and storing the contents of the new file generated by the new file generating means in a storage medium; And management means for managing files stored in the storage medium.
The writing means includes an information section for forming a new file if there is an unchanged information section in the predetermined information section for forming a new file that has not been changed from the contents of the original file. Among them, the write target information part which is an information part other than the unchanged information part is written in the storage medium. Further, the management means forms a new file by the writing target information part written by the writing means and the citation information part which is the information part having the same contents as the unchanged information part in the original file. To be managed as a thing.
また、情報処理方法としては、所定の複数の情報部により形成される形式を有し、記憶媒体に記憶済みとされていたファイルである原ファイルを基として、この原ファイルにおける所要の情報部の内容について変更することにより、新規のファイルである新規ファイルとしての内容を生成する新規ファイル生成手順と、この新規ファイル生成手順により生成された新規ファイルの内容を上記記憶媒体に書き込んで記憶させる書き込み手順と、記憶媒体に記憶されるファイルについて管理する管理手順とを実行するようにされる。
そして、書き込み手順は、新規ファイルを形成する所定の情報部のうちで、原ファイルの内容からの変更が無かったとされる未変更情報部がある場合には、新規ファイルを形成する情報部のうちで、この未変更情報部以外の情報部である書込対象情報部を記憶媒体に書き込むように構成する。また、管理手順は、書き込み手順により書き込まれた書込対象情報部と、原ファイルにおいて未変更情報部と同一とされる内容を有する情報部である引用情報部とにより新規ファイルが形成されるものとして管理するようにされる。
Further, as an information processing method, a required information portion of the original file is formed based on an original file that has a format formed by a plurality of predetermined information portions and has been stored in a storage medium. A new file generation procedure for generating contents as a new file, which is a new file, by changing the contents, and a writing procedure for writing and storing the contents of the new file generated by the new file generation procedure in the storage medium And a management procedure for managing files stored in the storage medium.
And, in the writing procedure, if there is an unaltered information part that has not been changed from the contents of the original file among the predetermined information parts that form a new file, Thus, the writing target information part which is an information part other than the unchanged information part is configured to be written in the storage medium. In addition, the management procedure is such that a new file is formed by the writing target information portion written by the writing procedure and the citation information portion which is the information portion having the same content as the unchanged information portion in the original file. To be managed as.
また、プログラムとして、上記情報処理方法としての手順を情報処理装置に実行させるように構成することとした。 Further, the program is configured to cause the information processing apparatus to execute the procedure as the information processing method.
上記各構成によると、本発明が対応するファイルとしては複数の情報部により形成される形式を有するものを前提としている。
そのうえで、記憶媒体に記憶済みであった原ファイルにおける所要の或る情報部の内容を変更して作成した新規ファイルを記憶媒体に記憶して管理するのにあたっては、先ず、新規ファイルを形成する所定の情報部のうちで、原ファイルの内容からの変更が無かったとされる未変更情報部がある場合には、この未変更情報部以外の情報部を、書込対象情報部として、実際に記憶媒体に書き込んで記憶させることとしている。つまり、この未変更情報部以外の情報部(書込対象情報部)については、実際のデータ書き込みが実行される。
また、これとともに、新規ファイルについては、上記のようにして実際に書き込みが行われた未変更情報部以外の情報部と、原ファイルにおいて未変更情報部と同一の内容を有する情報部(引用情報部)とにより、新規ファイルが形成されるものとして管理するようにされる。
このような処理が実行される結果、新規ファイルは、実際に書き込みが行われた未変更情報部以外の情報部(書込対象情報部)と、本来は原ファイルを形成するデータ部分である、未変更情報部と同一内容の情報部とにより形成されることになる。つまり、新規ファイルは、未変更部領域については、原ファイルにおける該当の情報部を引用、共有することでファイルとしての全体構造を形成する。
According to each of the above configurations, the file corresponding to the present invention is assumed to have a format formed by a plurality of information sections.
In addition, when storing and managing a new file created by changing the contents of a certain required information part in the original file that has already been stored in the storage medium, first, a new file is formed. If there is an unchanged information part that has not been changed from the contents of the original file, an information part other than the unchanged information part is actually stored as a write target information part. It is supposed to be written and stored on a medium. That is, actual data writing is executed for the information part (write target information part) other than the unchanged information part.
At the same time, for a new file, an information part other than the unchanged information part actually written as described above and an information part (cited information) having the same contents as the unchanged information part in the original file To manage that a new file is formed.
As a result of executing such processing, the new file is an information part (write target information part) other than the unchanged information part actually written, and a data part that originally forms the original file. The unchanged information part and the information part having the same contents are formed. In other words, the new file forms the entire structure as a file by quoting and sharing the corresponding information part in the original file for the unmodified part area.
このことから、本発明としては、新規ファイルを記憶媒体に書き込んで記憶(保存)させるのにあたり、上記未変更情報部の内容については、実際に記憶媒体に書き込む必要は無いこととなる。これにより、未変更情報部の内容を含む新規ファイルを成す全ての内容を書き込む場合と比較して、新規ファイル保存のための書き込み処理に要する時間は短縮される。また、原ファイルと新規ファイルとで1つの情報部を共有することにもなるので、その分の記憶媒体の記憶可能容量を節約できることになる。このようにして、本発明は新規ファイルの記憶媒体への記録を効率的なものとしている。 Therefore, according to the present invention, it is not necessary to actually write the contents of the unchanged information portion in the storage medium when writing and storing (saving) a new file in the storage medium. As a result, the time required for the writing process for saving the new file is shortened as compared with the case where all the contents of the new file including the contents of the unchanged information part are written. In addition, since one information part is shared between the original file and the new file, the storable capacity of the storage medium can be saved. In this way, the present invention makes it efficient to record a new file on a storage medium.
以下、本発明を実施するための最良の形態(以下、実施の形態という)について説明する。本実施の形態としては、本発明としての情報処理装置の構成をデジタルビデオカメラに適用した場合を例に挙げることとする。 Hereinafter, the best mode for carrying out the present invention (hereinafter referred to as an embodiment) will be described. In this embodiment, a case where the configuration of the information processing apparatus according to the present invention is applied to a digital video camera is taken as an example.
図1は、本実施の形態としてのデジタルビデオカメラ1の構成例を示すブロック図である。
この図に示すデジタルビデオカメラ1において、光学系部2は、撮像レンズ、絞りなどを備えて成り、入射された光を撮像光として、光電変換部3に結像させる。また、光学系部2においては、フォーカス(焦点)調整のためのフォーカス調整機構や、絞り値に応じて絞りを可変する絞り可変機構などを備えているものとされ、このような機構部の駆動は、カメラ機能部6から出力される駆動信号によって行われる。カメラ機能部6は、CPU10の制御に応じて、しかるべきフォーカス状態や絞りの状態等が得られるように所要の駆動信号を出力するようにされている。
また、例えば光学ズーム機能を与えることとした場合には、光学系部2においてズームレンズを移動させるズーム機構を設けると共に、上記と同様にして、CPU10の制御に応じて上記ズーム機構を移動させる駆動部を設けるようにすればよい。さらに、カメラ機能部6として、ストロボを設けたうえで、ストロボ発光機能を与えるように構成することもできる。
FIG. 1 is a block diagram illustrating a configuration example of a
In the
For example, when an optical zoom function is to be provided, a zoom mechanism for moving the zoom lens is provided in the
光電変換部3は、例えば光電変換素子であるCCD(Charge Coupled Device)を備えて構成され、光学系部2から入射されて受光面にて結像された撮像光を光電変換することで撮像信号を生成してビデオ信号処理部4に出力する。撮影時においては、例えば露出設定結果に応じて決定されるシャッター速度の指示が、CPU10からビデオ信号処理部4に通知される。ビデオ信号処理部4では、通知されたシャッター速度に対応する走査タイミング信号を光電変換部3に出力する。光電変換部3は、この走査タイミング信号に応じて走査を行うようにして、光電変換処理を実行して映像信号を出力するようにされる。
The
ビデオ信号処理部4は、光電変換部3から入力されたアナログのビデオ信号(撮像画像信号)について、例えばゲイン調整、サンプルホールド処理を施すことによって波形整形を行ったうえで、A/D変換を行うことで、デジタルとしてのビデオ信号データに変換する。そして、この変換処理によって得られたデジタルビデオ信号について、例えば、表示用輝度データの生成処理などをはじめ、表示部7にて表示が行われるようにするためのビデオ信号処理を実行する。これに伴い、ビデオ信号処理部4では、CPU10の制御に応じてキャラクタ画像なども撮像画像に重畳して表示可能なように、いわゆるオンスクリーンディスプレイのための信号処理も実行可能とされている。
表示部7として採用される実際のディスプレイデバイスについては特に限定されるべきものではないが、現状においては、広く液晶ディスプレイパネルが採用されている。
The video
The actual display device employed as the
また、ビデオ信号処理部4は、光電変換部3から入力されたアナログビデオ信号を変換して得たデジタルビデオ信号について、例えば所定方式による圧縮符号化処理を施して、圧縮ビデオデータを生成することが可能とされている。
また、本実施の形態のデジタルビデオカメラは、スチルカメラ機能も備える。つまり、撮像画像信号について、写真としての所定形式による静止画データファイルを生成することが可能とされているが、このような画像処理も、ビデオ信号処理部4によって行われる。
In addition, the video
The digital video camera of this embodiment also has a still camera function. That is, it is possible to generate a still image data file in a predetermined format as a photograph for the captured image signal. Such image processing is also performed by the video
また、ビデオ信号処理部4では、光電変換部3から入力された画像(映像)信号や、後述するメディアから読み出されたAV(Audio Video)データのファイル(AVファイル)などを、所定方式のアナログビデオ信号又はデジタルビデオ信号に変換して、画像入出力部5を介して外部機器などに出力可能とされている。
画像入出力部5は、外部から所定方式のビデオ信号を入力可能ともされており、この入力したビデオ信号をビデオ信号処理部4の処理を経て表示部7に表示させることが可能とされる。また、ビデオ信号処理部4は、画像入出力部5が入力したビデオ信号について、光電変換部3から入力されたアナログビデオ信号と同様にして、記録用データに変換してメディアコントローラ13に転送することもできる。
これに対応して、画像入出力部5は、例えば所定方式に従った映像(画像)信号出力端子/映像信号入力端子を備える。
Further, the video
The image input / output unit 5 can input a video signal of a predetermined method from the outside, and the input video signal can be displayed on the
Correspondingly, the image input / output unit 5 includes, for example, a video (image) signal output terminal / video signal input terminal according to a predetermined method.
また、本実施の形態のデジタルビデオカメラ1は、音声処理部8及び音声入出力部9を備えることで、音声信号の入出力も可能とされている。
先ず、音声入力については、音声入出力部9としてマイクロフォンなどを備え、外部音声の収音を行って音声信号に変換して音声を入力するようにされる。そして、このようにして入力した音声信号を音声処理部8に出力する。音声処理部8は、例えば、撮像画像の圧縮符号化に対応する音声圧縮符号化方式により符号化された圧縮オーディオデータに変換するなどの音声信号処理を施す。
In addition, the
First, for voice input, a microphone or the like is provided as the voice input / output unit 9, and external voices are collected and converted into voice signals to be inputted. The audio signal input in this manner is output to the
CPU10は、画像信号処理部4により得られた撮像画像についての圧縮ビデオデータと、音声処理部8により得られた収音音声についての圧縮オーディオデータとにより、所定形式のAVファイルを形成するための制御処理を実行するようにされる。このAVファイルは、圧縮ビデオデータを再生して出力される動画像に対して、圧縮オーディオデータを再生して出力される音声の再生時間軸が同期したものとなっている。なお、実際にAVファイルを形成するための構成としては、CPU10がプログラムを実行して得られるデジタル信号処理となるソフトウェア構成とされてもよいし、あるいは、AVファイルを形成するためのハードウェアを備えるとともに、CPU10がこのハードウェアについての動作を制御する構成としてもよい。
上記AVファイルとしてのデータは、記録用データとして、例えばCPU10の制御によってメディアコントローラ13に転送される。また、CPU10は、ビデオ信号処理部4によって生成された写真画像としての所定形式の静止画データファイルについても、記録用データとしてメディアコントローラ13に転送することができる。
The
The data as the AV file is transferred to the
音声入出力部9としては、音声信号入力端子などを備えて外部のオーディオ機器などからオーディオ信号を入力するようにも構成することができる。上記音声信号入力端子から入力されたオーディオ信号については、音声処理部8は、所定形式によるデジタルオーディオデータファイルに変換するようにされる。CPU10は、このようなデジタルオーディオデータファイルのデータについても、記録用データとしてメディアコントローラ13に転送することができる。
The audio input / output unit 9 may be configured to include an audio signal input terminal and the like to input an audio signal from an external audio device or the like. The
メディアコントローラ13は、CPU10との連携により、所定の異なる種別の外部のメディア(記憶媒体)、外部記憶デバイス(記憶装置)に対応して、これらのメディアに対するデータ処理に関する制御処理を実行可能に構成される。ここでいうメディアに対するデータ処理とは、メディアのフォーマット処理や、メディアの記憶領域に対するファイル及びファイル管理のための情報(ファイル管理情報)などの書き込み/読み出し処理など、メディアに記憶されるべきデータに関連する何らかの処理をいう。
The
本実施の形態では、メディアコントローラ13に対しては、先ず、ハードディスクドライブ(HDD)が接続されている。HDDは、周知のようにしてハードディスクといわれる、記憶媒体として磁気ディスクを備える記憶デバイスであり、現状においては、比較的低コストでギガバイトクラスの大容量が得られる。また、周知のようにして、記憶媒体である磁気ディスクに対する物理的なデータの読み出し/書き込みは、磁気ヘッドにより、磁気ディスク上に形成されるトラックをトレースしながら磁界印加、磁界検出を行うことによって実現される。
また、この場合のHDDとしては、例えばデジタルビデオカメラ1に固定的に内蔵されるものとしてもよいし、デジタルビデオカメラ1(ホスト)に対して装脱可能な、所定の規格に従ったリムーバブル形態とされてもよい。
In the present embodiment, a hard disk drive (HDD) is first connected to the
In this case, the HDD may be fixedly incorporated in the
また、この図では、メディアコントローラ13は、所定方式の光ディスク、光磁気ディスク、及び半導体メモリ素子を備える記憶デバイスである半導体記憶装置などにも対応してデータ処理が可能であることとされている。
光ディスク及び光磁気ディスクなどに対応する場合の実際としては、これらの記録(記憶)媒体に対応してデータの書き込み/読み出しが可能に構成されたドライブとしてのデバイスを備え、これらのデバイスとメディアコントローラ13とを接続することになる。
また、半導体記憶装置に対応する場合は、半導体記憶装置の実際の規格に従って、この半導体記憶装置が装脱されるスロットを、デジタルビデオカメラ1の本体に備える。このスロットに対して半導体記憶装置が適正に装填されると、半導体記憶装置のピン端子がスロットのコネクタ部位の電極と接続され、これにより、半導体記憶装置は、メディアコントローラ13との間で通信が可能に接続されることになる。
Also, in this figure, the
In the case of dealing with optical discs and magneto-optical discs, it is actually provided with a device as a drive configured to be able to write / read data corresponding to these recording (storage) media, and these devices and
In the case of supporting a semiconductor memory device, the main body of the
メディアコントローラ13は、先に説明したようにして、記録用データが転送されてくるのに応じて、この記録用データを、メディアコントローラ13と接続されているメディア(記憶媒体、記憶装置)のうちから対象として選択されているメディアに対してさらに転送する。データが転送されたメディアでは、メディアコントローラ13側からの指示に応じて記憶領域に対してデータを書き込んで記憶させる。このようにしてメディアに記憶されるデータがファイルとして記憶管理されることになる。なお、メディアに記憶されるファイルの管理は所定方式のファイルシステムによって行われる。
As described above, the
また、例えばメディアに記憶されているファイルについての再生として、AVファイルを再生するときには、CPU10及びメディアコントローラ13は、指定されたAVファイルにアクセスして読み出しを行う。このようにして読み出されるAVファイルは、例えばCPU10の処理により、圧縮ビデオデータと圧縮オーディオデータとに分離され、圧縮ビデオデータについてはビデオ信号処理部4に受け渡し、圧縮オーディオ信号については、音声処理部8に受け渡すようにされる。
この場合のビデオ信号処理部4及び音声処理部8は、それぞれ、上記のようにして転送されてきた圧縮ビデオデータ、圧縮オーディオデータについて、復調処理を含む所要の再生信号処理を実行する。これにより、圧縮ビデオデータを再生した画像を表示部7にて表示するとともに、この画像の再生時間に同期して、圧縮オーディオデータを再生して得られる音声信号を、音声入出力部9が有するとされるスピーカにより音声として出力させたり、ヘッドフォン端子から出力させることができる。
For example, when playing back an AV file as playback of a file stored in the medium, the
In this case, the video
また、例えばメディアから再生されたオーディオデータファイルは、音声処理部8の音声信号処理を経た後に、音声入出力部9を介して、外部に対して所定形式のオーディオ信号、オーディオデータとして出力することも可能とされている。この場合、音声入出力部9としては、音声処理部8から出力される所定のオーディオ信号、オーディオデータの形式に対応するオーディオ出力端子を備えることになる。
In addition, for example, an audio data file reproduced from a medium is output as a predetermined format audio signal and audio data to the outside via the audio input / output unit 9 after being subjected to the audio signal processing of the
CPU(Central Processing Unit)10は、プログラムを実行することでデジタルビデオカメラ1についての各種制御処理を実行する。ROM11は、CPU10が実行する各種プログラムのほか、CPU10が処理を実行するのに使用する各種設定情報などが記憶されている。RAM12は、CPU10がプログラムに従った処理を実行するときの作業領域として使用されるもので、各種の演算処理結果などのデータが保持される。
A CPU (Central Processing Unit) 10 executes various control processes for the
この場合の操作入力部15は、デジタルビデオカメラ1に備えられる各種操作子を一括して示しているものとされる。例えば、この操作入力部15における操作子としては、写真撮影時に操作されるシャッターボタン、撮影モードなどを選択する操作子、パラメータのアップ/ダウンを行うための操作子などが含まれる。
In this case, the
通信部16は、CPU10の制御に応じて、所定のデータ通信方式により外部デバイスと通信を行うためのハードウェア、ソフトウェアを実装して構成される部位である。この通信部16が対応するデータ通信方式としては、有線、無線を問わず特に限定されるべきものではなく、また、対応するデータ通信方式の数も限定されるべきものでない。現状であれば、データ通信方式としては、有線ではEthernet(商標)などのネットワーク、USB(Universal Serial Bus)、IEEE1394などのデータバス規格などを挙げることができる。また、無線であれば、Bluetooth(商標)などのデバイス間近距離無線通信、IEEE802.11a/b/gなどの無線LAN(Local Area Network)規格を挙げることができる。
The
電源部17は、デジタルビデオカメラ1における各種のハードウェアデバイスに対して動作電源を供給するもので、例えばバッテリや電源アダプタからの電力供給を受けて動作する電源回路などを備えて構成される。
The
上記のようにして、本実施の形態のデジタルビデオカメラ1では、主としては、撮像/収音により得られるAVファイルを、HDD、各種光学ディスク状記録媒体(光磁気ディスクを含む)、半導体記憶装置などのメディア(記憶媒体)に対して記憶させることができるようになっている。
上記のようにしてメディアに記憶されるファイルは、通常は、所定フォーマットによるファイルシステムにより管理されることになるのであるが、本実施の形態としては、FAT(File Allocation Table)ファイルシステムにより管理されるものとしている。FATファイルシステムは、周知のようにして、ツリー型のディレクトリ構造によりファイルを管理するようにされており、また、データの書き込み/読み出しについては、クラスタといわれる論理的な最小データ管理単位により行うものとされている。クラスタは、メディアにおける物理的なデータ書き込み/読み出しの最小単位であるセクタを所定数にまとめたものが1単位となる。
As described above, in the
The file stored in the medium as described above is normally managed by a file system in a predetermined format. In this embodiment, the file is managed by a FAT (File Allocation Table) file system. It is supposed to be. As is well known, the FAT file system manages files by a tree-type directory structure, and data writing / reading is performed by a logical minimum data management unit called a cluster. It is said that. A cluster is a unit obtained by collecting a predetermined number of sectors, which are the minimum units of physical data writing / reading on a medium.
図2は、FATファイルシステムの一般的なシステム構成を階層モデルにより示している。
先ず、この階層モデルとしては、ソフトウェア層と、その下層となるハードウェア層に大別される。
ソフトウェア層は、この場合には、メディアに対してホスト(実施の形態ではデジタルビデオカメラ1)となるデバイスにおいて、CPUが実行するプログラム、及び各種ファームウェア、ミドルウェアなどにより実現されるソフトウェア処理が対応するものとされる。この場合のソフトウェア層は、図示するように、上層から下層にかけて、アプリケーション100、ファイルシステム101、デバイスドライバ102の各層が位置する。
ハードウェア層には、メディアそのものの物理的な記憶領域が位置するものとして考えることができる。
FIG. 2 shows a general system configuration of the FAT file system using a hierarchical model.
First, this hierarchical model is roughly divided into a software layer and a hardware layer as a lower layer.
In this case, the software layer corresponds to a program executed by the CPU and software processing realized by various firmware, middleware, and the like in a device serving as a host (in the embodiment, the digital video camera 1) for the medium. It is supposed to be. As shown in the figure, the software layer in this case includes the
It can be considered that the physical storage area of the medium itself is located in the hardware layer.
アプリケーション100は、例えばファイルの記録/再生機能などを有して、メディアを使用するアプリケーションソフトウェアが対応し、ファイルレベルでのアクセス要求をファイルシステム101に対して行う。
The
ファイルシステム101は、ファイルシステムとしての機能を実現するソフトウェアが対応する。本実施の形態では、FATファイルシステムを採用することとしているので、ファイルシステム101の機能を提供するソフトウェアとしても、FATファイルシステムに対応して構成されるものとなる。
このファイルシステム101では、アプリケーション100からのファイルレベルによるアクセス要求を、FATファイルシステムのフォーマットにおけるデータの管理単位となるクラスタのレベルに変換して、デバイスドライバ102に対してアクセス要求を行う。
The
In the
デバイスドライバ102は、コントロール対象のデバイスとなるメディアをコントロールするためのソフトウェアが対応し、上記ファイルシステム101からのFATファイルシステムフォーマットに従ったクラスタレベルによるアクセス要求を、メディア103上におけるデータの記録再生単位であるセクタのレベルに変換して、メディア103へのアクセス要求を行う。
The
この場合のメディア103は、論理的にはFATファイルシステムに従ってフォーマット(初期化)されたものとなる。図1では、HDD、光学ディスク状記録媒体、半導体記憶装置など、メディアコントローラ13と接続されている記憶媒体、記憶装置がここでのメディア103に相当する。そして、メディア103は、デバイスドライバ102からのセクタレベルのアクセス要求に応答して、指定されたセクタアドレスからデータを読み出して、デバイスドライバ102に返す。つまり、セクタレベルでのアクセス応答を実行する。
デバイスドライバ102は、メディア103からのセクタレベルでのアクセス応答、つまりセクタ単位でのデータの受け取りを行い、この受け取ったデータについて、クラスタ単位によるデータとして扱ってファイルシステム101に受け渡す(クラスタレベルでのアクセス応答)。
ファイルシステム101は、デバイスドライバ102から受け取ったデータを、ファイルレベルのデータとしてアプリケーション100に受け渡すようにされる。アプリケーション100は、ファイルとして受け取ったデータについて、例えばユーザによる操作入力などに応じたアプリケーションレベルでの所要の処理を実行する。
The medium 103 in this case is logically formatted (initialized) according to the FAT file system. In FIG. 1, a storage medium and storage device connected to the
The
The
また、FATファイルシステムは、記憶ファイルをツリー型のディレクトリ構造により管理し、また、ファイルをクラスタ単位の集合として管理するようにされている。このようなファイル管理、データ管理は、周知のようにしてディレクトリエントリ、及びFATといわれるテーブル情報を備えることにより実現されるものとなる。ディレクトリエントリは、メディア上におけるファイル、ディレクトリ(サブディレクトリ)の所在をクラスタレベルで示す情報であり、FATは、ディレクトリ、ファイルを成すクラスタレベルでのチェイン(リンク、連結)を示す情報である。 Further, the FAT file system manages storage files with a tree-type directory structure, and manages files as a cluster unit set. Such file management and data management are realized by providing directory entries and table information called FAT as is well known. The directory entry is information indicating the location of a file or directory (subdirectory) on the medium at the cluster level, and the FAT is information indicating a chain (link or link) at the cluster level that forms the directory or file.
図3は、FATの規格に従ったメディアのフォーマット構造を示している。
FATの形式としては複数が規定されているのであるが、ここでは、FAT16及びFAT32の各形式に対応するフォーマット構造を示すこととする。
先ず、図3の左側に示されるFAT16に対応するフォーマット構造から説明する。
この図に示す構造は、LBA(Logical Block Addressing)に従った論理的なものとなっている。つまり、最も上を先頭セクタ(LBA=0)として、以降、下に向かってブロック(セクタ)の番号が進んでいくものとなる。
また、FATのファイルシステムでは、1つの物理的記憶領域を複数のパーティションに分割可能とされているが、ここでは説明の便宜上、1パーティションとした場合のフォーマット構造を示している。
FIG. 3 shows the format structure of the media according to the FAT standard.
Although a plurality of FAT formats are defined, here, the format structure corresponding to each of the FAT16 and FAT32 formats is shown.
First, the format structure corresponding to the
The structure shown in this figure is logical according to LBA (Logical Block Addressing). In other words, the top sector is the top sector (LBA = 0), and the block (sector) number advances downward thereafter.
Further, in the FAT file system, one physical storage area can be divided into a plurality of partitions, but here, for the convenience of explanation, a format structure in the case of one partition is shown.
先ず、LBA=0として表される先頭セクタは、MBR(Master Boot Recorder) といわれる、ブート領域となっている。 First, the head sector represented as LBA = 0 is a boot area called MBR (Master Boot Recorder).
MBRの構造を図4(a)に示す。
1セクタは512バイトのサイズであり、従って、MBRとしても512バイトとなる。図4(a)では、このMBRの領域における512バイトについて、先頭から最終のバイト位置を、0000h〜01FFhまでの16進法による番号を振って表現したうえで、16バイト単位を1列として配列して示している。なお、16進法の表記を行うのにあたっては、上記0000h、或いは01FFhのようにして、数値の最後尾に16進法表記であることを示すhを付すこととする。
先ず、バイト位置0000h〜01BDhまでの446バイトの領域は、OS(Operating System)起動用のメディアとして使用される場合において、その起動(ブート:boot)のためのコード(起動コード)が格納される領域である。
The structure of MBR is shown in FIG.
One sector has a size of 512 bytes. Therefore, the MBR is 512 bytes. In FIG. 4A, for the 512 bytes in the MBR area, the last byte position from the beginning is expressed by assigning a hexadecimal number from 0000h to 01FFh, and then arranged in units of 16 bytes. As shown. In the hexadecimal notation, h indicating the hexadecimal notation is added to the end of the numerical value, such as 0000h or 01FFh.
First, a 446-byte area from byte positions 0000h to 01BDh stores a code (boot code) for booting when used as an OS (Operating System) boot medium. It is an area.
MBRにおけるバイト位置01BEh〜01FDhまでの64バイトの領域は、パーティションテーブルとされており、起動時において必要とされるパーティションごとに関する所定の情報が格納される。このパーティションテーブルの領域は、さらに16バイト単位で4つの領域に分割されることになっており、これらの4分割された領域は、先頭から順に、パーティション1、パーティション2、パーティション3、パーティション4に対応する領域となっている。これらのこれらのパーティションごとに対応する各領域は、パーティションごとのエントリの領域となる。
A 64-byte area from byte positions 01BEh to 01FDh in the MBR is used as a partition table, and stores predetermined information required for each partition at the time of startup. This partition table area is further divided into four areas in units of 16 bytes. These four divided areas are partitioned into
また、MBRにおける最終の2バイトの領域には、現セクタがMBRであることの識別子として55AAhが格納される。 Also, 55AAh is stored in the final 2-byte area in the MBR as an identifier that the current sector is the MBR.
上記パーティションのエントリは、図4(b)に示す構造を有するものとされる。先ず、最上位のバイト位置00hは、該当パーティションについての、起動ドライブとしての指定の有無を示すフラグを格納する領域とされる。
また、続くバイト位置01h〜03hによる3バイトの領域は、該当パーティションの開始セクタをCHS(Cylinder/Head/Sector)により表現した値が格納される。バイト位置05h〜07hから成る3バイトの領域により、該当パーティションの終了セクタをCHSにより表現した値が格納される。
また、バイト位置08h〜0Bhによる4バイトの領域により、該当パーティションの開始セクタをLBAにより示す値を格納することとしている。
The partition entry has a structure shown in FIG. First, the most significant byte position 00h is an area for storing a flag indicating whether or not the partition is designated as a startup drive.
In the subsequent 3-byte area at byte positions 01h to 03h, a value expressing the start sector of the partition in terms of CHS (Cylinder / Head / Sector) is stored. A 3-byte area consisting of byte positions 05h to 07h stores a value representing the end sector of the partition in CHS.
In addition, a value indicating the start sector of the partition by LBA is stored in a 4-byte area at byte positions 08h to 0Bh.
バイト位置0Ch〜0Fhから成る4バイトの領域は、該当パーティションのデータサイズ(パーティションサイズ)を示す値を格納する。 A 4-byte area consisting of byte positions 0Ch to 0Fh stores a value indicating the data size (partition size) of the partition.
バイト位置04hが示す1バイトの領域は、システム識別子ともいわれる、該当パーティションが対応するプラットフォーム、ファイルシステムなどのタイプを示す値を格納する。 A 1-byte area indicated by the byte position 04h stores a value indicating a type of a platform, a file system, or the like corresponding to the partition, which is also called a system identifier.
説明を図3に戻す。
MBRとしての先頭セクタに続けては所定セクタ数による空き領域を設けることとしている。そして、この空き領域より後となるセクタ領域により、パーティション単位の領域を形成する。
Returning to FIG.
An empty area corresponding to a predetermined number of sectors is provided after the head sector as the MBR. Then, an area in units of partitions is formed by a sector area after this empty area.
1パーティション内における先頭セクタから所定のバイト数までによる領域は、システム関連の情報を格納するシステム領域となる。
このシステム領域において先頭セクタから開始される所定バイト数の領域は、BPB(BIOS Parameter Block/Boot Parameter Block)とされ、ここでは現パーティションに関して、例えばホスト側のBIOS(Basic Input/Output System)などのように、ブロックデバイスコントロールのためのプログラムが利用すべき所要のデータが格納される。BPBに格納する情報においては、次に説明するFAT領域の数、メインのFAT領域の開始セクタ、FAT領域のセクタ数などの情報を含む。
An area from the first sector to a predetermined number of bytes in one partition is a system area for storing system-related information.
In this system area, an area having a predetermined number of bytes starting from the first sector is a BPB (BIOS Parameter Block / Boot Parameter Block). As described above, necessary data to be used by the block device control program is stored. The information stored in the BPB includes information such as the number of FAT areas, the start sector of the main FAT area, and the number of sectors in the FAT area, which will be described below.
BPBに続けてはFAT1、FAT2のFAT領域が順に配置される。通常は、FAT1,2のいずれか一方の領域がメインのFAT領域として使用され、他方のFAT領域は、メインFAT領域の内容をコピーしたミラー領域として使用するなど、例えばメインのFAT領域の予備領域、バックアップ用領域として使用される。 Following BPB, FAT1 and FAT2 FAT areas are arranged in this order. Normally, one of the FAT1 and FAT2 areas is used as the main FAT area, and the other FAT area is used as a mirror area obtained by copying the contents of the main FAT area. Used as a backup area.
これらのFAT領域は、FATエントリが、データ領域内のクラスタ番号順に配列されて形成される領域とされる。FATエントリと、データ領域内のクラスタとは1対1で対応しており、FATエントリには、ディレクトリ、ファイルの記憶結果に応じて、該当クラスタについての情報として、例えば、未使用、該当ファイルにおいて現クラスタの次にチェインされるクラスタ番号、不良クラスタ、EOF(End Of File:ファイルにおける最終クラスタ)などのうちから、何れかを示す情報が格納される。
FAT16フォーマットでは、クラスタ番号を2バイト(16ビット)により表すこととしており、これに応じて、FATエントリの個々のサイズも2バイトとされている。
These FAT areas are areas formed by arranging FAT entries in the order of cluster numbers in the data area. There is a one-to-one correspondence between a FAT entry and a cluster in the data area. In the FAT entry, as information on the cluster, for example, unused or in the corresponding file, according to the directory and file storage results. Information indicating any one of a cluster number, a defective cluster, an EOF (End Of File: last cluster in a file), etc. chained next to the current cluster is stored.
In the FAT16 format, the cluster number is expressed by 2 bytes (16 bits), and accordingly, the size of each FAT entry is also 2 bytes.
FAT1,FAT2の領域に続けては、所定サイズのルートディレクトリエントリが配置される。このルートディレクトリエントリには、ルートディレクトリにおけるディレクトリ、ファイルなどについてのディレクトリエントリが格納される。 Subsequent to the FAT1 and FAT2 areas, a root directory entry of a predetermined size is arranged. The root directory entry stores directory entries for directories and files in the root directory.
ルートディレクトリより下位のセクタ領域が、データ領域となる。このデータ領域に対するデータの書き込み/読み出しは、FATファイルシステムにより管理される。従って、図示するようにして、ファイルシステムのフォーマット構造としては、1以上の所定数のセクタの連続から成るクラスタ単位によりデータ領域を管理することになる。上記もしたように、FAT領域は、原則として、このデータ領域を形成する全クラスタに対応するFATエントリを有して形成されるものとなる。 A sector area lower than the root directory is a data area. Writing / reading data to / from this data area is managed by the FAT file system. Therefore, as shown in the figure, the file system format structure is such that the data area is managed in cluster units composed of a sequence of one or more predetermined number of sectors. As described above, the FAT area is formed with the FAT entries corresponding to all the clusters forming the data area in principle.
続いては図3の右側に示されるFAT32に対応するフォーマット構造について説明する。
FAT32対応のフォーマット構造としても、LBA=0で表される先頭セクタにMBRを配置している。そして、このMBRに続けて配置する所定セクタ数の空き領域に続けて、パーティション単位の領域を配置していくようにされる。
Next, a format structure corresponding to FAT32 shown on the right side of FIG. 3 will be described.
Even in the format structure corresponding to FAT32, MBR is arranged in the head sector represented by LBA = 0. Then, an area in units of partitions is arranged subsequent to the empty area of a predetermined number of sectors arranged after the MBR.
FAT32対応のフォーマット構造のパーティション領域にけるシステム領域としては、BPBに続けてFSinfoの領域を設けることとしている。
FSinfoは、該当パーティションにおける空き容量を計算するのに利用する所定の情報を格納する領域である。FAT1,FAT2のFAT領域は、FSinfoに続けて順次配置される。
As a system area in the partition area of the FAT32 compatible format structure, an FSinfo area is provided after BPB.
The FSinfo is an area for storing predetermined information used to calculate the free space in the partition. The FAT areas of FAT1 and FAT2 are sequentially arranged following FSinfo.
FAT32のフォーマットの場合のFAT領域も、クラスタと1対1で対応するFATエントリがクラスタ番号順に配列されて形成され、FATエントリには、ディレクトリ、ファイルの記憶結果に応じて、該当クラスタについての所定の情報が格納される。ただし、FAT32のフォーマットでは、クラスタ番号を4バイト(32ビット)で表現することから、FATエントリの個々のサイズも4バイトで区切られることになる。 The FAT area in the case of the FAT32 format is also formed by arranging FAT entries corresponding to the clusters in a one-to-one order in the order of the cluster numbers. The FAT entries include predetermined entries for the corresponding clusters according to the directory and file storage results. Is stored. However, in the FAT32 format, since the cluster number is expressed by 4 bytes (32 bits), the size of each FAT entry is also divided by 4 bytes.
また、FAT32のフォーマット構造においては、FAT16のフォーマット構造においてシステム領域内に設けられていたルートディレクトリエントリの領域が省略されている。
FAT32のフォーマット構造では、ルートディレクトリはデータ領域内におかれることなっている。データ領域におけるルートディレクトリの開始クラスタ番号は、BPBにおける所定領域(RootClus)に格納される値により示されており、ルートディレクトリにアクセスするときには、上記RootClusを参照して認識したクラスタ番号にアクセスするようにされる。RootClusが示すルートディレクトリの開始クラスタ番号は、通常、2である。
Further, in the FAT32 format structure, the root directory entry area provided in the system area in the FAT16 format structure is omitted.
In the FAT32 format structure, the root directory is placed in the data area. The starting cluster number of the root directory in the data area is indicated by a value stored in a predetermined area (RootClus) in the BPB. When accessing the root directory, the cluster number recognized with reference to the RootClus is accessed. To be. The starting cluster number of the root directory indicated by RootClus is usually 2.
データ領域は、この場合においても、FAT32のファイルシステムによりクラスタ単位でデータの書き込み/読み出しが管理される領域となる。 In this case as well, the data area is an area in which writing / reading of data is managed in cluster units by the FAT32 file system.
図5に、FATのファイルシステムにおいて規定されるディレクトリエントリの構造を示す。なお、ここでは、FAT32に対応するディレクトリエントリの構造を示している。
この場合、ディレクトリエントリは32バイトとされている。この図においては、上位バイトから下位バイトまでの各バイト位置を、0h〜1Fhまでの値により示している。
ディレクトリエントリを形成する32バイトにおいて、最上位のバイト位置0hからバイト位置7hまでの8バイトの領域は、現ディレクトリエントリが示す現ファイル又は現ディレクトリの名称を格納する。
続く下位のバイト位置8hからバイト位置Ahまでの3バイトの領域は、現ファイルのファイル形式に応じた拡張子が格納される。
FIG. 5 shows the structure of a directory entry defined in the FAT file system. Here, the structure of the directory entry corresponding to FAT32 is shown.
In this case, the directory entry is 32 bytes. In this figure, each byte position from the upper byte to the lower byte is indicated by a value from 0h to 1Fh.
In 32 bytes forming the directory entry, an 8-byte area from the most significant byte position 0h to byte position 7h stores the name of the current file or current directory indicated by the current directory entry.
In the subsequent 3-byte area from the lower byte position 8h to the byte position Ah, an extension corresponding to the file format of the current file is stored.
続く下位のバイト位置Bhには、現ファイル/現ディレクトリについての属性を示す値が格納される。
バイト位置Chは、ここでは予約領域とされている。
バイト位置Dh〜Fhまでの3バイトの領域は、現ファイル/現ディレクトリの作成時刻を示す値を格納する。
バイト位置10h−11hによる2バイトの領域は、現ファイル/現ディレクトリの作成日付を示す値を格納する。
バイト位置12h−13hによる2バイトの領域は、現ファイル/現ディレクトリに対するアクセスが最後に行われた日(最終アクセス日付)を示す値を格納する。
In the subsequent lower byte position Bh, a value indicating the attribute for the current file / current directory is stored.
Here, the byte position Ch is a reserved area.
A 3-byte area from byte positions Dh to Fh stores a value indicating the creation time of the current file / current directory.
A 2-byte area at byte positions 10h to 11h stores a value indicating the creation date of the current file / current directory.
The 2-byte area at byte positions 12h to 13h stores a value indicating the date (last access date) when the current file / current directory was last accessed.
また、バイト位置14h−15hによる2バイト領域とバイト位置1Ah−1Bhによる2バイト領域との計4バイトの領域によっては、現ファイル/現ディレクトリが記憶されるメディア上の先頭位置をクラスタ番号により示すようにされる。つまり、この計4バイトの領域には現ファイル/現ディレクトリについての先頭クラスタ番号の値が格納される。バイト位置14h−15hによる2バイト領域に対しては、先頭クラスタ番号についての上位4バイトの値を格納する。バイト位置1Ah−1Bhによる2バイト領域に対しては、先頭クラスタ番号についての下位4バイトの値を格納する。 In addition, depending on the total of 4 bytes of the 2-byte area by byte positions 14h-15h and 2-byte area by byte positions 1Ah-1Bh, the head position on the medium where the current file / current directory is stored is indicated by the cluster number. To be done. That is, the value of the leading cluster number for the current file / current directory is stored in this 4-byte area. For the 2-byte area at byte positions 14h-15h, the value of the upper 4 bytes for the leading cluster number is stored. For the 2-byte area at byte positions 1Ah-1Bh, the lower 4 bytes of the first cluster number are stored.
バイト位置16h−17hによる2バイト領域は、現ファイル/現ディレクトリについての記録(最後の更新)が実行された時刻(記録時刻)を示す値を格納する。
バイト位置18h−19hによる2バイト領域は、現ファイル/現ディレクトリについての記録(最後の更新)が実行された日付(記録日付)を示す値を格納する。
バイト位置1Ch〜1Fhまでの4バイトの領域は、現ファイル/現ディレクトリについてのサイズ(容量)を示す値を格納する。
The 2-byte area at byte positions 16h to 17h stores a value indicating the time (recording time) when the recording (last update) for the current file / current directory is executed.
The 2-byte area at byte positions 18h to 19h stores a value indicating the date (recording date) when the recording (last update) for the current file / current directory was executed.
A 4-byte area from byte positions 1Ch to 1Fh stores a value indicating the size (capacity) of the current file / current directory.
図6は、FATファイルシステムによるファイル管理例を示している。なお、この図においては、FAT32に従ってフォーマットされた場合を示している。
ここでは、データ領域において、少なくともファイルA、ファイルB、ファイルC、ファイルDが記憶されているものとしたうえで、ファイルA,B,C,Dのディレクトリエントリを、それぞれ図6(a)(b)(c)(d)に示す。なお、この図における説明としては、ディレクトリエントリにおける先頭クラスタ番号(バイト位置14h-15h/1Ah-1Bh)
の情報が主要であることから、他の領域の情報については省略している箇所がある。
FIG. 6 shows an example of file management by the FAT file system. In this figure, a case where the data is formatted according to FAT32 is shown.
Here, it is assumed that at least the file A, the file B, the file C, and the file D are stored in the data area, and the directory entries of the files A, B, C, and D are respectively shown in FIG. b) As shown in (c) and (d). As an explanation in this figure, the first cluster number in the directory entry (byte position 14h-15h / 1Ah-1Bh)
Since the information is the main information, there is a portion omitted for information on other areas.
また、図6(e)は、FAT領域の一部を示すもので、ファイルA,B,C,Dの記憶結果に対応するFATエントリの内容を有している。なお、この図6(e)においては、図示が簡略でわかりやすくなることを考慮して、ほぼファイルA,B,C,Dのみに対応したFATエントリ内容のみを抜き出したものとなっている。なお、前述もしたように、FAT32では、個々のFATエントリは32ビットのサイズを有する。
また、この図6(e)に示すFAT領域におけるFATエントリは、00000000h、00000010h、00000020h、00000030h・・・として示されるように、FATエントリに対応するクラスタ番号の値が1桁ごとにインクリメントされる行と、各行が示すクラスタ番号の値に対して足し合わせる最下位桁の値である、+00h〜+0Fhが示される列とのマトリクスにより配列されている。例えば、00000000hの行と+07hの列が交差する位置のFATエントリは、クラスタ番号00000007hに対応する。
FIG. 6E shows a part of the FAT area, and has the contents of the FAT entry corresponding to the storage results of the files A, B, C, and D. In FIG. 6 (e), only the FAT entry contents corresponding to only the files A, B, C, and D are extracted in consideration of simplicity of illustration and easy understanding. As described above, in FAT32, each FAT entry has a size of 32 bits.
In addition, the FAT entry in the FAT area shown in FIG. 6E is incremented for each digit of the cluster number corresponding to the FAT entry as shown as 00000000h, 00000010h, 00000020h, 00000030h. They are arranged in a matrix of rows and columns indicating + 00h to + 0Fh, which are values of the least significant digit added to the cluster number value indicated by each row. For example, a FAT entry at a position where a row of 00000000h and a column of + 07h intersect corresponds to the
FATファイルシステムにおいては、クラスタ番号00000000h、00000001hで表される先頭クラスタとこれに続く2番目のクラスタの2クラスタは予約領域(RSV)となる。これに応じて、クラスタ番号00000000h、00000001hに対応する各FATエントリも予約領域として規定されている。
そして、上記FATエントリに格納する値として、現クラスタの次にチェインするクラスタ番号は、00000002h〜0FFFFFF6hで表すこととしている。また、EOF(該当クラスタを含むファイルにおける最終クラスタ(ファイルの終端クラスタ))については、EOF=0FFFFFFFhにより表すこととしている。また、図6(e)においては、未使用クラスタであることを「−」で示しているが、例えば実際には00000000hの値により表すこととしている。
In the FAT file system, the first cluster represented by the cluster numbers 00000000h and 00000001h and the second cluster following this are reserved areas (RSV). Accordingly, the FAT entries corresponding to the cluster numbers 00000000h and 00000001h are also defined as reserved areas.
As a value stored in the FAT entry, the cluster number to be chained next to the current cluster is represented by 00000002h to 0FFFFFF6h. Further, EOF (last cluster (file end cluster) in a file including the corresponding cluster) is represented by EOF = 0FFFFFFFh. Further, in FIG. 6E, “−” indicates that the cluster is unused, but actually, for example, it is represented by a value of 00000000h.
ファイルAにアクセスするためには、先ず、図6(a)に示すファイルAのディレクトリエントリにアクセスすることになるが、このファイルAのディレクトリエントリそのものに対するアクセスは例えば次のようにして行われる。
ファイルアクセスのコマンドが絶対パスによるものである場合を例に挙げると、ファイルAのディレクトリエントリに対するアクセスのためには、先ず、ルートディレクトリにアクセスし、ここからパスに従ってディレクトリエントリをたどっていくようにされる。また、ディレクトリエントリを辿っていく過程において、或るカレントディレクトリのサブディレクトリを辿ることになる場合があるが、周知のようにして、親ディレクトリと子ディレクトリの親子関係についても、ディレクトリエントリにより表現される。このためには、例えば親ディレクトリ側のディレクトリエントリには、名称として子ディレクトリを示すものを設けておき、この親ディレクトリ側のディレクトリエントリにより示される子ディレクトリのディレクトリエントリには、親ディレクトリが存在することを示す情報を名称の領域に格納したディレクトリエントリを設けるようにされる。これにより、親から子、及び子から親の両方向に対してディレクトリを辿っていくことができる。
そして、上記のようにしてパスに従ってディレクトリエントリをたどる結果、アクセス先として、最終的にはファイルAのディレクトリエントリに到達することになる。
In order to access the file A, first, the directory entry of the file A shown in FIG. 6A is accessed. For example, the directory entry itself of the file A is accessed as follows.
Taking the case where the file access command is an absolute path as an example, in order to access the directory entry of file A, the root directory is first accessed, and the directory entry is followed from here according to the path. Is done. In the process of tracing a directory entry, a subdirectory of a certain current directory may be traced. As is well known, the parent-child relationship between a parent directory and a child directory is also expressed by the directory entry. The For this purpose, for example, the directory entry on the parent directory side is provided with a name indicating the child directory, and the directory entry of the child directory indicated by the directory entry on the parent directory side has the parent directory. A directory entry storing information indicating this in the name area is provided. As a result, the directory can be traced in both directions from the parent to the child and from the child to the parent.
As a result of tracing the directory entry according to the path as described above, the directory entry of the file A is finally reached as the access destination.
ファイルAのディレクトリエントリへのアクセスが行われると、続いては、このファイルAのディレクトリエントリを起点として、ファイルAそのものへのアクセスが行われることになる。
ファイルAそのものへのアクセスとしては、概念的には次のようなものとなる。
ファイルAにアクセスするためには、ファイルAのディレクトリエントリにおける先頭(開始)クラスタ番号を取得する。この先頭クラスタ番号は、データ領域においてファイルAのデータが記憶される開始クラスタ番号を示しており、この場合には、図6(a)に示すようにして00000007hとなっている。つまり、この段階で、ファイルAの開始クラスタ番号が00000007hであることが認識される。
そこで、ファイルシステムは、図6(e)に示すFAT領域において、クラスタ番号00000007hに対応するFATエントリにアクセスして、このFATエントリに格納される値を参照する。この場合、クラスタ番号00000007hに対応するFATエントリには、00000008hを格納している。これにより、ファイルシステムは、ファイルAのデータは、クラスタ番号00000007hのクラスタのデータに続けて、クラスタ番号00000008hのクラスタのデータが連結されていることを認識する。そこで、次にクラスタ番号00000008hに対応するFATエントリにアクセスして参照すると、ここには、00000009hが格納されているので、ファイルAのデータは、さらにクラスタ番号00000008hのクラスタのデータに続けて、クラスタ番号00000009hのクラスタのデータを連結することが認識される。そこでまた、クラスタ番号00000009hのFATエントリを参照すると、ここにはEOFを示す値が格納されているので、ファイルAは、クラスタ番号00000009hのクラスタが終端であることが認識される。
このことから、ファイルAは、図6(f)のクラスタチェインに示すようにして、クラスタ番号00000007h-00000008h-00000009hの順によるクラスタのデータの連結により形成されることが認識されることになる。ファイルシステムは、クラスタ番号00000007h-00000008h-00000009hのクラスタにアクセスしていくようにされ、これにより、ファイルAに対するアクセスが行われることになる。
When the directory entry of the file A is accessed, the file A itself is subsequently accessed starting from the directory entry of the file A.
The access to the file A itself is conceptually as follows.
In order to access file A, the beginning (start) cluster number in the directory entry of file A is acquired. This leading cluster number indicates the starting cluster number in which data of file A is stored in the data area. In this case, it is 00000007h as shown in FIG. That is, at this stage, it is recognized that the start cluster number of file A is 00000007h.
Therefore, the file system accesses the FAT entry corresponding to the
From this, it is recognized that the file A is formed by concatenating cluster data in the order of
上記説明から分かるように、データ領域に記憶されるファイルのデータの位置は、ディレクトリエントリに格納される先頭クラスタ番号と、この先頭クラスタ番号を起点として参照するFAT領域のFATエントリの内容によって示されており、これらの情報を参照することで、ファイルへのアクセスが可能となっている。
また、データ領域に記憶されるファイルについての、ツリー型ディレクトリ構造による管理は、ディレクトリエントリにより表現されているものであることも分かる。
As can be seen from the above description, the data position of the file stored in the data area is indicated by the top cluster number stored in the directory entry and the contents of the FAT entry in the FAT area that is referenced from this start cluster number. The file can be accessed by referring to the information.
It can also be seen that the management of files stored in the data area by the tree-type directory structure is expressed by directory entries.
そして、残るファイルB,C,Dの記憶位置については、上記ディレクトリエントリ及びFAT領域から成るファイル管理情報により、次のようにして管理されている。
先ず、ファイルBについては、図6(b)のディレクトリエントリに示すようにして、ファイルの先頭(開始)クラスタのクラスタ番号が0000000Ahであることが示されている。そこで、図6(e)に示すFAT領域のクラスタ番号0000000Ahに対応するFATエントリを参照すると、次のクラスタを示すチェイン情報としてクラスタ番号0000001Fhが示されている。そこで、さらにFATエントリを辿って、クラスタ番号0000001Fhに対応するFATエントリを参照すると、チェイン情報としてクラスタ番号00000025hが格納されている。クラスタ番号00000025hに対応するFATエントリには、クラスタ番号00000031hが格納されている。クラスタ番号00000031hに対応するFATエントリにはクラスタ番号00000030hが格納されている。クラスタ番号00000030hに対応するFATエントリにはEOFであることを示す値が格納されている。
このようにして、ファイルBは、ディレクトリエントリ及びFAT領域により、図6(g)に示すようにして、クラスタ番号0000000Ah-0000001Fh-00000025h-00000031h-00000030hの順に従ったクラスタに記憶されるデータの連結により形成されることが表現される。
The storage locations of the remaining files B, C, and D are managed as follows using the file management information including the directory entry and the FAT area.
First, regarding the file B, as shown in the directory entry of FIG. 6B, the cluster number of the first (starting) cluster of the file is 0000000Ah. Therefore, referring to the FAT entry corresponding to the cluster number 0000000Ah in the FAT area shown in FIG. 6E, the cluster number 0000001Fh is shown as chain information indicating the next cluster. Therefore, when the FAT entry is further traced to refer to the FAT entry corresponding to the cluster number 0000001Fh, the cluster number 00000025h is stored as chain information. The FAT entry corresponding to the cluster number 00000025h stores the cluster number 00000031h. The FAT entry corresponding to the cluster number 00000031h stores the
In this way, the file B is connected to the data stored in the cluster according to the order of the cluster numbers 0000000Ah-0000001Fh-00000025h-00000031h-00000030h as shown in FIG. 6 (g) by the directory entry and the FAT area. It is expressed that it is formed by.
また、ファイルCについては、図6(c)に示すようにして、先ず、ファイルCのディレクトリエントリにおいて、ファイルの先頭(開始)クラスタとしてクラスタ番号0000001Bhが示されている。このことに基づき、図6(e)に示すFAT領域におけるクラスタ番号0000001BのFATエントリを起点として参照した内容によっては、ファイルCは、図6(h)に示すように、クラスタ番号0000001Bh-00000011h-00000012h-00000013h-00000014h-00000003hの順に従ったクラスタに記憶されるデータの連結により形成される。
As for the file C, as shown in FIG. 6C, first, in the directory entry of the file C, the cluster number 0000001Bh is shown as the head (start) cluster of the file. Based on this, depending on the contents referred to from the FAT entry of the
ファイルDについては、図6(d)に示すファイルDのディレクトリエントリにおいて、ファイルの先頭(開始)クラスタとしてクラスタ番号0000002Chが示されている。これに基づいて、図6(e)に示すFAT領域におけるクラスタ番号0000002CのFATエントリを起点として参照した内容としては、ファイルDは、図6(i)に示すように、クラスタ番号0000002Ch-0000002Dh-0000002Eh-0000002Fh-00000038h-00000039h-0000003Ah-0000003Bhの順に従ったクラスタに記憶されるデータの連結により形成される。
For the file D, the directory number of the file D shown in FIG. 6D indicates the cluster number 0000002Ch as the head (start) cluster of the file. Based on this, as the contents referred to from the FAT entry of the
これまでに説明したFATファイルシステムのフォーマット内容をふまえて、先ず、本発明に至った事情について説明しておく。
本実施の形態のデジタルビデオカメラ1によりメディアに記憶させることのできるAV(Audio Video)データファイルのファイルフォーマットの例として、ここでは、ISO Base Media File Format、あるいはMP4 File Formatなどに準拠したものであることとする。これらのフォーマットに従った本実施の形態のAVファイルの基本構造としては次のようになる。
Based on the format contents of the FAT file system described so far, the circumstances leading to the present invention will be described first.
As an example of the file format of an AV (Audio Video) data file that can be stored in a medium by the
図7には、上記ファイルフォーマットに従ったAVファイルとして、ファイルA、ファイルBの2つのファイルが示されている。ここでは、AVファイルの構造についてファイルAを参照して説明する。
図示するようにして、1つのAVファイルは、ヘッダ部A1、データ部A2、及びリソース部A3の3つの領域(情報部)に分けることができる。
ヘッダ部A1は、ファイルの先頭に配置される領域で、ファイル名、ファイルサイズ、再生互換性情報などの他、ヘッダ情報として格納すべき所定の情報が格納される。
データ部A2には、AVファイルを形成するビデオデータ(画像データ)、オーディオデータなどが所定のデータ要素単位により所定規則に従って格納される領域である。例として、ビデオデータとして動画再生に使用されるデータ要素単位であれば、JPEG(Joint Photographic Expert Group)形式などに代表される、所定の画像圧縮方式により圧縮された1つの静止画像データの単位などとなる。
リソース部A3は、上記データ部A2におけるデータ分割単位の位置情報などをはじめ、データ部A2に格納されるデータを再生出力(Presentation)するのに必要とされる所定の情報から成る領域である。ファイル再生にあたっては、このデータ部A2に格納される情報を読み込んで解釈し、解釈結果に従って、データ部A2から指定されるデータ要素単位を読み出してデコード処理を実行していく。これにより、例えば編集意図に従った内容による再生出力が実現される。
FIG. 7 shows two files, file A and file B, as AV files according to the file format. Here, the structure of the AV file will be described with reference to the file A.
As shown in the figure, one AV file can be divided into three areas (information part): a header part A1, a data part A2, and a resource part A3.
The header part A1 is an area arranged at the head of the file, and stores predetermined information to be stored as header information in addition to the file name, file size, reproduction compatibility information, and the like.
The data portion A2 is an area in which video data (image data), audio data, and the like forming an AV file are stored according to a predetermined rule in units of predetermined data elements. As an example, if it is a data element unit used for moving image reproduction as video data, a unit of one still image data compressed by a predetermined image compression method represented by JPEG (Joint Photographic Expert Group) format etc. It becomes.
The resource part A3 is an area made up of predetermined information required for reproducing and presenting data stored in the data part A2, including the position information of the data division unit in the data part A2. When reproducing the file, the information stored in the data part A2 is read and interpreted, and the data element unit designated from the data part A2 is read and the decoding process is executed according to the interpretation result. Thereby, for example, reproduction output with contents according to the editing intention is realized.
なお、本実施の形態が対応するAVファイルのフォーマットでは、ヘッダ部A1に続けて、図のようにしてデータ部A2−リソース部A3の順で配置する構造の他に、リソース部A3−データ部A2の順で配置する構造を採ることも許可されている。
しかしながら、下記の理由で、実際のアプリケーションとしては、図7に示す構造によりメディアへの書き込みが行われることが通常であり、本実施の形態としても、これに従っている。
Note that in the AV file format supported by the present embodiment, in addition to the structure in which the data part A2 and the resource part A3 are arranged in this order, the resource part A3-data part as shown in the figure following the header part A1. It is also permitted to adopt a structure that is arranged in the order of A2.
However, for the following reasons, as an actual application, it is normal that data is written on a medium with the structure shown in FIG. 7, and this embodiment also follows this.
実際におけるメディアに対するAVファイルの書き込み処理によっては、上記図7に示す構造に応じたデータのシーケンスにより、メディア上の空き領域を埋めていくようにしてデータの書き込みが行われる。
そのうえで、リソース部A3に格納される情報には、メディア上でのデータ分割単位の記録位置などの情報も含まれる。従って、リソース部A3は、先にデータ部A2の全てのデータがメディアに書き込まれた後、あるいは、データ部A2の全てのデータについてのメディアへの記録位置が確定した後でなければ生成することができない、ということになる。
このような事情があるにもかかわらず、ヘッダ部A1に続いて先ずリソース部A3が配置され、その後にデータ部A2が配置される構造によりメディアへの書き込みを実行するとすれば、そのための処理は相当に複雑なものとなる。つまり、例えばデータ部A2としてのデータをメディアに書き込まずにメモリ領域などに保持しておいたうえで、データ部A2をメディアに書き込んだ結果を推定するなどしてリソース部A3に格納すべき情報を生成し、この後に改めて、リソース部A3−データ部A2の順で、メディアに対する書き込みを実行しなければならない。また、このような書き込み手順では、相当のデータ量を有するデータ部A2のデータをバッファリングできるだけのメモリ容量も確保する必要が生じる。
これに対して、図7に示す構造であれば、ヘッダ部A1に続けて、データ部A2のデータのメディアへの物理的な書き込みを実行していきながら、その書き込み結果に応じてリソース部A3の情報も逐次生成していくことができる。そして、データ部A2のデータの書き込みが終了した時点では、リソース部A3の情報も完成していることになり、即座にリソース部A3のデータもメディアに書き込むことができる。
このようにして、本実施の形態のAVファイルは、図7に示す構造とすることがデータ書き込み処理に際して非常に効率的、合理的であり、この観点から、本実施の形態の場合も含め、図7のファイル構造を採用することが通常となっているものである。
ただし、確認のために述べておくと、本発明は、ファイル先頭からヘッダ部A1−リソース部A3−データ部A2の順で配置するAVファイルの構造であっても適用されるものであり、同様の効果が得られる。
Depending on the actual AV file writing process on the medium, the data is written by filling the empty area on the medium by the data sequence corresponding to the structure shown in FIG.
In addition, the information stored in the resource part A3 includes information such as the recording position of the data division unit on the medium. Therefore, the resource part A3 should be generated after all the data in the data part A2 has been written on the medium or after the recording position on the medium for all the data in the data part A2 has been determined. I can't do that.
In spite of such circumstances, if the resource part A3 is arranged first after the header part A1 and then the data part A2 is arranged, then writing to the medium is executed, the processing for that is as follows: It becomes quite complicated. That is, for example, information to be stored in the resource part A3 by presuming a result of writing the data part A2 to the medium after the data as the data part A2 is held in a memory area or the like without being written to the medium. After that, writing to the media must be executed again in the order of the resource part A3 and the data part A2. Further, in such a writing procedure, it is necessary to secure a memory capacity sufficient to buffer the data of the data part A2 having a considerable data amount.
On the other hand, in the structure shown in FIG. 7, the physical portion of the data portion A2 is physically written to the medium following the header portion A1, and the resource portion A3 according to the writing result. This information can also be generated sequentially. When the data writing of the data part A2 is completed, the information of the resource part A3 is also completed, and the data of the resource part A3 can be immediately written to the medium.
In this way, the AV file of the present embodiment is very efficient and rational for the data writing process to have the structure shown in FIG. 7. From this viewpoint, including the case of the present embodiment, It is normal to adopt the file structure of FIG.
However, for the sake of confirmation, the present invention is also applicable to the structure of an AV file arranged in the order of header part A1-resource part A3-data part A2 from the beginning of the file. The effect is obtained.
また、ISO Base Media File Format(又はMP4 File Format)では、ファイル構造はBoxといわれるデータ単位の集合として形成されることが規定されており、これらのBoxのタイプ(Box type)としては、ftyp、moov、mdat、free、skipなどが定義されている。
ftypは、現ファイルのファイルタイプ、現ファイルを形成するBox typeごとのサイズ(データ長)、brand,versionなどといわれるファイルの再生互換性などの情報を格納するBoxとされる
moovは、ファイル出力(再生)などに必要とされるメタデータ(meta data)を格納するBoxとされる
mdatは、ファイル再生に使用される、例えばビデオ、オーディオなどをはじめとした実データ(media data)を格納するBoxとされる。
free、skipは、free spaceとして規定されるもので、ファイル再生には無関係であり無視されるべき領域として扱われるBoxとなる。
The ISO Base Media File Format (or MP4 File Format) stipulates that the file structure is formed as a set of data units called Boxes, and the types of these Boxes (Box types) are ftyp, moov, mdat, free, skip, etc. are defined.
ftyp is a Box that stores information such as the file type of the current file, the size (data length) of each Box type that forms the current file, and file playback compatibility called brand, version, etc.
moov is a Box that stores metadata required for file output (playback) etc.
The mdat is a box that stores actual data (media data) such as video and audio used for file playback.
“free” and “skip” are defined as free space, and are Boxes that are irrelevant to file playback and are treated as areas to be ignored.
そして、図7に示すように、ISO Base Media File Formatでは、ヘッダ部A1において、ftype Boxを配置することとしている。つまり、ftype Boxに格納される上記各情報が実質的なヘッダ情報として機能している。
また、この場合においては、AVファイルのヘッダ部A1におけるftype Boxのサイズにより、ftype Boxの終端位置がクラスタの終端と一致しておらずに、クラスタの中途位置にある場合には、ヘッダ部A1におけるftype Boxの終端位置から、この終端位置を含むクラスタの終端までの領域をfree Box(又はskip Box)により埋めることができる。このfree Boxにより、ヘッダ部A1とデータ部A2との境界をクラスタ境界とするように調整することができ、これにより、データ部A2の開始位置をクラスタの先頭と一致させることで、データ部A2に対するアクセスを効率的なものとすることができる。
Then, as shown in FIG. 7, in the ISO Base Media File Format, an ftype box is arranged in the header part A1. That is, each of the above information stored in the ftype box functions as substantial header information.
Further, in this case, if the end position of the ftype box does not coincide with the end of the cluster due to the size of the ftype box in the header part A1 of the AV file, the header part A1 The region from the end position of the ftype box to the end of the cluster including this end position can be filled with a free box (or skip box). With this free box, it is possible to adjust the boundary between the header part A1 and the data part A2 to be a cluster boundary. Thus, by matching the start position of the data part A2 with the head of the cluster, the data part A2 The access to can be made efficient.
また、データ部A2に格納されるビデオデータ、オーディオデータなどがmedia dataとなるので、このmedia dataを格納している領域がmdat Boxとなる。
また、データ部A2においても、mdat Boxの終端位置から、この終端位置を含むクラスタの終端までの領域をfree Box(又はskip Box)により埋めることで、リソース部A3の開始位置をクラスタの先頭と一致させるように調整して、リソース部A3に対するアクセスの効率が高くなるようにしている。
In addition, since video data, audio data, and the like stored in the data part A2 are media data, an area storing the media data is an mdat box.
Also in the data part A2, the area from the end position of the mdat box to the end of the cluster including the end position is filled with a free box (or skip box), so that the start position of the resource part A3 is set as the head of the cluster. Adjustment is made so as to match, so that the efficiency of access to the resource unit A3 is increased.
リソース部A3は、先に説明したように、データ部A2に格納されるビデオ/オーディオなどのデータ(media data)を再生出力(Presentation)するための参照データを格納する領域である。つまりmeta dataを格納する領域のmoov Boxとなる。 As described above, the resource part A3 is an area for storing reference data for reproducing (Presentation) data (media data) such as video / audio stored in the data part A2. In other words, it becomes a moov box of the area that stores meta data.
上記したAVファイルの構造を前提として、例えば、図7におけるファイルAを基として、このファイルAに対する操作により何らかのデータ内容を変更して、新規ファイルを作成する場合を考えてみる。この場合、図7に示されるファイル構造では、データとして意味のある何らかの内容を有する領域は、ftyp Box、mdat Box、moov Boxであり、free Box(又はskip Box)は、データとしての意味を持つ内容を有していないので、実施区的なデータ内容を変更できる領域もftyp Box、mdat Box、moov Boxであることになる。 Assuming the structure of the AV file described above, let us consider a case where a new file is created by changing some data contents by an operation on the file A, for example, based on the file A in FIG. In this case, in the file structure shown in FIG. 7, areas having some contents meaningful as data are ftyp box, mdat box, and moov box, and free box (or skip box) has meaning as data. Since there is no content, the areas where the data content can be changed are ftyp Box, mdat Box, and moov Box.
そのうえで、図7のファイルAの内容に変更を加えて新規ファイルを作成してメディアに書き込んで記憶させる(保存する)場合の具体例として、同じ図7に示すように、ファイルAのヘッダ部A1内のftyp Boxとリソース部A3のmoov Box(あるいはftyp Boxとmoov Boxの何れか一方でもよい)における所要の内容を変更して、新規にファイルBを作成して保存した場合を想定してみる。
なお、ビデオ/オーディオなどの実データ(mdat)以外の、ヘッダ情報(ftyp)やリソース情報(moov)のみを変更するような編集としては、次のような事例を挙げることができる。
1.ヘッダ情報(ftyp)におけるbrand,versionなどの再生互換情報のみを変更する場合。例えば、ファイルAでは、brandの情報単位として、或る1つのbrandのみが登録されていたとする。そこで、brandの情報について、さらに他のbrandを追加登録する変更を行い、ファイルBを新規作成して保存する。
この場合において、リソース情報(moov)は変更しないものとすると、ファイルAとファイルBとでは、再生出力(presentation)される内容は変わらないが、再生可能なbrandについてはファイルBのほうが追加登録分により拡張されている。
2.例えばファイルAを基としたpresentationの変更のための編集処理などに応じて、ファイルAのリソース情報(moov)の内容を基にして、presentationの内容を変更する場合。この場合においては、データ部A2において格納するmdatの内容はファイルA,Bで同じであるが、再生出力される態様、つまり、presentationの結果が異なるものとなる。
In addition, as a specific example in the case where a change is made to the contents of the file A in FIG. 7 to create a new file and write and store (save) it in the medium, as shown in FIG. Let's assume that the required contents in the ftyp box and the moov box of the resource part A3 (or either ftyp box or moov box) are changed, and file B is newly created and saved .
In addition, examples of the editing that changes only header information (ftyp) and resource information (moov) other than actual data (mdat) such as video / audio include the following cases.
1. When changing only playback compatibility information such as brand and version in the header information (ftyp). For example, in the file A, it is assumed that only one brand is registered as the information unit of brand. Therefore, the brand information is further changed to additionally register another brand, and a new file B is created and saved.
In this case, if the resource information (moov) is not changed, the content of the reproduction output (presentation) is not changed between the file A and the file B, but the file B is the additional registration amount for the reproducible brand. Has been extended by
2. For example, when the content of the presentation is changed based on the content of the resource information (moov) of the file A according to an editing process for changing the presentation based on the file A. In this case, the contents of the mdat stored in the data part A2 are the same for the files A and B, but the mode of reproduction and output, that is, the result of the presentation is different.
また、上記図7に示す場合を含み、ファイルAを基にして内容に何らかの変更を与えて新規ファイルBを作成してメディアに保存するための処理手順を、図8に示す。この図は、先に図2に示したFATファイルシステムのシステム階層の下での処理手順として示している。 FIG. 8 shows a processing procedure for creating a new file B by storing some changes in the contents based on the file A and storing it in the medium, including the case shown in FIG. This figure shows the processing procedure under the system hierarchy of the FAT file system shown in FIG.
この場合において、編集元(変更元)となるファイルAは既にメディアに記憶済みとされている。そこで、アプリケーション100は、手順1によりファイルAの読み出しを要求する。この要求は、ファイルシステム101によりクラスタレベルのアクセス要求に変換されてデバイスドライバ102に伝達される。デバイスドライバ102は、この要求に応じて、ファイルAの読み出しのために、メディア103に対するセクタレベルによるアクセスを実行する。
次の手順2としては、上記したデバイスドライバ102のアクセスにより、メディア103からファイルAを成すデータの内容の一部が読み出されることになる。このときにどのようなデータのまとまりにより読み出しを実行するのかについては、読み出したデータをクラスタレベルで保持するワークRAM領域のサイズや、データ単位構造などに応じたものとなる。
そして、デバイスドライバ102は、読み出したファイルAの内容のデータをファイルシステム101経由でアプリケーション100に渡していくようにされる。この過程で、メディア103から読み出されるデータは、セクタレベルからクラスタレベルに、さらにアプリケーションデータのレベルに変換されていく。
In this case, the file A as the editing source (change source) has already been stored in the medium. Therefore, the
As the
Then, the
アプリケーション100では、手順3として示すように、上記手順2によりメディアから読み出して取得したファイルAの内容のデータ部分を変更対象として扱う。ここで、アプリケーション100は、ファイルBとしての内容を得るために変更が必要なのであれば、所要のデータ部分についての変更を行う。そして、この変更対象のデータをファイルBの内容として書き込むための要求を行う。これにより、この変更対象のデータは、ファイルシステム101からデバイスドライバ102に受け渡され、ファイルBとして管理されるようにして、メディア103に対して書き込みが行われる。
なお、手順3において、上記変更対象のデータ部分について変更の必要が無い場合には、そのままファイルAとして読み出したそのままの内容により、ファイルBとしてメディア103に書き込むための処理が実行される。
In the
In
そして、上記手順3によるファイルBの内容のデータ部分についてのメディア103への書き込みが完了したとされると、手順4として示すようにして、デバイスドライバ102は、今回のファイルBのデータ部分の書き込みを完了したことの通知を行う。この通知は、ファイルシステム101経由で、アプリケーション100に対して通知されることになる。
そして、この手順1〜手順4までの処理を、ファイルBを形成する全ての内容のデータについてのメディア103への書き込み処理が終了するまで繰り返し実行することになる。つまり、変更元のファイル(ファイルA)の内容を変更して新規ファイル(ファイルB)を作成してメディアに記憶させるためには、変更元のファイルの一部データ内容をメディアから一旦読み出して、必要に応じて変更を行い、このデータを、新規ファイルのデータ部分としてメディアに再度書き込むという処理を、新規ファイルを形成する全データの書き込みが完了するまで繰り返し実行する。
Then, when the writing of the data part of the contents of the file B in the
Then, the processes from the
上記図8に示した処理手順は、従来においては、変更元ファイルを基としてその内容を変更して生成した新規ファイルを保存する場合には、例外なく実行される処理となる。換言すれば、図7に示した構造のAVファイルであれば、ftype Box、mdat Box、moov Boxのうち、少なくも何れか1つの領域において、少なくとも1項目でも内容の変更があれば実行されるものとなる。 Conventionally, the processing procedure shown in FIG. 8 is a process that is executed without exception when a new file that is generated by changing its contents based on the original file is saved. In other words, if the AV file has the structure shown in FIG. 7, it is executed if there is a change in the content of at least one item in at least one of the ftype box, mdat box, and moov box. It will be a thing.
このために、例えば図7にて例示しているように、ファイルAについてftype Boxとmoov Boxの内容のみを変更して新規にファイルBを作成して保存することとした場合、ファイルAとファイルBとで同一とされるmdat Boxのデータ内容を含むデータ部A2についても、図8に示す手順1から手順4による処理を実行することになる。この場合において、変更が与えられたftype Boxを含むヘッダ部A1と、moov Boxであるリソース部A3については、図8に示す手順の処理を実行する必要はあるといえる。しかし、ファイルAからの変更がないデータ部A2についても図8に示す手順による読み出し/書き込みの処理を実行するということは、ファイルAのデータ部A2と同一の内容を、ファイルBのデータ部A2を形成するために、同じメディアにコピー(複製)しているのみであり、その分、ファイルBの新規保存にあたって余分な処理時間をかけている、ということがいえる。
現実的な問題として、mdat Boxは、例えば画像、音声などの実データなどであるから、そのデータサイズは、ftype Box及びmoov Boxに対して相当に大きく、ファイルの大部分を占める。従って、図7の場合において、mdat Boxの読み出し/書き込みを実行することは、ファイルBを作成/保存するための処理時間全体においても相当に冗長な時間を含んでいるということになる。また、このことは、換言すれば、図7に示されるケースにおいては、mdat Boxの読み出し/書き込みが省略されるようにすれば、ファイルBを作成/保存するための処理時間は相当に短縮されるというメリットが得られることにつながる。ただし、単純にmdat Boxの読み出し/書き込みの処理を省略しても、ファイルBとしてはmdat Boxを有さない不完全な構造のファイルとなるので、何ら意味は成さない。
本実施の形態としては、上記したことを背景として、新規のファイルBとしても、mdat Boxを有する構造によりメディアに記録されるようにしながらも、図8に示されるようなmdat Boxの読み出し/書き込みの処理が省略されるようにする。このための構成を、以降説明していく。
For this reason, for example, as illustrated in FIG. 7, when the file B is newly created and saved by changing only the contents of the ftype box and moov box for the file A, the file A and the file Also for the data part A2 including the data content of the mdat box that is the same as B, the process according to the
As a practical problem, since the mdat box is, for example, real data such as images and sounds, the data size is considerably larger than the ftype box and the moov box, and occupies most of the file. Accordingly, in the case of FIG. 7, reading / writing of the mdat box includes a considerably redundant time in the entire processing time for creating / saving the file B. In other words, in the case shown in FIG. 7, if the reading / writing of the mdat box is omitted, the processing time for creating / saving the file B is considerably shortened. This leads to the benefit of However, simply omitting the read / write processing of the mdat box does not make any sense because the file B is an incompletely structured file that does not have the mdat box.
In the present embodiment, against the background described above, the new file B is read / written to / from the mdat box as shown in FIG. 8 while being recorded on the medium by the structure having the mdat box. This processing is omitted. The configuration for this will be described below.
ここで、以降の説明にあたって、図7におけるファイルAのようにして、新規にファイルを作成するのにあたって、その作成元となるファイルについては、「オリジナルファイル(原ファイル)」ともいうこととする。また、図7のファイルBのように、オリジナルファイルを基として、その一部内容を変更、追加するなどして新規に作成されるファイル(新規ファイル)として、ヘッダ部A1(ftyp Box)、及びリソース部A3(moov Box)の少なくとも何れか一方について変更されているが、データ部A2(mdat)については変更のないファイルについては、「ヘッダ/リソース編集ファイル」ともいうことにする。なお、現実的には、ヘッダ部A1は、例えばファイル名、ファイルIDなどファイルごとに対応して固有の情報を有するから、オリジナルファイルを基として必ず変更がされる。従って、ヘッダ/リソース編集ファイルとしては、ヘッダ部A1のみが変更されてリソース部A3については変更がないファイルと、ヘッダ部A1及びリソース部A3の両者について変更されるファイルとの2つがあることになる。 Here, in the following description, when a new file is created as shown in the file A in FIG. 7, a file that is a creation source is also referred to as an “original file (original file)”. Further, as a file B in FIG. 7, a header part A1 (ftyp Box), and a new file (new file) created by changing or adding a part of the content based on the original file, A file that has been changed for at least one of the resource part A3 (moov Box) but has not changed for the data part A2 (mdat) is also referred to as a “header / resource edit file”. Actually, since the header part A1 has unique information corresponding to each file such as a file name and a file ID, the header part A1 is always changed based on the original file. Accordingly, there are two header / resource editing files: a file in which only the header part A1 is changed and the resource part A3 is not changed, and a file that is changed in both the header part A1 and the resource part A3. Become.
図9は、オリジナルファイルであるファイルAと、ファイルAを基とするヘッダ/リソース編集ファイルであるファイルBについてのメディアにおける記録状態例を、FATファイルシステムに従ったファイル管理結果として示している。この図により、本実施の形態におけるヘッダ/リソース編集ファイルについての構造概念を説明する。
先ず、オリジナルファイルのファイルAとしては次のようにして管理されている。
つまり、ファイルAがメディアに記録されていることにより、同じメディアに、ファイルAのディレクトリエントリ(D1)が記録されている。このディレクトリエントリD1が格納するファイルの先頭クラスタ番号(バイト位置14h-15h/1Ah-1Bh)が指示するクラスタには、矢印a−1として示すように、ファイルAのファイル先頭である、ヘッダ部A1(D2)のデータ(ftyp Box)の先頭部分が記録される。
そして、このヘッダ部A1の先頭データ部分を格納するクラスタを起点として、FAT領域を参照してファイルAについてのクラスタチェインを辿っていくことで、ヘッダ部A1(D2)に続けて、矢印a−2に示すように、ファイルAのデータ部A2(D3)が連結され、さらにファイルAのデータ部A2(D3)に続けて、矢印a−3に示すように、ファイルAのリソース部A3(D4)が連結されることになる。
FIG. 9 shows an example of a recording state in the medium of the file A, which is an original file, and the file B, which is a header / resource editing file based on the file A, as a file management result according to the FAT file system. With reference to this figure, the structural concept of the header / resource edit file in this embodiment will be described.
First, the file A of the original file is managed as follows.
That is, since the file A is recorded on the medium, the directory entry (D1) of the file A is recorded on the same medium. In the cluster indicated by the head cluster number (byte position 14h-15h / 1Ah-1Bh) of the file stored in the directory entry D1, the header part A1 which is the file head of the file A is indicated by an arrow a-1. The top part of the data (ftyp Box) of (D2) is recorded.
Then, starting from the cluster storing the head data portion of the header part A1, the cluster area for the file A is traced with reference to the FAT area, so that the arrow a− follows the header part A1 (D2). 2, the data part A2 (D3) of the file A is concatenated, and further, following the data part A2 (D3) of the file A, the resource part A3 (D4 of the file A is indicated by an arrow a-3. ) Will be linked.
また、ファイルBは次のようにして管理されている。
ヘッダ/リソース編集ファイルであるファイルBについても、メディアに記録されたファイルであるから、ファイルBのディレクトリエントリ(D5)が作成されてメディアに記録されている。
このファイルBのディレクトリエントリ(D5)が格納する先頭クラスタ番号が指示するクラスタには、矢印b−1として示すように、ファイルBのファイル先頭であるヘッダ部A1(D6)のデータ(ftyp Box)の先頭部分が記録される。
そして、以降、ファイルBのFAT領域を参照してクラスタチェインを辿っていくようにすると、この場合には、ヘッダ部A1(D6)の終端クラスタに続けて、矢印b−2に示すように、本来はファイルAの形成要素であるデータ部A2(D3)が連結される。そして、データ部A2(D3)の終端に続けては、ファイルAのリソース部A3(D4)ではなく、ファイルBのリソース部A3(D7)が連結されるようにして管理される。
The file B is managed as follows.
Since the file B which is the header / resource editing file is also a file recorded on the medium, the directory entry (D5) of the file B is created and recorded on the medium.
In the cluster indicated by the head cluster number stored in the directory entry (D5) of the file B, the data (ftyp box) of the header part A1 (D6) which is the file head of the file B, as indicated by an arrow b-1. The first part of is recorded.
Then, when the cluster chain is traced with reference to the FAT area of the file B, in this case, as indicated by the arrow b-2, following the terminal cluster of the header part A1 (D6), Originally, the data part A2 (D3) which is a forming element of the file A is connected. Subsequently to the end of the data part A2 (D3), the resource part A3 (D7) of the file B is managed, not the resource part A3 (D4) of the file A.
上記説明によると、ヘッダ/リソース編集ファイルであるファイルBのヘッダ部A1−データ部A2−リソース部A3の構造において、データ部A2は、オリジナルファイルであるファイルAのデータ部A2(D3)とされている。つまり、ヘッダ/リソース編集ファイルは、自身のデータ部A2について、オリジナルファイルのデータ部A2を共有、引用することで、ファイルとして完成した構造を得るようにされる。
確認のために述べておくと、ヘッダ/リソース編集ファイルのデータ部A2におけるmdat Boxに格納されるべき内容は、オリジナルファイルのデータ部A2と同一であるべきものなので、このようにしてデータ部A2が共有されたとしても、ファイルBを再生することによっては、意図通りのpresentation結果が得られる。
According to the above description, in the structure of the header part A1-data part A2-resource part A3 of the file B which is the header / resource editing file, the data part A2 is the data part A2 (D3) of the file A which is the original file. ing. In other words, the header / resource edit file is obtained by sharing and quoting the data portion A2 of the original file with respect to its own data portion A2, thereby obtaining a completed structure as a file.
For confirmation, the contents to be stored in the mdat box in the data part A2 of the header / resource editing file should be the same as the data part A2 of the original file. Even if the file is shared, by reproducing the file B, the intended presentation result can be obtained.
ヘッダ/リソース編集ファイルとして上記した構造を採るようにすれば、ヘッダリソースファイルを新規作成(生成)してメディアに保存するための、メディアへのデータ書き込み処理としては、ヘッダ部A1のデータとリソース部A3のみ(図9ではD6,D7の領域が相当する)でよく、データ部A2については必要がない。このようにして、データ部A2についてのデータ書き込み処理が省略されることで、ヘッダ/リソース編集ファイルの生成/保存は、ヘッダ部A1とリソース部A3のメディアへの書き込み処理と、データ部2が共有できるようにFAT領域の所要の内容を書き換える処理のみを実行すればよいことになる。
換言すれば、ヘッダ/リソース編集ファイルの生成/保存に要する処理時間は、上記している、ヘッダ部A1とリソース部A3のメディアへの書き込み処理時間と、FAT領域の所要の内容を書き換える処理時間との合計となるものであり、ヘッダ/リソース編集ファイルの作成/保存にあたってのデータ書き込み処理に要する時間は省かれる。
データ書き込み処理に要する時間は、書き込むべきデータ量の増加に応じて長くなるが、本実施の形態では、ファイル全体において最もサイズ占有率が高く、また、データサイズそのものが大容量の傾向にあるデータ部A2のデータ書き込み処理を省略することとしている。従って、本実施の形態におけるヘッダ/リソース編集ファイルの生成/保存のためのデータ書き込み処理の時間は、大幅に短縮されることになる。特に、HDD、光学ディスク状記録媒体などのようにして、メディアへのアクセスのためにヘッドなどの物理的移動(シーク動作)が伴うような場合には、その分、シーク動作が実行される機会も減少することになるので、データ書き込み時間の短縮効果はより顕著に得られる。
If the above-described structure is adopted as the header / resource editing file, the data and resources of the header part A1 are used as the data writing process to the medium for newly creating (generating) the header resource file and storing it in the medium. Only the portion A3 (corresponding to the regions D6 and D7 in FIG. 9) is sufficient, and the data portion A2 is not necessary. Thus, the data writing process for the data part A2 is omitted, so that the header / resource edit file is generated / saved by the writing process to the media of the header part A1 and the resource part A3, and the
In other words, the processing time required to generate / save the header / resource editing file is the above-described processing time for writing to the media of the header part A1 and the resource part A3 and the processing time for rewriting the required contents of the FAT area. Thus, the time required for the data writing process when creating / saving the header / resource edit file is saved.
The time required for the data writing process becomes longer as the amount of data to be written increases, but in this embodiment, the size occupancy is the highest in the entire file, and the data size itself tends to have a large capacity. The data writing process of the part A2 is omitted. Therefore, the time of the data writing process for generating / saving the header / resource editing file in this embodiment is greatly reduced. In particular, when a physical movement (seek operation) of a head or the like is required for accessing the medium, such as an HDD or an optical disk-shaped recording medium, the opportunity for the seek operation to be performed accordingly. Therefore, the effect of shortening the data writing time can be obtained more remarkably.
また、ヘッダ/リソース編集ファイルがオリジナルファイルのデータ部A2を共有していることで、ヘッダ/リソース編集ファイルのデータ書き込みに際しては、データ部書き込みのために新たにクラスタを消費することが無い。これにより、メディアの残容量が節約され、その使用効率についても向上される。
本発明においては、1つのオリジナルファイルを基として、複数のヘッダ/リソース編集ファイルを生成することが可能であり、これら複数のヘッダ/リソース編集ファイルは、何れもオリジナルファイルのデータ部A2を共有、引用する。従って、1つのオリジナルファイルを基とするヘッダ/リソース編集ファイルの数が多くなるほど、このメディア容量の使用効率は高くなっていく。
Further, since the header / resource edit file shares the data portion A2 of the original file, when writing data in the header / resource edit file, a new cluster is not consumed for writing the data portion. As a result, the remaining capacity of the medium is saved and the use efficiency is improved.
In the present invention, it is possible to generate a plurality of header / resource editing files based on one original file, all of which share the data portion A2 of the original file. Quote. Therefore, as the number of header / resource editing files based on one original file increases, the use efficiency of this media capacity increases.
ところで、先に挙げた特許文献1においても、記録済みのファイルAと、この後において生成/保存されたファイルBとで、ファイルAのデータの一部をファイルBも共有する構造としている形態が示されている。しかしながら、この特許文献1では、データ部分がファイルA,Bとにより共有されるようにして管理するのにあたっては、ファイルBについては、磁気テープに固有の情報となる開始/終了タイムコード、開始/終了巻径などによりファイルの記録位置を管理することとしている。つまり、ファイルAについては本来採用されているファイルシステムにより管理することとしているが、ファイルBについては、このファイルシステム以外の管理形態により管理することとしている。つまり、管理手段としては、ファイルシステムに従って管理するものと、ファイルシステムの枠組みからは外れた形式により管理するものとの、2つが存在しているということがいえる。このようなファイル管理形態は、メディアが磁気テープであることを前提した場合には非常に有効となるが、逆に他のメディア全般において採用することは難しい。
これに対して本実施の形態としては、以降の説明から理解されるように、ファイル管理のために本来的に採用されるファイルシステムの枠内で本実施の形態に特有の仕組みを与えることで、複数のファイル間におけるデータ部A2の共有を実現している。また、このようにして、本実施の形態としては、あくまでもファイルシステムの枠組みのなかでデータ部分の共有を実現していることで、メディアについて、上記磁気テープも含め、HDD、光学ディスク状記録媒体、半導体メディア装置、その他が対象となるもので、広い汎用性が与えられている、ということもいえる。
By the way, also in the above-mentioned
On the other hand, as will be understood from the following description, the present embodiment provides a mechanism specific to the present embodiment within the framework of a file system that is originally adopted for file management. The data part A2 is shared among a plurality of files. In this way, in this embodiment, the sharing of the data portion is realized only within the framework of the file system, so that the medium, including the magnetic tape, the HDD, the optical disk recording medium It can also be said that a wide range of versatility is given to semiconductor media devices and others.
続いては、図9に例示したようにして、FATファイルシステムの下で、ヘッダ/リソース編集ファイルが、オリジナルファイルのデータ部A2を共有(引用)したファイル構造により管理されるようにするためのファイルシステム構成について、図10〜図13を参照して説明する。なお、ここでの説明にあたっては、FATファイルシステムフォーマットとして、FAT32を採用していることとする。 Subsequently, as illustrated in FIG. 9, under the FAT file system, the header / resource editing file is managed by a file structure in which the data part A2 of the original file is shared (quoted). The file system configuration will be described with reference to FIGS. In this description, it is assumed that FAT32 is adopted as the FAT file system format.
図10は、オリジナルファイルであるファイルAと、このファイルAを共通に基とするヘッダ/リソース編集ファイルである3つのファイルB,C,Dとの4つのファイルについて、クラスタ番号によるクラスタチェイン構造として示している。
先ず、オリジナルファイルのファイルAは、ヘッダ部A1についてはクラスタ番号[00000010h→00000011h→00000012h]の3クラスタの連結により形成され、ヘッダ部A1の終端クラスタ(00000012h)に続くデータ部A2については、クラスタ番号[00000013h〜0000001Ch]までの10クラスタの連結により形成され、データ部A2の終端クラスタ(0000001Ch)に続くリソース部A3については、クラスタ番号[0000001Dh→0000001Eh→0000001Fh]の3クラスタの連結により形成されていることが示される。
FIG. 10 shows a cluster chain structure with cluster numbers for four files, ie, file A, which is an original file, and three files B, C, and D, which are header / resource editing files based on this file A in common. Show.
First, the file A of the original file is formed by concatenating three clusters of cluster numbers [00000010h → 00000011h → 00000012h] for the header part A1, and for the data part A2 following the end cluster (00000012h) of the header part A1, The resource part A3 following the terminal cluster (0000001Ch) of the data part A2 is formed by concatenating three clusters of cluster numbers [0000001Dh → 0000001Eh → 0000001Fh]. Is shown.
次に、ヘッダ/リソース編集ファイルであるファイルB,C,Dのうち、ファイルBについては、ヘッダ部A1はクラスタ番号[00000020h]の1クラスタから成ることとしている。そして、このクラスタに続くデータ部A2は、ファイルAのデータ部A2を引用していることで、ファイルAと同じクラスタ番号[00000013h〜0000001Ch]までの10クラスタの連結により形成されるものとなる。このデータ部A2に続くリソース部A3は、クラスタ番号[00000021h→00000022h]による2クラスタの連結から成るものとしている。 Next, of the files B, C, and D that are header / resource editing files, for the file B, the header portion A1 is made up of one cluster having the cluster number [00000020h]. Then, the data part A2 following this cluster is formed by linking the 10 clusters from the same cluster number [00000013h to 0000001Ch] as the file A by quoting the data part A2 of the file A. The resource part A3 following the data part A2 is composed of two clusters connected by a cluster number [00000021h → 00000022h].
ファイルCは、先ず、ヘッダ部A1はクラスタ番号[00000030h→00000031h]の2クラスタから成ることとしている。また、この場合にもデータ部A2は、ファイルAのデータ部A2を引用して、ファイルAと同じクラスタ番号[00000013h〜0000001Ch]の10クラスタの連結となる。リソース部A3は、クラスタ番号[00000032h→00000033h→00000034h]による3クラスタの連結から成っている。 In the file C, first, the header part A1 is made up of two clusters having a cluster number [00000030h → 00000031h]. Also in this case, the data part A2 is a concatenation of 10 clusters having the same cluster number [00000013h to 0000001Ch] as the file A, citing the data part A2 of the file A. The resource part A3 is composed of three clusters linked by a cluster number [00000032h → 00000033h → 00000034h].
ファイルDは、ヘッダ部A1についてクラスタ番号[00000038h→00000039h→0000003Ah]の3クラスタで形成しており、データ部A2は、ファイルC,Dと同様に、ファイルAのデータ部A2を引用してクラスタ番号[00000013h〜0000001Ch]の10クラスタの連結となっている。リソース部A3は、クラスタ番号[0000003Bh→0000003Ch→0000003Dh]による3クラスタの連結から成る。 The file D is formed of three clusters of the cluster number [00000038h → 00000039h → 0000003Ah] with respect to the header part A1, and the data part A2 is a cluster by quoting the data part A2 of the file A similarly to the files C and D. It is a concatenation of 10 clusters with numbers [00000013h to 0000001Ch]. The resource part A3 is composed of three clusters linked by a cluster number [0000003Bh → 0000003Ch → 0000003Dh].
次に、上記図10に示したクラスタチェイン構造によりファイルA,B,C,Dを管理可能とするためのFATファイルシステムのフォーマット(仕様)について説明する。
先に図3により説明したように、FATファイルシステムによるフォーマット構造では、FAT1,FAT2として示すように、複数のFAT領域を備えてよいことになっている。FAT1,FAT2の2つのFAT領域を形成した場合、通常はFAT1が実際のファイル管理に使用されるFAT領域で、FAT2は、予備領域、バックアップ領域として、FAT1の内容がコピーなどされるようにして使用される。
本実施の形態では、FAT1のFATエントリ構造について、次に説明するようにして定義すると共に、FAT2については、ヘッダ/リソース編集ファイルが、オリジナルファイルのデータ部A2を引用できるようにするためのクラスタチェインを記述するための領域として使用するようにされる。これにより、例えば図10に示したように、オリジナルファイルのデータ部A2を、他のヘッダ/リソース編集ファイルが共有するファイル構造管理を可能とする。
Next, the format (specification) of the FAT file system for enabling management of the files A, B, C, and D by the cluster chain structure shown in FIG. 10 will be described.
As described above with reference to FIG. 3, in the format structure using the FAT file system, a plurality of FAT areas may be provided as shown as FAT1 and FAT2. When two FAT areas, FAT1 and FAT2, are formed, the FAT1 is normally a FAT area used for actual file management. The FAT2 is used as a spare area and a backup area so that the contents of the FAT1 are copied. used.
In this embodiment, the FAT entry structure of FAT1 is defined as described below, and for FAT2, a cluster for enabling the header / resource editing file to cite the data part A2 of the original file It is used as an area for describing a chain. As a result, for example, as shown in FIG. 10, the file structure management in which the data portion A2 of the original file is shared by other header / resource editing files is made possible.
図11は、FAT1の領域において配列されるFATエントリの構造を示している。
この場合のFATエントリは、FATファイルシステムフォーマットがFAT32であることに対応して、32ビット(第0ビット〜第27ビット)とされている。そして、実際には、この32ビットにおける第4ビットから第27ビットまでの下位28ビットにより、チェイン先となる次のクラスタ番号を格納することとされている。そして、従来としては、残る上位第0ビット〜第3ビットまでの4ビットは未使用とされて、ビット値としては0,0,0,0(0h)を格納することとしていた。
本実施の形態では、これまで未使用であった上位4ビットについて、図のようにして定義する。つまり、この上位4ビットにおける最上位の第0ビットについては、引用元指示フラグの領域とする。
引用元指示フラグのビット値が0の場合には、現FATエントリの下位28ビットの領域は、通常に、次のチェイン先となるクラスタ番号を格納していることを示す。つまり、通常機能のFATエントリであることを示す。
これに対して、引用元指示フラグのビット値が1の場合には、現FATエントリの下位28ビットは、ヘッダ/リソース編集ファイルが引用すべきオリジナルファイルのデータ部A2の先頭のクラスタ番号、つまり、引用元となるデータ部分を格納する最初のクラスタ番号を格納していることを示す。
FIG. 11 shows the structure of the FAT entry arranged in the FAT1 area.
The FAT entry in this case is 32 bits (0th to 27th bits) corresponding to the FAT file system format being FAT32. In practice, the next cluster number to be chained is stored by the lower 28 bits from the 4th bit to the 27th bit in the 32 bits. Conventionally, the remaining 4 bits from the upper 0th bit to the 3rd bit are unused, and 0,0,0,0 (0h) is stored as the bit value.
In the present embodiment, the upper 4 bits that have been unused so far are defined as shown in the figure. That is, the most significant 0th bit in the upper 4 bits is set as a citation source flag area.
When the bit value of the citation source instruction flag is 0, it indicates that the lower 28-bit area of the current FAT entry normally stores the cluster number to be the next chain destination. That is, it indicates a FAT entry of a normal function.
On the other hand, when the bit value of the citation source instruction flag is 1, the lower 28 bits of the current FAT entry are the first cluster number of the data part A2 of the original file to be quoted by the header / resource edit file, that is, , Indicates that the first cluster number for storing the data portion as the citation source is stored.
また、FATエントリにおける第1ビット〜第3ビットまでの3ビットは引用ファイル数を格納する領域とされる。そのFATエントリが、オリジナルファイルのデータ部A2の開始位置を含むクラスタに対応している場合において、この第1ビット〜第3ビットの3ビットの領域において、オリジナルファイルのデータ部A2を引用しているヘッダ/リソース編集ファイルの数が示される。 The 3 bits from the first bit to the third bit in the FAT entry are used as an area for storing the number of cited files. In the case where the FAT entry corresponds to a cluster including the start position of the data part A2 of the original file, the data part A2 of the original file is quoted in the 3-bit area from the first bit to the third bit. The number of header / resource edit files that are present is indicated.
上記したFAT1のFATエントリ構造をふまえ、図10に示したファイルA,B,C,Dについての、FATファイルシステムによる管理形態について説明することとする。周知のようにしてFATファイルシステムでは、ファイルとしてのデータの実体は、ディレクトリエントリとFAT領域とにより管理されることとなっており、このことについては、本実施の形態の場合も同様である。 Based on the FAT entry structure of FAT1 described above, the management mode by the FAT file system for the files A, B, C, and D shown in FIG. 10 will be described. As is well known, in the FAT file system, the substance of data as a file is managed by a directory entry and a FAT area, and this is also the case in the present embodiment.
そこで先ず、図10に示したファイルA,B,C,Dに対応するディレクトリエントリを、それぞれ、図12(a)(b)(c)(d)に示す。なお、ここでは、ファイルA,B,C,Dのそれぞれについての先頭クラスタ番号の管理状態を示すことを主眼としているので、FATエントリにおける先頭クラスタ番号(バイト位置14h-15h/1Ah-1Bh)以外の領域については省略している箇所がある。 First, directory entries corresponding to the files A, B, C, and D shown in FIG. 10 are shown in FIGS. 12A, 12B, 12C, and 12D, respectively. Here, since the main purpose is to indicate the management state of the leading cluster number for each of the files A, B, C, and D, other than the leading cluster number (byte position 14h-15h / 1Ah-1Bh) in the FAT entry There is a part omitted in the area of.
これらファイルA,B,C,Dとして示している形式のAVファイルは、先に図7によっても示したように、ヘッダ部A1の先頭がファイルの先頭となる。
図9によれば、ファイルAは、ヘッダ部A1の先頭クラスタ番号が00000010hとされているので、ファイルの先頭クラスタの番号としても00000010hとなる。これに応じて、図12(a)に示すように、ファイルAのディレクトリエントリの先頭クラスタ番号の領域には、00000010hが格納される。
ファイルBのヘッダ部A1は、00000020hのクラスタのみであるから、ファイルの先頭クラスタ番号としても、この00000020hとなる。これに応じて、図12(b)に示すように、ファイルBのディレクトリエントリの先頭クラスタ番号の領域には、00000020hが格納される。
ファイルCのヘッダ部A1の先頭クラスタ(ファイル先頭クラスタ)は00000030hであり、これに応じて、ファイルCのディレクトリエントリの先頭クラスタ番号の領域にも、図12(c)に示すように、00000030hが格納される。
ファイルDのヘッダ部A1の先頭クラスタ(ファイル先頭クラスタ)は00000038hであり、これに応じて、ファイルCのディレクトリエントリの先頭クラスタ番号の領域にも、図12(c)に示すように、00000038hが格納される。
In the AV files in the format shown as these files A, B, C, and D, the head of the header portion A1 is the head of the file, as shown in FIG.
According to FIG. 9, since the file A has the
Since the header part A1 of the file B has only the cluster of 00000020h, the file has the leading cluster number of 00000020h. Accordingly, as shown in FIG. 12B, 00000020h is stored in the area of the head cluster number of the directory entry of file B.
The head cluster (file head cluster) of the header portion A1 of the file C is 00000030h. Accordingly, as shown in FIG. Stored.
The head cluster (file head cluster) of the header part A1 of the file D is 00000038h. Accordingly, as shown in FIG. Stored.
図13は、ファイルA,B,C,Dのメディアへの記録結果に応じたFAT領域の内容を示しているもので、図の上側にFAT1の領域の内容を示し、図の下側にFAT2の領域の内容を示す。
先ず、このFAT領域上で、オリジナルファイルであるファイルAがどのようにして管理されているのかについて述べる。なお、以降の説明にあたり、FAT1内のFATエントリについては、FATエントリ/FAT1と記載し、FAT2内のFATエントリについては、FATエントリ/FAT2と記載する場合がある。
FIG. 13 shows the contents of the FAT area corresponding to the recording results of the files A, B, C, and D on the medium. The contents of the FAT1 area are shown on the upper side of the figure, and the FAT2 is shown on the lower side of the figure. Indicates the contents of the area.
First, how the file A which is the original file is managed in the FAT area will be described. In the following description, the FAT entry in FAT1 may be described as FAT entry / FAT1, and the FAT entry in FAT2 may be described as FAT entry / FAT2.
ファイルAの先頭クラスタ番号は、図12(a)によれば00000010hとされている。そこで、図13のFAT1におけるクラスタ番号00000010hのFATエントリが格納する値を参照すると、00000011hとなっている。この値では、先ず、第0〜第3ビットまでの4ビットについて0,0,0,0,となっていることから、通常に次のチェイン先クラスタ番号を示す機能を有するFATエントリであることが分かる。そこで、チェイン先となるクラスタ番号00000011hのFATエントリ/FAT1を参照すると、00000012hが格納されており、さらに次のチェイン先クラスタ番号が00000012hであることを示している。以降、FAT1においてクラスタチェインを辿っていくことにより、最終的に、EOFを示すクラスタ番号0000001Fhのクラスタに到達する。これにより、ファイルAは、クラスタ番号00000010h〜0000001Fhの順による16クラスタの連結により形成されるものとして管理されていることとなり、図10に示したファイルAのクラスタチェイン構造と一致している。
なお、図10によるとファイルAのデータ部A2の領域は、クラスタ番号[00000013h〜0000001Ch]である。図13では、図示を見やすいものとするために、このデータ部A2の領域となるクラスタ番号のFATエントリ/FAT1の纏まりを、太枠で囲って示している。
The leading cluster number of file A is 00000010h according to FIG. Therefore, referring to the value stored in the FAT entry of
According to FIG. 10, the area of the data part A2 of the file A is a cluster number [00000013h to 0000001Ch]. In FIG. 13, in order to make the drawing easy to see, the FAT entry / FAT1 of the cluster number that is the area of the data portion A2 is shown surrounded by a thick frame.
そして、ファイルAにおけるデータ部A2の先頭クラスタのクラスタ番号00000013hに対応するFATエントリ/FAT1を参照してみると、30000014hが格納されている。つまり、上位4ビットのビット値としては、0,0,1,1となっており、引用ファイル数として3が示されていることが分かる。つまり、ファイルAのデータ部A2を引用元とするヘッダ/リソース編集ファイルとして、ファイルB,C,Dの3つとしていることに対応した値が格納されている。
Then, when referring to the FAT entry / FAT1 corresponding to the
続いて、同じ図13を参照して、ファイルAを基とするヘッダ/リソース編集ファイルの1つであるファイルBについてのFAT領域上での管理内容について説明する。なお、この説明にあたっては、図において○印内に示す番号に従った手順で説明していく。
図12(b)に示した、ファイルBに対応するディレクトリエントリの先頭クラスタ番号を参照すると00000020hが示されている。そこで、図13の手順1として示すようにして、先ずは、クラスタ番号00000020hのFATエントリ/FAT1を参照することになる。図10にて説明したようにファイルBのヘッダ部A1は、クラスタ00000020hの1クラスタのみとされている。従って、このファイルBのヘッダ部A1としてのクラスタ00000020hは、ヘッダ部A1における開始クラスタでもあるが、終端クラスタでもあることになる。
そして、このヘッダ部A1における終端クラスタとしてのクラスタ番号00000020hに対応するFATエントリ/FAT1には、図示するようにして、80000013hが格納されている。この場合、FATエントリ/FAT1の第0ビット〜第4ビットについて、8hの値となっているということは、ビット値としては、1,0,0,0とされていることになる。つまり、図11に示した引用元指示フラグについてビット値1が格納されていることになる。これにより、このクラスタ番号00000020hに対応するFATエントリ/FAT1の下位28ビットは、チェイン先のクラスタ番号ではなく、引用元のデータの開始クラスタ番号を示していることになる。
従って、この場合のFATエントリ/FAT1の下位28ビットは、ファイルAのデータ部A2の開始クラスタ番号を示すこととなる。ファイルAのデータ部A2の開始クラスタ番号としては00000013hであり、手順1として参照するクラスタ番号00000020hに対応するFATエントリ/FAT1には、上記のようにして、80000013hが格納される。つまり、引用元となるファイルAのデータ部A2の開始クラスタ番号を下位28ビットにより示している。
Next, with reference to FIG. 13, the management contents on the FAT area for the file B, which is one of the header / resource editing files based on the file A, will be described. In this description, the procedure will be described according to the numbers shown in the circles in the figure.
When referring to the first cluster number of the directory entry corresponding to the file B shown in FIG. 12B, 00000020h is indicated. Therefore, as shown as
As shown in the figure, 80000013h is stored in the FAT entry / FAT1 corresponding to the
Accordingly, the lower 28 bits of the FAT entry / FAT1 in this case indicate the start cluster number of the data part A2 of the file A. The start cluster number of the data part A2 of the file A is 00000013h, and 80000013h is stored in the FAT entry / FAT1 corresponding to the
そこで、手順2としては、上記クラスタ番号00000020hに対応するFATエントリ/FAT1が指示するクラスタ番号00000013hのFATエントリ/FAT1を参照することになる。クラスタ番号00000013hは、これまでの説明から理解されるように、ファイルAのデータ部A2の開始クラスタである、また、このクラスタ番号00000013hに対応するFATエントリ/FAT1の上位4ビットについて、3hとされていることで、このデータ部A2を引用するファイル数を示すようにされている。
また、この場合のクラスタ番号00000013hに対応するFATエントリ/FAT1は、現ヘッダ/リソース編集ファイル(ここではファイルB)により引用されるデータ部A2の先頭クラスタに対応するが、本実施の形態では、手順3として、これと同じクラスタ番号のFATエントリ/FAT2も参照しておくようにされる。つまり、ここでは、クラスタ番号00000013hに対応するFATエントリ/FAT2を参照する。
この位置のFATエントリ/FAT2は、現ヘッダ/リソース編集ファイルが引用するデータ部A2の終端クラスタ番号を格納するものとして規定されている。ファイルBにとっての引用元であるファイルAのデータ部A2の終端クラスタは、図10及び図13のFAT1にも示されるように0000001Chであり、クラスタ番号00000013hに対応するFATエントリ/FAT2にも、この値が格納されている。
Therefore, as the
Further, the FAT entry / FAT1 corresponding to the
The FAT entry / FAT2 at this position is defined as storing the terminal cluster number of the data part A2 cited by the current header / resource edit file. The terminal cluster of the data part A2 of the file A that is the citation source for the file B is 0000001Ch as shown in the FAT1 of FIGS. 10 and 13, and this is also included in the FAT entry / FAT2 corresponding to the
ここで、先の手順2により、引用元であるファイルAのデータ部A2の先頭クラスタに対応するクラスタ番号00000013hのFATエントリ/FAT1を参照して、以降、クラスタチェインを辿っていくと、先ず、図13のFAT1において太枠で囲っているFATエントリが順次参照されていくことになる。
ここで仮に、通常にクラスタチェインを辿っていくと最終的には、クラスタ番号0000001FhのFATエントリ/FAT1が示すEOFに到達して終了してしまうことになる。つまり、リソース部A3としては、ファイルBのものではなく、ファイルAのものが連結されるという不都合が生じる。
しかし、先に手順3により、引用元となるデータを格納する終端クラスタ番号の情報を得ていることで、上記した不都合は生じない。つまり、ヘッダ/リソース編集ファイルについては、上記手順2以降においてFATエントリを参照して継続されるクラスタチェインは、上記手順3により得た終端クラスタ番号までで一旦止めることとしている。具体的には、引用元であるファイルAのデータ部A2についての、開始クラスタ番号00000013hからのクラスタチェインは、終端クラスタ番号0000001Chのクラスタにて止められる。これにより、上記したようにファイルAのリソース部のクラスタがチェインされることにはならない。
Here, referring to the FAT entry / FAT1 of the
Here, if the cluster chain is normally traced, the EOF indicated by the FAT entry / FAT1 with the cluster number 0000001Fh will eventually be reached and terminated. In other words, the resource unit A3 is disadvantageous in that the file part A, not the file B, is linked.
However, the inconvenience described above does not occur because the information of the terminal cluster number for storing the citation source data is obtained by the
すると、この次には、ファイルAのデータ部A2の終端クラスタ番号0000001Chに続けて、ファイルBのリソース部A3の開始クラスタがチェインされるべきこととなる。このために、引用元データ(ファイルAのデータ部A2)から、本来のヘッダ/リソース編集ファイルのデータに復帰するようにしてチェインをつくる仕組みとして、FAT2においては、復帰先クラスタ番号を示すFATエントリを設けることとしている。
この復帰先クラスタ番号は、引用元データの開始クラスタ番号を格納するFATエントリ/FAT1と同じクラスタ番号に対応するFATエントリ/FAT2に格納することとしている。具体的には、ファイルBの場合であれば、引用元データの開始クラスタ番号を格納するFATエントリ/FAT1は、先に手順1により参照したクラスタ番号00000010hに対応するものであるから、復帰先クラスタ番号は、同じクラスタ番号00000010hに対応するFATエントリ/FAT2に格納されることになる。
手順4としては、このFATエントリ/FAT2における復帰先クラスタ番号を参照するようにされる。これにより、引用元データの終端クラスタにチェインさせるクラスタが認識される。図13のファイルBの場合には、この復帰先クラスタ番号として、00000021hが格納されている。
そして、次の手順5として、この場合の引用元データであるファイルAのデータ部A2の終端クラスタ番号0000001Chから、上記復帰先クラスタ番号00000021hにクラスタチェインさせることになる。つまり、クラスタ番号0000001ChのFATエントリ/FAT1には、0000001Dhが格納されているのにかかわらず、この場合には、クラスタ番号00000021hのFATエントリ/FAT1を参照すべきことになる。クラスタ番号00000021hのクラスタは、ファイルBのリソース部A3の開始クラスタである。これにより、ファイルAのデータ部A2の終端クラスタから、ファイルBのリソース部A3の開始クラスタに対してチェインが行われたことになる。以降、クラスタ番号00000021hのFATエントリ/FAT1を起点としてクラスタチェインを辿ることで、クラスタ番号00000021h−00000022h−00000023hの順によるクラスタチェインでリソース部A3を形成してEOFに至ることになる。
このようにして、FAT1,FAT2のFAT領域を使用することで、ファイルBについては、図10により示したとおりの構造で管理されることになる。
また、ここでの詳しい説明は省略するが、上記と同じ要領でクラスタチェインを辿っていくことで、他のヘッダ/リソース編集ファイルであるファイルC,Dについても、同じく図10に示したファイル構造により管理されるものとなる。
Then, next to the terminal cluster number 0000001Ch of the data part A2 of the file A, the start cluster of the resource part A3 of the file B should be chained. For this reason, in FAT2, a FAT entry indicating the return destination cluster number is used as a mechanism for creating a chain by returning from the citation source data (data portion A2 of file A) to the original header / resource edit file data. Is going to be established.
This return destination cluster number is stored in the FAT entry / FAT2 corresponding to the same cluster number as the FAT entry / FAT1 storing the starting cluster number of the citation source data. Specifically, in the case of the file B, the FAT entry / FAT1 that stores the starting cluster number of the citation source data corresponds to the
As the
Then, as the next procedure 5, a cluster chain is made from the terminal cluster number 0000001Ch of the data part A2 of the file A which is the citation source data in this case to the return destination cluster number 00000021h. That is, in this case, the FAT entry / FAT1 with the cluster number 00000021h should be referred to regardless of the fact that 0000001Dh is stored in the FAT entry / FAT1 with the cluster number 0000001Ch. The cluster with the cluster number 00000021h is the start cluster of the resource part A3 of the file B. As a result, the chain is performed from the terminal cluster of the data part A2 of the file A to the start cluster of the resource part A3 of the file B. Subsequently, by tracing the cluster chain starting from the FAT entry / FAT1 with the cluster number 00000021h, the resource part A3 is formed in the cluster chain in the order of the cluster number 00000021h-00000022h-00000023h, and reaches EOF.
In this way, by using the FAT areas of FAT1 and FAT2, the file B is managed in the structure as shown in FIG.
Although detailed description is omitted here, the file structure shown in FIG. 10 is also applied to the files C and D which are other header / resource editing files by tracing the cluster chain in the same manner as described above. It will be managed by.
上記図10〜図13による例説のようにしてFAT領域を使用するように規定することで、本実施の形態では、ヘッダ/リソース編集ファイルが、オリジナルファイルのデータ部A2を引用(共有)する構造を有するようにしてFATファイルシステム上で管理されることになる。
ここで、ヘッダ/リソース編集ファイルが、オリジナルファイルのデータ部A2を引用(共有)する構造として管理されるためには、2つのことが管理される必要がある。1つは、ヘッダ/リソース編集ファイルのヘッダ部A1の終端に続けて、オリジナルファイルのデータ部A2の先頭がチェイン(連結)されるように管理されることである。また、もう1つは、オリジナルファイルのデータ部A2の終端に続けて、ヘッダ/リソース編集ファイルのリソース部A3の先頭がチェイン(連結)されるように管理されることである。
In the present embodiment, the header / resource editing file quotes (shares) the data part A2 of the original file by defining that the FAT area is used as in the example illustrated in FIGS. It is managed on the FAT file system so as to have a structure.
Here, in order for the header / resource editing file to be managed as a structure for quoting (sharing) the data portion A2 of the original file, two things need to be managed. One is that the head of the data part A2 of the original file is chained (linked) following the end of the header part A1 of the header / resource editing file. The other is that the head of the resource part A3 of the header / resource edit file is managed so as to be chained (linked) following the end of the data part A2 of the original file.
図13の説明から理解されるように、本実施の形態では、前者の管理のために、FAT1におけるヘッダ/リソース編集ファイルのヘッダ部A1の最終クラスタ(ファイルBでは00000020h)のFATエントリに対して、引用元フラグ=1をセットするとともに、オリジナルファイル(ファイルA)のデータ部A2の開始クラスタの番号を格納するようにされる(この結果、80000013hを格納している)。
また、後者の管理のためには、FAT2に対して、復帰先クラスタ番号、及び引用データの終端クラスタ番号を格納することとしている。
As can be understood from the description of FIG. 13, in the present embodiment, for the former management, for the FAT entry of the last cluster (00000020h in the file B) of the header part A1 of the header / resource editing file in the FAT1. The citation source flag = 1 is set and the number of the start cluster of the data part A2 of the original file (file A) is stored (as a result, 80000013h is stored).
For the latter management, the return destination cluster number and the end cluster number of the cited data are stored in FAT2.
なお、復帰先クラスタ番号及び引用データの終端クラスタ番号を格納すべきFAT2内のFATエントリの位置としては、他にも考えることができる。しかしながら、本実施の形態のようにして、「復帰先クラスタ番号については、ヘッダ/リソース編集ファイルのヘッダ部A1の終端クラスタのFATエントリ/FAT1と同じ位置のFATエントリ/FAT2とする」、また、「引用データの終端クラスタ番号については、オリジナルファイルのデータ部A2の開始クラスタのFATエントリ/FAT1と同じ位置のFATエントリ/FAT2とする」ことで、これら復帰先クラスタ番号及び引用データの終端クラスタ番号を参照するのにあたって、参照位置を求めるための複雑な演算処理などは実行する必要が無い。これにより、例えばヘッダ/リソース編集ファイルの新規生成/保存のためのdFAT領域の編集(書き換え)処理や、ヘッダ/リソース編集ファイルを再生するときのFAT領域の参照処理などについて軽いものとすることができる。
In addition, the position of the FAT entry in the
そして、上記のようなヘッダ/リソース編集ファイルを管理するためのFAT領域の内容は、このヘッダ/リソース編集ファイルを新規に生成してメディアに記録(保存)するときに応じて、ファイルシステム情報(ディレクトリエントリ及びFAT領域)を更新することで得られるものとなる。
そこで、続いては、本実施の形態においてヘッダ/リソース編集ファイルを新規に生成/保存するための処理について説明する。
The contents of the FAT area for managing the header / resource edit file as described above are the file system information (when the header / resource edit file is newly generated and recorded (saved) on the medium. It is obtained by updating the directory entry and the FAT area.
Accordingly, processing for newly generating / saving a header / resource editing file in the present embodiment will be described.
先ず、本実施の形態におけるヘッダ/リソース編集ファイルの新規生成/保存を、先に図2に示したFATファイルシステムからみた場合の処理として考えた場合には、次のようになる。 First, when the new generation / storing of the header / resource editing file in this embodiment is considered as processing when viewed from the FAT file system shown in FIG. 2, the processing is as follows.
ヘッダ/リソース編集ファイルは、これまでの説明から理解されるように、ヘッダ部A1及びリソース部A3については、そのヘッダ/リソース編集ファイルのみに対応するデータであり、少なくとも何れか一方の内容は、オリジナルファイルに対して変更が与えられている。これに対して、データ部A2については、オリジナルファイルから引用しているものであり、本来はオリジナルファイルの構成要素となる。
このために、ヘッダ部A1とリソース部A3については、先に図8により説明した手順1〜手順4を、それぞれヘッダ部A1の内容のデータについて繰り返し実行し、ソース部A3の内容のデータについて繰り返し実行するようにされる。これにより、オリジナルファイルのヘッダ部A1及びリソース部A3について変更した内容がメディアに実際に記録されることになる。
これに対して、オリジナルファイルからの内容変更が無いデータ部A2については、図8の手順1〜手順4による処理は実行せずに、これに代えて、図14に示す手順を実行する。
As understood from the above description, the header / resource edit file is data corresponding to only the header / resource edit file for the header part A1 and the resource part A3. Changes have been given to the original file. On the other hand, the data part A2 is quoted from the original file and is essentially a component of the original file.
For this reason, for the header part A1 and the resource part A3, the
On the other hand, for the data part A2 whose contents are not changed from the original file, the procedure shown in FIG. 8 is not executed, but the procedure shown in FIG. 14 is executed instead.
つまり、先ず、図14の手順1として示すように、アプリケーション100としては、ヘッダ/リソース編集ファイルにおけるデータ部A2のデータについての書き込み要求をファイルシステム101に対して発行する。
ファイルシステム101では、データの書き込み要求が、上記手順1のようにしてヘッダ/リソース編集ファイルにおけるデータ部A2についてのものである場合には、手順2として示すように、リソース編集ファイルのデータ部A2について、オリジナルファイルのデータ部A2が引用されるようにする(つまり、ヘッダ/リソース編集ファイルのデータ部A1の終端に続けてオリジナルファイルのデータ部A2の先頭がチェインされ、このデータ部A2の終端に続けてヘッダ/リソース編集ファイルのリソース部A3がチェインされるようにする)ためのFAT領域の編集処理を実行する。
この処理に応じて、デバイスドライバ102は、メディアのFAT1,FAT2の領域において必要とされるFATエントリの内容を書き換えるようにして、メディアに対するアクセスを実行する。このデバイスドライバ102によるアクセスにより、実際のメディアに記録されるFAT1,FAT2としては、リソース編集ファイルについてオリジナルファイルのデータ部A2を引用する構造として管理する内容を有することになる。
That is, first, as shown as
In the
In response to this processing, the
そして、上記のようにして、デバイスドライバ102によるFAT領域のデータの書き換え、つまりFAT領域の編集が完了したとされると、手順3として、このことをデバイスドライバ102からファイルシステム101に通知する。そして、ファイルシステム101は、このFAT領域の編集の完了の通知を受けると、手順4として示すように、ヘッダ/リソース編集ファイルのデータ部A2についてのデータの書き換えが完了したものとしてアプリケーション100に通知するようにされる。この通知を受けることで、アプリケーション100は、ヘッダ/リソース編集ファイルのデータ部A2についてのデータの書き込みが完了したと認識する。
As described above, when rewriting of the data in the FAT area by the
また、ヘッダ/リソース編集ファイルの新規生成/保存のためにCPU10が実行するとされる処理を図15のフローチャートに示す。この図に示す処理は、CPU10が、例えばROM11(あるいはメディアコントローラ13と接続されるメディアなどとされてもよい)に記憶されているプログラムを実行することで、アプリケーション100、ファイルシステム101、デバイスドライバ102としてのソフトウェア処理が連携して実現される。
Further, the flowchart shown in FIG. 15 shows the processing executed by the
例えば、アプリケーション100のレベルでの処理によって、オリジナルファイルを基として、ヘッダ部A1又はリソース部A2についての変更を伴う編集を行ったうえで、例えば、オリジナルファイルに対する内容の変更を、オリジナルファイルとは別のファイルとして新規に保存させるための要求が発行されたとする。この場合、新規保存させるべきファイルは、オリジナルファイルとの内容比較としては、ヘッダ部A1又はリソース部A2についてのみ変更があり、データ部A2については変更が無い。このような条件を満たしている場合には、この新規保存させるべきファイルは、これまでに説明してきたヘッダ/リソース編集ファイルということになる。この場合に、ファイルの新規生成/保存のための処理として、図15に示す、ヘッダ/リソース編集ファイルの新規生成/保存処理を実行する。
For example, after editing the header part A1 or the resource part A2 based on the original file by processing at the level of the
ヘッダ/リソース編集ファイルの新規生成/保存を実行するにあたっては、先ず、ステップS101によりオリジナルファイルをreadモードでオープンするためのファイルオープンの処理を実行する。例えば、この処理に応じて、ヘッダ/リソース編集ファイルについてのディレクトリエントリが用意され、また、書き込みのためのクラスタ領域を確保するなどの処理が行われる。また、これに続くとされるステップS102により、今回の新規作成対象となっているヘッダ/リソース編集ファイルについてのwriteモードでのファイルオープンの処理を実行する。 In executing the new generation / saving of the header / resource editing file, first, in step S101, a file opening process for opening the original file in the read mode is executed. For example, according to this processing, a directory entry for the header / resource editing file is prepared, and processing such as securing a cluster area for writing is performed. Further, in step S102, which is assumed to be subsequent thereto, a file open process in the write mode is executed for the header / resource edit file to be newly created this time.
次のステップS103においては、オリジナルファイルにおけるヘッダ部A1のデータについての読み込みを実行する。そして、次のステップS104において、上記ステップS103にて読み込んだオリジナルファイルのヘッダ部A1の内容を基として、必要に応じてデータ内容を変更しながら、ヘッダ/リソース編集ファイルのヘッダ部A1としてのデータ内容を作成し、このデータについてのメディアへの書き込みを実行する。
このステップS103及びステップS104の処理は、ヘッダ部A1のデータについて、先に図8に示した手順1〜手順4を繰り返すことに対応する。
In the next step S103, reading of the data of the header part A1 in the original file is executed. In the next step S104, the data as the header part A1 of the header / resource edit file is changed while changing the data contents as necessary based on the contents of the header part A1 of the original file read in step S103. Create the content and write this data to the media.
The processing in step S103 and step S104 corresponds to repeating
上記ステップS103、S104の処理が完了することで、先ず、ヘッダ/リソース編集ファイルとしてのヘッダ部A1のデータの書き込みが完了したことになる。ここでは、AVファイル構造としては、ヘッダ部A1に続けてデータ部A2を配置することとしているので、続くステップS105からステップS109までは、ヘッダ/リソース編集ファイルのデータ部A2についての処理を実行するようにされる。つまり、ヘッダ/リソース編集ファイルのデータ部A2としては、オリジナルファイルのデータ部A2が引用されるようにして管理されるようにするためのFAT領域についての編集処理を実行する。この処理は、ファイルシステム階層モデルの観点では、図14により説明した手順1〜手順4が対応する。
By completing the processes of steps S103 and S104, first, the writing of data of the header part A1 as the header / resource edit file is completed. Here, as the AV file structure, the data part A2 is arranged after the header part A1, and therefore, the processing for the data part A2 of the header / resource editing file is executed from the subsequent step S105 to step S109. To be done. In other words, as the data part A2 of the header / resource editing file, the FAT area editing process is executed so that the data part A2 of the original file is managed so as to be cited. This processing corresponds to
先ず、ステップS105では、オリジナルファイルのデータ部A2としてのデータを格納するクラスタのうちで先頭となるクラスタ、つまり、データ部A2の開始位置を含むクラスタのクラスタ番号numdtを認識する。このためには、例えば先ず、オリジナルファイルのヘッダ部A1にアクセスしてデータの読み込みを行ってその内容を解析し、オリジナルファイルのデータ部A2のデータ位置を認識し、この認識したデータ位置をクラスタ換算することで得るようにされる。 First, in step S105, the cluster number numdt of the cluster including the start position of the data part A2 among the clusters storing the data as the data part A2 of the original file is recognized. For this purpose, for example, first, the header part A1 of the original file is accessed, the data is read and analyzed, the data position of the data part A2 of the original file is recognized, and the recognized data position is clustered. It is made to obtain by converting.
次のステップS106では、ヘッダ/リソース編集ファイルのヘッダ部A1に続けて、オリジナルファイルのデータ部A2がチェインされるようにするための処理を実行する。つまり、この段階では、先のステップS104の処理を経ていることで、ヘッダ/リソース編集ファイルのヘッダ部A1としてのデータの書き込みは完了している。そして、この書き込み済みのヘッダ部A1としてのデータを格納するクラスタのうちで終端となるクラスタに続けて、オリジナルファイルのデータ部A2のデータ開始位置を格納するクラスタがチェインするものとして管理されるようにFAT領域の内容を変更するものである。 In the next step S106, a process for chaining the data part A2 of the original file is executed following the header part A1 of the header / resource edit file. That is, at this stage, the writing of data as the header portion A1 of the header / resource edit file is completed through the processing of the previous step S104. Then, the cluster that stores the data start position of the data portion A2 of the original file is managed as a chain following the cluster that is the end of the clusters that store the data as the written header portion A1. The contents of the FAT area are changed.
このために、ステップS106としては、先ず、ヘッダ/リソース編集ファイルのヘッダ部A1のデータを格納するクラスタのうちで終端となるクラスタのクラスタ番号numheを認識する。そして、FAT1の領域において、このクラスタ番号numheに対応するFATエントリの下位28ビットに対して、上記ステップS105にて認識したクラスタ番号numdtを格納する。また、同じFATエントリの先頭ビット(第0ビット)のビット位置に対して、引用元指示フラグとして1の値をセットする。これにより、図13の場合であれば、ファイルBのヘッダ部A1の終端クラスタに対応するFAT1のクラスタ番号00000020hに格納すべき値(80000013h)が確定されることになる。
For this reason, as step S106, first, the cluster number numhe of the cluster that ends in the cluster that stores the data of the header part A1 of the header / resource edit file is recognized. In the FAT1 area, the cluster number numdt recognized in step S105 is stored for the lower 28 bits of the FAT entry corresponding to the cluster number numhe. Also, a value of 1 is set as the citation source flag for the bit position of the first bit (0th bit) of the same FAT entry. Accordingly, in the case of FIG. 13, the value (80000013h) to be stored in the
また、ステップS106では、ヘッダ/リソース編集ファイルの復帰先クラスタ番号numrtを決定する。この復帰先クラスタ番号numrtは、図13による説明から分かるように、ヘッダ/リソース編集ファイルのリソース部A3の記録を開始するクラスタ番号と同一となる。そこで、復帰先クラスタ番号numrtを決定するのにあたっては、例えばFAT1を参照するなどして現段階での空きクラスタを認識し、この空きクラスタのうちから所定規則に従ってリソース部A3の記録を開始するクラスタを決定する。この決定されたクラスタの番号が復帰先クラスタ番号numrtとなる。
そして、ここでは、上記のようにして決定した復帰先クラスタ番号numrtを、ヘッダ/リソース編集ファイルのヘッダ部A1の終端クラスタのクラスタ番号のFATエントリ/FAT2に対して格納するようにされる。図13におけるファイルBとの対応では、FAT2における00000020hのFATエントリに対して00000021hを格納している状態が、この処理結果に相当する。
In step S106, the return destination cluster number numrt of the header / resource edit file is determined. As can be seen from the description with reference to FIG. 13, the return destination cluster number numrt is the same as the cluster number at which recording of the resource part A3 of the header / resource edit file is started. Therefore, when determining the return destination cluster number numrt, for example, a cluster that recognizes a free cluster at the present stage by referring to FAT1, and starts recording of the resource part A3 from the free cluster according to a predetermined rule. Decide. The determined cluster number is the return destination cluster number numrt.
Here, the return destination cluster number numrt determined as described above is stored in the FAT entry / FAT2 of the cluster number of the terminal cluster of the header part A1 of the header / resource edit file. In correspondence with the file B in FIG. 13, a state where 00000021h is stored in the FAT entry of 00000020h in FAT2 corresponds to this processing result.
次のステップS107においては、オリジナルファイルのデータ部A2のデータを格納するクラスタのうちで終端となるクラスタ、つまり、データ部A2のデータの終端位置を格納するクラスタの番号numdeを認識する。
そして、続くステップS108においては、先のステップS105において認識したクラスタ番号numdtに対応するFAT2のFATエントリに対して、上記ステップS107により認識したクラスタ番号numdeを格納する。これは、図13との対応では、FAT2のクラスタ番号00000013hのFATエントリに対して、0000001Chを格納する処理となる。つまり、ステップS108において認識したオリジナルファイルのデータ部A2の終端クラスタ番号は、ヘッダ/リソース編集ファイルにとって引用元となるデータを格納するクラスタのうちで終端となるクラスタの番号としての意義を持つ。
In the next step S107, the number numde of the cluster that stores the end of the data in the data part A2 of the original file, that is, the cluster number numde that stores the end position of the data in the data part A2, is recognized.
In the subsequent step S108, the cluster number numde recognized in step S107 is stored in the FAT2 FAT entry corresponding to the cluster number numdt recognized in the previous step S105. This corresponds to the process of storing 0000001Ch for the FAT entry of the
ステップS109では、FAT1におけるクラスタ番号numdtに対応するFATエントリにアクセスして、このFATエントリにおける上位2番目から4番目(第1〜第3ビット)までの3ビットの領域が示す値、つまり引用ファイル数について、1インクリメントした値をセットする。これにより、FAT1のオリジナルファイルのデータ部A2の先頭クラスタに格納する引用ファイル数の情報として、今回新規に保存するヘッダ/リソース編集ファイルの数が含められることになる。
このようにしてステップS105〜ステップS109の処理が実行されることで、例えばFAT2に対する復帰先クラスタ番号及び引用データの終端クラスタ番号の書き込み、また、FAT1の引用ファイル数の情報についての書き換えが行われることになる。つまり、オリジナルファイルのデータ部A2を、今回新規に生成/保存するヘッダ/リソース編集ファイルが引用できるようにするためのFAT領域の内容の書き換えが完了したことになる。
なお、図13から理解されるように、FAT1におけるオリジナルファイルのデータ部A2の開始クラスタ番号に対応するFATエントリ/FAT2に格納される引用データの終端クラスタ番号は、1つのオリジナルファイルに対して複数のヘッダ/リソース編集ファイルが存在する場合には、これらのヘッダ/リソース編集ファイル間で共通に参照するものとなる。従って、ステップS108としての引用データの終端クラスタ番号を格納する処理は、或るオリジナルファイルに対して最初となるヘッダ/リソース編集ファイルを新規生成/保存するときにのみ実行して、同じオリジナルファイルに対して2番目以降のヘッダ/リソース編集ファイルを新規生成/保存するときには、省略するようにしてよい。ただし、ステップS108の処理をヘッダ/リソース編集ファイルを新規生成/保存するごとに実行したとしても、結果的に同じ値で書き換えられるのみであり実質的な内容変更は生じないので、何ら問題はない。
In step S109, the FAT entry corresponding to the cluster number numdt in FAT1 is accessed, and the value indicated by the upper 2nd to 4th (first to third bits) areas in this FAT entry, that is, the cited file Set the number incremented by one. As a result, the number of header / resource editing files newly saved this time is included as information on the number of quoted files stored in the first cluster of the data part A2 of the FAT1 original file.
By executing the processing from step S105 to step S109 in this manner, for example, writing of the return destination cluster number and the end cluster number of the cited data to FAT2 and rewriting of the information on the number of cited files in FAT1 are performed. It will be. That is, the rewriting of the contents of the FAT area for enabling the header / resource editing file to be newly generated / saved this time for the data portion A2 of the original file is completed.
As can be understood from FIG. 13, the end cluster number of the cited data stored in the FAT entry / FAT2 corresponding to the start cluster number of the data part A2 of the original file in FAT1 is plural for one original file. If the header / resource edit file exists, these header / resource edit files are referred to in common. Therefore, the processing for storing the terminal cluster number of the cited data in step S108 is executed only when a first header / resource editing file is newly generated / saved for a certain original file, and the same original file is stored. On the other hand, when the second and subsequent header / resource edit files are newly generated / saved, they may be omitted. However, even if the process of step S108 is performed every time a header / resource edit file is newly generated / saved, it is only rewritten with the same value as a result and no substantial content change occurs, so there is no problem. .
上記ステップS109の処理が完了した後は、データ部A2に続けて配置されるべきリソース部A3についての処理を実行することになる。先ず、ステップS110では、オリジナルファイルのリソース部A3にアクセスして読み込みを実行する。続いて、ステップS111において、ステップS110により読み込んだオリジナルファイルのリソース部A3の内容を基として、必要に応じてデータ内容を変更しながら、ヘッダ/リソース編集ファイルのリソース部A3としてのデータ内容を作成する。そして、このデータについてのメディアへの書き込みを実行する。
このステップS111の処理により、ヘッダ/リソース編集ファイルについてのリソース部A3のメディアへの記録が完了することを以て、ヘッダ/リソース編集ファイルについてのヘッダ部A1とリソース部A3の書き込みと、オリジナルファイルのデータ部A2を引用するためのFAT内容の変更が完了したことになる。つまり、ヘッダ/リソース編集ファイルのメディアへの記録が完了したとされる状態が得られたことになる。
なお、ステップS111としての書き込み処理としては、復帰先クラスタ番号numrtが示すクラスタを起点として記録を開始することになる。また、上記ステップS110、S111の処理としても、ファイルシステムの階層モデルとしてみた場合には、先のステップS103、S104と同様に、図8に示した手順が相当する。
After the process of step S109 is completed, the process for the resource part A3 to be arranged following the data part A2 is executed. First, in step S110, the resource part A3 of the original file is accessed and read. Subsequently, in step S111, based on the contents of the resource part A3 of the original file read in step S110, the data contents as the resource part A3 of the header / resource edit file are created while changing the data contents as necessary. To do. Then, this data is written to the medium.
As a result of the processing in step S111, the recording of the header / resource edit file on the medium of the resource part A3 is completed, so the writing of the header part A1 and the resource part A3 for the header / resource edit file and the data of the original file The change of the FAT content for quoting the part A2 is completed. That is, a state is assumed that the recording of the header / resource edit file on the medium is completed.
As the writing process in step S111, recording is started from the cluster indicated by the return destination cluster number numrt. Further, the processing in steps S110 and S111 also corresponds to the procedure shown in FIG. 8 as in the previous steps S103 and S104 when viewed as a hierarchical model of the file system.
そして、ステップS112により、オリジナルファイルと、今回の新規生成/保存対象であったヘッダ/リソース編集ファイルとについてファイルクローズの処理を実行することで、ヘッダ/リソース編集ファイルの新規生成/保存のための一連の処理が終了されることになる。 Then, in step S112, the file closing process is executed for the original file and the header / resource editing file that was the object of new generation / storage this time, so that the header / resource editing file can be newly generated / saved. A series of processing is terminated.
参考として、図2に示したファイルシステム階層モデルにおいて、ファイルシステム101の内部機能についてより詳細に示した構成例を、図16に示しておくこととする。なお、この図においては、図2と同様に、アプリケーション100、ファイルシステム101、デバイスドライバ102、及びメディア103によるシステム階層モデル全体を示している。
For reference, in the file system hierarchical model shown in FIG. 2, a configuration example showing the internal functions of the
この図に示すようにして、ファイルシステム101としてソフトウェアが実行する処理を機能ブロックとしてみた場合には、記録制御部200及びメディア制御部210を備えて構成されるものとみることができる。
As shown in this figure, when the processing executed by software as the
記録制御部200は、メディアに対するデータの記録(書き込み)及び読み出しに関する各種制御処理を実行するもので、ディレクトリエントリ制御部201、FAT制御部202、及びクラスタ制御部203を備える。また、メディア制御部210は、ファイルシステムがメディアに対するコントロールを行うために、デバイスドライバ102側とデータの授受を行うことが可能な機能部位として位置算出部211を備える。
The
記録制御部200内のディレクトリエントリ制御部201は、例えばメディアに対するファイルの書き込み、消去などのデータ処理結果に応じてディレクトリエントリを作成、削除、更新するなど、ディレクトリエントリについての各種所要の制御処理を実行する。FAT制御部202は、メディアに対するファイルデータ処理結果に応じてFAT領域における所定のFATエントリについての書き換えを実行するなど、FAT領域についての各種所要の制御処理を実行する。クラスタ制御部203は、ファイルシステム内での処理がクラスタレベルで実行されるようにするための各種制御処理を実行する。
例えばメディアに書き込むためのデータが、ファイル単位の処理としてアプリケーション100から渡されてきたとすると、クラスタ制御部203は、このファイルレベルのデータをクラスタレベルによるデータに変換する。そして、このクラスタレベルによるデータについてのメディアへの書き込みを、メディア制御部210の位置算出部211に指示する。
位置算出部211では、FAT制御部202により管理しているFAT領域の内容を参照して認識されるメディアの未使用領域のうちから、ファイルのデータを書き込むべきクラスタの位置(クラスタ番号)を算出する。そして、デバイスドライバ102に対して、書き込むべきクラスタ単位のデータを受け渡すと共に、このデータを書き込むべきクラスタ番号を指示する。デバイスドライバ102は、指示されたクラスタ番号について最終的には、メディア上の記憶領域の物理セクタのアドレスに変換して、セクタレベルによりメディアへのデータの書き込みを実行するようにされる。
The directory
For example, if data to be written to the medium is transferred from the
The
また、これとともに、ファイルシステムでは、上記のようにしてメディアに書き込まれて記憶されるファイルがFATファイルシステム上で適正に管理されるように、ディレクトリエントリ及びFAT領域についての書き換え(更新)を行う。
例えば先ず、ディレクトリエントリ制御部201により今回記録するファイルについてのディレクトリエントリを作成する。このときには、FAT制御部202と連携して、FAT領域における空き領域から、ファイルを記録すべきクラスタを決定する。これに伴い、ディレクトリエントリにおける開始クラスタに格納する値も決まることになる。また、ファイルを記録すべきクラスタが決定されるのに応じて、FAT制御部202は、FAT領域において、このファイルについてのクラスタチェインなどの内容が示されるように、所要のクラスタ番号のFATエントリの値を書き換える。
そして、このようにして作成したディレクトリエントリ、及びFAT領域の書き換え内容を、先の説明と同様にして、クラスタ制御部203及びメディア制御部210(位置算出部211)の処理によって、メディアの所定領域に書き込んで記憶させる。
At the same time, the file system rewrites (updates) the directory entry and the FAT area so that the file written and stored in the medium as described above is properly managed on the FAT file system. .
For example, first, the directory
Then, the directory entry created in this way and the rewritten contents of the FAT area are processed by the
本実施の形態において特有となる、図13におけるステップS105〜S109の処理、つまり、オリジナルファイルのデータ部A2が、ヘッダ/リソース編集ファイルのデータ部A2としても共用されるようにしてファイル管理されるようにするための処理としては、主として、FAT制御部202が実行すべきものとしてプログラムを構成することになる。
The processing of steps S105 to S109 in FIG. 13, which is peculiar to the present embodiment, that is, file management is performed so that the data part A2 of the original file is also shared as the data part A2 of the header / resource editing file. As a process for doing so, the program is mainly configured as what the
ところで、実際において、ヘッダ/リソース編集ファイルのヘッダ部A1は、そのファイルに特有のファイル名、ファイルIDなどを格納するので、必ずオリジナルファイルに対して内容が変更されるが、リソース部A3については変更されない場合がある。しかし、本実施の形態としての記載では、ヘッダ/リソース編集ファイルの新規生成/保存にあたり、ヘッダ部A1及びリソース部A3については、固定的に書込対象情報部として扱うこととして、常に図8に示した手順による書き換えの処理を実行させることとしている。
これは、ヘッダ部A1とリソース部A3は、データ部A2と比較してそのサイズは非常に小さいので、例えばヘッダ部A1のみがオリジナルファイルの内容から変更されて、リソース部A3については変更する必要がないとしても、書き換えの処理時間は非常に短いために、実質上特に問題がないことが理由である。
しかしながら、本発明としては、例えばヘッダ/リソース編集ファイルとして、リソース部A3について変更の無い場合には、リソース部A3についても、データ部A2と同様にして引用情報部として扱って、オリジナルファイルを引用できるようにファイル管理が行われるように構成してかまわない。
By the way, in practice, the header part A1 of the header / resource editing file stores the file name, file ID, etc. peculiar to the file, so the contents are always changed with respect to the original file. May not change. However, in the description of the present embodiment, when a header / resource edit file is newly generated / saved, the header part A1 and the resource part A3 are always treated as a write target information part, and are always shown in FIG. The rewriting process according to the procedure shown is executed.
This is because the size of the header part A1 and the resource part A3 is very small compared to the data part A2. For example, only the header part A1 is changed from the contents of the original file, and the resource part A3 needs to be changed. The reason for this is that the rewrite processing time is very short, so that there is virtually no problem.
However, according to the present invention, for example, as a header / resource editing file, when there is no change in the resource part A3, the resource part A3 is also treated as a citation information part in the same manner as the data part A2, and the original file is quoted. It may be configured to perform file management so that it can be performed.
また、前述もしたように、FATファイルシステムに従ってフォーマットされたメディアにおいては、FAT1、FAT2の2つのFAT領域が形成され、本実施の形態では、FAT1をメインのFAT領域としたうえで、FAT2の領域を復帰先クラスタ番号や引用データの終端クラスタ番号を格納すべき領域として使用している。
しかし、前述もしたように、FAT2は、FAT1の予備領域、バックアップ領域として、FAT1と同様の内容がコピーされるようにして使用される場合がある。このために、仕様として、本実施の形態のようにして、1つのFAT領域を復帰先クラスタ番号や引用データの終端クラスタ番号を格納すべき領域として使用するとしても、さらに、FATメインのFAT領域のためのバックアップ領域としてのFAT領域が必要となる場合があることが考えられる。
このような場合には、例えばFAT領域について3以上の領域を形成するフォーマットを採用すればよい。BPB内には、BPB_NumFATsといわれる、FAT領域数を示す情報が格納されている。そこで、このBPB_NumFATsについて3以上の値を設定してメディアフォーマットを実行すれば、3以上のFAT領域が形成される構造を得ることができる。
As described above, in the medium formatted according to the FAT file system, two FAT areas, FAT1 and FAT2, are formed. In this embodiment, the FAT1 is used as the main FAT area, and the FAT2 The area is used as an area for storing the return destination cluster number and the end cluster number of the cited data.
However, as described above, FAT2 may be used as a spare area and a backup area of FAT1 so that the same contents as FAT1 are copied. Therefore, as a specification, even if one FAT area is used as an area to store the return destination cluster number and the end cluster number of the cited data as in the present embodiment, the FAT main FAT area is further used. It is conceivable that a FAT area as a backup area may be required.
In such a case, for example, a format that forms three or more areas for the FAT area may be adopted. In the BPB, information indicating the number of FAT areas called BPB_NumFATs is stored. Therefore, if a media format is executed by setting 3 or more values for BPB_NumFATs, a structure in which 3 or more FAT areas are formed can be obtained.
また、本発明のファイルは、複数の情報部から成ることが最低限の要件となる。従って、実施の形態において図7などに示したISO Base Media File Formatなどに従ったファイルの形式は、あくまでも一例であり、上記した本発明が対応するファイルの要件を満たす限り、そのファイル構造、ファイル形式は限定されるべきものではない。また、これに応じて、ファイル種別としても動画と音声について再生時間軸を同期させて再生するようなAVファイル系以外の各種ファイルとされてよい。 In addition, it is a minimum requirement that the file of the present invention consists of a plurality of information parts. Therefore, the file format according to the ISO Base Media File Format shown in FIG. 7 or the like in the embodiment is merely an example, and as long as the requirements of the file corresponding to the present invention described above are satisfied, the file structure and file The format should not be limited. Correspondingly, the file type may be various files other than the AV file system in which the reproduction time axis is reproduced with respect to the moving image and the sound.
また、実施の形態におけるファイルの記録管理についてはFATファイルシステムを採用することとしているが、例えばHSF(Hierarchical File System)などをはじめとする他のファイルシステムとされてもよいものであり、ファイルシステムの規格に関しては特に限定されるべきものではない。 The file recording management in the embodiment adopts the FAT file system. However, the file system may be other file systems such as HSF (Hierarchical File System). There is no particular limitation on the standards.
また、上記実施の形態では、本発明の情報処理装置としても、実施の形態に挙げたデジタルビデオカメラに限定されるべきものではなく、例えば、デジタルスチルカメラ、テレビジョン放送番組の予約録画機器、さらにはパーソナルコンピュータをはじめ、これに準じた各種情報処理機器など、HDDなどの記憶媒体に対応してデータ書き込み/読み出しなどのデータ処理が可能な機器であれば、本発明が適用できる。
また、ファイルが記録される記憶媒体としても、実施の形態では、図1においてメディアコントローラ13と接続されているものを例示しているが、これら以外の各種記録媒体とされてよい。
In the above embodiment, the information processing apparatus of the present invention should not be limited to the digital video camera described in the embodiment. For example, a digital still camera, a reserved recording device for a television broadcast program, Furthermore, the present invention can be applied to any device capable of data processing such as data writing / reading corresponding to a storage medium such as an HDD such as a personal computer and various information processing devices conforming thereto.
Further, in the embodiment, the storage medium on which the file is recorded is illustrated as being connected to the
1 デジタルビデオカメラ、2 光学系部、3 光電変換部、4 ビデオ信号処理部、5 画像入出力部、6 カメラ機能部、7 表示部、8 音声処理部、9 音声入出力部、10 CPU、11 ROM、12 RAM、13 メディアコントローラ、14 HDD、15 操作入力部、16 通信部、100 アプリケーション、101 ファイルシステム、102 デバイスドライバ、200 記録制御部、201 ディレクトリエントリ、202 FAT制御部、203 クラスタ制御部、210 メディア制御部、211 位置算出部 1 digital video camera, 2 optical system unit, 3 photoelectric conversion unit, 4 video signal processing unit, 5 image input / output unit, 6 camera function unit, 7 display unit, 8 audio processing unit, 9 audio input / output unit, 10 CPU, 11 ROM, 12 RAM, 13 Media controller, 14 HDD, 15 Operation input unit, 16 Communication unit, 100 Application, 101 File system, 102 Device driver, 200 Recording control unit, 201 Directory entry, 202 FAT control unit, 203 Cluster control Section, 210 media control section, 211 position calculation section
Claims (4)
上記新規ファイル生成手段により生成された新規ファイルの内容を上記記憶媒体に書き込んで記憶させる書き込み手段と、
上記記憶媒体に記憶されるファイルについて管理する管理手段とを備え、
上記書き込み手段は、上記新規ファイルを形成する所定の情報部のうちで、原ファイルの内容からの変更が無かったとされる未変更情報部がある場合には、上記新規ファイルを形成する情報部のうちで、この未変更情報部以外の情報部である書込対象情報部を記憶媒体に書き込むようにされ、
上記管理手段は、上記書き込み手段により書き込まれた上記書込対象情報部と、上記原ファイルにおいて上記未変更情報部と同一とされる内容を有する情報部である引用情報部とにより、上記新規ファイルが形成されるものとして管理する、
ことを特徴とする情報処理装置。 By changing the content of the required information part in the original file based on the original file that is a file that has a format formed by a plurality of predetermined information parts and is already stored in the storage medium, New file generation means for generating the contents of the above file as a new file,
Writing means for writing and storing the contents of the new file generated by the new file generating means in the storage medium;
Management means for managing files stored in the storage medium,
If there is an unaltered information part that has not been changed from the contents of the original file among the predetermined information parts that form the new file, the writing means includes the information part that forms the new file. Among them, the writing target information part which is an information part other than the unchanged information part is written to the storage medium,
The management means includes the new file by the writing target information part written by the writing means and a citation information part, which is an information part having the same contents as the unchanged information part in the original file. Manage as formed,
An information processing apparatus characterized by that.
ファイルを形成するとされるデータを、所定のデータサイズを有する最小管理単位の連結による構造として管理するようにされたうえで、
上記新規ファイルを管理するために、
新規ファイルの構造として、上記引用情報部の前方に所定の書込対象情報部が配置される場合には、この所定の書込対象情報部のデータを格納する最小管理単位のうちで終端となる最小管理単位に続けて、上記引用情報部のデータを格納する最小管理単位のうちで先頭となる最小管理単位が連結されるようにして管理し、
新規ファイルの構造として、上記引用情報部の後方に所定の書込対象情報部が配置される場合には、上記引用情報部のデータを格納する最小管理単位のうちで終端となる最小管理単位に続けて、この所定の書込対象情報部のデータを格納する最小管理単位のうちで先頭となる最小管理単位が連結されるようにして管理する、
ことを特徴とする請求項1に記載の情報処理装置。 The management means is
After managing the data to form the file as a structure by concatenating the minimum management unit having a predetermined data size,
To manage the above new files,
As a new file structure, when a predetermined write target information part is arranged in front of the cited information part, it becomes the end of the minimum management unit for storing data of the predetermined write target information part. Following the minimum management unit, the minimum management unit that is the head of the minimum management units that store the data of the citation information section is managed so that it is concatenated,
As a new file structure, when a predetermined write target information part is arranged behind the citation information part, the minimum management unit that is the end of the minimum management units for storing the data of the citation information part is used. Subsequently, the minimum management unit that is the head of the minimum management units that store the data of the predetermined write target information section is connected and managed.
The information processing apparatus according to claim 1.
上記新規ファイル生成手順により生成された新規ファイルの内容を上記記憶媒体に書き込んで記憶させる書き込み手順と、
上記記憶媒体に記憶されるファイルについて管理する管理手順とを実行するものとされ、
上記書き込み手順は、上記新規ファイルを形成する所定の情報部のうちで、原ファイルの内容からの変更が無かったとされる未変更情報部がある場合には、上記新規ファイルを形成する情報部のうちで、この未変更情報部以外の情報部である書込対象情報部を記憶媒体に書き込むようにされ、
上記管理手順は、上記書き込み手順により書き込まれた上記書込対象情報部と、上記原ファイルにおいて上記未変更情報部と同一とされる内容を有する情報部である引用情報部とにより、上記新規ファイルが形成されるものとして管理する、
ことを特徴とする情報処理方法。 By changing the contents of the required information part in the original file based on the original file that is a file that has a format formed by a plurality of predetermined information parts and has been stored in the storage medium, A new file generation procedure for generating contents as a new file which is the above-mentioned file,
A writing procedure for writing and storing the content of the new file generated by the new file generating procedure in the storage medium;
A management procedure for managing a file stored in the storage medium is executed;
If there is an unaltered information part that has not been changed from the contents of the original file among the predetermined information parts that form the new file, the writing procedure includes the information part that forms the new file. Among them, the writing target information part which is an information part other than the unchanged information part is written to the storage medium,
The management procedure includes the new file by the writing target information portion written by the writing procedure and the citation information portion which is an information portion having the same contents as the unchanged information portion in the original file. Manage as formed,
An information processing method characterized by the above.
上記新規ファイル生成手順により生成された新規ファイルの内容を上記記憶媒体に書き込んで記憶させる書き込み手順と、
上記記憶媒体に記憶されるファイルについて管理する管理手順とを情報処理装置に実行させるものとされ、
上記書き込み手順は、上記新規ファイルを形成する所定の情報部のうちで、原ファイルの内容からの変更が無かったとされる未変更情報部がある場合には、上記新規ファイルを形成する情報部のうちで、この未変更情報部以外の情報部である書込対象情報部を記憶媒体に書き込むようにされ、
上記管理手順は、上記書き込み手順により書き込まれた上記書込対象情報部と、上記原ファイルにおいて上記未変更情報部と同一とされる内容を有する情報部である引用情報部とにより、上記新規ファイルが形成されるものとして管理する、
ことを特徴とするプログラム。 By changing the contents of the required information part in the original file based on the original file that is a file that has a format formed by a plurality of predetermined information parts and has been stored in the storage medium, A new file generation procedure for generating contents as a new file which is the above-mentioned file,
A writing procedure for writing and storing the content of the new file generated by the new file generating procedure in the storage medium;
A management procedure for managing a file stored in the storage medium is to be executed by the information processing apparatus;
If there is an unaltered information part that has not been changed from the contents of the original file among the predetermined information parts that form the new file, the writing procedure includes the information part that forms the new file. Among them, the writing target information part which is an information part other than the unchanged information part is written to the storage medium,
The management procedure includes the new file by the writing target information portion written by the writing procedure and the citation information portion which is an information portion having the same contents as the unchanged information portion in the original file. Manage as formed,
A program characterized by that.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004327256A JP4561323B2 (en) | 2004-11-11 | 2004-11-11 | Information processing apparatus, information processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004327256A JP4561323B2 (en) | 2004-11-11 | 2004-11-11 | Information processing apparatus, information processing method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2006139439A true JP2006139439A (en) | 2006-06-01 |
JP4561323B2 JP4561323B2 (en) | 2010-10-13 |
Family
ID=36620238
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004327256A Expired - Fee Related JP4561323B2 (en) | 2004-11-11 | 2004-11-11 | Information processing apparatus, information processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4561323B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012512460A (en) * | 2008-12-16 | 2012-05-31 | サンディスク アイエル リミテッド | Discardable file |
JP2012512462A (en) * | 2008-12-16 | 2012-05-31 | サンディスク アイエル リミテッド | Discardable file |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08320817A (en) * | 1995-05-25 | 1996-12-03 | Toshiba Corp | File system managing method |
JPH11162089A (en) * | 1997-11-28 | 1999-06-18 | Toshiba Corp | Data reproduction controller, storage medium used for the same and data reproduction control method |
JP2000259459A (en) * | 1999-03-08 | 2000-09-22 | Matsushita Electric Ind Co Ltd | File storage medium, file management device and storage medium for file management program |
JP2001051878A (en) * | 1999-08-11 | 2001-02-23 | Sony Corp | Device and method for film management |
JP2002373099A (en) * | 2001-06-14 | 2002-12-26 | Sharp Corp | Method for managing disk |
-
2004
- 2004-11-11 JP JP2004327256A patent/JP4561323B2/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08320817A (en) * | 1995-05-25 | 1996-12-03 | Toshiba Corp | File system managing method |
JPH11162089A (en) * | 1997-11-28 | 1999-06-18 | Toshiba Corp | Data reproduction controller, storage medium used for the same and data reproduction control method |
JP2000259459A (en) * | 1999-03-08 | 2000-09-22 | Matsushita Electric Ind Co Ltd | File storage medium, file management device and storage medium for file management program |
JP2001051878A (en) * | 1999-08-11 | 2001-02-23 | Sony Corp | Device and method for film management |
JP2002373099A (en) * | 2001-06-14 | 2002-12-26 | Sharp Corp | Method for managing disk |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012512460A (en) * | 2008-12-16 | 2012-05-31 | サンディスク アイエル リミテッド | Discardable file |
JP2012512462A (en) * | 2008-12-16 | 2012-05-31 | サンディスク アイエル リミテッド | Discardable file |
Also Published As
Publication number | Publication date |
---|---|
JP4561323B2 (en) | 2010-10-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0971358B1 (en) | Data processing apparatus and file management method therefor | |
JP5129156B2 (en) | Access device and write-once recording system | |
US8977802B2 (en) | Access device, information recording device, controller, real time information recording system, access method, and program | |
US20120102076A1 (en) | Information processing apparatus, information processing method, and program | |
GB2383859A (en) | Memory controller managing a file allocation table for a memory card | |
JP4487954B2 (en) | Data recording apparatus, data recording method, and program | |
JP2007233638A (en) | Information processor, information processing method, and computer program | |
US9015444B2 (en) | Access apparatus and available storage space calculation method | |
US7051054B1 (en) | Method and apparatus for emulating read/write file system on a write-once storage disk | |
EP1568031A1 (en) | Record carrier having a main file system area and a virtual file system area | |
JP4561323B2 (en) | Information processing apparatus, information processing method, and program | |
JP2007108853A (en) | Information processor, information processing method, and computer program | |
JP2006178633A (en) | Information processor, information processing method, and program | |
US20070055819A1 (en) | Information recording medium and its control method | |
JP2006164017A (en) | Information processor, information processing method, and program | |
WO2018186455A1 (en) | Available-space management method for nonvolatile memory, access device which stores data to information storage device with nonvolatile memory, information storage device, and information storage system | |
JP2006178632A (en) | Information processor, information processing method, and program | |
JP2010020845A (en) | Method and device for initializing recording medium | |
JP4734898B2 (en) | Information processing apparatus, information processing method, and program | |
JP2007059004A (en) | Information processor and method, program, and recording medium | |
JP2006139845A (en) | Information processing apparatus, information processing method, and program | |
US7424573B2 (en) | Information processing apparatus, method, and program for formatting multiple recording media integrated as one | |
JP2006133855A (en) | Information processor, information processing method and program | |
JP2006146812A (en) | Information processor, information processing method and program | |
JP4206872B2 (en) | Information editing apparatus, imaging apparatus, and information editing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070822 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100405 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100420 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100527 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20100706 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100719 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130806 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130806 Year of fee payment: 3 |
|
LAPS | Cancellation because of no payment of annual fees |