Versions Compared

Key

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

...

The RDK emulator is an x86 based implementation of the RDK software stack. It is primarily targeted towards the RDK development community (integrators, component developers and application developers) that attempts to simplify the process of working with the RDK software stack without the need for a reference hardware platform.  The key applications in the RDK Emulator are the rmfApp, Media streamer and the RDK-Browser.   As RDK emulator runs on desktop computers, applications can be tested and debugged before trying to deploy them to real devices.

...

Abbreviation/Acronym

Description

RDK

Reference Development Kit

VM

Virtual Machine

VBox

Virtual BoxQAM

Quadrature Amplitude Modulation

STB

Set Top Box

XRE

Cross-Platform Runtime Environment

HDD

Hard Disk DriveEOS

End of Stream

SPTS

Single Program Transport Stream

MPTS

Multi- Program Transport Stream

UPNP

Universal Plug and Play

...

  • Video/Audio playback using westerossink and autoaudiosink gstreamer elementselement.
  • IP video streaming playback using aamp-cli utility

...

Build Types

RDK Components Involved

Features/Applications Supported

Final Image Name

Startup Application

 RDK Mediaclient

  1. westeros
  2. gstreamer
  1. westeros_test cmd line utlity
  2. gst-launch utility
  3. aamp-cli utility

rdk-generic-mediaclient-image-qemux86.vmdk

Nil. Currently boots up to console screen.

...

STEP 1: Create your new VM Instance:

  • 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 MB


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

STEP 2: Configure your new VM Instance:

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

  • Configure your VMs network settings
  • Choose “Bridged Adapter” mode as shown in the screenshot below

STEP 3: Create an external hard drive:

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")


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

  • Select "Dynamically allocated" storage: 

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

  • 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

  • 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
$ Command (m for help): n
    • 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
$ Partition number (1-4, default 1): 1
    • Press "Enter" key for First sector & Last sector prompts
    • Select the command "p" to print the partition table on screen for review
$ Command (m for help): p
    • Select the command "w" to write the partition table to disk and exit fdisk
$ Command (m for help): w



  • Format your newly created partition with ext3 file system
$ mkfs.ext3 /dev/hdb1

  • 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

STEP 5: Copy a

Single Program Transport stream

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 SPTS video file from your host machine to /ext_hdd folder on the emulator VM 
  • Note: The following command is performed from your Host Machine
$ scp <your<file_spts_file_name> .ts root@<your_emulator_vm_ip>:/ext_hdd
  • Back on On your emulator VM, create a link in /opt/www/ to point to the external hard drive at its mount point /ext_hdd
$ ln -sf /ext_hdd/<your_spts_file_<file name> <your_spts_file_name>
  • In the screenshot below<your_spts_file_name> is assumed to be "received_spts1.ts" as an example.

 

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


Westeros Support on RDKV Emulator

RDK emulator supports westeros compositor and renderer module as westeros-renderer-gl

Applications testing over westeros Compositor

1) ssh login to the Emulator

Westeros compositor will  run automatically in startup of Emulator image

run following commands in terminal for manual starting the compositor on Emulator if needed

Code Block
languagenone
$ mkdir -p /run/user/0
$ export XDG_RUNTIME_DIR=/run/user/0/
$ westeros --renderer <renderer module> --display <socket-name> &
$ westeros --renderer /usr/lib/libwesteros_render_gl.so.0.0.0 --display WPE &
$ gdisplay start
$ export WAYLAND_DISPLAY=WPE

for Dunfell Emulator
---------------------
$ 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


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



Testing Videosink on Westeros Compositor


Code Block
languagenone
$ export XDG_RUNTIME_DIR=/run/user/0/
$ export WAYLAND_DISPLAY=WPE

#Check the plugin in image
$ gst-inspect-1.0 westerossink

# To play the video and render on westeros compositor
$ gst-launch-1.0 playbin uri=http://localhost:50050/received_spts1.ts videosink=westerossink