public override void Perform(MHEngine engine) { MHObjectRef target = new MHObjectRef(); m_Target.GetValue(target, engine); // Get the target if (m_fIsIncluded) { // Included content MHOctetString included = new MHOctetString(); m_Included.GetValue(included, engine); engine.FindObject(target).SetData(included, engine); } else { MHContentRef referenced = new MHContentRef(); int size, cc; m_Referenced.GetValue(referenced, engine); if (m_fSizePresent) { size = m_ContentSize.GetValue(engine); } else { size = 0; } if (m_fCCPriorityPresent) { cc = m_CCPriority.GetValue(engine); } else { cc = 0; } engine.FindObject(target).SetData(referenced, m_fSizePresent, size, m_fCCPriorityPresent, cc, engine); } }
public MHVideo() { m_Termination = VI_Disappear; m_nXDecodeOffset = 0; m_nYDecodeOffset = 0; m_nDecodeWidth = 0; m_nDecodeHeight = 0; m_streamContentRef = new MHContentRef(); }
public override void SetData(MHContentRef referenced, bool fSizeGiven, int size, bool fCCGiven, int cc, MHEngine engine) { Logging.Assert(m_ContentType == IN_ReferencedContent); m_ContentRef.Copy(referenced); m_nContentSize = size; if (fCCGiven) { m_nCCPrio = m_nOrigCCPrio; } ContentPreparation(engine); }
public MHIngredient() { m_fInitiallyActive = true; // Default is true m_nContentHook = 0; // Need to choose a value that isn't otherwise used m_fShared = false; m_nOrigContentSize = 0; m_nOrigCCPrio = 127; // Default. m_ContentType = IN_NoContent; m_OrigIncludedContent = new MHOctetString(); m_OrigContentRef = new MHContentRef(); m_IncludedContent = new MHOctetString(); m_ContentRef = new MHContentRef(); }
public virtual void CastToContentRef(MHObjectRef success, MHSequence <MHParameter> args, MHEngine engine) { // Converts a string to a ContentRef. if (args.Size == 2) { MHOctetString str = new MHOctetString(); GetString(args.GetAt(0), str, engine); MHContentRef result = new MHContentRef(); result.ContentRef.Copy(str); engine.FindObject(args.GetAt(1).GetReference()).SetVariableValue(new MHUnion(result)); SetSuccessFlag(success, true, engine); } else { SetSuccessFlag(success, false, engine); } }
public override void SetStreamRef(MHContentRef contentRef) { m_streamContentRef.Copy(contentRef); }
// Additional actions for stream components. public virtual void SetStreamRef(MHContentRef contentRef) { // Empty }
public MHAudio() { m_streamContentRef = new MHContentRef(); m_nOriginalVol = 0; m_fStreamPlaying = false; }
public MHContentRefVar() { m_OriginalValue = new MHContentRef(); m_Value = new MHContentRef(); }