X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fdb%2Fnote;fp=cinelerra-5.1%2Fdb%2Fnote;h=fec9365564bdfcae89b5163e006848f18fe0604b;hp=0000000000000000000000000000000000000000;hb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;hpb=52fcc46226f9df46f9ce9d0566dc568455a7db0b diff --git a/cinelerra-5.1/db/note b/cinelerra-5.1/db/note new file mode 100644 index 00000000..fec93655 --- /dev/null +++ b/cinelerra-5.1/db/note @@ -0,0 +1,50 @@ + during toc scan, + acquire video thumbnail for each position + transform video_thumbnail to media frame_key + mark frames which exist in video_frames + foreach frame in toc, + find next marked frame + acquire video thumbnail for mark position + transform video_thumbnail to media frame_key + find frame_key in video_frames giving video_frame_id + best = bad -- for every commercial using this frame + foreach clip_set in timelines matching (video_frame_id) + score = 0 -- for every frame in the commercial + foreach timeline_sequence matching (clip_set_id, seq_no++) + acquire video frame (now-offset) + transform video_thumbnail to media frame_key + access video_frame(video_frame_id); + compute error frame_key against video_frame(frame_key) + add error to score + if score > best then break + done + if score < best score then best = score + done + if best is bad then exit + perform action for best match + reset position past match + done + + during playback, + while normal playback + acquire video thumbnail for current position + transform video_thumbnail to media frame_key + find frame_key in video_frames giving video_frame_id + if found, playback = commercial + save clip_set,seq_no and start_offset of timelines matching (video_frame_id) + perform highest priority action for matching clip_set + playtime = 0 + while commercial playback + acquire video thumbnail for next position + transform video_thumbnail to media frame_key + find frame_key in video_frames giving video_frame_id + playback = normal + if not found : break + foreach timelines matching video_frame_id + search saved clip_set for time_line clip_set_id + if not found : continue + if( time_line sequence_no != saved ++seq_no ) + delete saved clip_set, empty save set : break + continue + access timeline_sequence(clip_set(i),++seq_no(i)) giving next_time_line + if( next_time_line.offset-start_offset(i) == playtime ) playback = commerial, break