InitialObjectDescriptor {
 objectDescriptorID 1
 audioProfileLevelIndication 255
 visualProfileLevelIndication 254
 sceneProfileLevelIndication 1
 graphicsProfileLevelIndication 1
 ODProfileLevelIndication 1
 includeInlineProfileLevelFlag true
 esDescr [
  ES_Descriptor {
   ES_ID 1
   decConfigDescr DecoderConfigDescriptor {
    streamType 3
    decSpecificInfo BIFSConfig {
     isCommandStream true
     pixelMetric true
     pixelWidth 400
     pixelHeight 400
    }
   }
  }
  ES_Descriptor {
   ES_ID 2
   decConfigDescr DecoderConfigDescriptor {
    streamType 1
   }
  }
 ]
}

OrderedGroup {
 children [
  Background2D {
   backColor 0 1 0
  }
  WorldInfo {
   info ["This shows an AnimationStream node" "controling a 3GPP text stream" "" "GPAC Regression Tests" "$Date: 2007-07-27 09:46:10 $ - $Revision: 1.2 $" "(C) 2002-2005 GPAC Team"]
   title "3GPP Text Switch"
  }

  Transform2D {
   translation -50 0
   children [
    DEF TS1 TouchSensor {}
    Shape {
     appearance Appearance {
      material Material2D {
       emissiveColor 1 0 0
       filled TRUE
      }
     }
     geometry Rectangle {
      size 75 50
     }
    }
    Shape {
     appearance DEF APP Appearance {
      material Material2D {
       emissiveColor 0 0 0
       filled TRUE
      }
     }
     geometry Text {
      string ["English"]
      fontStyle DEF FS FontStyle {
       justify ["MIDDLE" "MIDDLE"]
       size 18
      }
     }
    }
   ]
  }
  Transform2D {
   translation 50 0
   children [
    DEF TS2 TouchSensor {}
    Shape {
     appearance Appearance {
      material Material2D {
       emissiveColor 0 0 1
       filled TRUE
      }
     }
     geometry Rectangle {
      size 75 50
     }
    }
    Shape {
     appearance USE APP
     geometry Text {
      string ["French"]
      fontStyle USE FS
     }
    }
   ]
  } 
  
  DEF AS AnimationStream {
   loop TRUE
   url [od:20]
  }
  DEF C1 Conditional { buffer {
   REPLACE AS.stopTime BY 0
   REPLACE AS.url BY ["od:10"]
   REPLACE AS.startTime BY 0
    } 
  }
  DEF C2 Conditional { buffer {
   REPLACE AS.stopTime BY 0
   REPLACE AS.url BY ["od:20"]
   REPLACE AS.startTime BY 0
  } }
 ]
}

ROUTE TS1.isActive TO C1.activate
ROUTE TS2.isActive TO C2.activate


RAP AT 0 {
  UPDATE OD [
   ObjectDescriptor {
    objectDescriptorID 10
    esDescr [
     ES_Descriptor {
      ES_ID 5
      OCR_ES_ID 5
      muxInfo MuxInfo { fileName "../auxiliary_files/subtitle.srt" }
     }
    ]
   }
   ObjectDescriptor {
    objectDescriptorID 20
    esDescr [
     ES_Descriptor {
      ES_ID 6
      OCR_ES_ID 6
      muxInfo MuxInfo { fileName "../auxiliary_files/subtitle_fr.srt" }
     }
    ]
   }
  ]
}
