对象定义:
MasterMob位置essence data
SourceMob描述essence data
CompostionMob描述一个Compostion,引用MasterMobs
SourceClip表现为content data,并引用SourceMob
TimelineMobSlot描述时间变化。代表一个track
#调研 通过查看,xxx的PPT文件,确定MasterMob是一个重要的内容
通过查看MasterMob的属性与方法,结合test示例,尝试进行操作
# MasterMob
masterMob = MasterMob(aaf_file, "MasterMob Build")
aaf_file.storage.add_mob(masterMob)
locator = NetworkLocator(aaf_file,path="D:\ZhanPeng\Source\IMG_3713.mov")
masterMob.create_essence(slot_index=0, media_kind="picture", codec_name="JPEG", edit_rate=24, sample_rate=24, compress=False, locator=locator)
for slot in masterMob.slots():
print str(slot) + " | " + str(slot.slotID)
master_clip = masterMob.create_clip(slot.slotID, 10, 0)
...
sequence.append(master_clip)
来源:oschina
链接:https://my.oschina.net/u/52678/blog/736162