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

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

Group { 
children [

  Background2D {
   backColor 1 1 1
  }
  Viewpoint {}
  WorldInfo {
   info ["This shows spinning cubes with image and video textures" "GPAC Regression Tests" "$Date: 2008-11-24 14:58:25 $ - $Revision: 1.5 $" "(C) 2002-2004 GPAC Team"]
   title "Cube, Texture Test"
  }

	DEF TR Transform {
		rotation 1 1 1 0.5
		children [
			Transform {
				children [
					DEF Red Transform {
						children [
							Shape {
								appearance  DEF Red-App Appearance {
									material Material {
										diffuseColor 1.0 0.0 0.0
									}
									texture ImageTexture {  url "5" }
								}
								geometry Box { }
							}
						]
					}
					Transform { translation  2.0  2.0  0.0 children [ USE Red ] }
					Transform { translation -2.0  2.0  0.0 children [USE Red ] }
					Transform { translation  2.0 -2.0  0.0 children [USE Red ]}
					Transform { translation -2.0 -2.0  0.0 children [USE Red ]}
					Transform { translation  0.0 -2.0  2.0 children [USE Red ]}
					Transform { translation  0.0  2.0  2.0 children [USE Red ]}
					Transform { translation  2.0  0.0  2.0 children [USE Red ]}
					Transform { translation -2.0  0.0  2.0 children [USE Red ]}
					Transform { translation  0.0 -2.0 -2.0 children [USE Red ]}
					Transform { translation  0.0  2.0 -2.0 children [USE Red ]}
					Transform { translation  2.0  0.0 -2.0 children [USE Red ]}
					Transform { translation -2.0  0.0 -2.0 children [USE Red ]}
				]
			}
			
			Transform {
				children [
					DEF Blue Transform {
						translation 2.0 0.0 0.0
						children [
							Shape {
								appearance DEF Blue-App Appearance {
									material Material {
										diffuseColor 0.0 0.0 1.0
									}
									texture	DEF M2 MovieTexture { url "10" loop TRUE }
								}
								geometry Box { }
							}
						]
					}
					Transform { translation -4.0  0.0  0.0 children [USE Blue] }
					Transform { translation -2.0  0.0  2.0 children [USE Blue] }
					Transform { translation -2.0  0.0 -2.0 children [USE Blue] }
					Transform { translation -2.0  2.0  0.0 children [USE Blue] }
					Transform { translation -2.0 -2.0  0.0 children [USE Blue] }
					Transform { translation  0.0  2.0  2.0 children [USE Blue] }
					Transform { translation  0.0  2.0 -2.0 children [USE Blue] }
					Transform { translation -4.0  2.0  2.0 children [USE Blue] }
					Transform { translation -4.0  2.0 -2.0 children [USE Blue] }
					Transform { translation  0.0 -2.0  2.0 children [USE Blue] }
					Transform { translation  0.0 -2.0 -2.0 children [USE Blue] }
					Transform { translation -4.0 -2.0  2.0 children [USE Blue] }
					Transform { translation -4.0 -2.0 -2.0 children [USE Blue] }
				]
			}

			DEF Clock TimeSensor {
				cycleInterval 3.0
				loop FALSE
			}

			DEF Trigger TimeSensor {
				loop TRUE
				cycleInterval 5.0
			}

			DEF RedScale PositionInterpolator {
				key [ 0.0, 0.5, 1.0 ]
				keyValue [
					1.0 1.0 1.0,
					0.0001 0.0001 0.0001,
					1.0 1.0 1.0,
				]
			}

			DEF BlueScale PositionInterpolator {
				key [ 0.0, 0.25, 0.5, 0.75, 1.0 ]
				keyValue [
					1.0 1.0 1.0,
					0.0001 0.0001 0.0001,
					1.0 1.0 1.0,
					0.0001 0.0001 0.0001,
					1.0 1.0 1.0,
				]
			}
		]
	}

  DEF TS TimeSensor { cycleInterval 2.0 loop TRUE }
  DEF OI OrientationInterpolator  {
  	key [0 0.5 1]
  	keyValue [1 1 1 0, 1 1 1 3.14, 1 1 1 6.26]
 	}

]
}

ROUTE TS.fraction_changed TO OI.set_fraction
ROUTE OI.value_changed TO TR.rotation
ROUTE Trigger.cycleTime       TO Clock.startTime
ROUTE Clock.fraction_changed  TO RedScale.set_fraction
ROUTE Clock.fraction_changed  TO BlueScale.set_fraction
ROUTE RedScale.value_changed  TO Red.scale
ROUTE BlueScale.value_changed TO Blue.scale

AT 0 {
	UPDATE OD [
		ObjectDescriptor {
		  objectDescriptorID  10
		  esDescr [
		    ES_Descriptor {
		      ES_ID 20
		      OCR_ES_ID 20
		      muxInfo MuxInfo {
		       fileName "../auxiliary_files/enst_video.h264"
		      }
		    }
		  ]
		}
		ObjectDescriptor {
		  objectDescriptorID  5
		  esDescr [
		    ES_Descriptor {
		      ES_ID 10
		      muxInfo MuxInfo {
						fileName "../auxiliary_files/logo.jpg"
		      }
		    }
		  ]
		}
	]
}

