diff options
Diffstat (limited to 'waltham-transmitter')
-rw-r--r-- | waltham-transmitter/README.md | 148 | ||||
-rw-r--r-- | waltham-transmitter/transmitter-plugin/README | 103 | ||||
-rw-r--r-- | waltham-transmitter/waltham-renderer/README | 13 |
3 files changed, 148 insertions, 116 deletions
diff --git a/waltham-transmitter/README.md b/waltham-transmitter/README.md new file mode 100644 index 0000000..b358cfd --- /dev/null +++ b/waltham-transmitter/README.md @@ -0,0 +1,148 @@ +# Waltham Transmitter # + +Waltham transmitter is a plugin for weston which uses +waltham IPC library to connect to remote and transmit +client buffer using gstreamer framework + +Waltham Transmitter is divide in to two component: + +1. Transmitter plugin: Provides API to create remote connections and push surfaces over the network and handles remote output and remote input. +2. waltham renderer : The waltham renderer creates a buffer to be transmitted to other domain. The current implementation it uses gstreamer. + +###Architecture + +```` + ECU 1 ECU 2 + +-----------------------------------------------------+ +----------------------------------------------+ + | +-----------------+ | | | + | | IVI-Application | | | +-----------+-----------+ | + | +-----------------+ | | | Gstreamer | | | + | ^ | Buffer -----------------------> (Decode) | | | + | wayland | +----------------------/ | +-----------+ | | + | v | | (Ethernet) | | Waltham-receiver | | + | +----+---------------------+ | | ----------------------------> | | + | | | Transmitter Plugin |<-----------------------------/ | +-----------------------+ | + | | | | | | Waltham-Protocol | ^ | + | | | +-------------------+ | | | wayland | | + | | | | waltham-renderer |------------+ | | v | + | | | |(gstreamer Encode) | | | +---------------------+ | + | | +-+-------------------+ | | | | | + | | | | | | WESTON | | + | | WESTON | | | | | | + | +------+-------------------+ | | +----------------+----+ | + | | | | | | + | v | | v | + | +------------+ | | +----------+ | + | | Display | | | | Display | | + | | | | | | | | + | +------------+ | | +----------+ | + +-----------------------------------------------------+ +----------------------------------------------+ + +```` + +###How to build + +1. Prerequisite before building + + weston, wayland , gstreamer plugins and waltham should be built and available. + +2. Get the source code from the repository. + + git clone https://gerrit.automotivelinux.org/gerrit/src/weston-ivi-plugins + +3. Create build folder in weston-ivi-plugins + + $cd weston-ivi-plugins/ + $mkdir build/ + $cd build/ + +4. Run Cmake + + $cmake ../ + $cmake --build . + +5. transmitter.so and waltham-renderer.so should be available in the build directory. + +###How to configure weston.ini and gstreamer pipeline + +1. weston.ini: + + To load transmitter plugin to weston, add 'transmitter.so' to the 'modules' + key under '[core]', and make sure the 'shell' is 'ivi-shell.so'. + + The destination of remoting is configured in weston.ini. + Add output name, server address, port number, output's width and height key + under '[remote-output]'. You can speficy multiple [remote-output]. + + In details, see 'weston.ini.transmitter'. + +2. gstreamer pipeline: + + You can use gstreamer pipeline as you want by configuraing from "pipeline.cfg".This file should + be in the folder "/etc/xdg/weston/". + + As an example, please refer to the example file named "pipeline_example*.cfg". + + - pipeline_example_general.cfg : Does not use any HW encoder. + - pipeline_example_intel.cfg : Use Intel's HW encoder. + - pipeline_example_rcar.cfg : Use Rcar's HW encoder. + + Rename file as "pipeline.cfg" and put in correct place when you use them. + +###Connection Establishment + +1. Connect two board over ethernet. + +2. Assign IP to both the boards and check if the simple ping works. + + For example:if transmitter IP: 192.168.2.51 and Waltham-Receiver IP: 192.168.2.52 then + + $ping 192.168.2.52 (you can also ping vice versa) + +3. Make sure that IP address specified in the weston.ini under [remote-output] matches the Waltham-Receiver IP. + +4. Make sure that IP address in pipeline.cfg on the transmitter side match the Waltham-Receiver IP. + +###How to test + +start weston with modified weston.ini mention above. +You can confirm the transmitter is loaded properly from +weston log as below. + +```` + + [07:14:22.958] Loading module '/usr/lib/weston/transmitter.so' + [07:14:22.977] Registered plugin API 'transmitter_v1' of size 88 + [07:14:22.978] Registered plugin API 'transmitter_ivi_v1' of size 16 + [07:14:22.982] Loading module '/usr/lib/libweston-2/waltham-renderer.so' + [07:14:23.032] Transmitter initialized. + [07:14:23.032] Module '/usr/lib/libweston-2/waltham-renderer.so' already loaded + [07:14:23.032] Transmitter weston_seat 0xaaaad0079e50 + [07:14:23.032] Transmitter created pointer=0xaaaad00977c0 for seat 0xaaaad0079e50 + [07:14:23.032] Transmitter created keyboard=0xaaaad0079fe0 for seat 0xaaaad0079e50 + [07:14:23.032] Transmitter created touch=0xaaaacffe1010 for seat 0xaaaad0079e50 +```` +Start remoting : + +- Start an IVI application. +- Put surface on transmitter output using LayerManagerControl command + +Example command: + + $EGLWLMockNavigation & + $LaygeManagementControl get scene + -> Please check connector name of transmitter output + $layer-add-surfaces -d [transmitter output name] -s 1 -l 1 + +Weston log will indicate remoting has started: + +```` + [07:16:39.043] surface ID 10 + [07:16:39.055] gst-setting are :--> + [07:16:39.055] ip = 192.168.2.52 + [07:16:39.055] port = 34400 + [07:16:39.055] bitrate = 3000000 + [07:16:39.055] width = 800 + [07:16:39.055] height = 480 + [07:16:40.819] Parsing GST pipeline:appsrc name=src ! videoconvert ! video/x-raw,format=I420 ! omxh264enc bitrate=3000000 control-rate=2 ! rtph264pay ! udpsink name=sink host=192.168.2.52 port=34400 sync=false async=false +```` diff --git a/waltham-transmitter/transmitter-plugin/README b/waltham-transmitter/transmitter-plugin/README deleted file mode 100644 index c8305e2..0000000 --- a/waltham-transmitter/transmitter-plugin/README +++ /dev/null @@ -1,103 +0,0 @@ -Transmitter plugin - -The current implementation of Transmitter is a stub which interfaces to -other Weston parts appropriately, but all networking is just a mockup. - -Sections in this file describe: -- How to build -- How to write weston.ini -- How to test - -How to build -============ -Configure Weston with --enable-surface-remoting to build the Transmitter -plugin. - -How to write weston.ini -======================= -To load transmitter plugin to weston, add 'transmitter.so' to the 'modules' -key under '[core]', and make sure the 'shell' is 'ivi-shell.so'. - -The destination of remoting is configured in weston.ini. -Add output name, server address, port number, output's width and height key -under '[remote-output]'. -You can speficy multiple [remote-output]. - -In details, see 'weston.ini.transmitter'. - -How to test -=========== -You can use server side test application in waltham-server directory. - -If you set 'WALTHAM_DEBUG=1' to your environment valuable, you can -see the log like this: - - [13:24:08.345] Loading module '/usr/lib64/weston/transmitter.so' - [13:24:08.345] Registered plugin API 'transmitter_v1' of size 88 - [13:24:08.345] Registered plugin API 'transmitter_ivi_v1' of size 16 - [13:24:08.345] Transmitter initialized. - [13:24:08.345] Loading module '/usr/lib64/libweston-2/waltham-renderer.so' - [13:24:08.352] gst-setting are :--> - [13:24:08.352] ip = 192.168.2.52 - [13:24:08.352] port = 34400 - [13:24:08.352] bitrate = 3000000 - [13:24:08.352] crop = 384 x 368 - [13:24:08.352] width = 1920 - [13:24:08.352] width = 1080 - [13:24:08.531] open media device: platform:fe960000.vsp (fe960000.vsp) - [13:24:08.532] input pad setup ('fe960000.vsp rpf.0 input':'/dev/video0') - [13:24:08.533] output pad setup (fe960000.vsp wpf.0 output:/dev/video5) - [13:24:08.533] vsp-device '/dev/media0' created - [13:24:08.533] gst_recorder_create (1920x1080) crop 384x368 at 0,0 - [13:24:08.533] gst_pipeline: starting: appsrc name=src ! omxh264enc target-bitrate=3000000 control-rate=2 no-copy=k - [13:24:08.582] goot 1 pools - [13:24:08.583] pool settings size 211968, min 5, max 5 - [13:24:08.583] gst_recorder_create done - [13:24:08.583] [gst recorder] transmitter-192.168.2.52:34400-1: recorder initialized - [13:24:08.583] Transmitter weston_seat 0x15424630 - [13:24:08.583] Transmitter created pointer=0x15625df0 for seat 0x15424630 - [13:24:08.583] Transmitter created keyboard=0x154247c0 for seat 0x15424630 - [13:24:08.583] Transmitter created touch=0x15625f10 for seat 0x15424630 - -The connection is established, you can see following debug messages: - - debug: wth_connection_insert_new_object: new object id: 1 - debug: wth_connection_insert_new_object: new object id: 2 - 2018-01-09T13:24:22Z 00001000030000000100000002000000 wth_display_get_registry - debug: wth_connection_insert_new_object: new object id: 3 - 2018-01-09T13:24:22Z 00001000020000000100000003000000 wth_display_sync - debug: Message received on conn 0x15572730: (9) 40 bytes - debug: wthp_registry_send_global(2, 1, [variable type const char *], 4) (opcode 9) called. - debug: wth_connection_insert_new_object: new object id: 4 - 2018-01-09T13:24:22Z 00002c000800000002000000010000000400000010000000777468705f636f6d706f7369746f720001000000 wthpd - debug: Message received on conn 0x15572730: (9) 48 bytes - debug: wthp_registry_send_global(2, 1, [variable type const char *], 1) (opcode 9) called. - debug: wth_connection_insert_new_object: new object id: 5 - 2018-01-09T13:24:22Z 000034000800000002000000010000000500000015000000777468705f6976695f6170706c69636174696f6e00010d - debug: Message received on conn 0x15572730: (9) 44 bytes - debug: wthp_registry_send_global(2, 1, [variable type const char *], 4) (opcode 9) called. - debug: wth_connection_insert_new_object: new object id: 6 - 2018-01-09T13:24:22Z 000030000800000002000000010000000600000012000000777468705f626c6f625f666163746f72790001000000 d - debug: Message received on conn 0x15572730: (9) 36 bytes - debug: wthp_registry_send_global(2, 1, [variable type const char *], 4) (opcode 9) called. - debug: wth_connection_insert_new_object: new object id: 7 - 2018-01-09T13:24:22Z 00002800080000000200000001000000070000000a000000777468705f736561740001000000 wthp_registry_bid - debug: Message received on conn 0x15572730: (11) 16 bytes - debug: wthp_callback_send_done(3, 0) (opcode 11) called. - -Start remoting : -- Start an IVI application. -- Put surface on transmitter output - -Example command - $weston-simple-egl & - $LaygeManagementControl get scene - -> Please check connector name of transmitter output - $layer-add-surfaces -d [transmitter output name] -s 1 -l 1 - -Weston log will indicate remoting has started: - -[13:18:24.572] HMI transmitting surface 0x1c3dad0, ivi-id 0x9ff6 -[13:18:24.572] Transmitter: update surface 0x1c3dad0 (0, 0), 0 cb -[13:18:24.572] transmitter_surface_set_ivi_id(0x1c3dad0, 0x9ff6) -[13:18:24.972] Transmitter: surface 0x1c3dad0 entered output transmitter-0.0.0.0:66-1
\ No newline at end of file diff --git a/waltham-transmitter/waltham-renderer/README b/waltham-transmitter/waltham-renderer/README deleted file mode 100644 index 5eb94e2..0000000 --- a/waltham-transmitter/waltham-renderer/README +++ /dev/null @@ -1,13 +0,0 @@ -Waltham renderer - -The waltham renderer creates a buffer to be transmitted to other domain. -The current implementation it uses gstreamer. - -You can use gstreamer pipeline as you want by configuraing from "pipeline.cfg". -This file should be in the folder "/etc/xdg/weston/". - -As an example, please refer to the example file named "pipeline_example*.cfg". - -pipeline_example_general.cfg : Does not use any HW encoder. - -pipeline_example_intel.cfg : Use Intel's HW encoder. - -pipeline_example_rcar.cfg : Use Rcar's HW encoder. -Rename file as "pipeline.cfg" and put in correct place when you use them.
\ No newline at end of file |