Vorbisfile documentation

libVorbisfile version 1.65 - 20020702

OggVorbis_File

declared in "vorbis/vorbisfile.h"  "vorbis/vorbisfile.h"で定義されている

The OggVorbis_File structure defines an Ogg Vorbis file.
OggVorbis_File構造体は1つのOggVorbisファイルを定義する。

This structure is used in all libvorbisfile routines. Before it can be used, it must be initialized by ov_open() or ov_open_callbacks().
この構造体はlibvorbisfileのすべてのルーティンで使用される。 使用する前に ov_open()ov_open_callbacks() によって初期化しなければならない。

After use, the OggVorbis_File structure must be deallocated with a call to ov_clear().
使用後、OggVorbis_File構造体は ov_clear() を呼び出すことによって解放されなければならない。

Once a file or data source is opened successfully by libvorbisfile (using ov_open() or ov_open_callbacks()), it is owned by libvorbisfile. The file should not be used by any other applications or functions outside of the libvorbisfile API. The file must not be closed directly by the application at any time after a successful open; libvorbisfile expects to close the file within ov_clear().
(ov_open()ov_open_callbacks() を使うことで) libvorbisfileによって一度ファイルやデータソースが開かれると、 それはlibvorbisfileによって占有される。 ファイルはlivborbisfile API以外の関数および他のアプリケーションでは使用すべきではない。 ファイルはオープンが成功したあとはいかなるときもアプリケーションで直接クローズしてはならない; libvorbisfileは ov_clear() の中でファイルをクローズすることを想定している。

If the call to ov_open() or ov_open_callbacks() fails, libvorbisfile does not assume ownership of the file and the application is expected to close it if necessary.
もし ov_open()ov_open_callbacks() の呼び出しが失敗すれば、 libvorbisfileはファイルの占有することを仮定せず、 必要ならアプリケーションがクローズすることを想定している。

typedef struct {
  void             *datasource; /* Pointer to a FILE *, etc. */
  int              seekable;
  ogg_int64_t      offset;
  ogg_int64_t      end;
  ogg_sync_state   oy; 

  /* If the FILE handle isn't seekable (eg, a pipe), only the current
     stream appears */
  int              links;
  ogg_int64_t      *offsets;
  ogg_int64_t      *dataoffsets;
  long             *serialnos;
  ogg_int64_t      *pcmlengths;
  vorbis_info      *vi;
  vorbis_comment   *vc;

  /* Decoding working state local storage */
  ogg_int64_t      pcm_offset;
  int              ready_state;
  long             current_serialno;
  int              current_link;

  ogg_int64_t      bittrack;
  ogg_int64_t      samptrack;

  ogg_stream_state os; /* take physical pages, weld into a logical
                          stream of packets */
  vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
  vorbis_block     vb; /* local working space for packet->PCM decode */

  ov_callbacks callbacks;

} OggVorbis_File;

Relevant Struct Members

datasource
Pointer to file or other ogg source. When using stdio based file/stream access, this field contains a FILE pointer. When using custom IO via callbacks, libvorbisfile treats this void pointer as a black box only to be passed to the callback routines provided by the application.
ファイルや他のOggソースへのポインタ。stdioベースのファイル/ストリームアクセスを行う場合、 このフィールドは FILE ポインタを示す。コールバックを通して独自のIOを使う場合、 libvorbisfileはこのvoidポインタをブラックボックスとして扱い、アプリケーションによって 提供されたコールバックルーティンへ渡すのにのみ使用する。
seekable
Read-only int indicating whether file is seekable. E.g., a physical file is seekable, a pipe isn't.
この読み出し専用のint値はファイルが移動可能であるかを示す。たとえば、物理ファイルは移動可能だが、パイプは不可能だ。
links
Read-only int indicating the number of logical bitstreams within the physical bitstream.
この読み出し専用のint値は物理ビットストリーム内の論理ビットストリームの数を示す。
ov_callbacks
Collection of file manipulation routines to be used on this data source. When using stdio/FILE access via ov_open(), the callbacks will be filled in with stdio calls or wrappers to stdio calls.
このデータソースを使うためのファイル操作ルーティンの集まり。ov_open() により、stdio/FILEのアクセスを使う場合、callbacksにはstdio呼び出し、もしくはstdio呼び出しへのラッパーがセットされる。



copyright © 2002 Xiph.org

Ogg Vorbis

Vorbisfile documentation

libVorbisfile version 1.65 - 20020702