Article from CodeProject.com
This article is about an epiphany I had awhile back when I read an article by Alex Hildyard called:Build a Reusable Graphical Charting Engine with C#. I realized that the TimeLine in a video editing program like Adbode AfterEffects is just an ordinary horizontal bar graph like the one described in Alex Hildyard's article with a movable Thumb added. WOW! In this article I created a basic Video TmeLine Control using the code from Alex Hildyard's article as a starting point and I added a Thumb Slider to finish it off. Essentially it is an ordinary horizontal bar graph with zoom that displays video frames as horizontal bars on a graph. I decided to use DirectShow to play video to illustrate how the TimeLine control works. However, this is NOT intended as an article on DirectShow and doesn't belong in the section for DirectShow. This article and the enclosed sample project are designed to illustrate how to create a horizontal bar graph with zoom as a TimeLine Control. I used the DirectShowLib-2005.dll from the DirectShow.NET library to play the video in this sample but this project is NOT intended as a DirectShow project. This control ad its code are completelty independent of any code to play video and you can use this control with VideoLAN or any other means of playing video.
TimeControl, Horizontal Bar Graph with Thumb Slider & Zoom
I added a Thumb Slider using part of the code from an article by Michal Brylka here on CodeProject, namely:Owner-drawn trackbar(slider) By Michal Brylka
I also used the following control for sliders on the TimeLine Control, namely: Advanced TrackBar Control with MAC Style By NicolNghiaIn order to select a video track I added buttons on the left-side of the graph. I could have used ordinary buttons but I deciided to jazz up the look of the buttons and use the skinned buttons by ZapSolution found in another project on CodeProject, namely:Skinned Form Playing Audio and OpenGL Altogasdadasdsad
Download TimeLine_src - 1.44 MB