X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fawindowgui.C;h=66e69c3bd873d769092624af39d32cfb95b377d1;hp=8b1fda8c2fa24b4de91199fbb14368cfc6293386;hb=cdb8b00f2f7ecf0b4910a40e1d90a87540d2891d;hpb=a0d43979126b586d50b2de48056ae48fa8d0bb1d diff --git a/cinelerra-5.1/cinelerra/awindowgui.C b/cinelerra-5.1/cinelerra/awindowgui.C index 8b1fda8c..66e69c3b 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.C +++ b/cinelerra-5.1/cinelerra/awindowgui.C @@ -121,8 +121,7 @@ VFrame *AssetVIcon::frame() { AssetVIconThread *avt = picon->gui->vicon_thread; Asset *asset = (Asset *)picon->indexable; - if( !asset ) - return *images[0]; + if( !asset ) return vframes()>0 ? (VFrame*)*images[0] : 0; if( !asset->video_data && audio_data && audio_size && length > 0 ) { if( !temp ) temp = new VFrame(0, -1, w, h, BC_RGB888, -1); temp->clear_frame(); @@ -870,6 +869,9 @@ void AssetPicon::reset() vicon_frame = 0; in_use = 1; comments_time = 0; + comments_rate = -1; + comments_ffmt = ' '; + comments_type = ""; id = 0; persistent = 0; } @@ -1060,6 +1062,10 @@ void AssetPicon::create_objects() } struct stat st; comments_time = !stat(asset->path, &st) ? st.st_mtime : 0; + comments_rate = asset->get_frame_rate(); + comments_ffmt = asset->format == FILE_FFMPEG ? '=' : '-'; + comments_type = asset->format == FILE_FFMPEG ? + asset->vcodec : File::formattostr(asset->format); } else if( indexable && !indexable->is_asset ) { @@ -2083,9 +2089,13 @@ void AWindowGUI::update_asset_list() continue; } if( picon->indexable && picon->indexable->is_asset ) { + Asset *asset = (Asset *)picon->indexable; struct stat st; - picon->comments_time = !stat(picon->indexable->path, &st) ? - st.st_mtime : 0; + picon->comments_time = !stat(asset->path, &st) ? st.st_mtime : 0; + picon->comments_rate = asset->get_frame_rate(); + picon->comments_ffmt = asset->format == FILE_FFMPEG ? '=' : '-'; + picon->comments_type = asset->format == FILE_FFMPEG ? + asset->vcodec : File::formattostr(asset->format); } } } @@ -2271,9 +2281,11 @@ void AWindowGUI::copy_picons(AssetPicon *picon, ArrayList *src) else if( picon->comments_time ) { char date_time[BCSTRLEN]; struct tm stm; localtime_r(&picon->comments_time, &stm); - sprintf(date_time,"%04d.%02d.%02d %02d:%02d:%02d", + sprintf(date_time,"%04d.%02d.%02d %02d:%02d:%02d @%0.2f %c%s", stm.tm_year+1900, stm.tm_mon+1, stm.tm_mday, - stm.tm_hour, stm.tm_min, stm.tm_sec); + stm.tm_hour, stm.tm_min, stm.tm_sec, + picon->comments_rate, picon->comments_ffmt, + picon->comments_type); dst[1].append(item2 = new BC_ListBoxItem(date_time)); } else @@ -2826,7 +2838,8 @@ int AWindowAssets::selection_changed() case AW_CLIP_FOLDER: if( get_buttonpress() == LEFT_BUTTON ) { AssetVIcon *vicon = 0; - if( !gui->vicon_thread->vicon ) + AssetVIconThread *avt = gui->vicon_thread; + if( !avt->vicon && gui->vicon_drawing != AVICON_NO_PLAY ) vicon = item->vicon; gui->vicon_thread->set_view_popup(vicon, ASSET_VIEW_ICON); }