Le 26 oct. 2014 à 11:11, Christian Schmitz a écrit:

>> Hello,
>> The QTChapterTrackMBS has methods to get the chapters, but not to add them 
>> (and getting them doesn't work, as I tried, BTW; I get binary data which 
>> make no sense, even talking about zip files…?).
> 
> Well, last time I tried it, it worked. Not sure what happens for you.

Yes, I don't know where the data I get are taken from. It even contains 
references of “Path Finder”, an app that I'm using, but which I highly doubt 
the movie needs a reference to.
In case you wonder whether the function may get bad results, here's the code I 
tried (so you may get reassured about your plugin if you find that my code is 
just wrong ;-) ):
  dim c As QTChapterTrackMBS
  dim e As EditableMovie
  dim f As FolderItem
  
  f=GetOpenFolderItem("QuickTime Movies")
  if f<>nil then
    e=f.OpenEditableMovie
    if e<>nil then
      c=e.ChapterTrackMBS
      if c<>nil then
        for i as Integer=1 to c.ChapterCount
          MsgBox c.ChapterText(i)
        next
      end if
    end if
  end if

>> The class it adds to the movie (QTChapterDataMBS) has just one property that 
>> deals with timing (FrameDuration).
> 
> yes. Track has a start time like any track. Change with QTTrackMBS.TimeOffset.
> 
>> However, this is the duration of the chapter, not it's actual position.
> 
> Position of one chapter is sum of durations of previous chapters plus track 
> start time.

Ok, hmm… mathematically, I can remember the last marker's position and (for the 
start one) compute the gap length and (for the end one) get the 
track-to-be-added's length. I'd stack the chapters.
The only doubt I have still is the unit (sometimes QT functions take an 
absolute time in seconds, sometimes it's a time calculated considering the 
sample rate); I'll try both, unless you answer faster than I code, which is 
likely to happen ;-)

Thank you.
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to