A (At) 19:51 21/03/97, Wataru KAMEYAMA ecrivait (wrote):
>Hello,
>
>First of all, section 51 of MHEG-5 would help you. But, I'll try to
>answer you. Other members, please correct me if I'm wrong.
>
>Emmanuel wrote:
>> Let me take an example :
>>
>> I have 1 application group and 2 scenes.
>>
>> In the application group, I define the ObjectRef variable :
>> {:ObjectRefVar 1
>> :OrigValue :ObjectRef 1
>> }
>>
>> In scene 1 and scene 2, I have a visible with object identifier 1
>> {:Bitmap 1
>> ... // all needed attributes
>> }
>>
>>
>> * Q1 *
>> At the beginning, if I use the objectRefVar within the scene 1, which
>> object will it refer to ? The internal object 1 of the application (the var
>> itself) or the internal object 1 of the scene (the bitmap 1 of scene 1) ?
>
>According to the rule II A in section 51, the first reference shall be
>("application" 1).
In my version of the MHEG-5 standard, I have in section 51 :
II. Within an Application object,
A. Reference to an Ingredient of the Application group:
1. The GroupIdentifier may or may not be encoded.
so, if I'm reading well, both your syntax and mine are correct, aren't they ?
But anyway, following what you say any further, I understand that
ObjectRefVar is initialized to ("application" 1) at the beginning.
>> * Q2 *
>> In scene 1, I make an action ":SetVariable (("application" 1)
>> :GObjectRef 1)".
>> After this action, same question as 1, which object will it refer to ? The
>> internal object 1 of the application (the var itself considered as answer
>> A1 in the following) or the internal object 1 of the scene (the bitmap 1 of
>> scene 1 considered as answer A2) ?
>
>Because the action is included in scene 1 and because of the rule I A,
>:GObjectRef 1 shall be regarded as ("scene 1" 1).
Well, that's what I thought. Thanks for having confirmed me in this.
>> * Q3 *
>> If Q2A2,
>> I now make a transition to scene 2. Within scene 2, does the ObjectRef var
>> point to bitmap 1 of scene 1, or to bitmap 1 of scene 2 ? What is the
>> effect of using it as target of say a SetPosition action ?
>
>Now the ObjectRefVar is actually referring ("scene 1" 1). You cannot
>use it in scene 2 context.
Well, following what you say, I understand that ObjectRefVar shall always
refer to both the GroupIdentifier and the objectNumber. So, as you explain,
when the GroupIdentifier is not specified, it must be resolved at the time
the variable is initialized or set, not at the time it is used, am I right
?
Also, in the situation above, when ObjectRefVar is actually referring
("scene 1" 1), may it cause a problem for an MHEG engine to make the
transitionTo scene 2, I mean when ObjectRefVar is active (but not used
before being set) in scene 2 ?
In other words, could an MHEG engine crash because an ObjectRef variable
situated in the application refer to an object (potentially deleted)
situated in another scene (even if ObjectRefVar is not used) ?
And finally, when coming back to scene 1, would the ObjectRefVar be still
valid to use even if the object it refer to has been deleted and made
available again?
I guess there could be a problem if the engine programmer has translated
the objectRefVar to an handle on a known MHEG object and if this handle has
been disposed and then created again...
For instance, how did you make in your own engine ?
>In any case, you may encode GroupIdentifier to avoid confusion. It
>will not hurt so much the encoded object size.
Yes, I understand, but my goal was to know how ObjectRef variable shall be
stored into an MHEG engine memory and if I could build one objectRef var in
the application that I use for temporary need in pretty every scene.
Many thanks for your help.
Regards,
Emmanuel
__________________________________________________________________
Emmanuel BEUQUE Email: ebeuque@pratique.fr
mediaServ tel: +33 (0) 2 99 64 36 64
Multimedia consultant & developer fax: +33 (0) 2 99 64 36 65
__________________________________________________________________