Signed-off-by: Pi-Cheng Chen pi-cheng.chen@linaro.org --- doc/examples/video_playback.json | 278 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 278 insertions(+) create mode 100644 doc/examples/video_playback.json
diff --git a/doc/examples/video_playback.json b/doc/examples/video_playback.json new file mode 100644 index 0000000..941b20f --- /dev/null +++ b/doc/examples/video_playback.json @@ -0,0 +1,278 @@ +{ + "tasks" : { + "surfaceflinger" : { + "priority" : -7, + "loop" : -1, + "suspend" : "surfaceflinger", + "run" : 1500 + }, + + "DispSync" : { + "priority" : -7, + "loop" : -1, + "phases" : { + "p1" : { + "lock" : "mutexB", + "wait" : { "ref" : "DispSync", "mutex" : "mutexB" }, + "unlock": "mutexB", + "run" : 35, + "lock" : "mutexA", + "broad" : "EventThread", + "unlock" : "mutexA", + "run" : 40, + }, + + "p2" : { + "loop" : 2, + + "lock" : "mutexB", + "wait" : { "ref" : "DispSync", "mutex" : "mutexB" }, + "unlock": "mutexB", + "run" : 30 + } + }, + }, + + "hwc_eventmon" : { + "priority" : -19, + "loop" : -1, + "lock" : "mutexB", + "signal" : "DispSync", + "unlock": "mutexB", + "run" : 115, + "timer" : { "ref" : "timerA", "period" : 16667 } + }, + + "EventThread1" : { + "priority" : -8, + "loop" : -1, + "phases" : { + "p1" : { + "lock" : "mutexA", + "wait" : { "ref" : "EventThread", "mutex" : "mutexA" }, + "unlock" : "mutexA", + "run" : 25, + "lock" : "mutexB", + "signal" : "DispSync", + "unlock": "mutexB", + "sleep" : 9650, + "run" : 70, + "lock" : "mutexB", + "signal" : "DispSync", + "unlock": "mutexB", + "run" : 80 + }, + + "p2" : { + "lock" : "mutexA", + "wait" : { "ref" : "EventThread", "mutex" : "mutexA" }, + "unlock" : "mutexA", + "run" : 90, + "lock" : "mutexB", + "signal" : "DispSync", + "unlock": "mutexB" + } + } + }, + + "EventThread2" : { + "priority" : -8, + "loop" : -1, + "phases" : { + "p1" : { + "lock" : "mutexA", + "wait" : { "ref" : "EventThread", "mutex" : "mutexA" }, + "unlock" : "mutexA", + "run" : 30, + "resume" : "surfaceflinger" + }, + + "p2" : { + "lock" : "mutexA", + "wait" : { "ref" : "EventThread", "mutex" : "mutexA" }, + "unlock" : "mutexA", + "run" : 35, + "sleep" : 2000, + "run" : 110, + "lock" : "mutexB", + "signal" : "DispSync", + "unlock": "mutexB", + "run" : 60 + } + } + }, + + "waker" : { + "priority" : -19, + "loop" : -1, + "resume" : "NuPlayerRenderer", + "timer" : { "ref" : "timerB", "period" : 33333 } + }, + + "NuPlayerRenderer" : { + "priority" : -15, + "loop" : -1, + "phases" : { + "p1" : { + "loop" : 3, + "suspend" : "NuPlayerRenderer", + "run" : 140, + "signal" : "NuPlayerDriver1", + "run" : 95 + }, + + "p2" : { + "sleep" : 27000, + "run" : 580, + "resume" : "NPDecoder", + "resume" : "NPDecoder-CL", + "resume" : "gle.aac.decoder" + } + } + }, + + "NuPlayerDriver1" : { + "priority" : -15, + "loop" : -1, + "suspend" : "NuPlayerDriver1", + "run" : 100, + "lock" : "mutexC", + "sync" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" }, + "unlock" : "mutexC", + "run" : 50, + "lock" : "mutexC", + "wait" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" }, + "unlock" : "mutexC", + "run" : 80, + "lock" : "mutexC", + "sync" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" }, + "unlock" : "mutexC", + "run" : 370, + "lock" : "mutexC", + "sync" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" }, + "unlock" : "mutexC", + "run" : 135, + "lock" : "mutexC", + "signal" : "NuPlayerDriver", + "unlock" : "mutexC" + }, + + "NuPlayerDriver2" : { + "priority" : -15, + "loop" : -1, + "lock" : "mutexC", + "wait" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" }, + "unlock" : "mutexC", + "run" : 110, + "lock" : "mutexC", + "signal" : "NuPlayerDriver", + "unlock" : "mutexC", + "lock" : "mutexD", + "signal" : "CodecLooper1", + "unlock" : "mutexD", + "sleep" : 2500, + "run" : 80, + "lock" : "mutexC", + "sync" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" }, + "unlock" : "mutexC", + "run" : 50, + "lock" : "mutexC", + "sync" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" }, + "unlock" : "mutexC", + "run" : 70, + "lock" : "mutexC", + "sync" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" }, + "unlock" : "mutexC", + "run" : 35 + }, + + "CodecLooper1" : { + "priority" : -15, + "loop" : -1, + "lock" : "mutexD", + "wait" : { "ref" : "CodecLooper1", "mutex" : "mutexD" }, + "unlock" : "mutexD", + "run" : 230, + "sleep" : 80, + "run" : 150, + "sleep" : 210, + "run" : 330, + "resume" : "CodecLooper2", + "sleep" : 900, + "run" : 170, + "sleep" : 670, + "run" : 125, + "resume" : "CodecLooper2" + }, + + "CodecLooper2" : { + "priority" : -1, + "loop" : -1, + "suspend" : "CodecLooper2", + "run" : 160, + "resume" : "CodecLooper3", + "sleep" : 590, + "resume" : "OMXCallbackDisp2", + "run" : 75, + "suspend" : "CodecLooper2", + "run" : 260 + }, + + "OMXCallbackDisp2" : { + "priority" : -1, + "loop" : -1, + "suspend" : "OMXCallbackDisp2", + "run" : 180 + }, + + "CodecLooper3" : { + "priority" : -1, + "loop" : -1, + "suspend" : "CodecLooper3", + "run" : 1000 + }, + + "NPDecoder" : { + "priority" : -15, + "loop" : -1, + "suspend" : "NPDecoder", + "run" : 500, + "sleep" : 680, + "resume" : "OMXCallbackDisp1", + "run" : 2000 + }, + + "NPDecoder-CL" : { + "priority" : -15, + "loop" : -1, + "suspend" : "NPDecoder-CL", + "run" : 570, + "sleep" : 570, + "run" : 2100 + }, + + "gle.aac.decoder" : { + "priority" : -1, + "loop" : -1, + "suspend" : "gle.aac.decoder", + "run" : 2400, + "sleep" : 430, + "run" : 45 + }, + + "OMXCallbackDisp1" : { + "priority" : -1, + "loop" : -1, + "suspend" : "OMXCallbackDisp1", + "run" : 135, + "sleep" : 230, + "run" : 140, + "sleep" : 330, + "run" : 190, + "sleep" : 550, + "run" : 160 + } + } +} + +
I put the original trace file captured on Nexus 7 running Android 5.0 in the folder: https://drive.google.com/folderview?id=0B925ne0upo5HfjQ5M01HcDlFbGpiWmlsOWlu...
Some of the lock dependencies are very complicated to be fully emulated by workgen, so I just use "sleep" for a duration to reproduce the use case in some cases.
On Wed, Jun 10, 2015 at 10:03 AM, Pi-Cheng Chen pi-cheng.chen@linaro.org wrote:
Signed-off-by: Pi-Cheng Chen pi-cheng.chen@linaro.org
doc/examples/video_playback.json | 278 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 278 insertions(+) create mode 100644 doc/examples/video_playback.json
diff --git a/doc/examples/video_playback.json b/doc/examples/video_playback.json new file mode 100644 index 0000000..941b20f --- /dev/null +++ b/doc/examples/video_playback.json @@ -0,0 +1,278 @@ +{
"tasks" : {
"surfaceflinger" : {
"priority" : -7,
"loop" : -1,
"suspend" : "surfaceflinger",
"run" : 1500
},
"DispSync" : {
"priority" : -7,
"loop" : -1,
"phases" : {
"p1" : {
"lock" : "mutexB",
"wait" : { "ref" : "DispSync", "mutex" : "mutexB" },
"unlock": "mutexB",
"run" : 35,
"lock" : "mutexA",
"broad" : "EventThread",
"unlock" : "mutexA",
"run" : 40,
},
"p2" : {
"loop" : 2,
"lock" : "mutexB",
"wait" : { "ref" : "DispSync", "mutex" : "mutexB" },
"unlock": "mutexB",
"run" : 30
}
},
},
"hwc_eventmon" : {
"priority" : -19,
"loop" : -1,
"lock" : "mutexB",
"signal" : "DispSync",
"unlock": "mutexB",
"run" : 115,
"timer" : { "ref" : "timerA", "period" : 16667 }
},
"EventThread1" : {
"priority" : -8,
"loop" : -1,
"phases" : {
"p1" : {
"lock" : "mutexA",
"wait" : { "ref" : "EventThread", "mutex" : "mutexA" },
"unlock" : "mutexA",
"run" : 25,
"lock" : "mutexB",
"signal" : "DispSync",
"unlock": "mutexB",
"sleep" : 9650,
"run" : 70,
"lock" : "mutexB",
"signal" : "DispSync",
"unlock": "mutexB",
"run" : 80
},
"p2" : {
"lock" : "mutexA",
"wait" : { "ref" : "EventThread", "mutex" : "mutexA" },
"unlock" : "mutexA",
"run" : 90,
"lock" : "mutexB",
"signal" : "DispSync",
"unlock": "mutexB"
}
}
},
"EventThread2" : {
"priority" : -8,
"loop" : -1,
"phases" : {
"p1" : {
"lock" : "mutexA",
"wait" : { "ref" : "EventThread", "mutex" : "mutexA" },
"unlock" : "mutexA",
"run" : 30,
"resume" : "surfaceflinger"
},
"p2" : {
"lock" : "mutexA",
"wait" : { "ref" : "EventThread", "mutex" : "mutexA" },
"unlock" : "mutexA",
"run" : 35,
"sleep" : 2000,
"run" : 110,
"lock" : "mutexB",
"signal" : "DispSync",
"unlock": "mutexB",
"run" : 60
}
}
},
"waker" : {
"priority" : -19,
"loop" : -1,
"resume" : "NuPlayerRenderer",
"timer" : { "ref" : "timerB", "period" : 33333 }
},
"NuPlayerRenderer" : {
"priority" : -15,
"loop" : -1,
"phases" : {
"p1" : {
"loop" : 3,
"suspend" : "NuPlayerRenderer",
"run" : 140,
"signal" : "NuPlayerDriver1",
"run" : 95
},
"p2" : {
"sleep" : 27000,
"run" : 580,
"resume" : "NPDecoder",
"resume" : "NPDecoder-CL",
"resume" : "gle.aac.decoder"
}
}
},
"NuPlayerDriver1" : {
"priority" : -15,
"loop" : -1,
"suspend" : "NuPlayerDriver1",
"run" : 100,
"lock" : "mutexC",
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" },
"unlock" : "mutexC",
"run" : 50,
"lock" : "mutexC",
"wait" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" },
"unlock" : "mutexC",
"run" : 80,
"lock" : "mutexC",
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" },
"unlock" : "mutexC",
"run" : 370,
"lock" : "mutexC",
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" },
"unlock" : "mutexC",
"run" : 135,
"lock" : "mutexC",
"signal" : "NuPlayerDriver",
"unlock" : "mutexC"
},
"NuPlayerDriver2" : {
"priority" : -15,
"loop" : -1,
"lock" : "mutexC",
"wait" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" },
"unlock" : "mutexC",
"run" : 110,
"lock" : "mutexC",
"signal" : "NuPlayerDriver",
"unlock" : "mutexC",
"lock" : "mutexD",
"signal" : "CodecLooper1",
"unlock" : "mutexD",
"sleep" : 2500,
"run" : 80,
"lock" : "mutexC",
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" },
"unlock" : "mutexC",
"run" : 50,
"lock" : "mutexC",
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" },
"unlock" : "mutexC",
"run" : 70,
"lock" : "mutexC",
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" },
"unlock" : "mutexC",
"run" : 35
},
"CodecLooper1" : {
"priority" : -15,
"loop" : -1,
"lock" : "mutexD",
"wait" : { "ref" : "CodecLooper1", "mutex" : "mutexD" },
"unlock" : "mutexD",
"run" : 230,
"sleep" : 80,
"run" : 150,
"sleep" : 210,
"run" : 330,
"resume" : "CodecLooper2",
"sleep" : 900,
"run" : 170,
"sleep" : 670,
"run" : 125,
"resume" : "CodecLooper2"
},
"CodecLooper2" : {
"priority" : -1,
"loop" : -1,
"suspend" : "CodecLooper2",
"run" : 160,
"resume" : "CodecLooper3",
"sleep" : 590,
"resume" : "OMXCallbackDisp2",
"run" : 75,
"suspend" : "CodecLooper2",
"run" : 260
},
"OMXCallbackDisp2" : {
"priority" : -1,
"loop" : -1,
"suspend" : "OMXCallbackDisp2",
"run" : 180
},
"CodecLooper3" : {
"priority" : -1,
"loop" : -1,
"suspend" : "CodecLooper3",
"run" : 1000
},
"NPDecoder" : {
"priority" : -15,
"loop" : -1,
"suspend" : "NPDecoder",
"run" : 500,
"sleep" : 680,
"resume" : "OMXCallbackDisp1",
"run" : 2000
},
"NPDecoder-CL" : {
"priority" : -15,
"loop" : -1,
"suspend" : "NPDecoder-CL",
"run" : 570,
"sleep" : 570,
"run" : 2100
},
"gle.aac.decoder" : {
"priority" : -1,
"loop" : -1,
"suspend" : "gle.aac.decoder",
"run" : 2400,
"sleep" : 430,
"run" : 45
},
"OMXCallbackDisp1" : {
"priority" : -1,
"loop" : -1,
"suspend" : "OMXCallbackDisp1",
"run" : 135,
"sleep" : 230,
"run" : 140,
"sleep" : 330,
"run" : 190,
"sleep" : 550,
"run" : 160
}
}
+}
-- 1.9.1
Hi Pi-Cheng
On 10 June 2015 at 04:03, Pi-Cheng Chen pi-cheng.chen@linaro.org wrote:
Signed-off-by: Pi-Cheng Chen pi-cheng.chen@linaro.org
doc/examples/video_playback.json | 278 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 278 insertions(+) create mode 100644 doc/examples/video_playback.json
diff --git a/doc/examples/video_playback.json b/doc/examples/video_playback.json new file mode 100644 index 0000000..941b20f --- /dev/null +++ b/doc/examples/video_playback.json @@ -0,0 +1,278 @@ +{
"tasks" : {
"surfaceflinger" : {
"priority" : -7,
"loop" : -1,
"suspend" : "surfaceflinger",
"surfaceflinger" value is optional as you want to use the thread name. It will be added by workgen
"run" : 1500
},
"DispSync" : {
"priority" : -7,
"loop" : -1,
"phases" : {
"p1" : {
"lock" : "mutexB",
"wait" : { "ref" : "DispSync", "mutex" : "mutexB" },
"unlock": "mutexB",
why haven't you use "suspend/resume" which does exactly the same except that the lock name will be "DispSync" instead of mutexB
"run" : 35,
"lock" : "mutexA",
"broad" : "EventThread",
you can also use suspend and resume as resume uses a braodcast. In this case, you will have to specify the value for "suspend" and "resume" key as you use it for sevral threads. You can keep the one you currently use :"EventThread"
"unlock" : "mutexA",
"run" : 40,
},
"p2" : {
"loop" : 2,
remove blank line
"lock" : "mutexB",
"wait" : { "ref" : "DispSync", "mutex" : "mutexB" },
"unlock": "mutexB",
"run" : 30
}
},
},
"hwc_eventmon" : {
"priority" : -19,
"loop" : -1,
"lock" : "mutexB",
"signal" : "DispSync",
"unlock": "mutexB",
"run" : 115,
"timer" : { "ref" : "timerA", "period" : 16667 }
},
"EventThread1" : {
"priority" : -8,
"loop" : -1,
"phases" : {
"p1" : {
"lock" : "mutexA",
"wait" : { "ref" : "EventThread", "mutex" : "mutexA" },
"unlock" : "mutexA",
"run" : 25,
"lock" : "mutexB",
"signal" : "DispSync",
"unlock": "mutexB",
"sleep" : 9650,
"run" : 70,
"lock" : "mutexB",
"signal" : "DispSync",
"unlock": "mutexB",
"run" : 80
},
"p2" : {
"lock" : "mutexA",
"wait" : { "ref" : "EventThread", "mutex" : "mutexA" },
"unlock" : "mutexA",
"run" : 90,
"lock" : "mutexB",
"signal" : "DispSync",
"unlock": "mutexB"
}
}
},
"EventThread2" : {
"priority" : -8,
"loop" : -1,
"phases" : {
"p1" : {
"lock" : "mutexA",
"wait" : { "ref" : "EventThread", "mutex" : "mutexA" },
"unlock" : "mutexA",
"run" : 30,
"resume" : "surfaceflinger"
},
"p2" : {
"lock" : "mutexA",
"wait" : { "ref" : "EventThread", "mutex" : "mutexA" },
"unlock" : "mutexA",
"run" : 35,
"sleep" : 2000,
"run" : 110,
"lock" : "mutexB",
"signal" : "DispSync",
"unlock": "mutexB",
"run" : 60
}
}
},
"waker" : {
"priority" : -19,
"loop" : -1,
"resume" : "NuPlayerRenderer",
"timer" : { "ref" : "timerB", "period" : 33333 }
},
"NuPlayerRenderer" : {
"priority" : -15,
"loop" : -1,
"phases" : {
"p1" : {
"loop" : 3,
"suspend" : "NuPlayerRenderer",
"run" : 140,
"signal" : "NuPlayerDriver1",
I don't know if it's intentional but you haven't use any mutex in this sequence unlike all other ones
"run" : 95
},
"p2" : {
"sleep" : 27000,
"run" : 580,
"resume" : "NPDecoder",
"resume" : "NPDecoder-CL",
"resume" : "gle.aac.decoder"
}
}
},
"NuPlayerDriver1" : {
"priority" : -15,
"loop" : -1,
"suspend" : "NuPlayerDriver1",
"run" : 100,
"lock" : "mutexC",
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" },
"unlock" : "mutexC",
"run" : 50,
"lock" : "mutexC",
"wait" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" },
"unlock" : "mutexC",
"run" : 80,
"lock" : "mutexC",
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" },
"unlock" : "mutexC",
"run" : 370,
"lock" : "mutexC",
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" },
"unlock" : "mutexC",
"run" : 135,
"lock" : "mutexC",
"signal" : "NuPlayerDriver",
"unlock" : "mutexC"
},
"NuPlayerDriver2" : {
"priority" : -15,
"loop" : -1,
"lock" : "mutexC",
"wait" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" },
"unlock" : "mutexC",
"run" : 110,
"lock" : "mutexC",
"signal" : "NuPlayerDriver",
"unlock" : "mutexC",
"lock" : "mutexD",
"signal" : "CodecLooper1",
you can use suspend/resume
"unlock" : "mutexD",
"sleep" : 2500,
"run" : 80,
"lock" : "mutexC",
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" },
"unlock" : "mutexC",
"run" : 50,
"lock" : "mutexC",
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" },
"unlock" : "mutexC",
"run" : 70,
"lock" : "mutexC",
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "mutexC" },
"unlock" : "mutexC",
"run" : 35
},
"CodecLooper1" : {
"priority" : -15,
"loop" : -1,
"lock" : "mutexD",
"wait" : { "ref" : "CodecLooper1", "mutex" : "mutexD" },
"unlock" : "mutexD",
"run" : 230,
"sleep" : 80,
"run" : 150,
"sleep" : 210,
"run" : 330,
"resume" : "CodecLooper2",
"sleep" : 900,
"run" : 170,
"sleep" : 670,
"run" : 125,
"resume" : "CodecLooper2"
},
"CodecLooper2" : {
"priority" : -1,
"loop" : -1,
"suspend" : "CodecLooper2",
suspend is enough
"run" : 160,
"resume" : "CodecLooper3",
"sleep" : 590,
"resume" : "OMXCallbackDisp2",
"run" : 75,
"suspend" : "CodecLooper2",
"run" : 260
},
"OMXCallbackDisp2" : {
"priority" : -1,
"loop" : -1,
"suspend" : "OMXCallbackDisp2",
suspend is enough
"run" : 180
},
"CodecLooper3" : {
"priority" : -1,
"loop" : -1,
"suspend" : "CodecLooper3",
suspend is enough
"run" : 1000
},
"NPDecoder" : {
"priority" : -15,
"loop" : -1,
"suspend" : "NPDecoder",
suspend is enough
"run" : 500,
"sleep" : 680,
"resume" : "OMXCallbackDisp1",
"run" : 2000
},
"NPDecoder-CL" : {
"priority" : -15,
"loop" : -1,
"suspend" : "NPDecoder-CL",
suspend is enough
"run" : 570,
"sleep" : 570,
"run" : 2100
},
"gle.aac.decoder" : {
"priority" : -1,
"loop" : -1,
"suspend" : "gle.aac.decoder",
suspend is enough
"run" : 2400,
"sleep" : 430,
"run" : 45
},
"OMXCallbackDisp1" : {
"priority" : -1,
"loop" : -1,
"suspend" : "OMXCallbackDisp1",
suspend is enough
"run" : 135,
"sleep" : 230,
"run" : 140,
"sleep" : 330,
"run" : 190,
"sleep" : 550,
"run" : 160
}
}
+}
-- 1.9.1
Changes from v1 - address review comments for last version
Signed-off-by: Pi-Cheng Chen pi-cheng.chen@linaro.org --- doc/examples/video_playback.json | 253 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 253 insertions(+) create mode 100644 doc/examples/video_playback.json
diff --git a/doc/examples/video_playback.json b/doc/examples/video_playback.json new file mode 100644 index 0000000..8615f3f --- /dev/null +++ b/doc/examples/video_playback.json @@ -0,0 +1,253 @@ +{ + "tasks" : { + "surfaceflinger" : { + "priority" : -7, + "loop" : -1, + "suspend", + "run" : 1500 + }, + + "DispSync" : { + "priority" : -7, + "loop" : -1, + "phases" : { + "p1" : { + "suspend", + "run" : 35, + "lock" : "EventThread", + "broad" : "EventThread", + "unlock" : "EventThread", + "run" : 40, + }, + + "p2" : { + "loop" : 2, + "suspend", + "run" : 30 + } + }, + }, + + "hwc_eventmon" : { + "priority" : -19, + "loop" : -1, + "lock" : "DispSync", + "signal" : "DispSync", + "unlock": "DispSync", + "run" : 115, + "timer" : { "ref" : "timerA", "period" : 16667 } + }, + + "EventThread1" : { + "priority" : -8, + "loop" : -1, + "phases" : { + "p1" : { + "suspend" : "EventThread", + "run" : 25, + "lock" : "DispSync", + "signal" : "DispSync", + "unlock": "DispSync", + "sleep" : 9650, + "run" : 70, + "lock" : "DispSync", + "signal" : "DispSync", + "unlock": "DispSync", + "run" : 80 + }, + + "p2" : { + "suspend" : "EventThread", + "run" : 90, + "lock" : "DispSync", + "signal" : "DispSync", + "unlock": "DispSync" + } + } + }, + + "EventThread2" : { + "priority" : -8, + "loop" : -1, + "phases" : { + "p1" : { + "suspend" : "EventThread", + "run" : 30, + "resume" : "surfaceflinger" + }, + + "p2" : { + "suspend" : "EventThread", + "run" : 35, + "sleep" : 2000, + "run" : 110, + "lock" : "DispSync", + "signal" : "DispSync", + "unlock": "DispSync", + "run" : 60 + } + } + }, + + "waker" : { + "priority" : -19, + "loop" : -1, + "resume" : "NuPlayerRenderer", + "timer" : { "ref" : "timerB", "period" : 33333 } + }, + + "NuPlayerRenderer" : { + "priority" : -15, + "loop" : -1, + "phases" : { + "p1" : { + "loop" : 3, + "suspend" : "NuPlayerRenderer", + "run" : 140, + "resume" : "NuPlayerDriver1", + "run" : 95 + }, + + "p2" : { + "sleep" : 27000, + "run" : 580, + "resume" : "NPDecoder", + "resume" : "NPDecoder-CL", + "resume" : "gle.aac.decoder" + } + } + }, + + "NuPlayerDriver1" : { + "priority" : -15, + "loop" : -1, + "suspend", + "run" : 100, + "lock" : "NuPlayerDriver", + "sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" }, + "unlock" : "NuPlayerDriver", + "run" : 50, + "suspend" : "NuPlayerDriver", + "run" : 80, + "lock" : "NuPlayerDriver", + "sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" }, + "unlock" : "NuPlayerDriver", + "run" : 370, + "lock" : "NuPlayerDriver", + "sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" }, + "unlock" : "NuPlayerDriver", + "run" : 135, + "resume" : "NuPlayerDriver" + }, + + "NuPlayerDriver2" : { + "priority" : -15, + "loop" : -1, + "suspend" : "NuPlayerDriver", + "run" : 110, + "resume" : "NuPlayerDriver", + "resume" : "CodecLooper1", + "sleep" : 2500, + "run" : 80, + "lock" : "NuPlayerDriver", + "sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" }, + "unlock" : "NuPlayerDriver", + "run" : 50, + "lock" : "NuPlayerDriver", + "sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" }, + "unlock" : "NuPlayerDriver", + "run" : 70, + "lock" : "NuPlayerDriver", + "sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" }, + "unlock" : "NuPlayerDriver", + "run" : 35 + }, + + "CodecLooper1" : { + "priority" : -15, + "loop" : -1, + "suspend", + "run" : 230, + "sleep" : 80, + "run" : 150, + "sleep" : 210, + "run" : 330, + "resume" : "CodecLooper2", + "sleep" : 900, + "run" : 170, + "sleep" : 670, + "run" : 125, + "resume" : "CodecLooper2" + }, + + "CodecLooper2" : { + "priority" : -1, + "loop" : -1, + "suspend", + "run" : 160, + "resume" : "CodecLooper3", + "sleep" : 590, + "resume" : "OMXCallbackDisp2", + "run" : 75, + "suspend", + "run" : 260 + }, + + "OMXCallbackDisp2" : { + "priority" : -1, + "loop" : -1, + "suspend", + "run" : 180 + }, + + "CodecLooper3" : { + "priority" : -1, + "loop" : -1, + "suspend", + "run" : 1000 + }, + + "NPDecoder" : { + "priority" : -15, + "loop" : -1, + "suspend", + "run" : 500, + "sleep" : 680, + "resume" : "OMXCallbackDisp1", + "run" : 2000 + }, + + "NPDecoder-CL" : { + "priority" : -15, + "loop" : -1, + "suspend", + "run" : 570, + "sleep" : 570, + "run" : 2100 + }, + + "gle.aac.decoder" : { + "priority" : -1, + "loop" : -1, + "suspend", + "run" : 2400, + "sleep" : 430, + "run" : 45 + }, + + "OMXCallbackDisp1" : { + "priority" : -1, + "loop" : -1, + "suspend", + "run" : 135, + "sleep" : 230, + "run" : 140, + "sleep" : 330, + "run" : 190, + "sleep" : 550, + "run" : 160 + } + } +} + +
Sorry for forgeting to fix "DispSync" part. Fix and resend again.
Changes from v1 - use suspend/resume as possible to simplify the use case
Signed-off-by: Pi-Cheng Chen pi-cheng.chen@linaro.org --- doc/examples/video_playback.json | 243 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 243 insertions(+) create mode 100644 doc/examples/video_playback.json
diff --git a/doc/examples/video_playback.json b/doc/examples/video_playback.json new file mode 100644 index 0000000..a22ebe1 --- /dev/null +++ b/doc/examples/video_playback.json @@ -0,0 +1,243 @@ +{ + "tasks" : { + "surfaceflinger" : { + "priority" : -7, + "loop" : -1, + "suspend", + "run" : 1500 + }, + + "DispSync" : { + "priority" : -7, + "loop" : -1, + "phases" : { + "p1" : { + "suspend", + "run" : 35, + "lock" : "EventThread", + "broad" : "EventThread", + "unlock" : "EventThread", + "run" : 40, + }, + + "p2" : { + "loop" : 2, + "suspend", + "run" : 30 + } + }, + }, + + "hwc_eventmon" : { + "priority" : -19, + "loop" : -1, + "resume" : "DispSync", + "run" : 115, + "timer" : { "ref" : "timerA", "period" : 16667 } + }, + + "EventThread1" : { + "priority" : -8, + "loop" : -1, + "phases" : { + "p1" : { + "suspend" : "EventThread", + "run" : 25, + "resume" : "DispSync", + "sleep" : 9650, + "run" : 70, + "resume" : "DispSync", + "run" : 80 + }, + + "p2" : { + "suspend" : "EventThread", + "run" : 90, + "resume" : "DispSync" + } + } + }, + + "EventThread2" : { + "priority" : -8, + "loop" : -1, + "phases" : { + "p1" : { + "suspend" : "EventThread", + "run" : 30, + "resume" : "surfaceflinger" + }, + + "p2" : { + "suspend" : "EventThread", + "run" : 35, + "sleep" : 2000, + "run" : 110, + "resume" : "DispSync", + "run" : 60 + } + } + }, + + "waker" : { + "priority" : -19, + "loop" : -1, + "resume" : "NuPlayerRenderer", + "timer" : { "ref" : "timerB", "period" : 33333 } + }, + + "NuPlayerRenderer" : { + "priority" : -15, + "loop" : -1, + "phases" : { + "p1" : { + "loop" : 3, + "suspend" : "NuPlayerRenderer", + "run" : 140, + "resume" : "NuPlayerDriver1", + "run" : 95 + }, + + "p2" : { + "sleep" : 27000, + "run" : 580, + "resume" : "NPDecoder", + "resume" : "NPDecoder-CL", + "resume" : "gle.aac.decoder" + } + } + }, + + "NuPlayerDriver1" : { + "priority" : -15, + "loop" : -1, + "suspend", + "run" : 100, + "lock" : "NuPlayerDriver", + "sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" }, + "unlock" : "NuPlayerDriver", + "run" : 50, + "suspend" : "NuPlayerDriver", + "run" : 80, + "lock" : "NuPlayerDriver", + "sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" }, + "unlock" : "NuPlayerDriver", + "run" : 370, + "lock" : "NuPlayerDriver", + "sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" }, + "unlock" : "NuPlayerDriver", + "run" : 135, + "resume" : "NuPlayerDriver" + }, + + "NuPlayerDriver2" : { + "priority" : -15, + "loop" : -1, + "suspend" : "NuPlayerDriver", + "run" : 110, + "resume" : "NuPlayerDriver", + "resume" : "CodecLooper1", + "sleep" : 2500, + "run" : 80, + "lock" : "NuPlayerDriver", + "sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" }, + "unlock" : "NuPlayerDriver", + "run" : 50, + "lock" : "NuPlayerDriver", + "sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" }, + "unlock" : "NuPlayerDriver", + "run" : 70, + "lock" : "NuPlayerDriver", + "sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" }, + "unlock" : "NuPlayerDriver", + "run" : 35 + }, + + "CodecLooper1" : { + "priority" : -15, + "loop" : -1, + "suspend", + "run" : 230, + "sleep" : 80, + "run" : 150, + "sleep" : 210, + "run" : 330, + "resume" : "CodecLooper2", + "sleep" : 900, + "run" : 170, + "sleep" : 670, + "run" : 125, + "resume" : "CodecLooper2" + }, + + "CodecLooper2" : { + "priority" : -1, + "loop" : -1, + "suspend", + "run" : 160, + "resume" : "CodecLooper3", + "sleep" : 590, + "resume" : "OMXCallbackDisp2", + "run" : 75, + "suspend", + "run" : 260 + }, + + "OMXCallbackDisp2" : { + "priority" : -1, + "loop" : -1, + "suspend", + "run" : 180 + }, + + "CodecLooper3" : { + "priority" : -1, + "loop" : -1, + "suspend", + "run" : 1000 + }, + + "NPDecoder" : { + "priority" : -15, + "loop" : -1, + "suspend", + "run" : 500, + "sleep" : 680, + "resume" : "OMXCallbackDisp1", + "run" : 2000 + }, + + "NPDecoder-CL" : { + "priority" : -15, + "loop" : -1, + "suspend", + "run" : 570, + "sleep" : 570, + "run" : 2100 + }, + + "gle.aac.decoder" : { + "priority" : -1, + "loop" : -1, + "suspend", + "run" : 2400, + "sleep" : 430, + "run" : 45 + }, + + "OMXCallbackDisp1" : { + "priority" : -1, + "loop" : -1, + "suspend", + "run" : 135, + "sleep" : 230, + "run" : 140, + "sleep" : 330, + "run" : 190, + "sleep" : 550, + "run" : 160 + } + } +} + +
Hi pi-cheng,
I have one comment below. In addition to this last comment, could you create 2 version of this json file. A short one "video-short.json" with a duration of 6 seconds and a long one "video-long.json" with a duration of 600 seconds
Regards, Vincent
On 1 July 2015 at 12:30, Pi-Cheng Chen pi-cheng.chen@linaro.org wrote:
Sorry for forgeting to fix "DispSync" part. Fix and resend again.
Changes from v1
- use suspend/resume as possible to simplify the use case
Signed-off-by: Pi-Cheng Chen pi-cheng.chen@linaro.org
doc/examples/video_playback.json | 243 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 243 insertions(+) create mode 100644 doc/examples/video_playback.json
diff --git a/doc/examples/video_playback.json b/doc/examples/video_playback.json new file mode 100644 index 0000000..a22ebe1 --- /dev/null +++ b/doc/examples/video_playback.json @@ -0,0 +1,243 @@ +{
"tasks" : {
"surfaceflinger" : {
"priority" : -7,
"loop" : -1,
"suspend",
"run" : 1500
},
"DispSync" : {
"priority" : -7,
"loop" : -1,
"phases" : {
"p1" : {
"suspend",
"run" : 35,
"lock" : "EventThread",
"broad" : "EventThread",
"unlock" : "EventThread",
"resume" : "EventThread" do exactly the same.
"run" : 40,
},
"p2" : {
"loop" : 2,
"suspend",
"run" : 30
}
},
},
"hwc_eventmon" : {
"priority" : -19,
"loop" : -1,
"resume" : "DispSync",
"run" : 115,
"timer" : { "ref" : "timerA", "period" : 16667 }
},
"EventThread1" : {
"priority" : -8,
"loop" : -1,
"phases" : {
"p1" : {
"suspend" : "EventThread",
"run" : 25,
"resume" : "DispSync",
"sleep" : 9650,
"run" : 70,
"resume" : "DispSync",
"run" : 80
},
"p2" : {
"suspend" : "EventThread",
"run" : 90,
"resume" : "DispSync"
}
}
},
"EventThread2" : {
"priority" : -8,
"loop" : -1,
"phases" : {
"p1" : {
"suspend" : "EventThread",
"run" : 30,
"resume" : "surfaceflinger"
},
"p2" : {
"suspend" : "EventThread",
"run" : 35,
"sleep" : 2000,
"run" : 110,
"resume" : "DispSync",
"run" : 60
}
}
},
"waker" : {
"priority" : -19,
"loop" : -1,
"resume" : "NuPlayerRenderer",
"timer" : { "ref" : "timerB", "period" : 33333 }
},
"NuPlayerRenderer" : {
"priority" : -15,
"loop" : -1,
"phases" : {
"p1" : {
"loop" : 3,
"suspend" : "NuPlayerRenderer",
"run" : 140,
"resume" : "NuPlayerDriver1",
"run" : 95
},
"p2" : {
"sleep" : 27000,
"run" : 580,
"resume" : "NPDecoder",
"resume" : "NPDecoder-CL",
"resume" : "gle.aac.decoder"
}
}
},
"NuPlayerDriver1" : {
"priority" : -15,
"loop" : -1,
"suspend",
"run" : 100,
"lock" : "NuPlayerDriver",
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" },
"unlock" : "NuPlayerDriver",
"run" : 50,
"suspend" : "NuPlayerDriver",
"run" : 80,
"lock" : "NuPlayerDriver",
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" },
"unlock" : "NuPlayerDriver",
"run" : 370,
"lock" : "NuPlayerDriver",
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" },
"unlock" : "NuPlayerDriver",
"run" : 135,
"resume" : "NuPlayerDriver"
},
"NuPlayerDriver2" : {
"priority" : -15,
"loop" : -1,
"suspend" : "NuPlayerDriver",
"run" : 110,
"resume" : "NuPlayerDriver",
"resume" : "CodecLooper1",
"sleep" : 2500,
"run" : 80,
"lock" : "NuPlayerDriver",
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" },
"unlock" : "NuPlayerDriver",
"run" : 50,
"lock" : "NuPlayerDriver",
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" },
"unlock" : "NuPlayerDriver",
"run" : 70,
"lock" : "NuPlayerDriver",
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" },
"unlock" : "NuPlayerDriver",
"run" : 35
},
"CodecLooper1" : {
"priority" : -15,
"loop" : -1,
"suspend",
"run" : 230,
"sleep" : 80,
"run" : 150,
"sleep" : 210,
"run" : 330,
"resume" : "CodecLooper2",
"sleep" : 900,
"run" : 170,
"sleep" : 670,
"run" : 125,
"resume" : "CodecLooper2"
},
"CodecLooper2" : {
"priority" : -1,
"loop" : -1,
"suspend",
"run" : 160,
"resume" : "CodecLooper3",
"sleep" : 590,
"resume" : "OMXCallbackDisp2",
"run" : 75,
"suspend",
"run" : 260
},
"OMXCallbackDisp2" : {
"priority" : -1,
"loop" : -1,
"suspend",
"run" : 180
},
"CodecLooper3" : {
"priority" : -1,
"loop" : -1,
"suspend",
"run" : 1000
},
"NPDecoder" : {
"priority" : -15,
"loop" : -1,
"suspend",
"run" : 500,
"sleep" : 680,
"resume" : "OMXCallbackDisp1",
"run" : 2000
},
"NPDecoder-CL" : {
"priority" : -15,
"loop" : -1,
"suspend",
"run" : 570,
"sleep" : 570,
"run" : 2100
},
"gle.aac.decoder" : {
"priority" : -1,
"loop" : -1,
"suspend",
"run" : 2400,
"sleep" : 430,
"run" : 45
},
"OMXCallbackDisp1" : {
"priority" : -1,
"loop" : -1,
"suspend",
"run" : 135,
"sleep" : 230,
"run" : 140,
"sleep" : 330,
"run" : 190,
"sleep" : 550,
"run" : 160
}
}
+}
-- 1.9.1