Build Dependencies

Prerequisite - Build the Raspberry Pi Image (RPI 4B model reference platform for RDKV - RDK - RDK Central Wiki)

cd <workspace dir>
 
# Build the Raspberry Pi image 

$ MACHINE=raspberrypi4-rdk-hybrid source meta-cmf-raspberrypi/setup-environment
$ bitbake rdk-generic-hybrid-wpe-image



Recipes -Rialto recipes are required to build Rialto project using Yocto. Three recipes are needed - rialto, rialto-gstreamer and rialto-ocdm

rialto_git.bb

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 cmake
FILES_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"


rialto-gstreamer_git.bb

SUMMARY = "Rialto-gstreamer"
LICENSE = "CLOSED"
SRC_URI += "git://git@github.com/rdkcentral/rialto-gstreamer.git;protocol=ssh;branch=master"
SRCREV = "${AUTOREV}"
 
DEPENDS = "rialto gstreamer1.0 gstreamer1.0-plugins-base rialto-ocdm"
 
S = "${WORKDIR}/git"
inherit cmake
FILES_SOLIBSDEV = ""
 
FILES_${PN} += "${libdir}/gstreamer-1.0/libgstrialtosinks.so"


rialto-ocdm_git.bb

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 cmake
FILES_SOLIBSDEV = ""
 
FILES_${PN} += "${PKG_CONFIG_DIR}/*.pc"
FILES_${PN} += "${libdir}/libocdmRialto.so"













Building Rialto

Rialto can be built using following command:

bitbake rialto rialto-gstreamer rialto-ocdm



Running YouTube with Rialto

Libcobalt modifications

Enable ocdm rialto in libcobalt recipt in meta-rdk-video/recipes-extended/cobalt/libcobalt_22.lts.stable.bb:

libcobalt_22.lts.stable.bb

-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}
 }


Build libcobalt:


bitbake libcobalt