When I add a new VideoEvent, it seems like I must specify the start time and the end time as the first and second arguments respectively. (oVideoEvent = new VideoEvent(new Timecode(), oVideoStream.Length); )
If I have X number of clips, and I want to add each to the same track one after another, is there an easy way to accomplish this? Will I have to keep track of the total time of all the events added to the track in order to determine the start point of the next event to add to the track?
Thanks.
---
function AddVideoMediaToTrack(cfilename, oVideoTrack){
var oVideoEvent = null;
var oMedia = new Media(cfilename);
if (oMedia.IsValid()){
var oVideoStream = oMedia.Streams[0];
oVideoEvent = new VideoEvent(new Timecode(), oVideoStream.Length);
oVideoTrack.Events.Add(oVideoEvent);
var oStream = oMedia.Streams.GetItemByMediaType(MediaType.Video, 0);
oVideoEvent.Takes.Add(new Take(oStream, true));
}
return oVideoEvent;
}
If I have X number of clips, and I want to add each to the same track one after another, is there an easy way to accomplish this? Will I have to keep track of the total time of all the events added to the track in order to determine the start point of the next event to add to the track?
Thanks.
---
function AddVideoMediaToTrack(cfilename, oVideoTrack){
var oVideoEvent = null;
var oMedia = new Media(cfilename);
if (oMedia.IsValid()){
var oVideoStream = oMedia.Streams[0];
oVideoEvent = new VideoEvent(new Timecode(), oVideoStream.Length);
oVideoTrack.Events.Add(oVideoEvent);
var oStream = oMedia.Streams.GetItemByMediaType(MediaType.Video, 0);
oVideoEvent.Takes.Add(new Take(oStream, true));
}
return oVideoEvent;
}