Slide 13
Slide 13 text
Arcan Explained: A Browser for Di
ff
erent Webs
More Advanced
Streaming Video
function myapp()
net_open("@stdin",
function(source, status)
if status.kind == "connected" then
play_media(source)
end
end
)
end
function play_media(ref)
local fio = open_nonblock(ref, {}, "appl:/test.mp4")
launch_decode(nil, "protocol=media",
function(src, status)
if status.kind == "bchunkstate" then
open_nonblock(src, {}, fio)
elseif status.kind == "resized" then
show_image(src)
resize_image(src, status.width, status.height)
end
end
)
end
O
ffl
ine
fi
rst, explicitly request access to network connection
Request resource from server-side application speci
fi
c store
Transfer control parameters (bu
ff
ering, parallelisation)
Spawn sandboxed decode process
Announced supported formats
Transfer ownership of remote stream
First frame delivery, set presentation