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

OrderedGroup {
 children [
  Background2D {
   backColor 1 1 1
  }
  WorldInfo {
   info ["This shows MediaControl" "controling video playback speed" "" "GPAC Regression Tests" "$Date: 2007-07-27 09:46:10 $ - $Revision: 1.3 $" "(C) 2002-2004 GPAC Team"]
   title "Media Control Test"
  }
  DEF MC MediaControl {
   url [od:8]
   loop TRUE
  }
  Transform2D {
   translation -100 -65
   children [
    DEF TS1 TouchSensor {}
    Shape {
     appearance Appearance {
      material DEF M1 Material2D {
       emissiveColor 1 0 0
       filled TRUE
      }
     }
     geometry Circle {
      radius 30
     }
    }
    Transform2D {
     children [
      Shape {
       appearance DEF TXTAPP Appearance {
        material Material2D {
         emissiveColor 0 0 0
         filled TRUE
        }
       }
       geometry Text {
        string ["Speed" "x4"]
        fontStyle DEF FS FontStyle {
         justify ["MIDDLE" "MIDDLE"]
         size 18
        }
       }
      }
     ]
    }
   ]
  }
  Transform2D {
   translation 100 -65
   children [
    DEF TS2 TouchSensor {}
    Shape {
     appearance Appearance {
      material DEF M2 Material2D {
       emissiveColor 0 0 1
       filled TRUE
      }
     }
     geometry Circle {
      radius 30
     }
    }
    Transform2D {
     children [
      Shape {
       appearance USE TXTAPP
       geometry Text {
        string ["Speed" "x0.5"]
        fontStyle USE FS
       }
      }
     ]
    }
   ]
  }
  Transform2D {
   translation 0 -65
   children [
    DEF TS3 TouchSensor {}
    Shape {
     appearance Appearance {
      material DEF M3 Material2D {
       emissiveColor 0 1 0
       filled TRUE
      }
     }
     geometry Circle {
      radius 30
     }
    }
    Transform2D {
     children [
      Shape {
       appearance USE TXTAPP
       geometry Text {
        string ["Mute"]
        fontStyle USE FS
       }
      }
     ]
    }
   ]
  }
  Transform2D {
   translation 0 30
   children [
    Shape {
     appearance Appearance {
      texture MovieTexture {
       url [od:8]
      }
     }
     geometry Bitmap {}

    }
   ]
  }
  DEF C1 Conditional {
   buffer {
    REPLACE MC.mediaSpeed BY 4
    REPLACE M1.emissiveColor BY 1 0.5 0.5
   }
  }
  DEF C2 Conditional {
   buffer {
    REPLACE MC.mediaSpeed BY 0.5
    REPLACE M2.emissiveColor BY 0.5 0.5 1
   }
  }
  DEF C3 Conditional {
   buffer {
    REPLACE MC.mute BY TRUE
    REPLACE M3.emissiveColor BY 0.5 1 0.5
   }
  }
  DEF RESET Conditional {
   buffer {
    REPLACE MC.mediaSpeed BY 1
    REPLACE MC.mute BY FALSE
    REPLACE M1.emissiveColor BY 1 0 0
    REPLACE M2.emissiveColor BY 0 0 1
    REPLACE M3.emissiveColor BY 0 1 0
   }
  }
 ]
}

ROUTE TS1.isOver TO C1.activate
ROUTE TS1.isOver TO RESET.reverseActivate
ROUTE TS2.isOver TO C2.activate
ROUTE TS2.isOver TO RESET.reverseActivate
ROUTE TS3.isOver TO C3.activate
ROUTE TS3.isOver TO RESET.reverseActivate

AT 0 {
  UPDATE OD [
   ObjectDescriptor {
    objectDescriptorID 8
    esDescr [
     ES_Descriptor {
      ES_ID 21
      OCR_ES_ID 21
      muxInfo MuxInfo {
       fileName "../auxiliary_files/count_video.cmp"
      }
     }
    ]
   }
  ]
}

