Hi all,
I'm working on a plug-in for Avid NewsCutter 10.5.2 and I've run into an issue. Whenever I link to an AMA clip, the program reports the current date and time as the video's creation date. I.e., if the video was created on January 7th, 2014 and I added it to my current Bin right now, it would report today's date and time instead. Does anyone know what could be causing this, or where the creation date/time is modified in the source code? Not sure what component contains this data. Any help would be great.
Thanks,
Alex
Clip creation date is stored in the CreationTime property of clip's Master Mob. To display specific creation date in a bin AMA plug-in needs to set Master Mob CreationTime to desired value in AAF metadata that the plug-in returns to AMA host via IMediaContainer::GetAAFMasterClips() .
Alexey
Right, thanks. So I see that that value is stored as an aafTime_stamp_constref - is there a way to easily convert between this struct and a FileTime or a Local Time value generated from Windows?
There's AMA::ConvertTime(const time_t, aafTimeStamp_t*) in amasdk/include/MetadataUtils.hpp.
Awesome, thanks so much. I see that the const time_t is a typedef long, do you know what value this is expecting? I'm assuming either number of seconds since 1970 or 100 nano-seconds since 1601?
time_t is the number of seconds since 01/01/1970.I just discovered that AMA::ConvertTime() for reasons yet unknown to me converts only date but not time. While we're looking at why and what we can do you can use something like this for conversion:aafTimeStamp_t aafTime;time_t osTime;struct tm* temp = gmtime(&osTime);memset(&aafTime, 0, sizeof(aafTimeStamp_t));aafTime.date.month = temp->tm_mon+1;aafTime.date.day = temp->tm_mday;aafTime.date.year = temp->tm_year + 1900;aafTime.time.hour = temp->tm_hour;aafTime.time.minute = temp->tm_min;aafTime.time.second = temp->tm_sec;
Won't this return the current time, not the file's creation time?
I ended up circumventing this by retrieving the file time and converting it to system time, and then creating an aafTimeStamp_t variable and assigning the values from system time to this aafTimeStamp_t. It's now working correctly.
© Copyright 2011 Avid Technology, Inc. Terms of Use | Privacy Policy | Site Map | Find a Reseller