DirectShow Editing Services (DES): moving video source clips corrupts the timeline.
- From: JyC <jeanyves.chasle@xxxxxxx>
- Date: Wed, 16 May 2012 06:35:46 -0700 (PDT)
Hello.
Using the DirectShow Editing Services (DES) to edit movie clips, I experiment strange timeline behaviors when source clips are *moved* from track to track.
I have uploaded a minimal and well commented VC++ 2003 console project (http://jeanyves.chasle.free.fr/DESTest.zip) which creates a timeline, a video group, adds two tracks and two video source clips (included, one per track), then moves one source clip from one track to the other and back, and finally drops the timeline to an xml file. Although no source clip never spans the other, the timeline eventually contains twice the *moving* source clip, the other has *disappeared*. Any attempts to ClearAllGroups() the corrupted timeline stalls the application.
As you can see in the code, in order to *move* a source file from one track to another, I simply Remove() and SetStartStop() the source object, then SrcAdd() it to the track interface. Here are the three sequential xml files that the application generates:
Step 1 (initial state):
<timeline>
<group type="video">
<track>
<clip start="0" stop="2" src="Video0.avi" mstart="0"/>
</track>
<track>
<clip start="2" stop="4" src="Video1.avi" mstart="0"/>
</track>
</group>
</timeline>
Step 2 (moving Video0 from track 0 to track 1, after Video1):
<timeline>
<group type="video">
<track/>
<track>
<clip start="2" stop="4" src="Video1.avi" mstart="0"/>
<clip start="5" stop="7" src="Video0.avi" mstart="0"/>
</track>
</group>
</timeline>
Step 3 (moving back Video0. to track 0):
<timeline>
<group type="video">
<track>
<clip start="0" stop="2" src="Video0.avi" mstart="0"/>
</track>
<track>
<clip start="0" stop="2" src="Video0.avi" mstart="0"/>
</track>
</group>
</timeline>
Hmm, twice the same source clip on both tracks, no trace of the other source, something doesn't work the way it should... Do you experiment the same problems ? Is this a known bug ?
Anyway, I'm waiting eagerly to reading from you soon.
Regards.
JyC
---
Platform: Windows XP, VC++ 2003, DirectX 9.0c SDK (Summer 2004).
And if of any use, here are my VC++ default directories:
Include directories:
D:\Program Files\Microsoft DirectX 9.0 SDK (Summer 2004)\Include
$(VCInstallDir)PlatformSDK\include
$(VCInstallDir)include
$(VCInstallDir)atlmfc\include
$(VCInstallDir)PlatformSDK\include\prerelease
$(FrameworkSDKDir)include
D:\Program Files\WTL75\include
Lib directories:
D:\Program Files\Microsoft DirectX 9.0 SDK (Summer 2004)\Lib
$(VCInstallDir)PlatformSDK\lib
$(VCInstallDir)atlmfc\lib
$(VCInstallDir)PlatformSDK\lib\prerelease
$(VCInstallDir)lib
$(FrameworkSDKDir)lib
.
- Next by Date: Re: How to draw overlay bitmap on webcam preview without VMR9?
- Next by thread: Re: How to draw overlay bitmap on webcam preview without VMR9?
- Index(es):
Relevant Pages
|