Definition at line 779 of file Mpeg7Doc.h. References ExportMediaTime(), HasAnnotations(), HasFeatures(), Impala::MakeString(), mAnnotation, mConfidence, mEndFrame, mFeatureName, mFeatureValues, mKeyframeFrame, mKeyframeName, mOriginalHadKeyframes, mRelevance, mShotName, mStartFrame, and Impala::Util::IOBuffer::Puts(). Referenced by ExportXml(). 00780 { 00781 ioBuf->Puts("<VideoSegment id=\"" + mShotName[idx] + "\">"); 00782 ExportMediaTime(ioBuf, mStartFrame[idx], 00783 mEndFrame[idx] - mStartFrame[idx] + 1); 00784 if (HasAnnotations()) 00785 { 00786 String r = "relevance=\"" + MakeString(mRelevance[idx]) + "\""; 00787 String c = "confidence=\"" + MakeString(mConfidence[idx]) + "\""; 00788 ioBuf->Puts("<TextAnnotation " + r + " " + c + ">"); 00789 ioBuf->Puts("<KeywordAnnotation>"); 00790 ioBuf->Puts("<Keyword>" + mAnnotation[idx] + "</Keyword>"); 00791 ioBuf->Puts("</KeywordAnnotation>"); 00792 ioBuf->Puts("</TextAnnotation>"); 00793 00794 } 00795 if (mOriginalHadKeyframes) 00796 { 00797 ioBuf->Puts("<TemporalDecomposition>"); 00798 std::vector<String> names = mKeyframeName[idx]; 00799 std::vector<int> frames = mKeyframeFrame[idx]; 00800 for (int i=0 ; i<names.size() ; i++) 00801 { 00802 ioBuf->Puts("<VideoSegment id=\"" + names[i] + "\">"); 00803 ExportMediaTime(ioBuf, frames[i], -1); 00804 ioBuf->Puts("</VideoSegment>"); 00805 } 00806 ioBuf->Puts("</TemporalDecomposition>"); 00807 } 00808 if (HasFeatures()) 00809 { 00810 ioBuf->Puts("<DescriptorUnit xsi:type=\"DescriptorCollectionType\">"); 00811 ioBuf->Puts("<Descriptor xsi:type=\"" + mFeatureName[idx] + "\">"); 00812 ioBuf->Puts("<Coefficients>"); 00813 std::vector<double> v = mFeatureValues[idx]; 00814 int nr = 0; 00815 String s; 00816 for (int i=0 ; i<v.size() ; i++) 00817 { 00818 s += MakeString(v[i]) + " "; 00819 if (++nr == 10) 00820 { 00821 ioBuf->Puts(s); 00822 s = ""; 00823 nr = 0; 00824 } 00825 } 00826 if (nr != 0) 00827 ioBuf->Puts(s); 00828 ioBuf->Puts("</Coefficients>"); 00829 ioBuf->Puts("</Descriptor>"); 00830 ioBuf->Puts("</DescriptorUnit>"); 00831 00832 } 00833 ioBuf->Puts("</VideoSegment>"); 00834 }
Here is the call graph for this function:
|