Definition at line 27 of file SegmentationRepositoryInMonet.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::QuidId(), RepMonet(), and Impala::Core::VideoSet::Segmentation::UpdateGroups(). 00028 { 00029 Connection* conn = RepMonet().GetConnection(loc); 00030 00031 String vidSetBase = FileNameBase(loc.GetDataSet()); 00032 String query = 00033 "select f.quid, fr.fragment_start, fr.fragment_length, \ 00034 fr.fragment_name \ 00035 from fragment fr, file f, video_set vs, video_sets vss \ 00036 where vss.set_name = '" + vidSetBase + "' and \ 00037 vs.video_sets_id = vss.video_sets_id and \ 00038 f.file_id = vs.file_id and \ 00039 fr.media_id = f.media_id and \ 00040 fr.fragment_length > 1 and \ 00041 fr.keyframe = false \ 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 int* length = 0; 00059 int lengthSize = 0; 00060 if (!conn->QueryPartFetchInt(hdl, 2, length, lengthSize)) 00061 return 0; 00062 00063 std::vector<String> name; 00064 if (!conn->QueryPartFetchString(hdl, 3, name)) 00065 return 0; 00066 00067 conn->QueryPartEnd(hdl); 00068 00069 Segmentation* seg = new Segmentation(vidSet, ""); 00070 for (int i=0 ; i<quidSize ; i++) 00071 { 00072 int id = QuidId(quid[i]); 00073 int end = start[i] + length[i] - 1; 00074 seg->Add(id, start[i], end, name[i]); 00075 } 00076 seg->UpdateGroups(); 00077 00078 delete quid; 00079 delete start; 00080 delete length; 00081 return seg; 00082 }
Here is the call graph for this function:
|