...
| Params | Value |
|---|---|
| Chip | Rpi4/Rpi3B+ |
| Cobalt | RDK Common Port - Cobalt 22.lts |
| CPU | ARMv7 Processor rev 0 |
| Gstreamer | 1.16.0 |
| Kernel | 5.10.52 |
| Memory | 16 GB flash and 2 GB RAM |
| RDK Build | rdk-next |
| RDKServices | Main |
| UI | RDK Resident UI |
| Widevine | Not Available |
| Yocto | 3.1 - Dunfell |
...
cd <workspace dir>
# Build the Raspberry Pi image
$ MACHINE=raspberrypi4-rdk-hybrid source meta-cmf-raspberrypi/setup-environment$ bitbake rdk-generic-hybrid-wpe-image
...
...
SUMMARY = "Rialto"LICENSE = "CLOSED"SRC_URI += "git://git@github.com/rdkcentral/rialto.git;protocol=ssh;branch=master"
SRCREV = "${AUTOREV}"PACKAGES =+ "${PN}-client ${PN}-server ${PN}-servermanager"DEPENDS = "openssl jsoncpp glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base wpeframework-clientlibraries protobuf protobuf-native mongoose"RDEPENDS_${PN} += "protobuf"S = "${WORKDIR}/git"inherit cmakeFILES_SOLIBSDEV = ""FILES_${PN}-client += "${libdir}/libRialtoClient.so"FILES_${PN}-server += "${bindir}/RialtoServer"FILES_${PN}-server += "${libdir}/libRialtoServerMain.so"FILES_${PN}-servermanager += "${bindir}/RialtoServerManagerSim"FILES_${PN}-servermanager += "${libdir}/libRialtoServerManager.so"
...
|
...
SUMMARY = "Rialto-ocdm"LICENSE = "CLOSED"SRC_URI += "git://git@github.com/rdkcentral/rialto-ocdm.git;protocol=ssh;branch=master"SRCREV = "${AUTOREV}"
DEPENDS = "openssl jsoncpp glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base wpeframework-clientlibraries rialto"
S = "${WORKDIR}/git"inherit cmakeFILES_SOLIBSDEV = ""
FILES_${PN} += "${PKG_CONFIG_DIR}/*.pc"FILES_${PN} += "${libdir}/libocdmRialto.so"
...
bitbake rialto rialto-gstreamer rialto-ocdm
...
...
Stop wpeframework
| systemctl stop wpeframework |
|---|
For Rpi4 platform - Run the below command in all terminals where you need to run the rialto commands.
| export WESTEROS_DRM_CARD=/dev/dri/card0 |
|---|
Note: In case of Rpi3 platform, no need to run the above command. Since, Rpi3 uses only one master card.
Command used to run test streams:
| GST_REGISTRY=/tmp/rialto-registry.bin RIALTO_DEBUG=5 RIALTO_CONSOLE_LOG=1 RIALTO_SOCKET_PATH=/tmp/rialto-0 XDG_RUNTIME_DIR=/tmp WAYLAND_DISPLAY=westeros-cobalt LD_LIBRARY_PATH="$PWD/usr/lib" COBALT_CONTENT_DIR="$PWD/usr/share/content/data" RIALTO_CLIENT_BACKEND_LIB="/usr/lib/libRialtoClient.so" gst-launch-1.0 playbin uri=file:///tmp/sample-video-file-for-testing.mp4 |
|---|
Note:
Stop wpeframework
| systemctl stop wpeframework |
|---|
For Rpi4 platform - Run the below command in all terminals where you need to run the rialto commands.
| export WESTEROS_DRM_CARD=/dev/dri/card0 |
|---|
Note: In case of Rpi3 platform, no need to run the above command. Since, Rpi3 uses only one master card.
Run westeros
| XDG_RUNTIME_DIR=/tmp LD_PRELOAD=/usr/lib/libwesteros_gl.so.0 westeros --renderer /usr/lib/libwesteros_render_embedded.so.0.0.0 --embedded --display "westeros-cobalt" --window-size 1920x1080 |
|---|
Start server manager simulator:
| RIALTO_DEBUG=5 RIALTO_SESSION_SERVER_STARTUP_TIMEOUT_MS=15000 SESSION_SERVER_ENV_VARS='XDG_RUNTIME_DIR=/tmp;RIALTO_SINKS_RANK=0;GST_REGISTRY=/tmp/rialto-server-gstreamer-cache.bin;WAYLAND_DISPLAY=westeros-cobalt;FORCE_SAP=TRUE;FORCE_SVP=TRUE' /usr/bin/RialtoServerManagerSim |
|---|
Note:
If you are not able to play HLS using rialto-mse sinks, then try to increase value of RIALTO_SESSION_SERVER_STARTUP_TIMEOUT_MS (>2000) or remove the TIMEOUT. So, there will be no startup limit.Run Rialto Server for YouTube:
| curl -X POST -d "" localhost:9008/SetState/YouTube/Active |
|---|
Command used to run test streams:
| GST_REGISTRY=/tmp/rialto-registry.bin RIALTO_DEBUG=5 RIALTO_CONSOLE_LOG=1 RIALTO_SOCKET_PATH=/tmp/rialto-0 XDG_RUNTIME_DIR=/tmp WAYLAND_DISPLAY=westeros-cobalt LD_LIBRARY_PATH="$PWD/usr/lib" COBALT_CONTENT_DIR="$PWD/usr/share/content/data" RIALTO_CLIENT_BACKEND_LIB="/usr/lib/libRialtoClient.so" gst-launch-1.0 playbin uri=https://bitmovin-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd |
|---|
Note:
Stop wpeframework
| systemctl stop wpeframework |
|---|
For Rpi4 platform - Run the below command in all terminals where you need to run the rialto commands.
| export WESTEROS_DRM_CARD=/dev/dri/card0 |
|---|
Note: In case of Rpi3 platform, no need to run the above command. Since, Rpi3 uses only one master card.
Command used to launch YouTube Homepage.
GST_REGISTRY=/tmp/rialto-registry.bin RIALTO_DEBUG=5 RIALTO_SOCKET_PATH=/tmp/rialto-0 XDG_RUNTIME_DIR=/tmp WAYLAND_DISPLAY=westeros-cobalt LD_LIBRARY_PATH="$PWD/usr/lib" COBALT_CONTENT_DIR="/usr/share/content/data" RIALTO_CLIENT_BACKEND_LIB="/usr/lib/libRialtoClient.so" /usr/bin/cobalt_bin |
|---|
Note:
There is a small correction in the below "Run YouTube" Command mentioned in rdk wiki page
remove "$PWD" in COBALT_CONTENT_DIR
| draw.io Diagram | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| draw.io Diagram | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| draw.io Diagram | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| View file | ||||
|---|---|---|---|---|
|
After further review it was decided RialtoServerManager shouldn't be started by service file directly.
libRialtoServerManager.so should be responsible for creating an instance of RialtoServerManager which should spawn the socket for running rialto.
As mentioned above the latest approach was to integrate libRialtoServerManager.so to RDKShell which would give RDKShell the access to invoke API's.
API's to be invoked via RDKShell.
initiateApplication - causes for a new RialtoSessionServer instance to be spawned.
https://github.com/vijith-tv/rdkservices/blob/sprint/23Q2/RDKShell/RDKShell.cpp#L3517 places for invoking the API suggetsed by Michael
changeSessionServerState - requests an session server to change its state
https://github.com/vijith-tv/rdkservices/blob/sprint/23Q2/RDKShell/RDKShell.cpp#L4011 - suspend
https://github.com/vijith-tv/rdkservices/blob/sprint/23Q2/RDKShell/RDKShell.cpp#L4086 - destroy
Linking libRialtoServerManager.so to RDKShell
https://code.rdkcentral.com/r/c/components/generic/rdk-oe/meta-cmf-video/+/83909 pushed the code review to feature brach cretaed for upstareming the changes
Encrypted playback is not verified as a part of POC.
...
-DEPENDS += "virtual/egl essos wpeframework-clientlibraries gstreamer1.0 gstreamer1.0-plugins-base python-native ninja-native bison-native openssl-native"-RDEPENDS_${PN} += "gstreamer1.0-plugins-base-app gstreamer1.0-plugins-base-playback"+DEPENDS += "virtual/egl essos wpeframework-clientlibraries gstreamer1.0 gstreamer1.0-plugins-base python-native ninja-native bison-native openssl-native rialto-ocdm"+RDEPENDS_${PN} += "gstreamer1.0-plugins-base-app gstreamer1.0-plugins-base-playback rialto-ocdm" TUNE_CCARGS_remove = "-fno-omit-frame-pointer -fno-optimize-sibling-calls" @@ -54,6 +54,7 @@ addtask unpack_extra after do_unpack before do_patch do_configure() { export COBALT_HAS_OCDM="${@bb.utils.contains('PACKAGECONFIG', 'opencdm', '1', '0', d)}"+ export COBALT_OCDM_LIBRARY_NAME="ocdmRialto" export COBALT_ARM_CALLCONVENTION="${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'hardfp', 'softfp', d)}" ${S}/src/cobalt/build/gyp_cobalt -C qa -C gold -C devel ${COBALT_PLATFORM} }
...