InitialObjectDescriptor {
  objectDescriptorID 1
  ODProfileLevelIndication 0xFF
  sceneProfileLevelIndication 0xFE
  audioProfileLevelIndication 0xFF
  visualProfileLevelIndication 0xFE
  graphicsProfileLevelIndication 0xFE

  esdescr [
    ES_Descriptor {
      es_id 1
      decConfigDescr DecoderConfigDescriptor {
				streamType 3
				decSpecificInfo BIFSConfig {
				  isCommandStream true
				  pixelMetric true
				  pixelWidth 600
				  pixelHeight 400
				}
      }
    }
    ES_Descriptor {
      es_id 2
      decConfigDescr DecoderConfigDescriptor {
				streamType 1
      }
    }
  ]
}

OrderedGroup {
 children [
  DEF B1 Background2D {backColor 1 1 1}
  WorldInfo {
   title "Nested Clipping - Layer2D"
   info [
    "This test shows nested Layer2D nodes." 
    "Both layer sizes are animated" 
    "" 
    "GPAC Regression Tests" "$Date: 2007-07-27 09:46:07 $ - $Revision: 1.3 $" 
    "(C) 2002-2006 GPAC Team"
   ]
  }

  Transform2D {
   translation 100 0
   children [
    DEF L1 Layer2D {
     size 300 300
     background Background2D {url 10}
     children [
      Shape {
       appearance Appearance { material Material2D { filled TRUE } }
       geometry DEF RC Rectangle {size 100 75}
      }
      Transform2D {
       translation -150 0
       children [
      	DEF L2 Layer2D {
         size 100 100
		     background Background2D {backColor 0 0 1}
      	 children [
				  Shape {
				   appearance Appearance { material Material2D { emissiveColor 1 0 0 filled TRUE } }
				   geometry Circle {radius 20}
				  }
				 ]
				}
       ]
     	}
     ]
    }
   ]
  }
  DEF TS TimeSensor {
   cycleInterval 2.0
   loop TRUE
  }
  DEF PI1 PositionInterpolator2D {
   key [0.0 1.0]
   keyValue [400.0 300.0 0.0 0.0]
  }
  DEF PI2 PositionInterpolator2D {
   key [0.0 1.0]
   keyValue [100.0 100.0 0.0 0.0]
  }
 ]
}


ROUTE TS.fraction_changed TO PI1.set_fraction
ROUTE PI1.value_changed TO L1.size
ROUTE TS.fraction_changed TO PI2.set_fraction
ROUTE PI2.value_changed TO L2.size

AT 0 {
	UPDATE OD [
		ObjectDescriptor {
		  objectDescriptorID  10
		  esDescr [
		    ES_Descriptor {
		      ES_ID 20
		      muxInfo MuxInfo {
		       fileName "./../auxiliary_files/sky.jpg"
		      }
		    }
		  ]
		}
	]
}

