while( ret>=0 && !flushed && curr_pos<=pos && --i>=0 ) {
ret = read_frame(frame);
if( ret > 0 ) {
- if( frame->key_frame && seeking < 0 )
+ if( frame->key_frame && seeking < 0 ) {
seeking = 1;
- if( ffmpeg->file_base->get_use_cache() && seeking > 0 && curr_pos < pos ) {
- VFrame *cache_frame = ffmpeg->file_base->new_cache_frame(vframe, curr_pos);
+ ffmpeg->purge_cache();
+ }
+ if( ffmpeg->get_use_cache() && seeking > 0 && curr_pos < pos ) {
+ VFrame *cache_frame = ffmpeg->new_cache_frame(vframe, curr_pos);
if( cache_frame ) {
ret = convert_cmodel(cache_frame, frame);
- ffmpeg->file_base->put_cache_frame();
+ ffmpeg->put_cache_frame();
}
}
++curr_pos;
return ret;
}
+VFrame *FFMPEG::new_cache_frame(VFrame *vframe, int64_t position)
+{
+ return file_base->file->new_cache_frame(vframe, position, 0);
+}
+
+void FFMPEG::put_cache_frame()
+{
+ return file_base->file->put_cache_frame();
+}
+
+int FFMPEG::get_use_cache()
+{
+ return file_base->file->get_use_cache();
+}
+
+void FFMPEG::purge_cache()
+{
+ file_base->file->purge_cache();
+}
+
FFCodecRemap::FFCodecRemap()
{
old_codec = 0;
static double to_secs(int64_t time, AVRational time_base);
int info(char *text, int len);
+ VFrame *new_cache_frame(VFrame *vframe, int64_t position);
+ void put_cache_frame();
+ int get_use_cache();
+ void purge_cache();
+
int init_decoder(const char *filename);
int open_decoder();
int init_encoder(const char *filename);
history_allocated * history_channels * sizeof(double);
}
-
-VFrame *FileBase::new_cache_frame(VFrame *vframe, int64_t position)
-{
- return file->new_cache_frame(vframe, position, 0);
-}
-void FileBase::put_cache_frame()
-{
- return file->put_cache_frame();
-}
-int FileBase::get_use_cache()
-{
- return file->get_use_cache();
-}
-
int channel,
int64_t len);
void allocate_history(int len);
-// create cache frames
- VFrame *new_cache_frame(VFrame *vframe, int64_t position);
- void put_cache_frame();
- int get_use_cache();
// For static functions to access it
Asset *asset;