📄 smlelem.cpp
字号:
pAnc->m_tag == SMILAnimation || pAnc->m_tag == SMILTextstream || pAnc->m_tag == SMILBrush || pAnc->m_tag == SMILPrefetch) && bLegalMediaObjectChild) { pRet = pAnc->m_pElement; break; } pAnc = pAnc->m_pParent; } } return pRet;}BOOL CSmilElement::hasEventBasedEndTime(){ BOOL bRet = FALSE; if (m_pEndTimeList) { LISTPOSITION pos = m_pEndTimeList->GetHeadPosition(); while (pos) { SmilTimeValue* pValue = (SmilTimeValue*) m_pEndTimeList->GetNext(pos); if (pValue && pValue->m_type == SmilTimeEvent) { bRet = TRUE; break; } } } return bRet;}HX_RESULT CSmilElement::GetElementProperties(REF(IHXValues*) pProperties){ HX_RESULT rc = HXR_OK; BOOL bDone = FALSE; ElementWithinTag elementWithinTag = WithinUnknown; SMILNode* pNode = m_pNode; HX_ASSERT(pNode); while (pNode->m_pParent && !bDone) { switch (pNode->m_pParent->m_tag) { case SMILPar: if (elementWithinTag == WithinSeq) { elementWithinTag = WithinSeqInPar; } else { elementWithinTag = WithinPar; } bDone = TRUE; break; case SMILSeq: elementWithinTag = WithinSeq; break; default: break; } pNode = pNode->m_pParent; } pProperties = new CHXHeader(); pProperties->AddRef(); pProperties->SetPropertyULONG32("ElementWithinTag", elementWithinTag); pProperties->SetPropertyULONG32("Delay", m_ulDelay); if (m_bHasExplicitDur) { pProperties->SetPropertyULONG32("Duration", m_ulDuration); } return rc;}voidCSmilElement::checkElementFillBehavior(){ if (m_pTimelineElement) { m_pTimelineElement->checkElementFillBehavior(); }}/* * CSmilRootLayout methods */CSmilRootLayout::CSmilRootLayout(SMILNode* pNode) : CSmilElement(pNode){ m_dWidth = 0.0; m_eWidthType = CSS2TypeAuto; m_dHeight = 0.0; m_eWidthType = CSS2TypeAuto; m_ulBackgroundColor = 0; m_eBackgroundColorType = CSS2TypeTransparent; m_eResizeBehavior = ResizeZoom; m_eContextWindow = ContextWindowAuto;}CSmilRootLayout::~CSmilRootLayout(){}HX_RESULTCSmilRootLayout::handleElement(){ HX_RESULT rc = HXR_OK; if(m_pHandler) { rc = m_pHandler->handleRootLayout(this); } return rc;}/* * CSmilRegion methods */CSmilRegion::CSmilRegion(SMILNode* pNode) : CSmilElement(pNode){ m_Rect.m_dLeft = 0.0; m_Rect.m_eLeftType = CSS2TypeAuto; m_Rect.m_dTop = 0.0; m_Rect.m_eTopType = CSS2TypeAuto; m_Rect.m_dRight = 0.0; m_Rect.m_eRightType = CSS2TypeAuto; m_Rect.m_dBottom = 0.0; m_Rect.m_eBottomType = CSS2TypeAuto; m_Rect.m_dWidth = 0.0; m_Rect.m_eWidthType = CSS2TypeAuto; m_Rect.m_dHeight = 0.0; m_Rect.m_eHeightType = CSS2TypeAuto; m_lZIndex = 0; m_eZIndexType = CSS2TypeAuto; m_eFit = FitHidden; m_eShowBackground = ShowBackgroundAlways; m_ulBackgroundColor = 0xFF000000; m_eBackgroundColorType = CSS2TypeTransparent; m_dSoundLevel = 100.0; m_bRegionNameSpecified = FALSE;}CSmilRegion::~CSmilRegion(){}HX_RESULTCSmilRegion::handleElement(){ HX_RESULT rc = HXR_OK; if(m_pHandler) { rc = m_pHandler->handleRegion(this); } return rc;}CSmilRegPoint::CSmilRegPoint(SMILNode* pNode) : CSmilElement(pNode){ m_RegPoint.m_dLeft = 0.0; m_RegPoint.m_eLeftType = CSS2TypeAuto; m_RegPoint.m_dTop = 0.0; m_RegPoint.m_eTopType = CSS2TypeAuto; m_RegPoint.m_dRight = 0.0; m_RegPoint.m_eRightType = CSS2TypeAuto; m_RegPoint.m_dBottom = 0.0; m_RegPoint.m_eBottomType = CSS2TypeAuto; m_RegPoint.m_eRegAlign = RegAlignTopLeft;}CSmilRegPoint::~CSmilRegPoint(){}HX_RESULTCSmilRegPoint::handleElement(){ HX_RESULT rc = HXR_OK; if(m_pHandler) { rc = m_pHandler->handleRegPoint(this); } return rc;}#if defined(HELIX_FEATURE_SMIL2_MULTIWINDOWLAYOUT)CSmilViewport::CSmilViewport(SMILNode* pNode) : CSmilElement(pNode){ m_ulBackgroundColor = 0; m_eBackgroundColorType = CSS2TypeTransparent; m_dWidth = 0.0; m_eWidthType = CSS2TypeAuto; m_dHeight = 0.0; m_eHeightType = CSS2TypeAuto; m_eOpen = ViewportOpenOnStart; m_eClose = ViewportCloseOnRequest; m_eResizeBehavior = ResizeZoom; m_eContextWindow = ContextWindowAuto;}CSmilViewport::~CSmilViewport(){}HX_RESULTCSmilViewport::handleElement(){ HX_RESULT rc = HXR_OK; if(m_pHandler) { rc = m_pHandler->handleViewport(this); } return rc;}#endif /* #if defined(HELIX_FEATURE_SMIL2_MULTIWINDOWLAYOUT) *//* * CSmilMeta methods */CSmilMeta::CSmilMeta(SMILNode* pNode): CSmilElement(pNode){}CSmilMeta::~CSmilMeta(){}HX_RESULTCSmilMeta::handleElement(){ HX_RESULT rc = HXR_OK; if(m_pHandler) { rc = m_pHandler->handleMeta(this); } return rc;}/* * CSmilMetadata methods */CSmilMetadata::CSmilMetadata(SMILNode* pNode): CSmilElement(pNode){}CSmilMetadata::~CSmilMetadata(){}HX_RESULTCSmilMetadata::handleElement(){ HX_RESULT rc = HXR_OK; if(m_pHandler) { rc = m_pHandler->handleMetadata(this); } return rc;}/* * CSmilRendererPreFetch methods */CSmilRendererPreFetch::CSmilRendererPreFetch(SMILNode* pNode): CSmilElement(pNode){}CSmilRendererPreFetch::~CSmilRendererPreFetch(){}HX_RESULTCSmilRendererPreFetch::handleElement(){ HX_RESULT rc = HXR_OK; if(m_pHandler) { rc = m_pHandler->handleRendererPreFetch(this); } return rc;}/* * CSmilEndLayout methods */CSmilEndLayout::CSmilEndLayout(): CSmilElement(NULL){}CSmilEndLayout::~CSmilEndLayout(){}HX_RESULTCSmilEndLayout::handleElement(){ HX_RESULT rc = HXR_OK; if(m_pHandler) { rc = m_pHandler->handleEndLayout(this); } return rc;}/* * CSmilMetaValues methods */CSmilMetaValues::CSmilMetaValues(): CSmilElement(NULL), m_pValues(0){}CSmilMetaValues::~CSmilMetaValues(){ HX_RELEASE(m_pValues);}/* * CSmilCustomTest methods: */CSmilCustomTest::CSmilCustomTest(SMILNode* pNode) : CSmilElement(pNode) , m_bDefaultState(FALSE) , m_bOverrideVisible(FALSE){}CSmilCustomTest::~CSmilCustomTest(){}/* * CSmilSource methods */CSmilSource::CSmilSource(SMILNode* pNode): CSmilElement(pNode){ m_ulColor = 0; m_eColorType = CSS2TypeTransparent; m_Rect.m_dLeft = 0.0; m_Rect.m_eLeftType = CSS2TypeAuto; m_Rect.m_dTop = 0.0; m_Rect.m_eTopType = CSS2TypeAuto; m_Rect.m_dRight = 0.0; m_Rect.m_eRightType = CSS2TypeAuto; m_Rect.m_dBottom = 0.0; m_Rect.m_eBottomType = CSS2TypeAuto; m_Rect.m_dWidth = 0.0; m_Rect.m_eWidthType = CSS2TypeAuto; m_Rect.m_dHeight = 0.0; m_Rect.m_eHeightType = CSS2TypeAuto; m_lZIndex = 0; m_eZIndexType = CSS2TypeAuto; m_eFit = FitHidden; m_bFitSpecified = FALSE; m_ulBackgroundColor = 0; m_eBackgroundColorType = CSS2TypeTransparent; m_bRegPointIsPredef = TRUE; m_ePredefRegPoint = RegAlignTopLeft; m_eRegAlign = RegAlignTopLeft; m_bRegAlignSpecified = FALSE; m_bBackgroundOpacitySpecified = FALSE; m_ulBackgroundOpacity = 255; m_bMediaOpacitySpecified = FALSE; m_ulMediaOpacity = 255; m_bChromaKeySpecified = FALSE; m_ulChromaKey = 0; m_ulChromaKeyTolerance = 0; m_ulChromaKeyOpacity = 0; m_bAudioDeviceReflushHintNeeded = FALSE; m_eHandledBy = HandledByAuto; m_bBackgroundColorSpecified = FALSE; m_ulLinkTargetDestnLevel_pct = 100; m_ulLinkTargetSourceLevel_pct = 100; m_ulPrefetchAmount = 0; m_typeOfPrefetchAmount = PrefetchUnknown;}CSmilSource::~CSmilSource(){}HX_RESULTCSmilSource::handleElement(){ HX_RESULT rc = HXR_OK; if(m_pHandler) { rc = m_pHandler->handleSource(this); } return rc;}voidCSmilSource::setRange(const char* pRange){ // parse smpte/npt ranges: // smpte:12:03:14.21-12:15:26.03 // npt:3:02.5-4:38.6 // char* pPtr = (char *)strstr(pRange, "npt:"); if(pPtr) { pPtr += 4; // point to beginning of range char* pHyphen = (char *)strchr(pRange, '-'); // find '-' if(pHyphen > pPtr) { NPTime beginTime((const char*)CHXString(pPtr, pHyphen-pPtr)); m_ulAuthoredClipBegin = (UINT32)beginTime; m_ulClipBegin = m_ulAuthoredClipBegin; if(strlen(pHyphen+1) > 0) { NPTime endTime((const char*)CHXString(pHyphen+1)); m_ulClipEnd = (UINT32)endTime; } } else if(pHyphen) { NPTime endTime((const char*)CHXString(pHyphen+1)); m_ulClipEnd = (UINT32)endTime; } } else { pPtr = (char *)strstr(pRange, "smpte:"); if(pPtr) { pPtr += 6; // point to beginning of range char* pHyphen = (char *)strchr(pRange, '-'); // find '-' if(pHyphen > pPtr) {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -