Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

IndexFile Class Reference

#include <indexfile.h>

List of all members.

Public Member Functions

 IndexFile (MWindow *mwindow)
 IndexFile (MWindow *mwindow, Asset *asset)
 ~IndexFile ()
int open_index (Asset *asset)
int open_index (MWindow *mwindow, Asset *asset)
int create_index (Asset *asset, MainProgressBar *progress)
int create_index (MWindow *mwindow, Asset *asset, MainProgressBar *progress)
int interrupt_index ()
void update_edl_asset ()
int redraw_edits (int force)
int draw_index (ResourcePixmap *pixmap, Edit *edit, int x, int w)
int close_index ()
int remove_index ()
int read_info (Asset *test_asset=0)
int write_info ()

Static Public Member Functions

static void delete_index (Preferences *preferences, Asset *asset)
static int get_index_filename (char *source_filename, char *index_directory, char *index_filename, char *input_filename)

Public Attributes

MWindowmwindow
char index_filename [BCTEXTLEN]
char source_filename [BCTEXTLEN]
Assetasset
Timer * redraw_timer

Private Member Functions

void update_mainasset ()
int open_file ()
int open_source (File *source)
int64_t get_required_scale (File *source)

Private Attributes

FILE * file
int64_t file_length
int interrupt_flag


Detailed Description

Definition at line 16 of file indexfile.h.


Constructor & Destructor Documentation

IndexFile::IndexFile MWindow mwindow  ) 
 

Definition at line 29 of file indexfile.C.

References file, interrupt_flag, and redraw_timer.

IndexFile::IndexFile MWindow mwindow,
Asset asset
 

Definition at line 39 of file indexfile.C.

References file, interrupt_flag, and redraw_timer.

IndexFile::~IndexFile  ) 
 

Definition at line 49 of file indexfile.C.

References redraw_timer.


Member Function Documentation

int IndexFile::close_index  ) 
 

Definition at line 566 of file indexfile.C.

References fclose(), and file.

Referenced by MainIndexes::add_next_asset(), create_index(), ResourcePixmap::draw_audio_resource(), ResourcePixmap::draw_data(), MWindow::load_filenames(), open_index(), remove_index(), ThreadIndexer::run(), and MainIndexes::run().

int IndexFile::create_index MWindow mwindow,
Asset asset,
MainProgressBar progress
 

Definition at line 361 of file indexfile.C.

References create_index().

int IndexFile::create_index Asset asset,
MainProgressBar progress
 

Definition at line 235 of file indexfile.C.

References _, IndexThread::buffer_in, Asset::channels, File::close_file(), close_index(), MWindow::edl, File::get_audio_length(), File::get_index(), get_index_filename(), get_required_scale(), Preferences::index_directory, index_filename, Asset::index_zoom, IndexThread::input_len, IndexThread::input_lock, IndexThread::interrupt_flag, interrupt_flag, IndexThread::last_buffer, mwindow, open_index(), open_source(), IndexThread::output_lock, Asset::path, MWindow::preferences, File::read_samples(), redraw_edits(), redraw_timer, File::set_audio_position(), File::set_channel(), EDL::set_index_file(), source_filename, IndexThread::start_build(), IndexThread::stop_build(), TOTAL_BUFFERS, MainProgressBar::update(), MainProgressBar::update_length(), and MainProgressBar::update_title().

Referenced by create_index(), and MainIndexes::run().

void IndexFile::delete_index Preferences preferences,
Asset asset
[static]
 

Definition at line 93 of file indexfile.C.

References get_index_filename(), Preferences::index_directory, index_filename, Asset::path, remove(), and source_filename.

Referenced by PackageRenderer::create_output(), Record::open_output_file(), and MenuEffectThread::run().

int IndexFile::draw_index ResourcePixmap pixmap,
Edit edit,
int  x,
int  w
 

Definition at line 391 of file indexfile.C.

References _, Edit::asset, asset, Theme::audio_color, ResourcePixmap::canvas, Edit::channel, Asset::channels, MWindow::edl, file, file_length, fread(), Track::from_units(), fseek(), Asset::get_index_offset(), Asset::get_index_size(), Asset::index_buffer, Asset::index_end, Asset::index_start, Asset::index_status, Asset::index_zoom, EDL::local_session, MIN, mwindow, ResourcePixmap::pixmap_x, Asset::sample_rate, EDLSession::sample_rate, EDL::session, EDLSession::show_titles, Edit::startproject, Edit::startsource, MWindow::theme, Theme::title_bg_data, Edit::track, LocalSession::view_start, LocalSession::zoom_sample, LocalSession::zoom_track, and LocalSession::zoom_y.

