Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

RDK-V Emulator Users Guide

...

Copyright 2022 2023 RDK Management, LLC. All rights reserved.

...

  • High bitrate streams played using aamp-cli utility freezes during playback.
  • Screen goes blank after sometime 

Abbreviations and Acronyms

...

Abbreviation/Acronym

Description

RDK

Reference Development Kit

VM

Virtual Machine

VBox

Virtual Box

STB

Set Top Box

XRE

Cross-Platform Runtime Environment

HDD

Hard Disk Drive

SPTS

Single Program Transport Stream

UPNP

Universal Plug and Play

...

  • Executes on x86-based platforms including virtualization environments such as Virtual Box and QEMU.
  • Multiple build types - media client
  • Up to date with the RDK generic trunk and any x86-specific platform code.
  • Built using Yocto and RDK build frameworks

Key Features

...

  • ResidentApp startup UI
  • Video/Audio playback using westerossink gstreamer element.
  • IP video streaming playback using aamp-cli utility

...

Build Types

RDK Components Involved

Features/Applications Supported

Final Image Name

Startup Application

 RDK RDKV Mediaclient

  1. westeroswpeframework
  2. gstreamerwebkitbrowser
  3. westeros_test cmd line utlity
  4. gstreamer
  1. ResidentApp
  2. gst-launch utility
  3. aamp-cli utility

rdk-generic-mediaclient-image-qemux86.vmdk

Nil. Currently boots up to console screen.ResidentApp

Build Setup Instructions

...

Setting up the Host Environment

...

  • Open Virtualbox

  • Select New [A popup will come up]

  • Select Type as ‘Linux’

  • Select Version as ‘Other Linux (32 Bit)’

  • Click on “Next”

  • Choose a Memory Size of 512 MBat least 4GB


  • Use an existing virtual hard drive file which would be your newly built image in *.vmdk format and create your VM:

...

  • Click on “Settings” tab to configure your new VM instance

  • Set video memory to at least 64 MB in Display tab, and select the 3D acceleration option
  • Configure your VM's Configure your VMs network settings
  • Choose “Bridged Adapter” mode as shown in the screenshot below


STEP 3

...

Your VM has been built with very limited hard drive space. In order to run emulator and play video files, you need to copy your video files into the file system for playback. For this, you will need to setup a virtual external hard drive.

  • Select the vm instance on the main menu of Virtual Box
  • Click Settings -> Storage -> Add Hard disk [icon]
  • Click ‘Create new disk’ (Note: In the screenshot below, "Choose existing disk" may seem highlighted. Please select "Create new disk")

Image Removed

  • Select VDI (VirtualBox Disk Image) as your Hard Drive file type:

Image Removed

  • Select "Dynamically allocated" storage: 

Image Removed

Image Removed

STEP 4: Formatting and partitioning your new external hard drive:

  • Boot up the image and login as root with no password and use ifconfig to get IP address
  • Once you have the IP address you may SSH into your VM from your linux shell console. Use root as the ssh user.

...

  • Use the “mount” command to see the current status of connected hard disks
$ mount

Image Removed

  • Use fdisk command to list out connected hard drives. You may note that in the screenshot below, there are two hard drives listed. hda and hdb. hdb is the external hard drive that we have created in the previous step.
$ fdisk -l

Image Removed

  • Use fdisk to create your new hard disk partition
$ fdisk /dev/hdb

Review the description of the steps during fdisk operation below and the following screenshot for reference before proceeding.

  • Use fdisk to create your new hard disk partition
    • Use the command "n" to add a new partition

...

    • Select partition type as the suggested default "p" for primary partition

...

$ Partition type:

p primary (0 primary, 0 extended, 4 free)

e extended

Select (default p): p

    • Set your partition number as the suggested default. In the example case: 1

...

    • Press "Enter" key for First sector & Last sector prompts
    • Select the command "p" to print the partition table on screen for review

...

    • Select the command "w" to write the partition table to disk and exit fdisk
$ Command (m for help): w
Image Removed
  • Format your newly created partition with ext3 file system
$ mkfs.ext3 /dev/hdb1

Image Removed

  • Create a folder for mounting your new partition at /ext_hdd
  • Mount your newly created hard disk partition to /ext_hdd

$ mkdir /ext_hdd

$ mount /dev/hdb1 /ext_hdd

Image Removed

STEP 5 :  Copy a video file to your file system to be used for emulator video playback.Pre-requisite to the step is assumed that /ext_hdd is already mounted with the external hard disk partition on your emulator VM
  • Copy your video file from your host machine to /ext_hdd any folder folder on the emulator VM 
  • Note: The following command is performed from your Host Machine
$ scp <file_name> root@<your_emulator_vm_ip>:/ext_hdd <path>

Usage Instructions


Logging into your VM


As described in the previous section, you can log in to your emulator VM from your Host Machine using the ssh command.

$ ssh root@x.x.x.x

Testing

Westeros

animation using westeros compositor

using

test application

RDK emulator supports westeros compositor and renderer module as westeros-renderer-gl. Do the following to check westeros animation using westeros_test command line utility.

  • After logging in to the Emulator via ssh, kill the already running compositor application via below command and comment the last line in westeros-init.sh so that compositor is not started automatically on bootup
Code Block
collapsetrue
$ killall westeros
  • Restart the Emulator VM
  • Run following commands in terminal for manual starting the westeros compositor application
Code Block
languagenone
$ mkdir -p /run/user/0
$ export XDG_RUNTIME_DIR=/run/user/0/
$ westeros --renderer <renderer module> --display <socket-name> &
$ westeros

Comment the last line in /usr/bin/westeros-init.sh so that compositor is not started automatically on bootup
#westeros --renderer /usr/lib/libwesteros_render_gl.so.0.0.0 --display WPE &
$ gdisplay start
$ export WAYLAND_DISPLAY=WPE

for Dunfell Emulator
------
  • Restart the Emulator VM
  • Run following commands in terminal for manual starting the westeros compositor application
Code Block
languagenone
---------------
$ mkdir -p /run/user/0
$ export XDG_RUNTIME_DIR=/run/user/0/
Add the below line in westeros-init.sh
$ export LD_PRELOAD=/usr/lib/libwesteros_gl.so.0.0.0
$ westeros --renderer /usr/lib/libwesteros_render_gl.so.0.0.0 --display WPE &

Run the commands
westeros-init.sh
westeors_test


westeros compositor will launch

Testing Westeros_compositor

to test westeros compositor with simple egl test apliaction

  • Run westeros_test application in another window as given below
Code Block
languagenone
$ westeros_test


Image Added

Testing video playback using Gstreamer command line utility

  • Start the westeros compositor application as mentioned before if its not already running.
  • Copy video files to the VM 
  • Execute below command(s) to play video
run westeros_test
Code Block
languagenone
# After Launching westeros compositor in emulator
$ export XDG_RUNTIME_DIR=/run/user/0/
$ export WAYLAND_DISPLAY=WPE
$ westeros_test
(or)
$ westeros_test --display WPE

Image Removed

Testing Videosink on Westeros Compositor
$ gst-launch-1.0 playbin uri=file:///<video file name with full path>

Testing video streaming using aamp-cli utility

  • Start the westeros compositor application as mentioned before if its not already running.
  • Execute the below command to play clear-stream videos
Code Block
languagenone
$ 

...

aamp-cli <url>
e.g.
$ aamp-cli http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8