1) Short answer: Yes it is possible to get the timeline in/out, but only under specific circumstances and with a lot of coding. I wouldn't really recommend it. Can you explain how this is important to your workflow?
An importer can get access to the timeline, but it only gets a reference to the timeline during imGetPrefs8 (when the user has double-clicked the clip in the timeline). Also, in the timeline, the importer can only identify it's clip in the timeline if the file exists on disk, and if there is only one instance of that clip in the timeline.
In the imGetPrefsRec, the timelineData member provides this access. This PrTimelineID can be used with the Video Segment Suite to get access to the timeline, parse it, and locate the clip. It's quite involving but possible. The VideoSequenceParser::ParseSequence() code in Utils/SDK_Segment_Utils.cpp demonstrates how to parse the timeline. You'll need to find the media node by looking for the one with the filepath that the custom importer uses. From there, you can query the properties of the media node to find the in/out point.
2) You can't drive timeline playback from a plug-in at this point.
I really appreciate your reply, I will look for VideoSegmentSuite to get the in/out point.
Q: Why we need timeline in/out of title clip ?
A: Our titler could do animation, when user strench title clip in timeline, clip's length will be changed, we hope we could scale animiation to fit the new length. ( I means animation will be slower or faster with new length), in imImporterImageRec, there is a in/out point and postion, but, we found they are not correct in sometimes, and SDK help PDF tell me there is a API bug in it, is it fixed or not ?
In another, in ImportImage API, we use (Rec->pos + Rec->in) / Rec->sampleSize to get real frame number for out title clip rendering when our title is imNoDurationNoDefault, we test it, it seems that it is right. But if our title is imNoDurationStillDefault, then Rec->pos and Rec->in and Rec->out are all based 90000+, and Rec->out was not right in some times (when we strench clip's outpoint in timeline), it is a bug or we missed something ? In this situation, we have to use (Rec->pos - Rec->in) / Rec->sampleSize to get the rendering frame number, it seems that it is right too. But, we could not use Rec->out, because it was wrong in sometimes.
1) When we dragdrop our title files to timeline directly from windows explorer, Premiere will call imGetInfo8 (in here, we will allocate a private data for this clip), imOpenFile8, and there is no chance to call imGetPrefs8, so, when we close Premiere, imCloseFile will not be called for this clip, memory leaks for our private data. If we drag the title files to Premiere Bin firstly, then Premiere will call imGetPrefs8, imGetInfo8, imOpenFile8, there is no problem, imCloseFile will be called when we release this title clip.
So, my conclusion is: Premiere must call imGetPrefs8, else imCloseFile will not be called, I think it was a bug, isnot it?
2) We have a title template library (they are all based template title file), and, we use OLE dragdrop (COleDataSource->DoDragDrop), when we drag-drop these files to Premiere Bin/Timeline/SourceMonitor/TargetMonitor, there is a lots of memory leaks in oledobj2.cpp (microsoft source code files for COleDataSource), we are sure our code is correct, because if we dragdrop to our windows or other NLE (for example, EDIUS), there is not any problem. So, I guess, because we use MFC, and Premiere did not support it fully? Do you have see this problem before ? Do you have another suggestion to do these drag-drops ?
3) About to get sequence start timecode, we see a thread in forum which said there is new sdk headers, use them, we could get it through PrSDKSequenceInfoSuite. But its downloading link is broken, so, how to get new SDK headers? could you give me a new link to download ?
BTW, we are useing CS6 SDK Release2 + CS6, and will upgrade to 6.03 to test.
Thank you very much. and Sorry for these lots of questions, I am new guy in Premiere plug-ins developing.
Just a quick response right now, sorry I'm in the middle of a project.
1) This does sound like a possible bug. I will check it out soon.
3) I've updated the download link here: http://forums.adobe.com/message/5022929#5022929
I did not know why I could not access the link, so, please, could you send these files to my mail ? firstname.lastname@example.org.
Thank you very much.
I had get the clip's timeline in out point through VideoSegmentSuite, but I have to analyse all segment, and find the segments which contains my title clip, and then combine its start time and end time to work out the clip's in out. It seems that no direct access property, is not it ?
Update message, I had successed to download that file about SequenceInfoSuite, thank you very much.