~ubuntu-branches/ubuntu/intrepid/gpac/intrepid-proposed

« back to all changes in this revision

Viewing changes to regression_tests/bifs-script-date.bt

  • Committer: Bazaar Package Importer
  • Author(s): John Dong
  • Date: 2007-01-24 23:34:57 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070124233457-zzlls8afkt0nyakj
Tags: 0.4.2~rc2-0ubuntu1
* New upstream release
  * Most notably MP4 tagging support via MP4Box -itags
* debian/patches/01_64bits.dpatch: dropped; included upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
InitialObjectDescriptor {
 
2
 objectDescriptorID 1
 
3
 audioProfileLevelIndication 255
 
4
 visualProfileLevelIndication 254
 
5
 sceneProfileLevelIndication 1
 
6
 graphicsProfileLevelIndication 1
 
7
 ODProfileLevelIndication 1
 
8
 esDescr [
 
9
  ES_Descriptor {
 
10
   ES_ID 1
 
11
   decConfigDescr DecoderConfigDescriptor {
 
12
    streamType 3
 
13
    decSpecificInfo BIFSConfig {
 
14
     isCommandStream true
 
15
     pixelMetric true
 
16
     pixelWidth 260
 
17
     pixelHeight 70
 
18
    }
 
19
   }
 
20
  }
 
21
 ]
 
22
}
 
23
 
 
24
OrderedGroup {
 
25
 children [
 
26
  Background2D {
 
27
   backColor 1 1 1
 
28
  }
 
29
  WorldInfo {
 
30
   info ["This shows script used to retrieve system time" "" "GPAC Regression Tests" "(C) 2002-2004 GPAC Team"]
 
31
   title "Script Date() test"
 
32
  }
 
33
  Transform2D {
 
34
   children [
 
35
    Shape {
 
36
     appearance Appearance {
 
37
      material Material2D {
 
38
       emissiveColor 0 0 0
 
39
       filled TRUE
 
40
      }
 
41
     }
 
42
     geometry DEF TXT Text {
 
43
      string ["MPEG4 time on your system"]
 
44
      fontStyle FontStyle {
 
45
       justify ["MIDDLE" "MIDDLE"]
 
46
       size 18
 
47
      }
 
48
     }
 
49
    }
 
50
   ]
 
51
  }
 
52
  DEF TIMER TimeSensor {
 
53
   loop TRUE
 
54
  }
 
55
  DEF SC Script {
 
56
   eventIn SFTime set_time
 
57
   field SFNode str USE TXT
 
58
   url ["javascript:function set_time(value, text) {today = new Date();the_day = today.getDate();the_weekday = today.getDay();the_month = today.getMonth();the_year = today.getYear();the_hour = today.getHours();the_minute = today.getMinutes();the_second = today.getSeconds();am_pm = 0;the_initials = 'a.m.';if (the_year < 1900) the_year = the_year + 1900;if ((the_hour >=2) && (the_hour <=11)) {am_pm = the_hour;the_initials = 'a.m.';} else if (the_hour == 0) {am_pm = 12;the_initials = 'a.m.';} else if (the_hour == 12) {am_pm = 12;the_initials = 'p.m.';} else if (the_hour >=13) {am_pm = the_hour - 12;the_initials = 'p.m.';}if (the_minute <=9) the_minute = '0' + (the_minute);if (the_second <=9) the_second = '0' + (the_second);if (the_month == '0') the_month = 'January';else if (the_month == '1') the_month = 'February';else if (the_month == '2') the_month = 'March';else if (the_month == '3') the_month = 'April';else if (the_month == '4') the_month = 'May';else if (the_month == '5') the_month = 'June';else if (the_month == '6') the_month = 'July';else if (the_month == '7') the_month = 'August';else if (the_month == '8') the_month = 'September';else if (the_month == '9') the_month = 'October';else if (the_month == '10') the_month = 'November';else if (the_month == '11') the_month = 'December';if (the_weekday == '0') the_weekday = 'Sunday';else if (the_weekday == '1') the_weekday = 'Monday';else if (the_weekday == '2') the_weekday = 'Tuesday';else if (the_weekday == '3') the_weekday = 'Wednesday';else if (the_weekday == '4') the_weekday = 'Thursday';else if (the_weekday == '5') the_weekday = 'Friday';else if (the_weekday == '6') the_weekday = 'Saturday';if (the_day == '1') the_day = '1st';else if (the_day == '2') the_day = '2nd';else if (the_day == '3') the_day = '3rd';else if (the_day == '4') the_day = '4th';else if (the_day == '21') the_day = '21st';else if (the_day == '22') the_day = '23rd';else if (the_day == '31') the_day = '31st';else the_day = the_day + 'th';str.string[1] = the_weekday + ' ' + the_day + ' ' + the_month + ', ' + the_year;str.string[2] = am_pm + ':' + the_minute + ':' + the_second + ' ' + the_initials;}function initialize() {set_time(0, 0);}"   ]
 
59
  }
 
60
 ]
 
61
}
 
62
 
 
63
ROUTE TIMER.cycleTime TO SC.set_time
 
64