HDR basics


High-Dynamic Range has two images, low light and high light
Camera: take two images, one .hdr file with each pixel having RGB and light.
Standard: HLG Hybrid Log Gamma is compatible with H.264 so that non-HDR TV can still show it.
Older ones like Dolby Vision and HDR10 cannot show on non-HDR TV because these TVs make no sense out of the data.
TV: depending on how bright/dark the TV can do, merge the two image into one and map the pixel values into the range the TV handles.

Interactive ad server


This is to demo interactive ads on Roku player. Screen capture below.
The ad server files are hosted in http://riowing.net/p/wp/iRollServer/www
These files feed Innovid iRoll preroll and midroll interactive ads.
The preroll ad shows up at the lower left corner.
Upon a click on OK button on remote when the midroll is at the lower left corner, a full screen ad shows up.
The full screen ad is interactive: left button to show poster, and right button to show video, OK to play the video ad.

On the server:
app.xml tells when to show preroll midroll ad, and where to find the ad json files.
bestbuy.json is about the preroll.
PosterVideoSony.json is about the midroll, telling where to get the posters and ad mp4.

Screen capture: http://riowing.net/p/wp/iRollServer/RiaMidroll.mp4
Ad server files: http://riowing.net/p/wp/iRollServer/iRollServer.tar

Roku midroll ad


Ads are played by RAF in a task thread, both preroll and midroll.
Here is the flow:
Scene creates ContentNode with URL, e.g. gym.mp4, and sets it to Video’s content
Call video.control = “play” to start play
Create task thread, and in this thread:
RAF.setAdUrl, e.g. my ad server, http://….vmapPreMidroll.xml
RAF.getAds() to get the pods, each pod multiple ads, each ads multiple streams/mp4
pods have pod like preroll, midroll…
By loop checking video position, When it’s time to show, e.g. midroll,
get the midroll ad from adpods, e.g. adPods[1], stop video and call RAF.showAds(adPods[1])
when showAds returns, resume regular video.

Screen capture: http://riowing.net/p/Midroll2007.mp4
Source code download: http://riowing.net/p/RioRafRsg1.zip

brightscript: Task node function


A task node function is , e.g. eventLoopFunction() in m.myTask.functionName = “eventLoopFunction”
Source code to demo this is attached.

eventLoopFunction has its own m, and have access to a copy of task’s m.
This is demo’d in m.dataCreatedByInit and m.dataCreatedByLoopFunction
eventLoopFunction cannot pass function to task’s node, as seen in m.dataWithFunction.myFunction
which becomes Invalid. vice versa.
In order to call functions initialized by eventLoopFunction, we use m.port.
see m.top.observeField(“command”, m.port)
In order to pass data to eventLoopFunction, msg.GetData() and interface field, e.g. metadata, are used.

Download: http://riowing.net/p/DemoEventLoop.zip