Referenced by ResourcePixmap::draw_audio_resource().

int IndexFile::get_index_filename char *  source_filename,
char *  index_directory,
char *  index_filename,
char *  input_filename
[static]
 

Definition at line 201 of file indexfile.C.

Referenced by MainIndexes::add_next_asset(), create_index(), FileMPEG::create_index(), delete_index(), MWindow::load_filenames(), open_file(), MWindow::rebuild_indices(), and AssetEdit::run().

int64_t IndexFile::get_required_scale File source  )  [private]
 

Definition at line 173 of file indexfile.C.

References asset, Asset::channels, File::get_audio_length(), Preferences::index_size, mwindow, and MWindow::preferences.

Referenced by create_index().

int IndexFile::interrupt_index  ) 
 

Definition at line 227 of file indexfile.C.

References interrupt_flag.

Referenced by ThreadIndexer::interrupt_build(), and MainIndexes::interrupt_build().

int IndexFile::open_file  )  [private]
 

Definition at line 105 of file indexfile.C.

References asset, fclose(), file, file_length, fopen(), fseek(), ftell(), get_index_filename(), Asset::index_bytes, Preferences::index_directory, index_filename, mwindow, Asset::path, MWindow::preferences, read_info(), and source_filename.

Referenced by open_index().

int IndexFile::open_index MWindow mwindow,
Asset asset
 

Definition at line 88 of file indexfile.C.

References open_index().

int IndexFile::open_index Asset asset  ) 
 

Definition at line 55 of file indexfile.C.

References close_index(), Asset::index_status, open_file(), and read_info().

Referenced by MainIndexes::add_next_asset(), create_index(), ResourcePixmap::draw_audio_resource(), ResourcePixmap::draw_data(), MWindow::load_filenames(), open_index(), ThreadIndexer::run(), and MainIndexes::run().

int IndexFile::open_source File source  )  [private]
 

Definition at line 152 of file indexfile.C.

References asset, Asset::index_bytes, mwindow, File::open_file(), Asset::path, and MWindow::preferences.

Referenced by create_index().

int IndexFile::read_info Asset test_asset = 0  ) 
 

Definition at line 584 of file indexfile.C.

References asset, file, Asset::format, fread(), Asset::index_start, Asset::index_status, Asset::read(), and FileXML::read_from_string().

Referenced by open_file(), and open_index().

int IndexFile::redraw_edits int  force  ) 
 

Definition at line 370 of file indexfile.C.

References asset, MWindowGUI::canvas, TrackCanvas::draw_indexes(), MWindow::edl, MWindow::gui, Asset::index_end, mwindow, Asset::old_index_end, redraw_timer, and EDL::set_index_file().

Referenced by create_index(), and IndexThread::run().

int IndexFile::remove_index  ) 
 

Definition at line 575 of file indexfile.C.

References asset, close_index(), index_filename, Asset::index_status, and remove().

void IndexFile::update_edl_asset  ) 
 

void IndexFile::update_mainasset  )  [private]
 

int IndexFile::write_info  ) 
 


Member Data Documentation

Asset* IndexFile::asset
 

Definition at line 43 of file indexfile.h.

Referenced by draw_index(), get_required_scale(), open_file(), open_source(), read_info(), redraw_edits(), and remove_index().

FILE* IndexFile::file [private]
 

Definition at line 52 of file indexfile.h.

Referenced by close_index(), draw_index(), IndexFile(), open_file(), and read_info().

int64_t IndexFile::file_length [private]
 

Definition at line 53 of file indexfile.h.

Referenced by draw_index(), and open_file().

char IndexFile::index_filename[BCTEXTLEN]
 

Definition at line 42 of file indexfile.h.

Referenced by create_index(), delete_index(), open_file(), and remove_index().

int IndexFile::interrupt_flag [private]
 

Definition at line 54 of file indexfile.h.

Referenced by create_index(), IndexFile(), and interrupt_index().

MWindow* IndexFile::mwindow
 

Definition at line 41 of file indexfile.h.

Referenced by create_index(), draw_index(), get_required_scale(), open_file(), open_source(), and redraw_edits().

Timer* IndexFile::redraw_timer
 

Definition at line 44 of file indexfile.h.

Referenced by create_index(), IndexFile(), redraw_edits(), and ~IndexFile().

char IndexFile::source_filename[BCTEXTLEN]
 

Definition at line 42 of file indexfile.h.

Referenced by create_index(), delete_index(), and open_file().


The documentation for this class was generated from the following files:
Generated on Sun Jan 8 13:39:15 2006 for Cinelerra-svn by  doxygen 1.4.4