Definition at line 29 of file KeyframesRepositoryInMonet.h. References Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Add(), Impala::FileNameBase(), Impala::Persistency::RepositoryInMonetDB::GetConnection(), Impala::Persistency::Locator::GetDataSet(), Impala::Persistency::Locator::GetProtocolAndHost(), Impala::QuidId(), RepMonet(), and Impala::Core::VideoSet::Keyframes::UpdateGroups(). 00030 { 00031 Connection* conn = RepMonet().GetConnection(loc); 00032 00033 String vidSetBase = FileNameBase(loc.GetDataSet()); 00034 String query = 00035 "select f.quid, fr.fragment_start, fr.fragment_name \ 00036 from fragment fr, file f, video_set vs, video_sets vss \ 00037 where vss.set_name = '" + vidSetBase + "' and \ 00038 vs.video_sets_id = vss.video_sets_id and \ 00039 f.file_id = vs.file_id and \ 00040 fr.media_id = f.media_id and \ 00041 fr.keyframe = true \ 00042 order by f.quid, fr.fragment_start;"; 00043 00044 MapiHdl hdl = conn->QueryPartStart(query); 00045 if (hdl == 0) 00046 return 0; 00047 00048 Quid* quid = 0; 00049 int quidSize = 0; 00050 if (!conn->QueryPartFetchULL(hdl, 0, quid, quidSize)) 00051 return 0; 00052 00053 int* start = 0; 00054 int startSize = 0; 00055 if (!conn->QueryPartFetchInt(hdl, 1, start, startSize)) 00056 return 0; 00057 00058 std::vector<String> name; 00059 if (!conn->QueryPartFetchString(hdl, 2, name)) 00060 return 0; 00061 00062 conn->QueryPartEnd(hdl); 00063 00064 SegmentationLocator segLoc(loc.GetProtocolAndHost(), loc.GetDataSet(), 00065 "segmentation"); 00066 Segmentation* seg = SegmentationRepository().Get(segLoc, vidSet); 00067 Keyframes* keys = new Keyframes(vidSet, ""); 00068 for (int i=0 ; i<quidSize ; i++) 00069 { 00070 int vidId = QuidId(quid[i]); 00071 int shotId = seg->GetShotId(vidId, start[i]); 00072 keys->Add(vidId, shotId, start[i], name[i]); 00073 } 00074 keys->UpdateGroups(); 00075 delete seg; 00076 00077 delete quid; 00078 delete start; 00079 return keys; 00080 }
Here is the call graph for this function:
|