├── CONTRIBUTING.md ├── COPYING ├── LICENSE ├── Makefile.am ├── Makefile.ubuntu ├── NOTICE ├── README.md ├── brcm ├── Makefile.am ├── configure.ac ├── westeros-gl │ ├── westeros-gl.cpp │ └── westeros-gl.h ├── westeros-render-nexus │ ├── Makefile.am │ ├── configure.ac │ └── westeros-render-nexus.cpp └── westeros-sink ├── configure.ac ├── docs └── relnotes │ ├── 1.01.13.txt │ ├── 1.01.14.txt │ ├── 1.01.15.txt │ ├── 1.01.16.txt │ ├── 1.01.17.txt │ ├── 1.01.18.txt │ ├── 1.01.19.txt │ ├── 1.01.20.txt │ ├── 1.01.21.txt │ ├── 1.01.22.txt │ ├── 1.01.23.txt │ ├── 1.01.24.txt │ ├── 1.01.25.txt │ ├── 1.01.26.txt │ ├── 1.01.27.txt │ ├── 1.01.28.txt │ ├── 1.01.29.txt │ ├── 1.01.30.txt │ ├── 1.01.31.txt │ ├── 1.01.32.txt │ ├── 1.01.33.txt │ ├── 1.01.34.txt │ ├── 1.01.35.txt │ ├── 1.01.36.txt │ ├── 1.01.37.txt │ ├── 1.01.38.txt │ ├── 1.01.39.txt │ ├── 1.01.40.txt │ └── 1.01.41.txt ├── drm ├── Makefile.am ├── README.md ├── configure.ac ├── modules │ ├── Makefile.am │ ├── configure.ac │ └── resolution │ │ ├── Makefile.am │ │ ├── configure.ac │ │ └── module.cpp ├── westeros-gl │ ├── avsync │ │ ├── aml-meson │ │ │ └── avsync.c │ │ └── avsync.h │ ├── westeros-gl-console-helper.c │ ├── westeros-gl-console-helper.h │ ├── westeros-gl-console.c │ ├── westeros-gl.c │ └── westeros-gl.h └── westeros-sink ├── emu └── westeros-sink ├── essos ├── Makefile.am ├── README.md ├── configure.ac ├── essos-app.h ├── essos-game.h ├── essos-resmgr-shm.cpp ├── essos-resmgr-uds.cpp ├── essos-resmgr.cpp ├── essos-resmgr.h ├── essos-sample-resmgr.cpp ├── essos-sample.cpp ├── essos-system.h ├── essos.cpp ├── essos.h └── essos.pc.in ├── icegdl ├── Makefile.am ├── configure.ac ├── westeros-gl │ ├── westeros-gl.cpp │ └── westeros-gl.h └── westeros-sink ├── linux-dmabuf ├── protocol │ ├── Makefile │ └── linux-dmabuf-unstable-v1.xml ├── westeros-linux-dmabuf.cpp └── westeros-linux-dmabuf.h ├── protocol ├── Makefile ├── stable │ └── xdg-shell.xml ├── version4 │ └── xdg-shell.xml ├── version5 │ └── xdg-shell.xml └── vpc.xml ├── rpi ├── Makefile.am ├── configure.ac ├── modules │ └── resolution │ │ ├── Makefile.am │ │ ├── configure.ac │ │ └── module.cpp ├── westeros-gl │ ├── westeros-gl.cpp │ └── westeros-gl.h ├── westeros-render-dispmanx │ ├── Makefile.am │ ├── configure.ac │ └── westeros-render-dispmanx.cpp └── westeros-sink ├── simplebuffer ├── Makefile.am ├── configure.ac ├── protocol │ ├── Makefile │ └── simple-buffer.xml ├── westeros-simplebuffer.cpp └── westeros-simplebuffer.h ├── simpleshell ├── Makefile.am ├── configure.ac ├── protocol │ ├── Makefile │ └── simpleshell.xml ├── westeros-simpleshell.cpp └── westeros-simpleshell.h ├── systemd ├── INSTALL ├── westeros-env ├── westeros-init ├── westeros.service └── westeros.sysvinit ├── test ├── Makefile.brcm ├── Makefile.common ├── Makefile.drm ├── Makefile.test ├── README.md ├── brcm-em │ ├── Makefile.am │ ├── config.site │ ├── configure.ac │ ├── em │ │ ├── Makefile.am │ │ ├── brcm-em.cpp │ │ ├── brcm-em.h │ │ ├── configure.ac │ │ └── protocol │ │ │ ├── Makefile │ │ │ └── bnxs.xml │ ├── include │ │ ├── EGL │ │ │ ├── begl_displayplatform.h │ │ │ ├── egl.h │ │ │ └── eglext.h │ │ ├── GLES2 │ │ │ ├── gl2.h │ │ │ └── gl2ext.h │ │ ├── nexus_config.h │ │ ├── platform_app.inc │ │ ├── wayland-egl.h │ │ └── westeros-ut-open.h │ ├── soc-tests.cpp │ ├── soc-tests.h │ ├── soc-video-src.cpp │ ├── soc-video-src.h │ └── wayland-egl.pc ├── drm-em │ ├── Makefile.am │ ├── config.site │ ├── configure.ac │ ├── em │ │ ├── Makefile.am │ │ ├── configure.ac │ │ ├── drm-em.cpp │ │ ├── drm-em.h │ │ └── protocol │ │ │ └── Makefile │ ├── gbm.pc │ ├── include │ │ ├── EGL │ │ │ ├── egl.h │ │ │ └── eglext.h │ │ ├── GLES2 │ │ │ ├── gl2.h │ │ │ └── gl2ext.h │ │ ├── wayland-egl.h │ │ └── westeros-ut-open.h │ ├── libdrm.pc │ ├── soc-tests.cpp │ ├── soc-tests.h │ ├── soc-video-src.cpp │ ├── soc-video-src.h │ └── wayland-egl.pc ├── get-coverage.sh ├── parse-coverage.cpp ├── run-tests.sh ├── test-clientapp.cpp ├── test-clientapp.h ├── test-egl.cpp ├── test-egl.h ├── test-essos-erm.cpp ├── test-essos-erm.h ├── test-essos.cpp ├── test-essos.h ├── test-keyboard.cpp ├── test-keyboard.h ├── test-main.cpp ├── test-pointer.cpp ├── test-pointer.h ├── test-render.cpp ├── test-render.h ├── test-repeaterapp.cpp ├── test-repeaterapp.h ├── test-simpleshell.cpp ├── test-simpleshell.h ├── test-touch.cpp ├── test-touch.h └── westeros-ut-em.h ├── tools └── mediacapture │ ├── Makefile.am │ ├── README.md │ ├── configure.ac │ ├── mediacapture-daemon.cpp │ ├── mediacapture-test.cpp │ └── mediacapture.cpp ├── v4l2 └── westeros-sink ├── westeros-compositor.cpp ├── westeros-compositor.h ├── westeros-compositor.pc.in ├── westeros-main.cpp ├── westeros-nested.cpp ├── westeros-nested.h ├── westeros-player.cpp ├── westeros-render-embedded.cpp ├── westeros-render-gl.cpp ├── westeros-render.cpp ├── westeros-render.h ├── westeros-sink ├── COPYING ├── COPYING.LGPL ├── brcm │ ├── Makefile.am │ ├── configure.ac │ ├── westeros-sink-soc.c │ └── westeros-sink-soc.h ├── drm │ ├── Makefile.am │ ├── configure.ac │ ├── westeros-sink-soc.c │ └── westeros-sink-soc.h ├── emu │ ├── Makefile.am │ ├── README │ ├── configure.ac │ ├── westeros-sink-soc.c │ └── westeros-sink-soc.h ├── icegdl │ ├── Makefile.am │ ├── configure.ac │ ├── westeros-sink-soc.c │ └── westeros-sink-soc.h ├── raw │ ├── Makefile.am │ ├── configure.ac │ ├── westeros-sink-soc.c │ └── westeros-sink-soc.h ├── rpi │ ├── Makefile.am │ ├── configure.ac │ ├── westeros-sink-soc.c │ └── westeros-sink-soc.h ├── v4l2 │ ├── Makefile.am │ ├── configure.ac │ ├── svp │ │ ├── aml-meson │ │ │ └── svp-util.c │ │ └── svp-util.h │ ├── westeros-sink-soc.c │ └── westeros-sink-soc.h ├── westeros-sink-sw.c ├── westeros-sink-sw.h ├── westeros-sink.c └── westeros-sink.h ├── westeros-test.cpp └── westeros-version.h /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Contributing 2 | ============ 3 | 4 | If you wish to make code contributions to this project, the master source is hosted at [code.rdkcentral.com](https://code.rdkcentral.com/r/#/admin/projects/components/opensource/westeros). You can submit your changes for review via that site. 5 | 6 | This component is Apache-2.0 licensed, except for portions contained under the westeros-sink directory, which are licensed under the LGPL-2.1 license. Please use the appropriate header(s) for your contribution. 7 | 8 | Please follow the [workflow](https://wiki.rdkcentral.com/display/CMF/Gerrit+Development+Workflow) when making a contribution. 9 | 10 | In order to contribute code, first-time users are requested to agree to the [license](https://wiki.rdkcentral.com/signup.action). 11 | 12 | There is a GitHub [mirror](https://github.com/rdkcmf/westeros) of this project. Pull requests to the mirror will be ignored. 13 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | LICENSE -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | This component contains software that is Copyright (c) 2016 RDK Management. 2 | The component is licensed to you under the Apache License, Version 2.0 (the "License"). 3 | You may not use the component except in compliance with the License. 4 | 5 | The component may include material which is licensed under other licenses / copyrights as 6 | listed below. Your use of this material within the component is also subject to the terms and 7 | conditions of these licenses. The LICENSE file contains the text of all the licenses which apply 8 | within this component, except as indicated in the following paragraph. 9 | 10 | The westeros-sink directory tree within this component contains some software which is 11 | Copyright (c) 2016 RDK Management and licensed to you under the LGPL-2.1 License. The westeros-sink 12 | directory contains its own license file, called COPYING, which describes the licensing of the 13 | software under the westeros-sink directory. 14 | 15 | 16 | Copyright © 2008-2013 Kristian Høgsberg 17 | Copyright © 2013 Rafael Antognolli 18 | Copyright © 2013 Jasper St. Pierre 19 | Copyright © 2010-2013 Intel Corporation 20 | Licensed under the MIT License 21 | 22 | Copyright © 2010 Intel Corporation 23 | Copyright © 2011 Benjamin Franzke 24 | Copyright © 2012-2013 Collabora, Ltd. 25 | Licensed under the MIT License 26 | 27 | Copyright © 2011 Kristian Høgsberg 28 | Copyright © 2011 Benjamin Franzke 29 | Licensed under the MIT License 30 | 31 | Copyright © 2008-2011 Kristian Høgsberg 32 | Copyright © 2010-2011 Intel Corporation 33 | Licensed under the MIT License 34 | 35 | Copyright (c) 2007-2009 The Khronos Group Inc. 36 | Licensed under the MIT License 37 | 38 | Copyright (c) 2007-2013 The Khronos Group Inc. 39 | Licensed under the MIT License 40 | 41 | Copyright (c) 2013 The Khronos Group Inc. 42 | Licensed under the MIT License 43 | 44 | Copyright © 2014,2015 Collabora, Ltd. 45 | Licensed under the MIT License 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # westeros 2 | Wayland Compositor 3 | 4 | Westeros is a light-weight Wayland compositor library. It uses the Wayland protocols, and is designed 5 | to be compatible with applications built to use Wayland compositors. It implements a library that 6 | enables an application to create one or more Wayland displays. It supports the creation of normal, nested, and 7 | embedded wayland compositors. A normal compositor displays its composited output to the screen, while a nested 8 | compositor sends its composited output to another compositor as a client surface. An embedded compositor allows 9 | the application that has created the embedded Wayland compositor to incorporate its composited output into the 10 | applications UI. This allows for easy integration of the UI of external third party applications into an 11 | applications's UI. 12 | 13 | --- 14 | # Copyright and license 15 | 16 | Most of Westeros is licensed under the Apache License, Version 2.0. GStreamer plugins are licensed under 17 | the LGPL-2.1 license. Licensing for the Apache-licensed portion is described in LICENSE and NOTICE, in 18 | the top level directory. Licensing for the GStreamer plugins is described in westeros-sink/COPYING. 19 | 20 | -------------------------------------------------------------------------------- /brcm/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2016 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | include ${PKG_CONFIG_SYSROOT_DIR}/usr/include/platform_app.inc 21 | 22 | AUTOMAKE_OPTIONS = subdir-objects 23 | 24 | SUBDIRS = 25 | 26 | REFSW_VERSION ?= refsw14.4 27 | 28 | GST_BASE_CFLAGS ?= 29 | GST_BASE_LIBS ?= 30 | LIB_SUB_DIR= gstreamer-0.10 31 | 32 | AM_CFLAGS = -DUSE_WESTEROS $(NEXUS_CFLAGS) $(NXCLIENT_CFLAGS) -I$(ROCKFORD_TOP)/middleware/platform/nexus \ 33 | -I$(ROCKFORD_TOP)/middleware/v3d/interface/khronos/include \ 34 | -I$(ROCKFORD_TOP)/middleware/v3d/interface/khronos/include/EGL 35 | 36 | AM_LDFLAGS = 37 | 38 | lib_LTLIBRARIES = libwesteros_gl.la 39 | 40 | libwesteros_gl_la_SOURCES = westeros-gl/westeros-gl.cpp 41 | 42 | libwesteros_gl_la_include_HEADERS = westeros-gl/westeros-gl.h 43 | libwesteros_gl_la_includedir = $(includedir) 44 | libwesteros_gl_la_CXXFLAGS= $(AM_CFLAGS) 45 | 46 | libwesteros_gl_la_LDFLAGS= \ 47 | $(AM_LDFLAGS) \ 48 | -lwayland-egl \ 49 | -lpthread \ 50 | ${NEXUS_LD_LIBRARIES} 51 | 52 | if NXCLIENT_LOCAL 53 | libwesteros_gl_la_LDFLAGS += -lnxclient_local 54 | else 55 | libwesteros_gl_la_LDFLAGS += -lnxclient 56 | endif 57 | 58 | distcleancheck_listfiles = *-libtool 59 | 60 | ## IPK Generation Support 61 | IPK_GEN_PATH = $(abs_top_builddir)/ipk 62 | IPK_GEN_STAGING_DIR=$(abs_top_builddir)/staging_dir 63 | IPK_GEN_INPUT = debian-binary control.tar.gz data.tar.gz 64 | IPK_GEN_OUTPUT = westeros-soc.ipk 65 | 66 | package_ipk: 67 | @echo "Generating IPK Package" 68 | $(MAKE) prefix=${abs_top_builddir}/staging_dir install 69 | $(mkdir_p) $(IPK_GEN_STAGING_DIR)/usr/bin/ 70 | cp -af $(IPK_GEN_STAGING_DIR)/bin/* $(IPK_GEN_STAGING_DIR)/usr/bin/ 71 | tar -czvf $(IPK_GEN_PATH)/data.tar.gz -C $(IPK_GEN_STAGING_DIR) usr 72 | tar -czvf $(IPK_GEN_PATH)/control.tar.gz -C $(IPK_GEN_PATH) control postinst prerm 73 | cd $(IPK_GEN_PATH) && ar cr $(IPK_GEN_OUTPUT) $(IPK_GEN_INPUT) && cd - 74 | rm -rf ${abs_top_builddir}/staging_dir 75 | rm -rf $(abs_top_builddir)/ipk/control.tar.gz 76 | rm -rf $(abs_top_builddir)/ipk/data.tar.gz 77 | -------------------------------------------------------------------------------- /brcm/configure.ac: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2016 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | # -*- Autoconf -*- 21 | # Process this file with autoconf to produce a configure script. 22 | 23 | dnl AC_PREREQ([2.65]) 24 | AC_INIT(westeros-soc, version-1.0, jeff_wannamaker@cable.comcast.com,westeros-soc) 25 | AC_CONFIG_SRCDIR([]) 26 | AC_CONFIG_HEADERS([cfg/config.h]) 27 | AC_CONFIG_MACRO_DIR([m4]) 28 | AC_CONFIG_AUX_DIR([cfg]) 29 | AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-bzip2 1.9]) 30 | LT_INIT 31 | 32 | # Checks for programs. 33 | AC_PROG_CC 34 | AC_PROG_INSTALL 35 | AC_PROG_MAKE_SET 36 | AC_PROG_CXX 37 | 38 | # Checks for header files. 39 | AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) 40 | 41 | # Checks for typedefs, structures, and compiler characteristics. 42 | AC_TYPE_SIZE_T 43 | AC_HEADER_STDBOOL 44 | 45 | IARM_CFLAGS=" " 46 | 47 | NXCLIENT_LOCAL=" " 48 | AC_ARG_ENABLE([nxclient_local], 49 | AS_HELP_STRING([--enable-nxclient_local],[enable local nxclient ]), 50 | [ 51 | case "${enableval}" in 52 | yes) NXCLIENT_LOCAL=true ;; 53 | no) NXCLIENT_LOCAL=false ;; 54 | *) AC_MSG_ERROR([bad value ${enableval} for --enable-nxclient_local ]) ;; 55 | esac 56 | ], 57 | [echo "local nxclient is enable"]) 58 | AM_CONDITIONAL([NXCLIENT_LOCAL], [test x$NXCLIENT_LOCAL = xtrue]) 59 | AC_SUBST(NXCLIENT_LOCAL) 60 | 61 | # Checks for library functions. 62 | #Add the subdirectories to be considered for building. 63 | SUBDIRS=" " 64 | #to setup m4 macros 65 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])], 66 | [AM_DEFAULT_VERBOSITY=1 67 | AC_SUBST(AM_DEFAULT_VERBOSITY)]) 68 | 69 | PKG_CHECK_MODULES([GLIB],[glib-2.0 >= 2.22.5]) 70 | PKG_CHECK_MODULES([GTHREAD],[gthread-2.0 >= 2.38.2]) 71 | PKG_CHECK_MODULES([WAYLAND_CLIENT],[wayland-client >= 1.6.0]) 72 | PKG_CHECK_MODULES([WAYLAND_SERVER],[wayland-server >= 1.6.0]) 73 | 74 | WAYLANDLIB="-lwayland-client" 75 | AC_SUBST(WAYLANDLIB) 76 | 77 | AC_CONFIG_FILES([Makefile]) 78 | AC_SUBST(WAYLAND_CFLAGS) 79 | AC_SUBST(GUPNP_VERSION) 80 | AC_SUBST(plugindir) 81 | AC_OUTPUT 82 | 83 | -------------------------------------------------------------------------------- /brcm/westeros-gl/westeros-gl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2016 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _WESTEROS_GL_H 20 | #define _WESTEROS_GL_H 21 | 22 | typedef struct _WstGLCtx WstGLCtx; 23 | 24 | typedef struct _WstGLDisplaySafeArea 25 | { 26 | int x; 27 | int y; 28 | int w; 29 | int h; 30 | } WstGLDisplaySafeArea; 31 | 32 | typedef struct _WstGLDisplayInfo 33 | { 34 | int width; 35 | int height; 36 | WstGLDisplaySafeArea safeArea; 37 | bool secureGraphics; 38 | } WstGLDisplayInfo; 39 | 40 | typedef void (*WstGLDisplaySizeCallback)( void *userData, int width, int height ); 41 | 42 | WstGLCtx* WstGLInit(); 43 | void WstGLTerm( WstGLCtx *ctx ); 44 | bool WstGLGetDisplayInfo( WstGLCtx *ctx, WstGLDisplayInfo *displayInfo ); 45 | bool WstGLGetDisplaySafeArea( WstGLCtx *ctx, int *x, int *y, int *w, int *h ); 46 | bool WstGLAddDisplaySizeListener( WstGLCtx *ctx, void *userData, WstGLDisplaySizeCallback listener ); 47 | bool WstGLRemoveDisplaySizeListener( WstGLCtx *ctx, WstGLDisplaySizeCallback listener ); 48 | void* WstGLCreateNativeWindow( WstGLCtx *ctx, int x, int y, int width, int height ); 49 | void WstGLDestroyNativeWindow( WstGLCtx *ctx, void *nativeWindow ); 50 | bool WstGLGetNativePixmap( WstGLCtx *ctx, void *nativeBuffer, void **nativePixmap ); 51 | void WstGLGetNativePixmapDimensions( WstGLCtx *ctx, void *nativePixmap, int *width, int *height ); 52 | void WstGLReleaseNativePixmap( WstGLCtx *ctx, void *nativePixmap ); 53 | void* WstGLGetEGLNativePixmap( WstGLCtx *ctx, void *nativePixmap ); 54 | 55 | #endif 56 | 57 | -------------------------------------------------------------------------------- /brcm/westeros-render-nexus/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2016 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | SUBDIRS = 21 | 22 | AM_CXXFLAGS = -DENABLE_SBPROTOCOL 23 | 24 | AM_CFLAGS = 25 | 26 | AM_LDFLAGS = 27 | 28 | 29 | lib_LTLIBRARIES = libwesteros_render_nexus.la 30 | 31 | libwesteros_render_nexus_la_SOURCES = westeros-render-nexus.cpp 32 | libwesteros_render_nexus_la_includedir = $(includedir) 33 | libwesteros_render_nexus_la_LDFLAGS= -lwesteros_simplebuffer_server 34 | if HAVE_WAYLAND_EGL 35 | AM_CXXFLAGS += -DWESTEROS_HAVE_WAYLAND_EGL 36 | libwesteros_render_nexus_la_LDFLAGS += -lwayland-egl 37 | endif 38 | 39 | if NXCLIENT_LOCAL 40 | libwesteros_render_nexus_la_LDFLAGS += -lnxclient_local 41 | else 42 | libwesteros_render_nexus_la_LDFLAGS += -lnxclient 43 | endif 44 | 45 | distcleancheck_listfiles = *-libtool 46 | 47 | ## IPK Generation Support 48 | IPK_GEN_PATH = $(abs_top_builddir)/ipk 49 | IPK_GEN_STAGING_DIR=$(abs_top_builddir)/staging_dir 50 | IPK_GEN_INPUT = debian-binary control.tar.gz data.tar.gz 51 | IPK_GEN_OUTPUT = westeros-render-nexus.ipk 52 | 53 | package_ipk: 54 | @echo "Generating IPK Package" 55 | $(MAKE) prefix=${abs_top_builddir}/staging_dir install 56 | $(mkdir_p) $(IPK_GEN_STAGING_DIR)/usr/bin/ 57 | cp -af $(IPK_GEN_STAGING_DIR)/bin/* $(IPK_GEN_STAGING_DIR)/usr/bin/ 58 | tar -czvf $(IPK_GEN_PATH)/data.tar.gz -C $(IPK_GEN_STAGING_DIR) usr 59 | tar -czvf $(IPK_GEN_PATH)/control.tar.gz -C $(IPK_GEN_PATH) control postinst prerm 60 | cd $(IPK_GEN_PATH) && ar cr $(IPK_GEN_OUTPUT) $(IPK_GEN_INPUT) && cd - 61 | rm -rf ${abs_top_builddir}/staging_dir 62 | rm -rf $(abs_top_builddir)/ipk/control.tar.gz 63 | rm -rf $(abs_top_builddir)/ipk/data.tar.gz 64 | -------------------------------------------------------------------------------- /brcm/westeros-render-nexus/configure.ac: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2016 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | # -*- Autoconf -*- 21 | # Process this file with autoconf to produce a configure script. 22 | 23 | dnl AC_PREREQ([2.65]) 24 | AC_INIT(westeros-render-nexus, version-1.0, jeff_wannamaker@cable.comcast.com,westeros-render-nexus) 25 | AC_CONFIG_SRCDIR([]) 26 | AC_CONFIG_HEADERS([config.h]) 27 | AC_CONFIG_MACRO_DIR([m4]) 28 | AC_CONFIG_AUX_DIR([.]) 29 | AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-bzip2 1.9]) 30 | LT_INIT 31 | 32 | # Checks for programs. 33 | AC_PROG_CC 34 | AC_PROG_INSTALL 35 | AC_PROG_MAKE_SET 36 | AC_PROG_CXX 37 | 38 | # Checks for header files. 39 | AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) 40 | 41 | # Checks for typedefs, structures, and compiler characteristics. 42 | AC_TYPE_SIZE_T 43 | AC_HEADER_STDBOOL 44 | 45 | WAYLAND_EGL_DETECTED=" " 46 | 47 | IARM_CFLAGS=" " 48 | NXCLIENT_LOCAL=" " 49 | AC_ARG_ENABLE([nxclient_local], 50 | AS_HELP_STRING([--enable-nxclient_local],[enable local nxclient ]), 51 | [ 52 | case "${enableval}" in 53 | yes) NXCLIENT_LOCAL=true ;; 54 | no) NXCLIENT_LOCAL=false ;; 55 | *) AC_MSG_ERROR([bad value ${enableval} for --enable-nxclient_local ]) ;; 56 | esac 57 | ], 58 | [echo "local nxclient is enable"]) 59 | AM_CONDITIONAL([NXCLIENT_LOCAL], [test x$NXCLIENT_LOCAL = xtrue]) 60 | AC_SUBST(NXCLIENT_LOCAL) 61 | 62 | # Checks for library functions. 63 | #Add the subdirectories to be considered for building. 64 | SUBDIRS=" " 65 | #to setup m4 macros 66 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])], 67 | [AM_DEFAULT_VERBOSITY=1 68 | AC_SUBST(AM_DEFAULT_VERBOSITY)]) 69 | 70 | PKG_CHECK_MODULES([GLIB],[glib-2.0 >= 2.22.5]) 71 | PKG_CHECK_MODULES([GTHREAD],[gthread-2.0 >= 2.38.2]) 72 | PKG_CHECK_MODULES([WAYLAND_CLIENT],[wayland-client >= 1.6.0]) 73 | PKG_CHECK_MODULES([WAYLAND_EGL],[wayland-egl >= 0.0],[WAYLAND_EGL_DETECTED=true],[WAYLAND_EGL_DETECTED=false]) 74 | 75 | AM_CONDITIONAL([HAVE_WAYLAND_EGL], [test x$WAYLAND_EGL_DETECTED = xtrue]) 76 | 77 | AC_CONFIG_FILES([Makefile]) 78 | AC_SUBST(GUPNP_VERSION) 79 | AC_OUTPUT 80 | 81 | -------------------------------------------------------------------------------- /brcm/westeros-sink: -------------------------------------------------------------------------------- 1 | ../westeros-sink/brcm/ -------------------------------------------------------------------------------- /docs/relnotes/1.01.13.txt: -------------------------------------------------------------------------------- 1 | Westeros Release Notes 2 | ====================== 3 | 4 | Westeros 1.01.13 Release Notes 5 | ------------------------------ 6 | 7 | Date: Jan 8, 2020 8 | Revision hash: 7df197ef3141e6d6218b8d11229d4db334ce2142 9 | Changes: 10 | 11 | -Add test case for shm with repeater 12 | test: a new test case added to the automated unit test system to 13 | cover client rendering with Wayland shared memory across a repeating 14 | compositor. 15 | 16 | -Remove stop hang defence as root cause is fixed 17 | core compositor: a bug whereby the compositor display update timer can 18 | be set to a hugh value upon system time change was fixed in version 19 | 1.01.12. This change removes some defensive code that was temporarily 20 | added before the root cause was known. 21 | 22 | -Mode setting enhancements 23 | essos: Provide EssContextSetDisplayMode and add convenience "--window-size" 24 | cmdline arg to reference compositor. The EssContextSetDisplayMode API uses 25 | the new westeros-gl WstGLSetDisplayMode API (see below) when it is 26 | available, which is on devices using KMS+DRM. It is discouraged for the 27 | reference compositor app to be used in deployments as its intended purpose 28 | is as a simple example of how to use the Westeros API's to implement a 29 | Wayland compositor. However, this new command line argument allows 30 | specifying a display resolution. On devices using KMS this will set the 31 | display mode on compositor startup. On non-KMS devices it merely infoms 32 | the compositor what display mode has been set by some external mechanism. 33 | 34 | 35 | -Mode setting enhancements 36 | drm: Add WstGLSetDisplayMode for explicit mode setting and enhance ability for 37 | graphics resolution to differ from display resolution. This change affects 38 | Westeros built for devices using KMS+DRM. The WstGLSetDisplayMode API takes 39 | a mode string with the format "[wx]h[p|i][[x]r]". For example: 40 | 1920x1080i60 41 | 720p 42 | 1080i 43 | 3840x2160 44 | 1920x1080x24 45 | Support for graphics resolution to diff from display resolution enables 46 | scenarios where the HDMI output resolution is 4K for full video quality 47 | but graphics arek rendered at a lower resolution like 1080p. 48 | 49 | -Sink gets display size from compositor 50 | sink: The sink binds to wl_output in order to get display size information from 51 | the compositor. This eliminates the need for any downstream patching related to 52 | default screen size. For usage without a compositor connection the rectangle 53 | property must be used. 54 | 55 | -Act on rectangle property only when values change 56 | sink: to avoid overwhelming the wayland connection with traffic, the sink 57 | element will now only act on its 'rectangle' property if the provided values 58 | differ from the current values. 59 | 60 | -Avoid possible null dereference on error path 61 | core compositor: correcting an error path null dereference found via static 62 | analysis. 63 | 64 | 65 | Depedencies 66 | ------------ 67 | wayland >= 1.6.0 68 | libxkbcommon >= 0.8.3 69 | xkeyboard-config >= 2.18 70 | gstreamer >= 1.10.4 71 | EGL >= 1.4 72 | GLES >= 2.0 73 | 74 | 75 | -------------------------------------------------------------------------------- /docs/relnotes/1.01.14.txt: -------------------------------------------------------------------------------- 1 | Westeros Release Notes 2 | ====================== 3 | 4 | Westeros 1.01.14 Release Notes 5 | ------------------------------ 6 | 7 | Date: Jan 28, 2020 8 | Tag: Westeros-1.01.14 9 | Changes: 10 | 11 | -Update method of detecting if secure video is enabled 12 | brcm: Update the method used to determine at runtime if 13 | a Broadcom SOC device has SVP (secure video path) enabled. 14 | 15 | -EOS fixes 16 | sink: don't generate eos during underflow without eos from upstream and 17 | ensure synchronous transition from PAUSED to PLAYING after preroll. Add 18 | automated test case to cover this scenario 19 | 20 | -Ensure window size set for embedded 21 | reference app: fix bug where window size defaults to zero if 22 | no --window-size command line argument was supplied and running 23 | as embedded compositor 24 | 25 | -Video positioning fixes and related tests 26 | core compositor, sink: fix video positioning in vpc bridge 27 | configuration when running at various output resolutions. Add 28 | automated test case covering 23 video positioning scenarios. 29 | 30 | -Use NV12M for multiplane when available 31 | v4l2: preferentially use NV12M format for video on v4l2 devices which 32 | report support for this capture format. 33 | 34 | 35 | Depedencies 36 | ------------ 37 | wayland >= 1.6.0 38 | libxkbcommon >= 0.8.3 39 | xkeyboard-config >= 2.18 40 | gstreamer >= 1.10.4 41 | EGL >= 1.4 42 | GLES >= 2.0 43 | 44 | 45 | -------------------------------------------------------------------------------- /docs/relnotes/1.01.15.txt: -------------------------------------------------------------------------------- 1 | Westeros Release Notes 2 | ====================== 3 | 4 | Westeros 1.01.15 Release Notes 5 | ------------------------------ 6 | 7 | Date: Feb 19, 2020 8 | Tag: Westeros-1.01.15 9 | Changes: 10 | 11 | -Fix typo breaking rpi build 12 | rpi (useland+omx): fix typo in code causing a build failure 13 | 14 | -Video hole punch fix and related tests 15 | sink: Fix some video issues with video alpha hole punching and updating releated test cases 16 | 17 | -Expand automated test to drm+v4l2 18 | test: Expanded automated test system to include emulation for testing configurations based 19 | on KMS+drm+v4l2 20 | 21 | -V4l2 updates 22 | sink (v4l2): Fix max frame size detection and make sink caps based on format support 23 | discovered from v4l2 driver. 24 | 25 | -Drm updates 26 | drm: Updates to westeros-gl for drm: 27 | -Support zpos plane attribute 28 | -Prefer primary plane for graphics 29 | -Video server adjusts frame size based on mode and gfx res 30 | -Suppress video server with 'export WESTEROS_GL_NO_VIDEOSERVER=1' 31 | -No native fence if video server used 32 | 33 | -Add support for v4l2 events 34 | sink (v4l2): Add support to v4l2 sink for using v4l2 events 35 | 36 | -Fixes for brcm video positioning at various resolutions 37 | core compositor, sink: Fixes for video positioning with VPC bridge 38 | 39 | -Update method of detecting if secure video is enabled 40 | brcm: Update the method used to determine at runtime if 41 | a Broadcom SOC device has SVP (secure video path) enabled. 42 | 43 | -Fix brcm video show property and add test case 44 | sink (brcm): fix operation of the show-video-window property 45 | 46 | -Fix video scaling with emb output size with vpc bridge 47 | core compositor: remove code breaking vpc propagation of output size 48 | when running in a bridged configuration. 49 | 50 | Depedencies 51 | ------------ 52 | wayland >= 1.6.0 53 | libxkbcommon >= 0.8.3 54 | xkeyboard-config >= 2.18 55 | gstreamer >= 1.10.4 56 | EGL >= 1.4 57 | GLES >= 2.0 58 | 59 | 60 | -------------------------------------------------------------------------------- /docs/relnotes/1.01.16.txt: -------------------------------------------------------------------------------- 1 | Westeros Release Notes 2 | ====================== 3 | 4 | Westeros 1.01.16 Release Notes 5 | ------------------------------ 6 | 7 | Date: Mar 6, 2020 8 | Tag: Westeros-1.01.16 9 | Changes: 10 | 11 | -Fix compilation error 12 | brcm: allow building with new Broadcom SDK versions where NXPL_CreateCompatiblePixmap no longer 13 | exists while still supporting older SDK versions still in use. 14 | 15 | -Fix handle leak in drm video server 16 | drm: use DRM_IOCTL_GEM_CLOSE to release handles obtained from drmPrimeFDToHandle 17 | 18 | -Changes for building with Yocto 3.1 19 | build: Changes to configure.ac files to fix build issues with Yocto 3.1 20 | 21 | -V4l2 updates: 22 | v4l2: updates to v4l2 westerossink: 23 | -handle caps received prior to opening driver 24 | -fix munumap issue 25 | -fix sync issue on shutdown 26 | 27 | -Ensure capture thread is stopped 28 | brcm: with brcm westerossink, if capture thread is started and the transition to paused state 29 | doesn't complete it needs to be stopped before the element is finalized 30 | 31 | -Adjust locking in v4l2 sink 32 | v4l2: Adjust locking in v4l2 westerosisnk to fix some crashes 33 | 34 | -Enhance drm emulation for videoserver automated testing 35 | test: expand drm emulation in automated test to support testing of westeros video server 36 | 37 | -v4l2 update: fix input format selection from caps 38 | v4l2: Fix v4l2 westerossink abilit to set v4l2 input format based on set caps 39 | 40 | -Query and log drm version 41 | drm: Add code to query and log detected drm version 42 | 43 | -Remove unconditional position log 44 | sink: remove an unconditional debug log 45 | 46 | 47 | Depedencies 48 | ------------ 49 | wayland >= 1.6.0 50 | libxkbcommon >= 0.8.3 51 | xkeyboard-config >= 2.18 52 | gstreamer >= 1.10.4 53 | EGL >= 1.4 54 | GLES >= 2.0 55 | 56 | 57 | -------------------------------------------------------------------------------- /docs/relnotes/1.01.17.txt: -------------------------------------------------------------------------------- 1 | Westeros Release Notes 2 | ====================== 3 | 4 | Westeros 1.01.17 Release Notes 5 | ------------------------------ 6 | 7 | Date: Apr 16, 2020 8 | Tag: Westeros-1.01.17 9 | Changes: 10 | 11 | * V4l2 and drm updates plus automated tests: 12 | -drm fixes for issues found when rapidly starting and stopping video server 13 | -v4l2 setup input buffers upon receipt of first input buffer 14 | -v4l2 fix preroll, seeking, frame stepping 15 | -add a number of drm/v4l2 specific automated tests 16 | 17 | * Improve essos app ability to control EGL 18 | -add EssContextSetEGLSurfaceAttributes, EssContextGetEGLSurfaceAttributes methods 19 | 20 | * Essos updates: 21 | -add EssContextDestroyNativeWindow 22 | -don't do internal EGL setup if app is doing external EGL 23 | 24 | * Sink restructuring: 25 | -move wayland resource acquisition/release from init/term to state transition 26 | -break out of wayland dispatch to prevent hang 27 | 28 | * Essos updates: 29 | -fix some names 30 | -don't perform platform term in EssContextStop 31 | -only run event loop if context running in EssContextRunEventLoopOnce 32 | 33 | * Sink updates for auto-plugging 34 | 35 | * Ensure sink rectangle property acted on first time 36 | -rectangle property updates are ignored if the new values match the current values 37 | but with this change, updates are done regardless for the first instance of 38 | setting the property 39 | 40 | * Revert to previous behavior in EssContextRunEventLoopOnce 41 | 42 | * Restructure essos: 43 | -divide API into app and system 44 | -add explicit keyRepeat method to key listener 45 | 46 | * Remove duplicate API declaration 47 | -remove duplicate declaration for EssContextSetName that was inadvertently added 48 | during restructuring 49 | 50 | * Fix video connection initialization error 51 | -faulty initialization of a field holding a file descriptor lead to various errors 52 | 53 | * Sink updates for brcm: 54 | -add property 'immediate-output' as alias for 'camera-latency' 55 | -add property 'force-aspet-ratio' for use by playbin 56 | -clean up some unneeded newlines in logs 57 | 58 | * Drm updates: 59 | -use output fence in atomic updates 60 | -handle devices that return null connector when HDMI cable is unplugged 61 | 62 | * Adjust output fence to maximize parallelism 63 | 64 | * Add gamepad support to Essos 65 | 66 | * WstCompositorFocusClientByName: check surface and surface->name are not null pointer 67 | 68 | * Add automated gamepad tests 69 | 70 | * Add WstClient_firstFrame client status event 71 | 72 | * Brcm sink: improve virtual size setting 73 | 74 | 75 | Depedencies 76 | ------------ 77 | wayland >= 1.6.0 78 | libxkbcommon >= 0.8.3 79 | xkeyboard-config >= 2.18 80 | gstreamer >= 1.10.4 81 | EGL >= 1.4 82 | GLES >= 2.0 83 | 84 | 85 | -------------------------------------------------------------------------------- /docs/relnotes/1.01.18.txt: -------------------------------------------------------------------------------- 1 | Westeros Release Notes 2 | ====================== 3 | 4 | Westeros 1.01.18 Release Notes 5 | ------------------------------ 6 | 7 | Date: June 10, 2020 8 | Tag: Westeros-1.01.18 9 | Changes: 10 | 11 | * Add icegdl support files 12 | 13 | * Accommodate newer versions of mesa 14 | 15 | * Initial support for secure video on AmLogic-Meson 16 | 17 | * Use QoS to signal dropped frames 18 | 19 | * v4l2 updates 20 | -re-subscribe for events after hard decoder reset 21 | -avoid double rendering of buffer during preroll 22 | -retain reference on input dma-buf gstbuffer until dequeued from driver 23 | 24 | * Fix crash on video server over subscribe 25 | 26 | * Fix crash on video server over subscribe 27 | -handle asynchronous frame updates at various rates and update display at mode rate 28 | -video server informs clients of display refresh rate 29 | -sink drops frames if video frame rate exceeds display rate 30 | -improve sink pause/resume 31 | -automatic screen refresh on HDMI hot plug 32 | -rely on gstreamer for AV sync 33 | -fixes for some sources of tearing 34 | -sink uses /dev/dri/renderD128 for SVP 35 | 36 | * v4l2: fix gem allocation for amlogic dw mode 0 37 | 38 | * v4l2 updates 39 | -increase input buffer sizes 40 | -fix sequencing of Amlogic svp decoder configuration 41 | 42 | * Move gamepad from joystick to evdev api 43 | 44 | * drm+v4l2 updates 45 | -remove reference to unneeded header file 46 | -add compilation guards for references to newer V4L2 formats 47 | 48 | * v4l2 updates 49 | -adjusting management of Amlogic dw mode 50 | -move to 4M input buffers 51 | 52 | * Fix alpha application with WstHints_applyTransform 53 | 54 | 55 | 56 | Depedencies 57 | ------------ 58 | wayland >= 1.6.0 59 | libxkbcommon >= 0.8.3 60 | xkeyboard-config >= 2.18 61 | gstreamer >= 1.10.4 62 | EGL >= 1.4 63 | GLES >= 2.0 64 | 65 | 66 | -------------------------------------------------------------------------------- /docs/relnotes/1.01.21.txt: -------------------------------------------------------------------------------- 1 | Westeros Release Notes 2 | ====================== 3 | 4 | Westeros 1.01.21 Release Notes 5 | ------------------------------ 6 | 7 | Date: Nov 11, 2020 8 | Tag: Westeros-1.01.21 9 | Changes: 10 | 11 | * Limit audience for mode msgs with virtutual embedded compositor 12 | 13 | * Video updates 14 | -add Essos resource manager for the coordinated use of video resources 15 | -integrate use of resource manager into westeros-sink 16 | -add software video decode capability to westeros-sink 17 | 18 | Use of the resource manager is runtime disabled by default. Enable with 19 | 'export WESTEROS_SINK_USE_ESSRMGR=1'. At present it can be enabled only for the brcm platform. 20 | 21 | Software decode support is disabled at build time by default. It may be enabled by defining 22 | -DENABLE_SW_DECODE in the build. At present it can be enabled only for the brcm platform. 23 | 24 | * v4l2 updates 25 | -adjust stop sequence to stop unwanted logs 26 | -fix buffer leak on flush with dma-buf input 27 | -fix possible crash on pause to ready transition 28 | -fix memory leak on eos thread exit 29 | -fix size of msg buffer for session info 30 | 31 | * Video updates 32 | -Extend software decode support to v4l2 platform. Software decode support is disabled at build time 33 | by default. It may be enabled by defining -DENABLE_SW_DECODE in build. 34 | -Fixes and improvements to softare decode operation 35 | 36 | * drm: change to m4 configure macro dir 37 | 38 | * Video updates 39 | -separate Essos resource manager into libessosrmgr.so 40 | -sinks link with libessosrmgr.so rather than libessos.so 41 | 42 | * v4l2 westeros-sink: change to m4 configure macro dir 43 | 44 | * Fix race condition on decoder release by owner 45 | 46 | * v4l2: fix potential crash during flush 47 | 48 | * Add support for zwp_linux_dmabuf_v1: 49 | -diabled by default, enable with --enable-ldbprotocol during configure 50 | 51 | * Update license 52 | 53 | * v4l2: fix potential crash on tear down 54 | 55 | 56 | Depedencies 57 | ------------ 58 | wayland >= 1.6.0 59 | libxkbcommon >= 0.8.3 60 | xkeyboard-config >= 2.18 61 | gstreamer >= 1.10.4 62 | EGL >= 1.4 63 | GLES >= 2.0 64 | 65 | 66 | -------------------------------------------------------------------------------- /docs/relnotes/1.01.25.txt: -------------------------------------------------------------------------------- 1 | Westeros Release Notes 2 | ====================== 3 | 4 | Westeros 1.01.25 Release Notes 5 | ------------------------------ 6 | 7 | Date: June 21, 2021 8 | Tag: Westeros-1.01.25 9 | Changes: 10 | 11 | 12 | * v4l2: updates: 13 | 14 | -update aml parm structures 15 | -update buffer margin policy for mpeg2 16 | -skip capture buffers with V4L2_BUF_FLAG_LAST flag set and bytesused set to 0 17 | 18 | * drm: ensure video frame widths are even 19 | 20 | * raw: release preroll lock while paused 21 | 22 | * brm: update stc freeze based on state 23 | 24 | * v4l2: adjust calculation of queued_frames 25 | 26 | * v4l2: estimate frame rate if not supplied in caps 27 | 28 | * drm: update video server frame cropping 29 | 30 | * v4l2 updates: 31 | 32 | -fix setting zoom none as a local override 33 | -handle multiple decoded frames being waiting to dequeue when POLLPRI is signaled 34 | 35 | * Try to address some race conditions and resource connection leak 36 | 37 | * erm, sink: add resource activity state tracking 38 | 39 | * erm: add options to sample app for resource state 40 | 41 | * Address some race conditions on resource revocation 42 | 43 | ERM: 44 | - capture EssRMgrRequeset by value 45 | - wait for revoke notifications complition 46 | 47 | Sink: 48 | - additional locking to address some revocatoin scenarios 49 | 50 | * v4l2: check and log dequeue errors 51 | 52 | * drm: updates to video server frame cropping 53 | 54 | * Add test cases for ERM 55 | 56 | * v4l2: set some default hdr values 57 | 58 | * erm: ensure res request returns after initial request outcome 59 | 60 | * v4l2: video peek enhancements 61 | 62 | * v4l2: get interlace info from v4l2 driver 63 | 64 | * core: invalidate scene if vpc surface geometry changes 65 | 66 | * drm: add ability to adjust refresh thread priority: 67 | 68 | -use export WESTEROS_GL_REFRESH_PRIORITY=N to set priority. Use -20 to get the most 69 | favourable schedulingdrm: refresh thread updates: 70 | 71 | * brcm: add support for av1 codec 72 | 73 | * drm: refresh thread updates: 74 | 75 | -use SCHED_FIFO priorty 1 by default 76 | -allow setting scheduling policy and priority via env var: 77 | export WESTEROS_GL_REFRESH_PRIORITY=P,PRI 78 | where P is the policy specified as a single letter: 79 | O for SCHED_OTHER 80 | F for SCHED_FIFO 81 | R for SCHED_RR 82 | and PRI is a number specifying the priority: 83 | -20 to 19 for SCHED_OTHER 84 | 1 to 99 for SCHED_FIFO and SCHED_RR 85 | 86 | for example: 87 | export WESTEROS_GL_REFRESH_PRIORITY=O,-20 88 | export WESTEROS_GL_REFRESH_PRIORITY=F,2 89 | export WESTEROS_GL_REFRESH_PRIORITY=R,1 90 | 91 | 92 | 93 | 94 | Depedencies 95 | ------------ 96 | wayland >= 1.6.0 97 | libxkbcommon >= 0.8.3 98 | xkeyboard-config >= 2.18 99 | gstreamer >= 1.10.4 100 | EGL >= 1.4 101 | GLES >= 2.0 102 | 103 | 104 | -------------------------------------------------------------------------------- /docs/relnotes/1.01.26.txt: -------------------------------------------------------------------------------- 1 | Westeros Release Notes 2 | ====================== 3 | 4 | Westeros 1.01.26 Release Notes 5 | ------------------------------ 6 | 7 | Date: Aug 9, 2021 8 | Tag: Westeros-1.01.26 9 | Changes: 10 | 11 | 12 | * drm: allow refresh lock on rpi 13 | 14 | * raw: update vpc geometry on aspect/zoom changes 15 | 16 | * v4l2, raw: fix crash without compositor connection 17 | 18 | * sink: brcm: fix race condition for start video 19 | 20 | * essos: avoid unnecessary dispatch call 21 | 22 | * v4l2: add support for auto dw mode 23 | 24 | * sink: brcm,v4l2: use g_error_new_literal instead of g_error_new 25 | 26 | * drm, v4l2 updates: 27 | 28 | -use v4l2 decoder stop command and eos events 29 | -adjust underflow detection when applied_rate is not 1.0 30 | -ensure vmaster mode used when applied_rate is not 1.0 31 | 32 | * drm: auto frm updates: 33 | 34 | -for Amlogic SOC interpret modes rate 47 as 47.95 and 59 as 59.94 35 | 36 | * drm: updates for rpi: 37 | 38 | -ensure primary plane is used for graphics 39 | -use zpos to place primary plane above video 40 | 41 | * drm, v4l2, raw: support altering video rect while paused 42 | 43 | * core: update dependencies for linux dmabuf protocol 44 | 45 | * v4l2: force local position reporting if applied_rate is not 1.0 46 | 47 | * drm: fix mode resoure blob leak 48 | 49 | * v4l2: use bit masking to check for event types 50 | 51 | * brcm: fix capture thread join race condition 52 | 53 | * v4l2: use bitmasking to check source change type 54 | 55 | -correct previous change 'v4l2: use bit masking to check for event types' which 56 | incorreclty used bitmasking on event types 57 | 58 | * brcm: fix early spurious first frame signal while paused 59 | 60 | * erm: add missing file close reading config 61 | 62 | * v4l2: don't issue decoder stop with no queued frame data 63 | 64 | 65 | 66 | 67 | Depedencies 68 | ------------ 69 | wayland >= 1.6.0 70 | libxkbcommon >= 0.8.3 71 | xkeyboard-config >= 2.18 72 | gstreamer >= 1.10.4 73 | EGL >= 1.4 74 | GLES >= 2.0 75 | 76 | 77 | -------------------------------------------------------------------------------- /docs/relnotes/1.01.28.txt: -------------------------------------------------------------------------------- 1 | Westeros Release Notes 2 | ====================== 3 | 4 | Westeros 1.01.27 Release Notes 5 | ------------------------------ 6 | 7 | Date: Dec 16, 2021 8 | Tag: Westeros-1.01.28 9 | Changes: 10 | 11 | 12 | * v4l2: ensure driver events are checked after last frame decoded 13 | 14 | * brcm: intial support for instant rate change 15 | 16 | * drm: eliminate a source of video latency: 17 | 18 | -perform avsync initialization earlier to avoid introducing an additional 19 | one vertical period latency. 20 | 21 | * v4l2, raw: use window rect for vpc geometry updates 22 | 23 | * drm: fix offload queue full resource leak 24 | 25 | * drm: update amlogic decoder config 26 | 27 | * erm: avoid allocating large state in stack 28 | 29 | * v4l2: respect user set avsync mode 30 | 31 | * drm, v4l2: fix a cause of missing eos 32 | 33 | -prevent video server status messages that pertain to events prior to 34 | a flush from updating state after the flush 35 | 36 | * drm, v4l2: add immediate-output: 37 | 38 | -add support for low latency video which can be enabled by setting the 39 | immediate-output westerossink property to true. 40 | 41 | * drm: fix display server startup race condition 42 | 43 | * drm, v4l2, raw: add policy control for zoom: 44 | 45 | -two policies are added to westeros-soc-drm: global-zoom-active, allow-4k-zoom. These policies are sent from the video server to westeros sink instances and control whether or not user zoom settings (global zoom) apply by default or not, and whether user zoom settings should be applied to 4k content. The policles can be set on startup via these env vars: 46 | 47 | export WESTEROS_GL_GLOBAL_ZOOM_ACTIVE=1 (or =0) 48 | export WESTEROS_GL_ALLOW_4K_ZOOM=1 (or =0) 49 | 50 | The policies can also be set and queried via westeros-gl-console commands: 51 | 52 | westros-gl-console get global-zoom-active 53 | westeros-gl-console set global-zoom-active 1 54 | westeros-gl-console get allow-4k-zoom 55 | westeros-gl-console set allow-4k-zoom 1 56 | 57 | The default value for both policies is 0 58 | 59 | 60 | 61 | 62 | 63 | Depedencies 64 | ------------ 65 | wayland >= 1.6.0 66 | libxkbcommon >= 0.8.3 67 | xkeyboard-config >= 2.18 68 | gstreamer >= 1.10.4 69 | EGL >= 1.4 70 | GLES >= 2.0 71 | 72 | 73 | -------------------------------------------------------------------------------- /docs/relnotes/1.01.29.txt: -------------------------------------------------------------------------------- 1 | Westeros Release Notes 2 | ====================== 3 | 4 | Westeros 1.01.29 Release Notes 5 | ------------------------------ 6 | 7 | Date: Jan 27, 2022 8 | Tag: Westeros-1.01.29 9 | Changes: 10 | 11 | * v4l2: fix eos issue for streams starting without timestamps 12 | 13 | * raw: fix missing return values 14 | 15 | * v4l2: add support for codec_data in caps 16 | 17 | * erm: make revoke timeout configurable 18 | 19 | * erm: update missed timeouts to configured value 20 | 21 | * drm: clear avsync video_config struct 22 | 23 | * v4l2, raw: fix vpc positioning for textures 24 | 25 | The Nov 18 commit 'v4l2, raw: use window rect for geometry updates' fixed 26 | the positioning on the video plane but broke the positioning of 27 | textures. 28 | 29 | * essos: fix possible hang in essProcessRunWaylandEventLoopOnce 30 | 31 | A wl_display_read_events called in another thread may result in 32 | wl_display_dispatch to block calling thread (in wl_display_poll) 33 | blocking essProcessRunWaylandEventLoopOnce 34 | 35 | * erm: fix race condition 36 | 37 | fix a race condition that can result in the first resource request 38 | of a context using the wrong revoke timeout 39 | 40 | 41 | 42 | Depedencies 43 | ------------ 44 | wayland >= 1.6.0 45 | libxkbcommon >= 0.8.3 46 | xkeyboard-config >= 2.18 47 | gstreamer >= 1.10.4 48 | EGL >= 1.4 49 | GLES >= 2.0 50 | 51 | 52 | -------------------------------------------------------------------------------- /docs/relnotes/1.01.30.txt: -------------------------------------------------------------------------------- 1 | Westeros Release Notes 2 | ====================== 3 | 4 | Westeros 1.01.30 Release Notes 5 | ------------------------------ 6 | 7 | Date: Feb 22, 2022 8 | Tag: Westeros-1.01.30 9 | Changes: 10 | 11 | * v4l2: add support for mjpeg 12 | 13 | * brcm: restore tsm mode with audio dependent clock 14 | 15 | * sink: fix leak after ERM revoke 16 | 17 | this fixes the issue of potential resource leaks when a sink element 18 | is disposed of after having had its resouces revoked by ERM. 19 | 20 | * essos: fix crash in wl_egl_window_create for platforms with weston 21 | 22 | * brcm: release capture buffers on ERM revoke 23 | 24 | * brcm: fix position error from decoder pts status rollover 25 | 26 | * v4l2: fix log message 27 | 28 | * brcm: fix false rollover detection 29 | 30 | * essos: make new eglGetDisplay call conditional: 31 | 32 | Make the change from 'fix crash in wl_egl_window_create for platforms with weston' present only if HAVE_WESTEROS is not defined. This fixes a regression in 33 | another platfrom caused by this change 34 | 35 | * v4l2: reduce eos count down 36 | 37 | * brcm: sink updates 38 | -1080i fallback to SDR 39 | -HDR10 on AXG1V4 40 | -Use first pts rather than first pts passed callback 41 | 42 | 43 | 44 | 45 | 46 | Depedencies 47 | ------------ 48 | wayland >= 1.6.0 49 | libxkbcommon >= 0.8.3 50 | xkeyboard-config >= 2.18 51 | gstreamer >= 1.10.4 52 | EGL >= 1.4 53 | GLES >= 2.0 54 | 55 | 56 | -------------------------------------------------------------------------------- /docs/relnotes/1.01.31.txt: -------------------------------------------------------------------------------- 1 | Westeros Release Notes 2 | ====================== 3 | 4 | Westeros 1.01.31 Release Notes 5 | ------------------------------ 6 | 7 | Date: March 24, 2022 8 | Tag: Westeros-1.01.31 9 | Changes: 10 | 11 | * v4l2: add cast for build issue 12 | 13 | Add cast for build issue in 64 bit RPi4 14 | 15 | * sink: retry obtaining compositor 16 | 17 | * brcm: add some null checks in sink 18 | 19 | * v4l2: fix potential crash 20 | 21 | -join wayland dispatch thread prior to tearing down output buffers 22 | 23 | * test: fixes/improvements to automated test code 24 | 25 | * drm: fix errors from video positioned offscreen 26 | 27 | * v4l2: add locking around input buffer creation 28 | 29 | * v4l2: add support for VIDIOC_CROPCAP to check pixel-aspect-ratio 30 | 31 | * erm: uds: fix thread safety issue in some requests 32 | 33 | * drm: fix potential glitch on video client close 34 | 35 | * v4l2: add some memory reduction build options: 36 | 37 | -build with -DWESTEROS_SINK_LOW_MEM_DWMODE to reduce double write mode memory usage 38 | -build with -DWESTEROS_SINK_LOW_MEM_BUFFERS to reduce capture buffer memory usage 39 | 40 | 41 | 42 | 43 | Depedencies 44 | ------------ 45 | wayland >= 1.6.0 46 | libxkbcommon >= 0.8.3 47 | xkeyboard-config >= 2.18 48 | gstreamer >= 1.10.4 49 | EGL >= 1.4 50 | GLES >= 2.0 51 | 52 | 53 | -------------------------------------------------------------------------------- /docs/relnotes/1.01.32.txt: -------------------------------------------------------------------------------- 1 | Westeros Release Notes 2 | ====================== 3 | 4 | Westeros 1.01.32 Release Notes 5 | ------------------------------ 6 | 7 | Date: April 26, 2022 8 | Tag: Westeros-1.01.32 9 | Changes: 10 | 11 | 12 | * v4l2: avoid deadlock if eos detected during preroll 13 | 14 | * drm, v4l2, raw: support client-side playback rate 15 | 16 | * drm, v4l2: add support for holding last frame on stop 17 | 18 | -set sink property 'stop-keep-frame=true' to have the last frame 19 | continue to display after the pipeline stops instead of displaying 20 | black 21 | 22 | * v4l2: fix cases of truncated data when codec data is in caps 23 | 24 | * v4l2: don't reset stop-keep-frame on return to ready state 25 | 26 | * sink: re-request resources on ready to paused if revoked 27 | 28 | * erm: add black list 29 | 30 | -the black list is a mechanism to prevent certain entities from requesting 31 | resources at certain times. Each requesting entity is assigned an appid, 32 | which is a string, via the env var ESSRMGR_APPID. An application manager 33 | can add and remove appid's from a black list and while an appid is in the 34 | black list that application is not permitted to request or hold resources 35 | 36 | * test: fix some video play postion checks 37 | 38 | * erm: fix possible bad appid 39 | 40 | * v4l2: fix race condition between dequeue and decoder teardown 41 | 42 | 43 | 44 | 45 | 46 | Depedencies 47 | ------------ 48 | wayland >= 1.6.0 49 | libxkbcommon >= 0.8.3 50 | xkeyboard-config >= 2.18 51 | gstreamer >= 1.10.4 52 | EGL >= 1.4 53 | GLES >= 2.0 54 | 55 | 56 | -------------------------------------------------------------------------------- /docs/relnotes/1.01.33.txt: -------------------------------------------------------------------------------- 1 | Westeros Release Notes 2 | ====================== 3 | 4 | Westeros 1.01.33 Release Notes 5 | ------------------------------ 6 | 7 | Date: May 27, 2022 8 | Tag: Westeros-1.01.33 9 | Changes: 10 | 11 | * v4l2: adjust eos deadlock prevention in preroll 12 | 13 | * v4l2: keep vpc surface on ERM revoke when keep last frame active 14 | 15 | * sink: fix formatting for event log 16 | 17 | * brcm: fix spurious underflows with useImmediateOutput: 18 | 19 | useImmediateOutput forces underflows by settting 2x decode trickrate 20 | causes flood of underflow messages/logging with cameras, for example 21 | add code to filter emitUnderflow with useImmediateOutput 22 | removes underflow messages/logging flood 23 | 24 | * drm: fix errors from video positioned off screen while paused 25 | 26 | * v4l2: adjust eos deadlock prevention in preroll 27 | 28 | * v4l2, raw, brcm: add "stats" property 29 | 30 | * test: fix some test case issues 31 | 32 | * drm: fix mutex locking order for rect update 33 | 34 | 35 | 36 | Depedencies 37 | ------------ 38 | wayland >= 1.6.0 39 | libxkbcommon >= 0.8.3 40 | xkeyboard-config >= 2.18 41 | gstreamer >= 1.10.4 42 | EGL >= 1.4 43 | GLES >= 2.0 44 | 45 | 46 | -------------------------------------------------------------------------------- /docs/relnotes/1.01.34.txt: -------------------------------------------------------------------------------- 1 | Westeros Release Notes 2 | ====================== 3 | 4 | Westeros 1.01.34 Release Notes 5 | ------------------------------ 6 | 7 | Date: June 28, 2022 8 | Tag: Westeros-1.01.34 9 | Changes: 10 | 11 | * drm: update video rect when playing but with no queued frames 12 | 13 | * v4l2: adjust frame counts on sync mode change 14 | 15 | * drm: improve locking for video plane allocation 16 | 17 | * v4l2: use dw 1:1 for film grain and interlaced h265 18 | 19 | * v4l2: initialize structs with memset 20 | 21 | * raw,v4l2: use 64 bit offsets for DRM_IOCTL_MODE_MAP_DUMB 22 | 23 | * brcm, raw, v4l2: prevent redundant surface commits on rectangle changes 24 | 25 | * v4l2: improve defense against flushless sync mode changes 26 | 27 | * v4l2: allow vpc scaling when playing but no new frames 28 | 29 | * erm: use CLIENT_IDENTIFIER if ESSRMGR_APPID is not defined 30 | 31 | * brcm, v4l2: support mastering-display-info in gstreamer 1.18 and later 32 | 33 | 34 | 35 | Depedencies 36 | ------------ 37 | wayland >= 1.6.0 38 | libxkbcommon >= 0.8.3 39 | xkeyboard-config >= 2.18 40 | gstreamer >= 1.10.4 41 | EGL >= 1.4 42 | GLES >= 2.0 43 | 44 | 45 | -------------------------------------------------------------------------------- /docs/relnotes/1.01.35.txt: -------------------------------------------------------------------------------- 1 | Westeros Release Notes 2 | ====================== 3 | 4 | Westeros 1.01.35 Release Notes 5 | ------------------------------ 6 | 7 | Date: July 27, 2022 8 | Tag: Westeros-1.01.35 9 | Changes: 10 | 11 | * drm,v4l2,generic avsync: pause video scheduling in amaster mode when 12 | audio is not rendering 13 | 14 | * v4l2: use video color enum values 15 | 16 | * sink: ignore extra segment events: 17 | 18 | -defend against extra segment events sent by basesrc in pipelines using appsrc elements 19 | when performing trick play to avoid the applied_rate set by the app being reset to 1 20 | by the segment event sent by the appsrc's basesrc layer. 21 | 22 | * drm: add support for AV_SYNC_MODE_VIDEO_MONO 23 | 24 | * v4l2: use window rect for vpc geometry updates on source res change 25 | 26 | * v4l2: add support for new Amlogic double write modes 27 | 28 | 29 | 30 | Depedencies 31 | ------------ 32 | wayland >= 1.6.0 33 | libxkbcommon >= 0.8.3 34 | xkeyboard-config >= 2.18 35 | gstreamer >= 1.10.4 36 | EGL >= 1.4 37 | GLES >= 2.0 38 | 39 | 40 | -------------------------------------------------------------------------------- /docs/relnotes/1.01.36.txt: -------------------------------------------------------------------------------- 1 | Westeros Release Notes 2 | ====================== 3 | 4 | Westeros 1.01.36 Release Notes 5 | ------------------------------ 6 | 7 | Date: August 27, 2022 8 | Tag: Westeros-1.01.36 9 | Changes: 10 | 11 | 12 | * v4l2: ensure changes to stop-keep-frame prop are sent to video server 13 | 14 | * drm: generic avsync updates: 15 | 16 | -fix spurious underflow when audio halted 17 | -add missing av progression drop log 18 | 19 | * sink: don't reset segment start position on duplicate segment event 20 | 21 | * brcm: fix operation of legacy server-play-speed property 22 | 23 | * sink: add locking for wayland resource release 24 | 25 | * erm: increase client msg buffer size 26 | 27 | * v4l2: amlogic: use resmen to reserve svp memory 28 | 29 | 30 | 31 | Depedencies 32 | ------------ 33 | wayland >= 1.6.0 34 | libxkbcommon >= 0.8.3 35 | xkeyboard-config >= 2.18 36 | gstreamer >= 1.10.4 37 | EGL >= 1.4 38 | GLES >= 2.0 39 | 40 | 41 | -------------------------------------------------------------------------------- /docs/relnotes/1.01.37.txt: -------------------------------------------------------------------------------- 1 | Westeros Release Notes 2 | ====================== 3 | 4 | Westeros 1.01.37 Release Notes 5 | ------------------------------ 6 | 7 | Date: Sept 14, 2022 8 | Tag: Westeros-1.01.37 9 | Changes: 10 | 11 | 12 | * v4l2: amlogic: intercept instant rate change requests 13 | 14 | Amlogic audio sink handles instant rage change requests. Westeros sink 15 | should intercept it as well to avoid subsequent GST_EVENT_INSTANT_RATE_SYNC_TIME. 16 | 17 | 18 | Depedencies 19 | ------------ 20 | wayland >= 1.6.0 21 | libxkbcommon >= 0.8.3 22 | xkeyboard-config >= 2.18 23 | gstreamer >= 1.10.4 24 | EGL >= 1.4 25 | GLES >= 2.0 26 | 27 | 28 | -------------------------------------------------------------------------------- /docs/relnotes/1.01.38.txt: -------------------------------------------------------------------------------- 1 | Westeros Release Notes 2 | ====================== 3 | 4 | Westeros 1.01.38 Release Notes 5 | ------------------------------ 6 | 7 | Date: Oct 14, 2022 8 | Tag: Westeros-1.01.38 9 | Changes: 10 | 11 | 12 | * brcm: reduce memory usage 13 | 14 | -don't pre-allocate capture surfaces if secure video is used 15 | without secure graphics 16 | 17 | * brcm: low latency improvements 18 | 19 | -add latency logging 20 | -push new video frame PTS and systemtime to vidfilter, let it log Reduce latency 21 | -add event to tell vidfilter to do lowlatency 22 | -enable earlyPictureDeliveryMode, disable mtgAllowed/captureMode 23 | 24 | * v4l2: ensure dv flags get reset 25 | 26 | -when new caps arrive, ensure dv flags are reset if the dv structures 27 | are not present. 28 | 29 | * brcm: return VideoDynamicRangeMode to eTrackInput after DV stream, GUI 30 | 31 | colors were more saturated, but may cause some TVs to flash/put up info 32 | 33 | * brcm: correct surface visibility query 34 | 35 | Reason for change: Return surface->visible and log if the 36 | value is different than composition settings 37 | 38 | * Expose surface scaling via the simpleshell 39 | 40 | * brcm: use NEXUS_VideoDecoderLowLatencyMode_eGaming with immediate-output if available 41 | 42 | * v4l2: generic avsync update 43 | 44 | -allow eos detection in cases where audio is of shorter duration than video 45 | 46 | 47 | 48 | Depedencies 49 | ------------ 50 | wayland >= 1.6.0 51 | libxkbcommon >= 0.8.3 52 | xkeyboard-config >= 2.18 53 | gstreamer >= 1.10.4 54 | EGL >= 1.4 55 | GLES >= 2.0 56 | 57 | 58 | -------------------------------------------------------------------------------- /docs/relnotes/1.01.39.txt: -------------------------------------------------------------------------------- 1 | Westeros Release Notes 2 | ====================== 3 | 4 | Westeros 1.01.39 Release Notes 5 | ------------------------------ 6 | 7 | Date: Nov 14, 2022 8 | Tag: Westeros-1.01.39 9 | Changes: 10 | 11 | 12 | * erm: fix thread safety issue in EssRMgrDestroy 13 | 14 | * test: fixes for running automated tests on ARM64 Linux 15 | 16 | * sink: add display-name property 17 | 18 | * v4l2: fix guarding of a non-generic call 19 | 20 | * sink: add stats log: 21 | -to enable define WESTEROS_SINK_STATS_LOG=N in the player environment 22 | where N is the desired log interval in milliseconds 23 | 24 | 25 | Depedencies 26 | ------------ 27 | wayland >= 1.6.0 28 | libxkbcommon >= 0.8.3 29 | xkeyboard-config >= 2.18 30 | gstreamer >= 1.10.4 31 | EGL >= 1.4 32 | GLES >= 2.0 33 | 34 | 35 | -------------------------------------------------------------------------------- /docs/relnotes/1.01.40.txt: -------------------------------------------------------------------------------- 1 | Westeros Release Notes 2 | ====================== 3 | 4 | Westeros 1.01.40 Release Notes 5 | ------------------------------ 6 | 7 | Date: Dec 14, 2022 8 | Tag: Westeros-1.01.40 9 | Changes: 10 | 11 | * sink: don't clear eosEventSeen on eos post 12 | 13 | * drm: don't set avsync rate on unpause 14 | 15 | -unless we've previously set it to non-unity 16 | 17 | * drm: add support for video fence 18 | 19 | -enable at build time with -DDRM_USE_VIDEO_FENCE 20 | 21 | * erm: serialize transactions by resource type 22 | 23 | 24 | Depedencies 25 | ------------ 26 | wayland >= 1.6.0 27 | libxkbcommon >= 0.8.3 28 | xkeyboard-config >= 2.18 29 | gstreamer >= 1.10.4 30 | EGL >= 1.4 31 | GLES >= 2.0 32 | 33 | 34 | -------------------------------------------------------------------------------- /docs/relnotes/1.01.41.txt: -------------------------------------------------------------------------------- 1 | Westeros Release Notes 2 | ====================== 3 | 4 | Westeros 1.01.41 Release Notes 5 | ------------------------------ 6 | 7 | Date: Jan 13, 2023 8 | Tag: Westeros-1.01.41 9 | Changes: 10 | 11 | * brcm: log sdk version from sink 12 | 13 | * brcm: Do NEXUS_SimpleVideoDecoder_SetTrickState at pause/resume 14 | 15 | - Video only stream will not pause by NEXUS_SimpleStcChannel_Freeze 16 | since it is in vsync mode (tsm off) 17 | 18 | * drm,v4l2: allow video show/hide while paused 19 | 20 | * drm: only set mode from env on initial window creation 21 | 22 | * drm: fix locking for offload thread 23 | 24 | -fix thread safety issue between the offload thread and the disconnection of a video server client thread 25 | 26 | 27 | Depedencies 28 | ------------ 29 | wayland >= 1.6.0 30 | libxkbcommon >= 0.8.3 31 | xkeyboard-config >= 2.18 32 | gstreamer >= 1.10.4 33 | EGL >= 1.4 34 | GLES >= 2.0 35 | 36 | 37 | -------------------------------------------------------------------------------- /drm/README.md: -------------------------------------------------------------------------------- 1 | Description: 2 | -------------------- 3 | DRM adaptation layer for westeros 4 | 5 | 6 | Usage: 7 | -------------------- 8 | Configure Westeros with "--enable-drm=yes" enabled 9 | 10 | Run westeros using: 11 | 12 | $ LD_PRELOAD=libwesteros_gl.so westeros --renderer libwesteros_render_gl.so 13 | 14 | 15 | Run the westeros test (without EGL overload): 16 | 17 | $ westeros_test --display 18 | 19 | Where is the value you get from the output of the westeros command line. 20 | 21 | Example output from westeros: 22 | 23 | Westeros Debug: calling wl_display_run for display: westeros-2455-0 24 | ^ 25 | | 26 | ----------------- 27 | This is your 28 | 29 | ----------------- 30 | -------------------------------------------------------------------------------- /drm/configure.ac: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2016 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | # -*- Autoconf -*- 21 | # Process this file with autoconf to produce a configure script. 22 | 23 | dnl AC_PREREQ([2.65]) 24 | AC_INIT(westeros-soc, version-1.0, jeff_wannamaker@cable.comcast.com,westeros-soc) 25 | AC_CONFIG_SRCDIR([]) 26 | AC_CONFIG_HEADERS([cfg/config.h]) 27 | AC_CONFIG_MACRO_DIR([m4]) 28 | AC_CONFIG_AUX_DIR([cfg]) 29 | AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-bzip2 1.9]) 30 | LT_INIT 31 | 32 | # Checks for programs. 33 | AC_PROG_CC 34 | AC_PROG_INSTALL 35 | AC_PROG_MAKE_SET 36 | AC_PROG_CXX 37 | 38 | # Checks for header files. 39 | AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) 40 | 41 | # Checks for typedefs, structures, and compiler characteristics. 42 | AC_TYPE_SIZE_T 43 | AC_HEADER_STDBOOL 44 | 45 | IARM_CFLAGS=" " 46 | 47 | # Checks for library functions. 48 | #Add the subdirectories to be considered for building. 49 | SUBDIRS=" " 50 | #to setup m4 macros 51 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])], 52 | [AM_DEFAULT_VERBOSITY=1 53 | AC_SUBST(AM_DEFAULT_VERBOSITY)]) 54 | 55 | PKG_CHECK_MODULES([GLIB],[glib-2.0 >= 2.22.5]) 56 | PKG_CHECK_MODULES([GTHREAD],[gthread-2.0 >= 2.38.2]) 57 | PKG_CHECK_MODULES([WAYLAND_CLIENT],[wayland-client >= 1.6.0]) 58 | PKG_CHECK_MODULES([EGL],[egl >= 0.0],[EGL_DETECTED=true],[EGL_DETECTED=false]) 59 | AM_CONDITIONAL([HAVE_EGL], [test x$EGL_DETECTED = xtrue]) 60 | PKG_CHECK_MODULES([WAYLAND_SERVER],[wayland-server >= 1.6.0]) 61 | PKG_CHECK_MODULES([GBM],[gbm >= 10.2]) 62 | PKG_CHECK_MODULES([LIBDRM],[libdrm >= 2.0]) 63 | 64 | AC_ARG_ENABLE([gbm-modifiers], 65 | AS_HELP_STRING([--enable-gbm-modifiers],[enable gbm modifiers (default is no)]), 66 | [ 67 | case "${enableval}" in 68 | yes) ENABLE_GBM_MODIFIERS=true ;; 69 | no) ENABLE_GBM_MODIFIERS=no ;; 70 | *) AC_MSG_ERROR([bad value ${enableval} for --enable-gbm-modifiers]) ;; 71 | esac 72 | ], 73 | [echo "gbm modifiers is disabled"]) 74 | AM_CONDITIONAL([ENABLE_GBM_MODIFIERS], [test x$ENABLE_GBM_MODIFIERS = xtrue]) 75 | 76 | WAYLANDLIB="-lwayland-client" 77 | AC_SUBST(WAYLANDLIB) 78 | 79 | AC_CONFIG_FILES([Makefile]) 80 | AC_SUBST(WAYLAND_CFLAGS) 81 | AC_SUBST(GUPNP_VERSION) 82 | AC_SUBST(plugindir) 83 | AC_OUTPUT 84 | 85 | -------------------------------------------------------------------------------- /drm/modules/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2019 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | AUTOMAKE_OPTIONS = subdir-objects 21 | 22 | SUBDIRS = resolution 23 | 24 | -------------------------------------------------------------------------------- /drm/modules/configure.ac: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2019 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | # -*- Autoconf -*- 21 | # Process this file with autoconf to produce a configure script. 22 | 23 | dnl AC_PREREQ([2.65]) 24 | AC_INIT(modules, version-1.0, moorthy.baskaravenkatraman-sambamoorthy@linaro.org,modules) 25 | AC_CONFIG_SRCDIR([]) 26 | AC_CONFIG_HEADERS([config.h]) 27 | AC_CONFIG_MACRO_DIR([.]) 28 | AC_CONFIG_AUX_DIR([.]) 29 | AC_CONFIG_SUBDIRS([resolution]) 30 | AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-bzip2 1.9]) 31 | LT_INIT 32 | 33 | # Checks for programs. 34 | AC_PROG_CC 35 | AC_PROG_INSTALL 36 | AC_PROG_MAKE_SET 37 | AC_PROG_CXX 38 | 39 | # Checks for library functions. 40 | #Add the subdirectories to be considered for building. 41 | SUBDIRS=" " 42 | 43 | #to setup m4 macros 44 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])], 45 | [AM_DEFAULT_VERBOSITY=1 46 | AC_SUBST(AM_DEFAULT_VERBOSITY)]) 47 | 48 | AC_CONFIG_FILES([Makefile]) 49 | AC_OUTPUT 50 | 51 | -------------------------------------------------------------------------------- /drm/modules/resolution/Makefile.am: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # If not stated otherwise in this file or this component's Licenses.txt 3 | # file the following copyright and licenses apply: 4 | # 5 | # Copyright 2017 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | ########################################################################## 19 | 20 | AUTOMAKE_OPTIONS = subdir-objects 21 | 22 | lib_LTLIBRARIES = libresolutionmodule.la 23 | 24 | libresolutionmodule_la_SOURCES = module.cpp 25 | 26 | libresolutionmodule_la_CXXFLAGS= $(AM_CFLAGS) $(libdrm_CFLAGS) -I$(top_srcdir)/../../../ 27 | 28 | libresolutionmodule_la_LDFLAGS= \ 29 | $(AM_LDFLAGS) \ 30 | -lgbm -ldrm 31 | 32 | ## IPK Generation Support 33 | IPK_GEN_PATH = $(abs_top_builddir)/ipk 34 | IPK_GEN_STAGING_DIR=$(abs_top_builddir)/staging_dir 35 | IPK_GEN_INPUT = debian-binary control.tar.gz data.tar.gz 36 | IPK_GEN_OUTPUT = holepunch.ipk 37 | 38 | package_ipk: 39 | @echo "Generating IPK Package" 40 | $(MAKE) prefix=${abs_top_builddir}/staging_dir install 41 | $(mkdir_p) $(IPK_GEN_STAGING_DIR)/usr/bin/ 42 | cp -af $(IPK_GEN_STAGING_DIR)/bin/* $(IPK_GEN_STAGING_DIR)/usr/bin/ 43 | tar -czvf $(IPK_GEN_PATH)/data.tar.gz -C $(IPK_GEN_STAGING_DIR) usr 44 | tar -czvf $(IPK_GEN_PATH)/control.tar.gz -C $(IPK_GEN_PATH) control postinst prerm 45 | cd $(IPK_GEN_PATH) && ar cr $(IPK_GEN_OUTPUT) $(IPK_GEN_INPUT) && cd - 46 | rm -rf ${abs_top_builddir}/staging_dir 47 | rm -rf $(abs_top_builddir)/ipk/control.tar.gz 48 | rm -rf $(abs_top_builddir)/ipk/data.tar.gz 49 | 50 | -------------------------------------------------------------------------------- /drm/modules/resolution/configure.ac: -------------------------------------------------------------------------------- 1 | ########################################################################## 2 | # If not stated otherwise in this file or this component's Licenses.txt 3 | # file the following copyright and licenses apply: 4 | # 5 | # Copyright 2017 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | ########################################################################## 19 | 20 | # -*- Autoconf -*- 21 | # Process this file with autoconf to produce a configure script. 22 | 23 | dnl AC_PREREQ([2.65]) 24 | AC_INIT(resolutionmodule, 1.0.0, jeff_wannamaker@cable.comcast.com,resolutionmodule) 25 | AC_CONFIG_SRCDIR([]) 26 | AC_CONFIG_HEADERS([config.h]) 27 | AC_CONFIG_MACRO_DIR([.]) 28 | AC_CONFIG_AUX_DIR([.]) 29 | AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-bzip2 1.9]) 30 | LT_INIT 31 | 32 | # Checks for programs. 33 | AC_PROG_CC 34 | AC_PROG_INSTALL 35 | AC_PROG_MAKE_SET 36 | AC_PROG_CXX 37 | 38 | # Checks for header files. 39 | AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) 40 | 41 | # Checks for typedefs, structures, and compiler characteristics. 42 | AC_TYPE_SIZE_T 43 | AC_HEADER_STDBOOL 44 | 45 | # Checks for library functions. 46 | #Add the subdirectories to be considered for building. 47 | SUBDIRS=" " 48 | #to setup m4 macros 49 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])], 50 | [AM_DEFAULT_VERBOSITY=1 51 | AC_SUBST(AM_DEFAULT_VERBOSITY)]) 52 | 53 | PKG_CHECK_MODULES([libdrm], [libdrm >= 1.0]) 54 | 55 | AC_CONFIG_FILES([Makefile]) 56 | AC_OUTPUT 57 | 58 | -------------------------------------------------------------------------------- /drm/westeros-gl/avsync/avsync.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2016 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef __WESTEROS_GL_AVSYNC_H__ 21 | #define __WESTEROS_GL_AVSYNC_H__ 22 | 23 | #define WESTEROS_GL_AVSYNC 24 | 25 | static void wstAVSyncInit( VideoFrameManager *vfm, int sessionId ); 26 | static void wstAVSyncTerm( VideoFrameManager *vfm ); 27 | static void wstAVSyncSetSyncType( VideoFrameManager *vfm, int type ); 28 | static void wstAVSyncPush( VideoFrameManager *vfm, VideoFrame *f ); 29 | static VideoFrame *wstAVSyncPop( VideoFrameManager *vfm ); 30 | static void wstAVSyncPause( VideoFrameManager *vfm, bool pause ); 31 | static void wstAVSyncEos( VideoFrameManager *vfm ); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /drm/westeros-gl/westeros-gl-console-helper.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2016 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef _WESTEROS_GL_CONSOLE_HELPER_H 21 | #define _WESTEROS_GL_CONSOLE_HELPER_H 22 | 23 | /** 24 | * WstGLConsoleCommand 25 | * 26 | * Send a command to the westeros-gl display server and receive 27 | * a response. 28 | * 29 | * cmd : null terminated command string 30 | * rsp : address of a charcter pointer will be assigned a pointer 31 | * to the null terminated response string. The caller should free the returned 32 | * pointer with free after use. 33 | * 34 | * Returns 0 on success, non-zero otherwise. 35 | */ 36 | int WstGLConsoleCommand( char *cmd, char **rsp ); 37 | 38 | #endif 39 | 40 | -------------------------------------------------------------------------------- /drm/westeros-gl/westeros-gl-console.c: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2016 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | #include "westeros-gl-console-helper.h" 28 | 29 | int main( int argc, const char **argv ) 30 | { 31 | int nRC= 0; 32 | char msg[256]; 33 | char *rsp= 0; 34 | 35 | printf("westeros-gl-console\n"); 36 | 37 | if ( argc > 1 ) 38 | { 39 | int i, len, mlen; 40 | msg[0]= '\0'; 41 | for( i= 1; i < argc; ++i ) 42 | { 43 | mlen= strlen(msg); 44 | len= strlen(argv[i]); 45 | if ( mlen+len+2 < sizeof(msg) ) 46 | { 47 | strcat( msg, argv[i] ); 48 | strcat( msg, " " ); 49 | } 50 | } 51 | 52 | nRC= WstGLConsoleCommand( msg, &rsp ); 53 | if ( rsp ) 54 | { 55 | printf("Response: [%s]\n", rsp); 56 | free( rsp ); 57 | } 58 | } 59 | 60 | return nRC; 61 | } 62 | -------------------------------------------------------------------------------- /drm/westeros-gl/westeros-gl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2016 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _WESTEROS_GL_H 20 | #define _WESTEROS_GL_H 21 | 22 | #ifndef __cplusplus 23 | #include 24 | #endif 25 | 26 | #if defined(__cplusplus) 27 | extern "C" { 28 | #endif 29 | 30 | /** 31 | * Libraries using libdrm must be c libraries. 32 | * To ensure we can link with c++ code we use 33 | * extern "C" here. 34 | */ 35 | typedef struct _WstGLCtx WstGLCtx; 36 | 37 | #define WESTEROS_GL_DISPLAY_CAPS 38 | 39 | typedef enum _WstGLDisplayCapabilies 40 | { 41 | WstGLDisplayCap_none = 0, 42 | WstGLDisplayCap_modeset = (1<<0) 43 | } WstGLDisplayCapabilities; 44 | 45 | typedef struct _WstGLDisplaySafeArea 46 | { 47 | int x; 48 | int y; 49 | int w; 50 | int h; 51 | } WstGLDisplaySafeArea; 52 | 53 | typedef struct _WstGLDisplayInfo 54 | { 55 | int width; 56 | int height; 57 | WstGLDisplaySafeArea safeArea; 58 | } WstGLDisplayInfo; 59 | 60 | typedef void (*WstGLDisplaySizeCallback)( void *userData, int width, int height ); 61 | 62 | WstGLCtx* WstGLInit(); 63 | void WstGLTerm( WstGLCtx *ctx ); 64 | bool WstGLGetDisplayCaps( WstGLCtx *ctx, unsigned int *caps ); 65 | bool WstGLSetDisplayMode( WstGLCtx *ctx, const char *mode ); 66 | bool WstGLGetDisplayInfo( WstGLCtx *ctx, WstGLDisplayInfo *displayInfo ); 67 | bool WstGLGetDisplaySafeArea( WstGLCtx *ctx, int *x, int *y, int *w, int *h ); 68 | bool WstGLAddDisplaySizeListener( WstGLCtx *ctx, void *userData, WstGLDisplaySizeCallback listener ); 69 | bool WstGLRemoveDisplaySizeListener( WstGLCtx *ctx, WstGLDisplaySizeCallback listener ); 70 | void* WstGLCreateNativeWindow( WstGLCtx *ctx, int x, int y, int width, int height ); 71 | void WstGLDestroyNativeWindow( WstGLCtx *ctx, void *nativeWindow ); 72 | bool WstGLGetNativePixmap( WstGLCtx *ctx, void *nativeBuffer, void **nativePixmap ); 73 | void WstGLGetNativePixmapDimensions( WstGLCtx *ctx, void *nativePixmap, int *width, int *height ); 74 | void WstGLReleaseNativePixmap( WstGLCtx *ctx, void *nativePixmap ); 75 | void* WstGLGetEGLNativePixmap( WstGLCtx *ctx, void *nativePixmap ); 76 | 77 | #if defined(__cplusplus) 78 | } //extern "C" 79 | #endif 80 | #endif 81 | 82 | -------------------------------------------------------------------------------- /drm/westeros-sink: -------------------------------------------------------------------------------- 1 | ../westeros-sink/drm -------------------------------------------------------------------------------- /emu/westeros-sink: -------------------------------------------------------------------------------- 1 | ../westeros-sink/emu/ -------------------------------------------------------------------------------- /essos/README.md: -------------------------------------------------------------------------------- 1 | # Essos 2 | Essos 3 | 4 | Essos is a library making it simple to create applications that run either as native EGL or Wayland clients. It 5 | is a companion to Westeros. 6 | 7 | --- 8 | # Copyright and license 9 | 10 | If not stated otherwise in this file or this component's Licenses.txt file the 11 | following copyright and licenses apply: 12 | 13 | Copyright 2017 RDK Management 14 | 15 | Licensed under the Apache License, Version 2.0 (the "License"); 16 | you may not use this file except in compliance with the License. 17 | You may obtain a copy of the License at 18 | 19 | http://www.apache.org/licenses/LICENSE-2.0 20 | 21 | Unless required by applicable law or agreed to in writing, software 22 | distributed under the License is distributed on an "AS IS" BASIS, 23 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 24 | See the License for the specific language governing permissions and 25 | limitations under the License. 26 | 27 | -------------------------------------------------------------------------------- /essos/essos.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2017 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef __ESSOS__ 21 | #define __ESSOS__ 22 | 23 | #include "essos-app.h" 24 | #include "essos-game.h" 25 | #include "essos-system.h" 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /essos/essos.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: essos 7 | Description: A library making it simple to create applications that run either as native EGL or Wayland clients. 8 | Version: @VERSION@ 9 | Requires.private: egl wayland-egl xkbcommon 10 | Libs.private: -ldl -lm @PTHREAD_LIBS@ 11 | Libs: -L${libdir} -lessos @LIB_ESSOS_EXTRA_LIBS@ 12 | Cflags: -I${includedir} @LIB_ESSOS_EXTRA_CFLAGS@ @PTHREAD_CFLAGS@ 13 | -------------------------------------------------------------------------------- /icegdl/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2016 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | AUTOMAKE_OPTIONS = subdir-objects 21 | 22 | SUBDIRS = 23 | 24 | AM_CFLAGS = 25 | 26 | AM_LDFLAGS = 27 | 28 | lib_LTLIBRARIES = libwesteros_gl.la 29 | 30 | libwesteros_gl_la_SOURCES = westeros-gl/westeros-gl.cpp 31 | 32 | libwesteros_gl_la_include_HEADERS = westeros-gl/westeros-gl.h 33 | libwesteros_gl_la_includedir = $(includedir) 34 | libwesteros_gl_la_CXXFLAGS= $(AM_CFLAGS) 35 | 36 | libwesteros_gl_la_LDFLAGS= \ 37 | $(AM_LDFLAGS) \ 38 | -lgdl 39 | 40 | pkgconfigdir = $(libdir)/pkgconfig 41 | 42 | distcleancheck_listfiles = *-libtool 43 | 44 | ## IPK Generation Support 45 | IPK_GEN_PATH = $(abs_top_builddir)/ipk 46 | IPK_GEN_STAGING_DIR=$(abs_top_builddir)/staging_dir 47 | IPK_GEN_INPUT = debian-binary control.tar.gz data.tar.gz 48 | IPK_GEN_OUTPUT = westeros-soc.ipk 49 | 50 | package_ipk: 51 | @echo "Generating IPK Package" 52 | $(MAKE) prefix=${abs_top_builddir}/staging_dir install 53 | $(mkdir_p) $(IPK_GEN_STAGING_DIR)/usr/bin/ 54 | cp -af $(IPK_GEN_STAGING_DIR)/bin/* $(IPK_GEN_STAGING_DIR)/usr/bin/ 55 | tar -czvf $(IPK_GEN_PATH)/data.tar.gz -C $(IPK_GEN_STAGING_DIR) usr 56 | tar -czvf $(IPK_GEN_PATH)/control.tar.gz -C $(IPK_GEN_PATH) control postinst prerm 57 | cd $(IPK_GEN_PATH) && ar cr $(IPK_GEN_OUTPUT) $(IPK_GEN_INPUT) && cd - 58 | rm -rf ${abs_top_builddir}/staging_dir 59 | rm -rf $(abs_top_builddir)/ipk/control.tar.gz 60 | rm -rf $(abs_top_builddir)/ipk/data.tar.gz 61 | -------------------------------------------------------------------------------- /icegdl/configure.ac: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2016 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | # -*- Autoconf -*- 21 | # Process this file with autoconf to produce a configure script. 22 | 23 | dnl AC_PREREQ([2.65]) 24 | AC_INIT(westeros-soc, version-1.0, jeff_wannamaker@cable.comcast.com,westeros-soc) 25 | AC_CONFIG_SRCDIR([]) 26 | AC_CONFIG_HEADERS([cfg/config.h]) 27 | AC_CONFIG_MACRO_DIR([cfg]) 28 | AC_CONFIG_AUX_DIR([cfg]) 29 | AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-bzip2 1.9]) 30 | LT_INIT 31 | 32 | # Checks for programs. 33 | AC_PROG_CC 34 | AC_PROG_INSTALL 35 | AC_PROG_MAKE_SET 36 | AC_PROG_CXX 37 | 38 | # Checks for header files. 39 | AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) 40 | 41 | # Checks for typedefs, structures, and compiler characteristics. 42 | AC_TYPE_SIZE_T 43 | AC_HEADER_STDBOOL 44 | 45 | IARM_CFLAGS=" " 46 | 47 | # Checks for library functions. 48 | #Add the subdirectories to be considered for building. 49 | SUBDIRS=" " 50 | #to setup m4 macros 51 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])], 52 | [AM_DEFAULT_VERBOSITY=1 53 | AC_SUBST(AM_DEFAULT_VERBOSITY)]) 54 | 55 | PKG_CHECK_MODULES([GLIB],[glib-2.0 >= 2.22.5]) 56 | PKG_CHECK_MODULES([GTHREAD],[gthread-2.0 >= 2.38.2]) 57 | PKG_CHECK_MODULES([WAYLAND_CLIENT],[wayland-client >= 1.6.0]) 58 | PKG_CHECK_MODULES([WAYLAND_SERVER],[wayland-server >= 1.6.0]) 59 | 60 | WAYLANDLIB="-lwayland-client" 61 | AC_SUBST(WAYLANDLIB) 62 | 63 | AC_CONFIG_FILES([Makefile]) 64 | AC_SUBST(WAYLAND_CFLAGS) 65 | AC_SUBST(GUPNP_VERSION) 66 | AC_SUBST(plugindir) 67 | AC_OUTPUT 68 | 69 | -------------------------------------------------------------------------------- /icegdl/westeros-gl/westeros-gl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2016 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _WESTEROS_GL_H 20 | #define _WESTEROS_GL_H 21 | 22 | #define _WESTEROS_GL_ICEGDL_ 23 | 24 | typedef struct _WstGLCtx WstGLCtx; 25 | 26 | WstGLCtx* WstGLInit(); 27 | void WstGLTerm( WstGLCtx *ctx ); 28 | void* WstGLCreateNativeWindow( WstGLCtx *ctx, int x, int y, int width, int height ); 29 | void WstGLDestroyNativeWindow( WstGLCtx *ctx, void *nativeWindow ); 30 | bool WstGLGetNativePixmap( WstGLCtx *ctx, void *nativeBuffer, void **nativePixmap ); 31 | void WstGLGetNativePixmapDimensions( WstGLCtx *ctx, void *nativePixmap, int *width, int *height ); 32 | void WstGLReleaseNativePixmap( WstGLCtx *ctx, void *nativePixmap ); 33 | void* WstGLGetEGLNativePixmap( WstGLCtx *ctx, void *nativePixmap ); 34 | 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /icegdl/westeros-sink: -------------------------------------------------------------------------------- 1 | ../westeros-sink/icegdl/ -------------------------------------------------------------------------------- /linux-dmabuf/protocol/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2020 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | all: linux-dmabuf-unstable-v1-client-header linux-dmabuf-unstable-v1-server-header linux-dmabuf-unstable-v1-code 21 | 22 | linux-dmabuf-unstable-v1-client-header: 23 | $(SCANNER_TOOL) client-header < linux-dmabuf-unstable-v1.xml > linux-dmabuf-unstable-v1-client-protocol.h 24 | 25 | linux-dmabuf-unstable-v1-server-header: 26 | $(SCANNER_TOOL) server-header < linux-dmabuf-unstable-v1.xml > linux-dmabuf-unstable-v1-server-protocol.h 27 | 28 | linux-dmabuf-unstable-v1-code: 29 | $(SCANNER_TOOL) code < linux-dmabuf-unstable-v1.xml > linux-dmabuf-unstable-v1-protocol.c 30 | 31 | clean: 32 | @rm -f linux-dmabuf-unstable-v1-client-protocol.h linux-dmabuf-unstable-v1-server-protocol.h linux-dmabuf-unstable-v1-protocol.c 33 | 34 | 35 | -------------------------------------------------------------------------------- /linux-dmabuf/westeros-linux-dmabuf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2016 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef _WESTEROS_LINUX_DMABUF_H 21 | #define _WESTEROS_LINUX_DMABUF_H 22 | 23 | #include 24 | #include "wayland-server.h" 25 | #include "westeros-render.h" 26 | 27 | #define WST_LDB_MAX_PLANES 4 28 | 29 | #ifndef DRM_FORMAT_MOD_INVALID 30 | #define DRM_FORMAT_MOD_INVALID ((1ULL<<56) - 1) 31 | #endif 32 | 33 | #ifndef DRM_FORMAT_MOD_LINEAR 34 | #define DRM_FORMAT_MOD_LINEAR 0 35 | #endif 36 | 37 | struct wl_ldb; 38 | 39 | struct wstLDBInfo 40 | { 41 | uint32_t format; 42 | uint32_t flags; 43 | int32_t width; 44 | int32_t height; 45 | int planeCount; 46 | int fd[WST_LDB_MAX_PLANES]; 47 | uint32_t offset[WST_LDB_MAX_PLANES]; 48 | uint32_t stride[WST_LDB_MAX_PLANES]; 49 | uint64_t modifier[WST_LDB_MAX_PLANES]; 50 | }; 51 | 52 | struct wl_ldb_buffer 53 | { 54 | struct wl_resource *paramsResource; 55 | struct wl_resource *bufferResource; 56 | struct wl_ldb *ldb; 57 | struct wstLDBInfo info; 58 | }; 59 | 60 | struct wayland_ldb_callbacks { 61 | void (*bind)(void *user_data, struct wl_client *client, struct wl_resource *resource); 62 | }; 63 | 64 | wl_ldb* WstLDBInit( struct wl_display *display, struct wayland_ldb_callbacks *callbacks, void *userData ); 65 | void WstLDBUninit( struct wl_ldb *ldb ); 66 | void WstLDBSetRenderer( struct wl_ldb *ldb, WstRenderer *renderer ); 67 | struct wl_ldb_buffer *WstLDBBufferGet( struct wl_resource *resource ); 68 | uint32_t WstLDBBufferGetFormat(struct wl_ldb_buffer *buffer); 69 | int32_t WstLDBBufferGetWidth(struct wl_ldb_buffer *buffer); 70 | int32_t WstLDBBufferGetHeight(struct wl_ldb_buffer *buffer); 71 | int32_t WstLDBBufferGetStride(struct wl_ldb_buffer *buffer); 72 | void WstLDBBufferGetPlaneOffsetAndStride(struct wl_ldb_buffer *buffer, int plane, int32_t *offset, int32_t *stride ); 73 | void *WstLDBBufferGetBuffer(struct wl_ldb_buffer *buffer); 74 | int WstLDBBufferGetFd(struct wl_ldb_buffer *buffer); 75 | int WstLDBBufferGetPlaneFd(struct wl_ldb_buffer *buffer, int plane); 76 | uint64_t WstLDBBufferGetPlaneModifier(struct wl_ldb_buffer *buffer, int plane); 77 | 78 | #endif 79 | 80 | -------------------------------------------------------------------------------- /protocol/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2016 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | all: xdgv4 xdgv5 xdgstable vpc 21 | 22 | xdgv4: xgd-server-header-v4 xgd-code-v4 23 | 24 | xdgv5: xgd-server-header-v5 xgd-code-v5 25 | 26 | xdgstable: xgd-server-header-stable xgd-code-stable 27 | 28 | xgd-server-header-v4: 29 | $(SCANNER_TOOL) server-header < version4/xdg-shell.xml > version4/xdg-shell-server-protocol.h 30 | 31 | xgd-code-v4: 32 | $(SCANNER_TOOL) code < version4/xdg-shell.xml > version4/xdg-shell-protocol.c 33 | 34 | xgd-server-header-v5: 35 | $(SCANNER_TOOL) server-header < version5/xdg-shell.xml > version5/xdg-shell-server-protocol.h 36 | 37 | xgd-code-v5: 38 | $(SCANNER_TOOL) code < version5/xdg-shell.xml > version5/xdg-shell-protocol.c 39 | 40 | xgd-server-header-stable: 41 | $(SCANNER_TOOL) server-header < stable/xdg-shell.xml > stable/xdg-shell-server-protocol.h 42 | 43 | xgd-code-stable: 44 | $(SCANNER_TOOL) code < stable/xdg-shell.xml > stable/xdg-shell-protocol.c 45 | 46 | vpc: vpc-client-header vpc-server-header vpc-code 47 | 48 | vpc-client-header: 49 | $(SCANNER_TOOL) client-header < vpc.xml > vpc-client-protocol.h 50 | 51 | vpc-server-header: 52 | $(SCANNER_TOOL) server-header < vpc.xml > vpc-server-protocol.h 53 | 54 | vpc-code: 55 | $(SCANNER_TOOL) code < vpc.xml > vpc-protocol.c 56 | 57 | clean: 58 | @rm -f xdg-shell-server-protocol.h xdg-shell-protocol.c vpc-client-protocol.h vpc-server-protocol.h vpc-protocol.c 59 | 60 | 61 | -------------------------------------------------------------------------------- /rpi/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2016 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | AUTOMAKE_OPTIONS = subdir-objects 21 | 22 | SUBDIRS = 23 | 24 | AM_CFLAGS = 25 | 26 | AM_LDFLAGS = 27 | 28 | lib_LTLIBRARIES = libwesteros_gl.la 29 | 30 | libwesteros_gl_la_SOURCES = westeros-gl/westeros-gl.cpp 31 | 32 | libwesteros_gl_la_include_HEADERS = westeros-gl/westeros-gl.h 33 | libwesteros_gl_la_includedir = $(includedir) 34 | libwesteros_gl_la_CXXFLAGS= $(AM_CFLAGS) -I=/usr/include/interface/vmcs_host/linux 35 | 36 | libwesteros_gl_la_LDFLAGS= \ 37 | -lpthread \ 38 | $(AM_LDFLAGS) 39 | 40 | pkgconfigdir = $(libdir)/pkgconfig 41 | 42 | distcleancheck_listfiles = *-libtool 43 | 44 | ## IPK Generation Support 45 | IPK_GEN_PATH = $(abs_top_builddir)/ipk 46 | IPK_GEN_STAGING_DIR=$(abs_top_builddir)/staging_dir 47 | IPK_GEN_INPUT = debian-binary control.tar.gz data.tar.gz 48 | IPK_GEN_OUTPUT = westeros-soc.ipk 49 | 50 | package_ipk: 51 | @echo "Generating IPK Package" 52 | $(MAKE) prefix=${abs_top_builddir}/staging_dir install 53 | $(mkdir_p) $(IPK_GEN_STAGING_DIR)/usr/bin/ 54 | cp -af $(IPK_GEN_STAGING_DIR)/bin/* $(IPK_GEN_STAGING_DIR)/usr/bin/ 55 | tar -czvf $(IPK_GEN_PATH)/data.tar.gz -C $(IPK_GEN_STAGING_DIR) usr 56 | tar -czvf $(IPK_GEN_PATH)/control.tar.gz -C $(IPK_GEN_PATH) control postinst prerm 57 | cd $(IPK_GEN_PATH) && ar cr $(IPK_GEN_OUTPUT) $(IPK_GEN_INPUT) && cd - 58 | rm -rf ${abs_top_builddir}/staging_dir 59 | rm -rf $(abs_top_builddir)/ipk/control.tar.gz 60 | rm -rf $(abs_top_builddir)/ipk/data.tar.gz 61 | -------------------------------------------------------------------------------- /rpi/configure.ac: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2016 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | # -*- Autoconf -*- 21 | # Process this file with autoconf to produce a configure script. 22 | 23 | dnl AC_PREREQ([2.65]) 24 | AC_INIT(westeros-soc, version-1.0, jeff_wannamaker@cable.comcast.com,westeros-soc) 25 | AC_CONFIG_SRCDIR([]) 26 | AC_CONFIG_HEADERS([cfg/config.h]) 27 | AC_CONFIG_MACRO_DIR([m4]) 28 | AC_CONFIG_AUX_DIR([cfg]) 29 | AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-bzip2 1.9]) 30 | LT_INIT 31 | 32 | # Checks for programs. 33 | AC_PROG_CC 34 | AC_PROG_INSTALL 35 | AC_PROG_MAKE_SET 36 | AC_PROG_CXX 37 | 38 | # Checks for header files. 39 | AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) 40 | 41 | # Checks for typedefs, structures, and compiler characteristics. 42 | AC_TYPE_SIZE_T 43 | AC_HEADER_STDBOOL 44 | 45 | IARM_CFLAGS=" " 46 | 47 | # Checks for library functions. 48 | #Add the subdirectories to be considered for building. 49 | SUBDIRS=" " 50 | #to setup m4 macros 51 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])], 52 | [AM_DEFAULT_VERBOSITY=1 53 | AC_SUBST(AM_DEFAULT_VERBOSITY)]) 54 | 55 | PKG_CHECK_MODULES([GLIB],[glib-2.0 >= 2.22.5]) 56 | PKG_CHECK_MODULES([GTHREAD],[gthread-2.0 >= 2.38.2]) 57 | PKG_CHECK_MODULES([WAYLAND_CLIENT],[wayland-client >= 1.6.0]) 58 | PKG_CHECK_MODULES([WAYLAND_SERVER],[wayland-server >= 1.6.0]) 59 | 60 | WAYLANDLIB="-lwayland-client" 61 | AC_SUBST(WAYLANDLIB) 62 | 63 | AC_CONFIG_FILES([Makefile]) 64 | AC_SUBST(WAYLAND_CFLAGS) 65 | AC_SUBST(GUPNP_VERSION) 66 | AC_SUBST(plugindir) 67 | AC_OUTPUT 68 | 69 | -------------------------------------------------------------------------------- /rpi/modules/resolution/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2016 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | AUTOMAKE_OPTIONS = subdir-objects 21 | 22 | SUBDIRS = 23 | 24 | AM_CFLAGS = 25 | 26 | AM_LDFLAGS = 27 | 28 | lib_LTLIBRARIES = libresolutionmodule.la 29 | 30 | libresolutionmodule_la_SOURCES = module.cpp 31 | 32 | libresolutionmodule_la_CXXFLAGS= $(AM_CFLAGS) -I=/usr/include/interface/vmcs_host/linux 33 | 34 | libresolutionmodule_la_LDFLAGS= \ 35 | $(AM_LDFLAGS) 36 | 37 | distcleancheck_listfiles = *-libtool 38 | 39 | ## IPK Generation Support 40 | IPK_GEN_PATH = $(abs_top_builddir)/ipk 41 | IPK_GEN_STAGING_DIR=$(abs_top_builddir)/staging_dir 42 | IPK_GEN_INPUT = debian-binary control.tar.gz data.tar.gz 43 | IPK_GEN_OUTPUT = resolutionmodule.ipk 44 | 45 | package_ipk: 46 | @echo "Generating IPK Package" 47 | $(MAKE) prefix=${abs_top_builddir}/staging_dir install 48 | $(mkdir_p) $(IPK_GEN_STAGING_DIR)/usr/bin/ 49 | cp -af $(IPK_GEN_STAGING_DIR)/bin/* $(IPK_GEN_STAGING_DIR)/usr/bin/ 50 | tar -czvf $(IPK_GEN_PATH)/data.tar.gz -C $(IPK_GEN_STAGING_DIR) usr 51 | tar -czvf $(IPK_GEN_PATH)/control.tar.gz -C $(IPK_GEN_PATH) control postinst prerm 52 | cd $(IPK_GEN_PATH) && ar cr $(IPK_GEN_OUTPUT) $(IPK_GEN_INPUT) && cd - 53 | rm -rf ${abs_top_builddir}/staging_dir 54 | rm -rf $(abs_top_builddir)/ipk/control.tar.gz 55 | rm -rf $(abs_top_builddir)/ipk/data.tar.gz 56 | -------------------------------------------------------------------------------- /rpi/modules/resolution/configure.ac: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2016 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | # -*- Autoconf -*- 21 | # Process this file with autoconf to produce a configure script. 22 | 23 | dnl AC_PREREQ([2.65]) 24 | AC_INIT(resolutionmodule, version-1.0, jeff_wannamaker@cable.comcast.com,resolutionmodule) 25 | AC_CONFIG_SRCDIR([]) 26 | #AC_CONFIG_HEADERS([cfg/config.h]) 27 | #AC_CONFIG_MACRO_DIR([cfg]) 28 | #AC_CONFIG_AUX_DIR([cfg]) 29 | AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-bzip2 1.9]) 30 | LT_INIT 31 | 32 | # Checks for programs. 33 | AC_PROG_CC 34 | AC_PROG_INSTALL 35 | AC_PROG_MAKE_SET 36 | AC_PROG_CXX 37 | 38 | # Checks for header files. 39 | AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) 40 | 41 | # Checks for typedefs, structures, and compiler characteristics. 42 | AC_TYPE_SIZE_T 43 | AC_HEADER_STDBOOL 44 | 45 | IARM_CFLAGS=" " 46 | 47 | # Checks for library functions. 48 | #Add the subdirectories to be considered for building. 49 | SUBDIRS=" " 50 | #to setup m4 macros 51 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])], 52 | [AM_DEFAULT_VERBOSITY=1 53 | AC_SUBST(AM_DEFAULT_VERBOSITY)]) 54 | 55 | PKG_CHECK_MODULES([GLIB],[glib-2.0 >= 2.22.5]) 56 | PKG_CHECK_MODULES([GTHREAD],[gthread-2.0 >= 2.38.2]) 57 | PKG_CHECK_MODULES([WAYLAND_CLIENT],[wayland-client >= 1.6.0]) 58 | PKG_CHECK_MODULES([WAYLAND_SERVER],[wayland-server >= 1.6.0]) 59 | 60 | WAYLANDLIB="-lwayland-client" 61 | AC_SUBST(WAYLANDLIB) 62 | 63 | AC_CONFIG_FILES([Makefile]) 64 | AC_SUBST(WAYLAND_CFLAGS) 65 | AC_SUBST(GUPNP_VERSION) 66 | AC_OUTPUT 67 | 68 | -------------------------------------------------------------------------------- /rpi/modules/resolution/module.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2016 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #include 20 | #include 21 | #include 22 | 23 | #include "wayland-server.h" 24 | #include "westeros-compositor.h" 25 | 26 | #include 27 | 28 | static WstCompositor *compositor= 0; 29 | 30 | void determineInitialResolution( void ) 31 | { 32 | int displayId; 33 | uint32_t width, height; 34 | 35 | displayId= DISPMANX_ID_MAIN_LCD; 36 | int32_t result= graphics_get_display_size( displayId, 37 | &width, 38 | &height ); 39 | 40 | if ( result == 0 ) 41 | { 42 | printf("module: display %dx%d\n", width, height); 43 | WstCompositorResolutionChangeBegin( compositor ); 44 | WstCompositorResolutionChangeEnd( compositor, width, height ); 45 | } 46 | } 47 | 48 | extern "C" 49 | { 50 | 51 | bool moduleInit( WstCompositor *ctx, struct wl_display *display ) 52 | { 53 | bool result= false; 54 | 55 | compositor= ctx; 56 | 57 | bcm_host_init(); 58 | determineInitialResolution(); 59 | 60 | result= true; 61 | 62 | return result; 63 | } 64 | 65 | void moduleTerm( WstCompositor *ctx ) 66 | { 67 | bcm_host_deinit(); 68 | compositor= 0; 69 | } 70 | 71 | } 72 | 73 | -------------------------------------------------------------------------------- /rpi/westeros-gl/westeros-gl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2016 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _WESTEROS_GL_H 20 | #define _WESTEROS_GL_H 21 | 22 | typedef struct _WstGLCtx WstGLCtx; 23 | 24 | typedef struct _WstGLDisplaySafeArea 25 | { 26 | int x; 27 | int y; 28 | int w; 29 | int h; 30 | } WstGLDisplaySafeArea; 31 | 32 | typedef struct _WstGLDisplayInfo 33 | { 34 | int width; 35 | int height; 36 | WstGLDisplaySafeArea safeArea; 37 | } WstGLDisplayInfo; 38 | 39 | typedef void (*WstGLDisplaySizeCallback)( void *userData, int width, int height ); 40 | 41 | WstGLCtx* WstGLInit(); 42 | void WstGLTerm( WstGLCtx *ctx ); 43 | bool WstGLGetDisplayInfo( WstGLCtx *ctx, WstGLDisplayInfo *displayInfo ); 44 | bool WstGLGetDisplaySafeArea( WstGLCtx *ctx, int *x, int *y, int *w, int *h ); 45 | bool WstGLAddDisplaySizeListener( WstGLCtx *ctx, void *userData, WstGLDisplaySizeCallback listener ); 46 | bool WstGLRemoveDisplaySizeListener( WstGLCtx *ctx, WstGLDisplaySizeCallback listener ); 47 | void* WstGLCreateNativeWindow( WstGLCtx *ctx, int x, int y, int width, int height ); 48 | void WstGLDestroyNativeWindow( WstGLCtx *ctx, void *nativeWindow ); 49 | bool WstGLGetNativePixmap( WstGLCtx *ctx, void *nativeBuffer, void **nativePixmap ); 50 | void WstGLGetNativePixmapDimensions( WstGLCtx *ctx, void *nativePixmap, int *width, int *height ); 51 | void WstGLReleaseNativePixmap( WstGLCtx *ctx, void *nativePixmap ); 52 | void* WstGLGetEGLNativePixmap( WstGLCtx *ctx, void *nativePixmap ); 53 | 54 | #endif 55 | 56 | -------------------------------------------------------------------------------- /rpi/westeros-render-dispmanx/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2016 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | SUBDIRS = 21 | 22 | AM_CXXFLAGS = -DENABLE_SBPROTOCOL -DBUILD_WAYLAND -I=/usr/include/interface/vmcs_host/linux 23 | 24 | AM_CFLAGS = 25 | 26 | AM_LDFLAGS = 27 | 28 | 29 | lib_LTLIBRARIES = libwesteros_render_dispmanx.la 30 | 31 | libwesteros_render_dispmanx_la_SOURCES = westeros-render-dispmanx.cpp 32 | libwesteros_render_dispmanx_la_includedir = $(includedir) 33 | libwesteros_render_dispmanx_la_LDFLAGS= -lbcm_host -lvchostif 34 | if HAVE_WAYLAND_EGL 35 | AM_CXXFLAGS += -DWESTEROS_HAVE_WAYLAND_EGL 36 | libwesteros_render_dispmanx_la_LDFLAGS += -lwayland-egl 37 | endif 38 | 39 | distcleancheck_listfiles = *-libtool 40 | 41 | ## IPK Generation Support 42 | IPK_GEN_PATH = $(abs_top_builddir)/ipk 43 | IPK_GEN_STAGING_DIR=$(abs_top_builddir)/staging_dir 44 | IPK_GEN_INPUT = debian-binary control.tar.gz data.tar.gz 45 | IPK_GEN_OUTPUT = westeros-render-dispmanx.ipk 46 | 47 | package_ipk: 48 | @echo "Generating IPK Package" 49 | $(MAKE) prefix=${abs_top_builddir}/staging_dir install 50 | $(mkdir_p) $(IPK_GEN_STAGING_DIR)/usr/bin/ 51 | cp -af $(IPK_GEN_STAGING_DIR)/bin/* $(IPK_GEN_STAGING_DIR)/usr/bin/ 52 | tar -czvf $(IPK_GEN_PATH)/data.tar.gz -C $(IPK_GEN_STAGING_DIR) usr 53 | tar -czvf $(IPK_GEN_PATH)/control.tar.gz -C $(IPK_GEN_PATH) control postinst prerm 54 | cd $(IPK_GEN_PATH) && ar cr $(IPK_GEN_OUTPUT) $(IPK_GEN_INPUT) && cd - 55 | rm -rf ${abs_top_builddir}/staging_dir 56 | rm -rf $(abs_top_builddir)/ipk/control.tar.gz 57 | rm -rf $(abs_top_builddir)/ipk/data.tar.gz 58 | -------------------------------------------------------------------------------- /rpi/westeros-render-dispmanx/configure.ac: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2016 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | # -*- Autoconf -*- 21 | # Process this file with autoconf to produce a configure script. 22 | 23 | dnl AC_PREREQ([2.65]) 24 | AC_INIT(westeros-render-dispmanx, version-1.0, jeff_wannamaker@cable.comcast.com,westeros-render-dispmanx) 25 | AC_CONFIG_SRCDIR([]) 26 | AC_CONFIG_HEADERS([cfg/config.h]) 27 | AC_CONFIG_MACRO_DIR([cfg]) 28 | AC_CONFIG_AUX_DIR([cfg]) 29 | AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-bzip2 1.9]) 30 | LT_INIT 31 | 32 | # Checks for programs. 33 | AC_PROG_CC 34 | AC_PROG_INSTALL 35 | AC_PROG_MAKE_SET 36 | AC_PROG_CXX 37 | 38 | # Checks for header files. 39 | AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) 40 | 41 | # Checks for typedefs, structures, and compiler characteristics. 42 | AC_TYPE_SIZE_T 43 | AC_HEADER_STDBOOL 44 | 45 | WAYLAND_EGL_DETECTED=" " 46 | 47 | IARM_CFLAGS=" " 48 | 49 | # Checks for library functions. 50 | #Add the subdirectories to be considered for building. 51 | SUBDIRS=" " 52 | #to setup m4 macros 53 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])], 54 | [AM_DEFAULT_VERBOSITY=1 55 | AC_SUBST(AM_DEFAULT_VERBOSITY)]) 56 | 57 | PKG_CHECK_MODULES([GLIB],[glib-2.0 >= 2.22.5]) 58 | PKG_CHECK_MODULES([GTHREAD],[gthread-2.0 >= 2.38.2]) 59 | PKG_CHECK_MODULES([WAYLAND_CLIENT],[wayland-client >= 1.6.0]) 60 | PKG_CHECK_MODULES([WAYLAND_EGL],[wayland-egl >= 0.0],[WAYLAND_EGL_DETECTED=true],[WAYLAND_EGL_DETECTED=false]) 61 | 62 | AM_CONDITIONAL([HAVE_WAYLAND_EGL], [test x$WAYLAND_EGL_DETECTED = xtrue]) 63 | 64 | AC_CONFIG_FILES([Makefile]) 65 | AC_SUBST(GUPNP_VERSION) 66 | AC_OUTPUT 67 | 68 | -------------------------------------------------------------------------------- /rpi/westeros-sink: -------------------------------------------------------------------------------- 1 | ../westeros-sink/rpi/ -------------------------------------------------------------------------------- /simplebuffer/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2016 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | SUBDIRS = 21 | AM_CXXFLAGS= \ 22 | -I$(top_srcdir)/include \ 23 | -I${srcdir}/protocol \ 24 | -I${PKG_CONFIG_SYSROOT_DIR}/$(includedir)/wayland 25 | AM_CXXFLAGS += $(WAYLAND_CLIENT_CFLAGS) $(WAYLAND_SERVER_CFLAGS) 26 | AM_LDFLAGS=$(WAYLANDLIB) 27 | AM_CFLAGS = $(AM_CXXFLAGS) 28 | 29 | lib_LTLIBRARIES = libwesteros_simplebuffer_server.la libwesteros_simplebuffer_client.la 30 | 31 | libwesteros_simplebuffer_server_la_SOURCES = westeros-simplebuffer.cpp ${srcdir}/protocol/simplebuffer-protocol.c 32 | libwesteros_simplebuffer_server_la_include_HEADERS = westeros-simplebuffer.h ${srcdir}/protocol/simplebuffer-client-protocol.h 33 | libwesteros_simplebuffer_server_la_includedir = $(includedir) 34 | 35 | libwesteros_simplebuffer_server_la_LDFLAGS= \ 36 | $(AM_LDFLAGS) \ 37 | $(WAYLAND_SERVER_LIBS) 38 | 39 | libwesteros_simplebuffer_client_la_SOURCES = ${srcdir}/protocol/simplebuffer-protocol.c 40 | libwesteros_simplebuffer_client_la_LDFLAGS= \ 41 | $(AM_LDFLAGS) \ 42 | $(WAYLAND_CLIENT_LIBS) 43 | 44 | distcleancheck_listfiles = *-libtool 45 | 46 | ## IPK Generation Support 47 | IPK_GEN_PATH = $(abs_top_builddir)/ipk 48 | IPK_GEN_STAGING_DIR=$(abs_top_builddir)/staging_dir 49 | IPK_GEN_INPUT = debian-binary control.tar.gz data.tar.gz 50 | IPK_GEN_OUTPUT = westeros-simplebuffer.ipk 51 | 52 | package_ipk: 53 | @echo "Generating IPK Package" 54 | $(MAKE) prefix=${abs_top_builddir}/staging_dir install 55 | $(mkdir_p) $(IPK_GEN_STAGING_DIR)/usr/bin/ 56 | cp -af $(IPK_GEN_STAGING_DIR)/bin/* $(IPK_GEN_STAGING_DIR)/usr/bin/ 57 | tar -czvf $(IPK_GEN_PATH)/data.tar.gz -C $(IPK_GEN_STAGING_DIR) usr 58 | tar -czvf $(IPK_GEN_PATH)/control.tar.gz -C $(IPK_GEN_PATH) control postinst prerm 59 | cd $(IPK_GEN_PATH) && ar cr $(IPK_GEN_OUTPUT) $(IPK_GEN_INPUT) && cd - 60 | rm -rf ${abs_top_builddir}/staging_dir 61 | rm -rf $(abs_top_builddir)/ipk/control.tar.gz 62 | rm -rf $(abs_top_builddir)/ipk/data.tar.gz 63 | -------------------------------------------------------------------------------- /simplebuffer/configure.ac: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2016 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | # -*- Autoconf -*- 21 | # Process this file with autoconf to produce a configure script. 22 | 23 | dnl AC_PREREQ([2.65]) 24 | AC_INIT(westeros-simplebuffer, version-1.0, jeff_wannamaker@cable.comcast.com,westeros-simplebuffer) 25 | AC_CONFIG_SRCDIR([]) 26 | AC_CONFIG_HEADERS([cfg/config.h]) 27 | AC_CONFIG_MACRO_DIR([m4]) 28 | AC_CONFIG_AUX_DIR([cfg]) 29 | AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-bzip2 1.9]) 30 | LT_INIT 31 | 32 | # Checks for programs. 33 | AC_PROG_CC 34 | AC_PROG_INSTALL 35 | AC_PROG_MAKE_SET 36 | AC_PROG_CXX 37 | 38 | # Checks for header files. 39 | AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) 40 | 41 | # Checks for typedefs, structures, and compiler characteristics. 42 | AC_TYPE_SIZE_T 43 | AC_HEADER_STDBOOL 44 | 45 | IARM_CFLAGS=" " 46 | 47 | # Checks for library functions. 48 | #Add the subdirectories to be considered for building. 49 | SUBDIRS=" " 50 | #to setup m4 macros 51 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])], 52 | [AM_DEFAULT_VERBOSITY=1 53 | AC_SUBST(AM_DEFAULT_VERBOSITY)]) 54 | 55 | PKG_CHECK_MODULES([GLIB],[glib-2.0 >= 2.22.5]) 56 | PKG_CHECK_MODULES([GTHREAD],[gthread-2.0 >= 2.38.2]) 57 | PKG_CHECK_MODULES([WAYLAND_CLIENT],[wayland-client >= 1.6.0]) 58 | PKG_CHECK_MODULES([WAYLAND_SERVER],[wayland-server >= 1.6.0]) 59 | 60 | WAYLANDLIB="-lwayland-client" 61 | AC_SUBST(WAYLANDLIB) 62 | 63 | AC_CONFIG_FILES([Makefile]) 64 | AC_SUBST(WAYLAND_CFLAGS) 65 | AC_SUBST(GUPNP_VERSION) 66 | AC_OUTPUT 67 | -------------------------------------------------------------------------------- /simplebuffer/protocol/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2016 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | all: sb-client-header sb-server-header sb-code 21 | 22 | sb-client-header: 23 | $(SCANNER_TOOL) client-header < simple-buffer.xml > simplebuffer-client-protocol.h 24 | 25 | sb-server-header: 26 | $(SCANNER_TOOL) server-header < simple-buffer.xml > simplebuffer-server-protocol.h 27 | 28 | sb-code: 29 | $(SCANNER_TOOL) code < simple-buffer.xml > simplebuffer-protocol.c 30 | 31 | clean: 32 | @rm -f simplebuffer-client-protocol.h simplebuffer-server-protocol.h simplebuffer-protocol.c 33 | 34 | 35 | -------------------------------------------------------------------------------- /simpleshell/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2016 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | SUBDIRS = 21 | AM_CXXFLAGS= \ 22 | -I$(top_srcdir)/include \ 23 | -I${srcdir}/protocol \ 24 | -I${PKG_CONFIG_SYSROOT_DIR}/$(includedir)/wayland 25 | AM_CXXFLAGS += $(WAYLAND_CLIENT_CFLAGS) $(WAYLAND_SERVER_CFLAGS) 26 | AM_LDFLAGS=$(WAYLANDLIB) 27 | AM_CFLAGS = $(AM_CXXFLAGS) 28 | 29 | lib_LTLIBRARIES = libwesteros_simpleshell_server.la libwesteros_simpleshell_client.la 30 | 31 | libwesteros_simpleshell_server_la_SOURCES = westeros-simpleshell.cpp ${srcdir}/protocol/simpleshell-protocol.c 32 | libwesteros_simpleshell_server_la_include_HEADERS = westeros-simpleshell.h ${srcdir}/protocol/simpleshell-client-protocol.h 33 | libwesteros_simpleshell_server_la_includedir = $(includedir) 34 | 35 | libwesteros_simpleshell_server_la_LDFLAGS= \ 36 | $(AM_LDFLAGS) \ 37 | $(WAYLAND_SERVER_LIBS) 38 | 39 | libwesteros_simpleshell_client_la_SOURCES = ${srcdir}/protocol/simpleshell-protocol.c 40 | libwesteros_simpleshell_client_la_LDFLAGS= \ 41 | $(AM_LDFLAGS) \ 42 | $(WAYLAND_CLIENT_LIBS) 43 | 44 | distcleancheck_listfiles = *-libtool 45 | 46 | ## IPK Generation Support 47 | IPK_GEN_PATH = $(abs_top_builddir)/ipk 48 | IPK_GEN_STAGING_DIR=$(abs_top_builddir)/staging_dir 49 | IPK_GEN_INPUT = debian-binary control.tar.gz data.tar.gz 50 | IPK_GEN_OUTPUT = westeros-simpleshell.ipk 51 | 52 | package_ipk: 53 | @echo "Generating IPK Package" 54 | $(MAKE) prefix=${abs_top_builddir}/staging_dir install 55 | $(mkdir_p) $(IPK_GEN_STAGING_DIR)/usr/bin/ 56 | cp -af $(IPK_GEN_STAGING_DIR)/bin/* $(IPK_GEN_STAGING_DIR)/usr/bin/ 57 | tar -czvf $(IPK_GEN_PATH)/data.tar.gz -C $(IPK_GEN_STAGING_DIR) usr 58 | tar -czvf $(IPK_GEN_PATH)/control.tar.gz -C $(IPK_GEN_PATH) control postinst prerm 59 | cd $(IPK_GEN_PATH) && ar cr $(IPK_GEN_OUTPUT) $(IPK_GEN_INPUT) && cd - 60 | rm -rf ${abs_top_builddir}/staging_dir 61 | rm -rf $(abs_top_builddir)/ipk/control.tar.gz 62 | rm -rf $(abs_top_builddir)/ipk/data.tar.gz 63 | -------------------------------------------------------------------------------- /simpleshell/configure.ac: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2016 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | # -*- Autoconf -*- 21 | # Process this file with autoconf to produce a configure script. 22 | 23 | dnl AC_PREREQ([2.65]) 24 | AC_INIT(westeros-simpleshell, version-1.0, jeff_wannamaker@cable.comcast.com,westeros-simpleshell) 25 | AC_CONFIG_SRCDIR([]) 26 | AC_CONFIG_HEADERS([cfg/config.h]) 27 | AC_CONFIG_MACRO_DIR([m4]) 28 | AC_CONFIG_AUX_DIR([cfg]) 29 | AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-bzip2 1.9]) 30 | LT_INIT 31 | 32 | # Checks for programs. 33 | AC_PROG_CC 34 | AC_PROG_INSTALL 35 | AC_PROG_MAKE_SET 36 | AC_PROG_CXX 37 | 38 | # Checks for header files. 39 | AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) 40 | 41 | # Checks for typedefs, structures, and compiler characteristics. 42 | AC_TYPE_SIZE_T 43 | AC_HEADER_STDBOOL 44 | 45 | IARM_CFLAGS=" " 46 | 47 | # Checks for library functions. 48 | #Add the subdirectories to be considered for building. 49 | SUBDIRS=" " 50 | #to setup m4 macros 51 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])], 52 | [AM_DEFAULT_VERBOSITY=1 53 | AC_SUBST(AM_DEFAULT_VERBOSITY)]) 54 | 55 | PKG_CHECK_MODULES([GLIB],[glib-2.0 >= 2.22.5]) 56 | PKG_CHECK_MODULES([GTHREAD],[gthread-2.0 >= 2.38.2]) 57 | PKG_CHECK_MODULES([WAYLAND_CLIENT],[wayland-client >= 1.6.0]) 58 | PKG_CHECK_MODULES([WAYLAND_SERVER],[wayland-server >= 1.6.0]) 59 | 60 | WAYLANDLIB="-lwayland-client" 61 | AC_SUBST(WAYLANDLIB) 62 | 63 | AC_CONFIG_FILES([Makefile]) 64 | AC_SUBST(WAYLAND_CFLAGS) 65 | AC_SUBST(GUPNP_VERSION) 66 | AC_OUTPUT 67 | -------------------------------------------------------------------------------- /simpleshell/protocol/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2016 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | all: client-header server-header code 21 | 22 | client-header: 23 | $(SCANNER_TOOL) client-header < simpleshell.xml > simpleshell-client-protocol.h 24 | 25 | server-header: 26 | $(SCANNER_TOOL) server-header < simpleshell.xml > simpleshell-server-protocol.h 27 | 28 | code: 29 | $(SCANNER_TOOL) code < simpleshell.xml > simpleshell-protocol.c 30 | 31 | clean: 32 | @rm -f simpleshell-client-protocol.h simpleshell-server-protocol.h simpleshell-protocol.c simpleshell-protocol.o 33 | 34 | 35 | -------------------------------------------------------------------------------- /simpleshell/westeros-simpleshell.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2016 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _WESTEROS_SIMPLESHELL_H 20 | #define _WESTEROS_SIMPLESHELL_H 21 | 22 | #include "wayland-server.h" 23 | 24 | typedef struct _WstRenderer WstRenderer; 25 | typedef struct _WstRenderSurface WstRenderSurface; 26 | 27 | struct wl_simple_shell; 28 | 29 | struct wayland_simple_shell_callbacks { 30 | void (*set_name)( void* userData, uint32_t surfaceId, const char *name ); 31 | void (*set_visible)( void* userData, uint32_t surfaceId, bool visible ); 32 | void (*set_geometry)( void* userData, uint32_t surfaceId, int x, int y, int width, int height ); 33 | void (*set_opacity)( void* userData, uint32_t surfaceId, float opacity ); 34 | void (*set_zorder)( void* userData, uint32_t surfaceId, float zorder ); 35 | void (*get_name)( void* userData, uint32_t surfaceId, const char **name ); 36 | void (*get_status)( void *userData, uint32_t surfaceId, bool *visible, 37 | int32_t *x, int32_t *y, int32_t *width, int32_t *height, 38 | float *opacity, float *zorder ); 39 | void (*set_focus)( void *userData, uint32_t surfaceId); 40 | void (*set_scale)( void *userData, uint32_t surfaceId, float scaleX, float scaleY ); 41 | }; 42 | 43 | wl_simple_shell* WstSimpleShellInit( struct wl_display *display, 44 | wayland_simple_shell_callbacks *callbacks, 45 | void *userData ); 46 | void WstSimpleShellUninit( wl_simple_shell *shell ); 47 | 48 | void WstSimpleShellNotifySurfaceCreated( wl_simple_shell *shell, struct wl_client *client, 49 | struct wl_resource *surface_resource, uint32_t surfaceId ); 50 | 51 | void WstSimpleShellNotifySurfaceDestroyed( wl_simple_shell *shell, struct wl_client *client, uint32_t surfaceId ); 52 | 53 | #endif 54 | 55 | 56 | -------------------------------------------------------------------------------- /systemd/INSTALL: -------------------------------------------------------------------------------- 1 | copy during install 2 | 3 | westeros-env -> /etc/default 4 | westeros-init -> /usr/bin 5 | westeros.service -> /lib/systemd/system 6 | -------------------------------------------------------------------------------- /systemd/westeros-env: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rdkcmf/westeros/380015778c45e7f26406f22a063bd259a7dece46/systemd/westeros-env -------------------------------------------------------------------------------- /systemd/westeros-init: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2016 RDK Management 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | if test -z "$XDG_RUNTIME_DIR"; then 18 | export XDG_RUNTIME_DIR="/run" 19 | fi 20 | 21 | waitfordir=60 22 | while [ ! -d $XDG_RUNTIME_DIR -a $waitfordir -gt 0 ]; 23 | do 24 | sleep 1 25 | echo "waiting XDG_RUNTIME_DIR mount while $waitfordir > 0 " 26 | waitfordir=$((waitfordir-1)) 27 | done 28 | echo 'XDG_RUNTIME_DIR mounted' 29 | 30 | if test -z "$WAYLAND_DISPLAY"; then 31 | export WAYLAND_DISPLAY=wayland-0 32 | fi 33 | 34 | #Dispmanx renderer support in RPI 35 | 36 | if [ -f /usr/lib/libwesteros_render_dispmanx.so.0 ]; then 37 | RENDERER="/usr/lib/libwesteros_render_dispmanx.so.0 --enableCursor" 38 | else 39 | RENDERER="/usr/lib/libwesteros_render_gl.so.0" 40 | fi 41 | 42 | if [ -f "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" ]; then 43 | echo "ERROR: A Wayland compositor $WAYLAND_DISPLAY is already running" 44 | exit 1 45 | fi 46 | exec /usr/bin/westeros --renderer $RENDERER --framerate 60 --display $WAYLAND_DISPLAY 47 | 48 | -------------------------------------------------------------------------------- /systemd/westeros.service: -------------------------------------------------------------------------------- 1 | # Copyright 2016 RDK Management 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | [Unit] 16 | Description=Westersos Wayland Compositor 17 | RequiresMountsFor=/run 18 | 19 | [Service] 20 | User=root 21 | EnvironmentFile=-/etc/default/westeros-env 22 | ExecStart=/usr/bin/westeros-init 23 | 24 | [Install] 25 | WantedBy=multi-user.target 26 | -------------------------------------------------------------------------------- /systemd/westeros.sysvinit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # If not stated otherwise in this file or this component's Licenses.txt file the 4 | # following copyright and licenses apply: 5 | # 6 | # Copyright 2016 RDK Management 7 | # 8 | # Licensed under the Apache License, Version 2.0 (the "License"); 9 | # you may not use this file except in compliance with the License. 10 | # You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, software 15 | # distributed under the License is distributed on an "AS IS" BASIS, 16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | # See the License for the specific language governing permissions and 18 | # limitations under the License. 19 | # 20 | 21 | start() { 22 | echo -n "Starting westeros: " 23 | start-stop-daemon -S -q -b -m -p /var/run/westeros.pid --exec /usr/bin/westeros-init -- /dev/null 2>&1 24 | [ $? == 0 ] && echo "OK" || echo "FAIL" 25 | } 26 | stop() { 27 | echo -n "Stopping westeros: " 28 | start-stop-daemon -K -q -p /var/run/westeros.pid 29 | [ $? == 0 ] && echo "OK" || echo "FAIL" 30 | rm -rf /var/run/westeros.pid 31 | } 32 | restart() { 33 | stop 34 | sleep 3 35 | start 36 | } 37 | 38 | case "$1" in 39 | start) 40 | start 41 | ;; 42 | stop) 43 | stop 44 | ;; 45 | restart|reload) 46 | restart 47 | ;; 48 | *) 49 | echo "Usage: $0 {start|stop|restart}" 50 | exit 1 51 | esac 52 | 53 | exit $? 54 | -------------------------------------------------------------------------------- /test/Makefile.test: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2018 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | all: parse-coverage test-common test-brcm test-drm 21 | 22 | clean: 23 | rm -f *.o && rm -f *.gcov && rm -f *.gcno && rm -f *.gcda && \ 24 | rm -f parse-coverage && \ 25 | cd common && \ 26 | make -f Makefile.common clean && \ 27 | cd .. && \ 28 | cd brcm && \ 29 | make -f Makefile.brcm clean && \ 30 | cp ../Makefile.brcm . && \ 31 | cd .. && \ 32 | cd drm && \ 33 | make -f Makefile.drm clean && \ 34 | cp ../Makefile.drm . && \ 35 | cd .. 36 | 37 | cleanall: initall 38 | 39 | initall: init 40 | rm -rf common && \ 41 | rm -rf brcm && \ 42 | rm -rf drm 43 | 44 | init: 45 | rm -f .common && \ 46 | rm -f .brcm && \ 47 | rm -f .drm 48 | 49 | parse-coverage: 50 | g++ parse-coverage.cpp -O2 -o parse-coverage 51 | 52 | test-common: .common 53 | cd common && \ 54 | make -f Makefile.common && \ 55 | cd .. 56 | 57 | .common: 58 | mkdir -p common && \ 59 | cd common && \ 60 | cp ../Makefile.common . && \ 61 | make -f Makefile.common && \ 62 | cd .. && \ 63 | touch .common 64 | 65 | test-brcm: .brcm 66 | cd brcm && \ 67 | unset CFLAGS && \ 68 | make -f Makefile.brcm && \ 69 | cd .. 70 | 71 | .brcm: 72 | git clone https://code.rdkcentral.com/r/a/components/opensource/westeros brcm && \ 73 | cd brcm && \ 74 | cp ../Makefile.brcm . && \ 75 | cd .. && \ 76 | touch .brcm 77 | 78 | test-drm: .drm 79 | cd drm && \ 80 | unset CFLAGS && \ 81 | make -f Makefile.drm && \ 82 | cd .. 83 | 84 | .drm: 85 | git clone https://code.rdkcentral.com/r/a/components/opensource/westeros drm && \ 86 | cd drm && \ 87 | cp ../Makefile.drm . && \ 88 | cd .. && \ 89 | touch .drm 90 | 91 | -------------------------------------------------------------------------------- /test/README.md: -------------------------------------------------------------------------------- 1 | # westeros-unittest 2 | Westeros Automated Test Tool 3 | 4 | Westeros-unittest is a automated test tool for the Westeros compositor. It can be built and executed on 5 | Linux systems. Output include code coverage information. 6 | 7 | --- 8 | # Building 9 | 10 | To build on a Linxu system, make sure the system has a GNU toolchain, Autotools, and gcov installed. The tool 11 | will download and build its dependencies as part of its build process. 12 | 13 | For a complete clean build of the tool and all dependencies: 14 | 15 | make -f Makefile.test initall 16 | make -f Makefile.test 17 | 18 | To leave dependency packages intact but clean build the tool itself: 19 | 20 | make -f Makefile.test clean 21 | make -f Makefile.test 22 | 23 | --- 24 | # Running 25 | 26 | Run all tests with: 27 | 28 | ./run-tests.sh 29 | 30 | where may be one of: 31 | brcm 32 | drm 33 | 34 | To run a specific test: 35 | 36 | ./run-tests testname 37 | 38 | --- 39 | # Copyright and license 40 | 41 | If not stated otherwise in this file or this component's Licenses.txt file the 42 | following copyright and licenses apply: 43 | 44 | Copyright 2018 RDK Management 45 | 46 | Licensed under the Apache License, Version 2.0 (the "License"); 47 | you may not use this file except in compliance with the License. 48 | You may obtain a copy of the License at 49 | 50 | http://www.apache.org/licenses/LICENSE-2.0 51 | 52 | Unless required by applicable law or agreed to in writing, software 53 | distributed under the License is distributed on an "AS IS" BASIS, 54 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 55 | See the License for the specific language governing permissions and 56 | limitations under the License. 57 | 58 | -------------------------------------------------------------------------------- /test/brcm-em/config.site: -------------------------------------------------------------------------------- 1 | CPPFLAGS="-I${includedir} -fpermissive -fprofile-arcs -ftest-coverage -O0" 2 | LDFLAGS="-L${libdir} -lgcov --coverage" 3 | 4 | -------------------------------------------------------------------------------- /test/brcm-em/configure.ac: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2018 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | # -*- Autoconf -*- 21 | # Process this file with autoconf to produce a configure script. 22 | 23 | dnl AC_PREREQ([2.65]) 24 | AC_INIT(westeros-unittest, version-1.0, jeff_wannamaker@cable.comcast.com,westeros-unittest) 25 | AC_CONFIG_SRCDIR([]) 26 | AC_CONFIG_HEADERS([cfg/config.h]) 27 | AC_CONFIG_MACRO_DIR([cfg]) 28 | AC_CONFIG_AUX_DIR([cfg]) 29 | AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-bzip2 1.9]) 30 | LT_INIT 31 | 32 | # Checks for programs. 33 | AC_PROG_CC 34 | AC_PROG_INSTALL 35 | AC_PROG_MAKE_SET 36 | AC_PROG_CXX 37 | 38 | # Checks for header files. 39 | AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) 40 | 41 | # Checks for typedefs, structures, and compiler characteristics. 42 | AC_TYPE_SIZE_T 43 | AC_HEADER_STDBOOL 44 | 45 | # Checks for library functions. 46 | #Add the subdirectories to be considered for building. 47 | SUBDIRS=" " 48 | #to setup m4 macros 49 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])], 50 | [AM_DEFAULT_VERBOSITY=1 51 | AC_SUBST(AM_DEFAULT_VERBOSITY)]) 52 | 53 | PKG_CHECK_MODULES([GLIB],[glib-2.0 >= 2.22.5]) 54 | PKG_CHECK_MODULES([GTHREAD],[gthread-2.0 >= 2.38.2]) 55 | PKG_CHECK_MODULES([WAYLAND_CLIENT],[wayland-client >= 1.6.0]) 56 | PKG_CHECK_MODULES([WAYLAND_SERVER],[wayland-server >= 1.6.0]) 57 | PKG_CHECK_MODULES([GST], [gstreamer-1.0 >= 1.4]) 58 | PKG_CHECK_MODULES([GSTBASE], [gstreamer-base-1.0 >= 1.4]) 59 | PKG_CHECK_MODULES([XKBCOMMON],[xkbcommon >= 0.4]) 60 | 61 | WAYLANDLIB="-lwayland-client" 62 | AC_SUBST(WAYLANDLIB) 63 | 64 | AC_CONFIG_FILES([Makefile]) 65 | AC_SUBST(WAYLAND_CFLAGS) 66 | AC_OUTPUT 67 | -------------------------------------------------------------------------------- /test/brcm-em/em/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2018 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | AUTOMAKE_OPTIONS = subdir-objects 21 | 22 | lib_LTLIBRARIES = libwesteros-ut-em.la 23 | 24 | libwesteros_ut_em_la_SOURCES = brcm-em.cpp protocol/bnxs-protocol.c 25 | libwesteros_ut_em_la_include_HEADERS = brcm-em.h protocol/bnxs-client-protocol.h 26 | libwesteros_ut_em_la_includedir = $(includedir) 27 | 28 | libwesteros_ut_em_la_CXXFLAGS = $(AM_CXXFLAGS) -I$(srcdir)../include -I$(srcdir)/../.. -I$(srcdir)/protocol $(WAYLAND_CLIENT_CFLAGS) $(WAYLAND_SERVER_CFLAGS) 29 | libwesteros_ut_em_la_LDFLAGS = $(AM_LDFLAGS) $(WAYLAND_SERVER_LIBS) $(WAYLAND_CLIENT_LIBS) -ldl 30 | 31 | distcleancheck_listfiles = *-libtool 32 | -------------------------------------------------------------------------------- /test/brcm-em/em/brcm-em.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _BRCM_EM_H 20 | #define _BRCM_EM_H 21 | 22 | typedef struct _EMCTX EMCTX; 23 | 24 | EMCTX* EMCreateContext( void ); 25 | void EMRDestroyContext( EMCTX* ctx ); 26 | bool EMSetDisplaySize( EMCTX *ctx, int width, int height ); 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /test/brcm-em/em/configure.ac: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2018 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | # -*- Autoconf -*- 20 | # Process this file with autoconf to produce a configure script. 21 | 22 | dnl AC_PREREQ([2.65]) 23 | AC_INIT(brcm-em, 1.0.0, jeff_wannamaker@cable.comcast.com,brcm-em) 24 | AC_CONFIG_SRCDIR([]) 25 | AC_CONFIG_HEADERS([cfg/config.h]) 26 | AC_CONFIG_MACRO_DIR([cfg]) 27 | AC_CONFIG_AUX_DIR([.]) 28 | AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-bzip2 1.9]) 29 | LT_INIT 30 | 31 | # Checks for programs. 32 | AC_PROG_CC 33 | AC_PROG_INSTALL 34 | AC_PROG_MAKE_SET 35 | AC_PROG_CXX 36 | 37 | # Checks for header files. 38 | AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) 39 | 40 | # Checks for typedefs, structures, and compiler characteristics. 41 | AC_TYPE_SIZE_T 42 | AC_HEADER_STDBOOL 43 | 44 | # Checks for library functions. 45 | #Add the subdirectories to be considered for building. 46 | SUBDIRS=" " 47 | #to setup m4 macros 48 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])], 49 | [AM_DEFAULT_VERBOSITY=1 50 | AC_SUBST(AM_DEFAULT_VERBOSITY)]) 51 | 52 | PKG_CHECK_MODULES([WAYLAND_CLIENT],[wayland-client >= 1.6.0]) 53 | PKG_CHECK_MODULES([WAYLAND_SERVER],[wayland-server >= 1.6.0]) 54 | 55 | AC_CONFIG_FILES([Makefile]) 56 | AC_OUTPUT 57 | 58 | -------------------------------------------------------------------------------- /test/brcm-em/em/protocol/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2016 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | all: bnxs-client-header bnxs-server-header bnxs-code 21 | 22 | bnxs-client-header: 23 | $(SCANNER_TOOL) client-header < bnxs.xml > bnxs-client-protocol.h 24 | 25 | bnxs-server-header: 26 | $(SCANNER_TOOL) server-header < bnxs.xml > bnxs-server-protocol.h 27 | 28 | bnxs-code: 29 | $(SCANNER_TOOL) code < bnxs.xml > bnxs-protocol.c 30 | 31 | clean: 32 | @rm -f bnxs-client-protocol.h bnxs-server-protocol.h bnxs-protocol.c 33 | 34 | 35 | -------------------------------------------------------------------------------- /test/brcm-em/include/EGL/begl_displayplatform.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _begl_displayplatform_h 20 | #define _begl_displayplatform_h 21 | 22 | #include 23 | 24 | typedef enum 25 | { 26 | /* These formats are render target formats */ 27 | BEGL_BufferFormat_eA8B8G8R8, 28 | BEGL_BufferFormat_eR8G8B8A8, 29 | BEGL_BufferFormat_eX8B8G8R8, 30 | BEGL_BufferFormat_eR8G8B8X8, 31 | BEGL_BufferFormat_eR5G6B5, 32 | 33 | BEGL_BufferFormat_eR4G4B4A4, 34 | BEGL_BufferFormat_eA4B4G4R4, 35 | BEGL_BufferFormat_eR4G4B4X4, 36 | BEGL_BufferFormat_eX4B4G4R4, 37 | 38 | BEGL_BufferFormat_eR5G5B5A1, 39 | BEGL_BufferFormat_eA1B5G5R5, 40 | BEGL_BufferFormat_eR5G5B5X1, 41 | BEGL_BufferFormat_eX1B5G5R5, 42 | 43 | BEGL_BufferFormat_eYV12, 44 | BEGL_BufferFormat_eYUV422, 45 | 46 | BEGL_BufferFormat_eBSTC, 47 | 48 | BEGL_BufferFormat_INVALID 49 | } BEGL_BufferFormat; 50 | 51 | typedef struct BEGL_PixmapInfo 52 | { 53 | uint32_t width; 54 | uint32_t height; 55 | BEGL_BufferFormat format; 56 | } BEGL_PixmapInfo; 57 | 58 | typedef struct BEGL_PixmapInfoEXT 59 | { 60 | uint32_t width; 61 | uint32_t height; 62 | BEGL_BufferFormat format; 63 | bool secure; 64 | } BEGL_PixmapInfoEXT; 65 | 66 | #endif 67 | 68 | -------------------------------------------------------------------------------- /test/brcm-em/include/GLES2/gl2ext.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _gl2ext_h 20 | #define _gl2ext_h 21 | 22 | #define GL_APIENTRYP * 23 | 24 | #define GL_BGRA_EXT 0x80E1 25 | 26 | typedef void *GLeglImageOES; 27 | 28 | typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); 29 | 30 | GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); 31 | 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /test/brcm-em/include/platform_app.inc: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2018 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | -------------------------------------------------------------------------------- /test/brcm-em/include/wayland-egl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | /* 20 | * Copyright © 2011 Kristian Høgsberg 21 | * Copyright © 2011 Benjamin Franzke 22 | * 23 | * Permission to use, copy, modify, distribute, and sell this software and its 24 | * documentation for any purpose is hereby granted without fee, provided that 25 | * the above copyright notice appear in all copies and that both that copyright 26 | * notice and this permission notice appear in supporting documentation, and 27 | * that the name of the copyright holders not be used in advertising or 28 | * publicity pertaining to distribution of the software without specific, 29 | * written prior permission. The copyright holders make no representations 30 | * about the suitability of this software for any purpose. It is provided "as 31 | * is" without express or implied warranty. 32 | * 33 | * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 34 | * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 35 | * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR 36 | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 37 | * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 38 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 39 | * OF THIS SOFTWARE. 40 | */ 41 | #ifndef _wayland_egl_h 42 | #define _wayland_egl_h 43 | 44 | #include "EGL/egl.h" 45 | #include "EGL/eglext.h" 46 | 47 | #ifdef __cplusplus 48 | extern "C" { 49 | #endif 50 | 51 | struct wl_egl_window *wl_egl_window_create(struct wl_surface *surface, int width, int height); 52 | void wl_egl_window_destroy(struct wl_egl_window *egl_window); 53 | void wl_egl_window_resize(struct wl_egl_window *egl_window, int width, int height, int dx, int dy); 54 | void wl_egl_window_get_attached_size(struct wl_egl_window *egl_window, int *width, int *height); 55 | void *wl_egl_get_device_buffer(struct wl_resource *resource); 56 | 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif 62 | 63 | -------------------------------------------------------------------------------- /test/brcm-em/include/westeros-ut-open.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _WESTEROS_UT_OPEN_H 20 | #define _WESTEROS_UT_OPEN_H 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #define _SYS_IOCTL_H 1 32 | #include 33 | 34 | /* Hooks to allow brcm-em.cpp to intercept ioctl calls */ 35 | #define ioctl( d, r, p ) EMIOctl( (d), (r), (p) ) 36 | 37 | /* Hooks to allow brcm-em.cpp to intercept mmap calls */ 38 | #define mmap( addr, length, prot, flags, fd, offset ) EMMmap( addr, length, prot, flags, fd, offset) 39 | #define munmap( addr, length ) EMMunmap( addr, length ) 40 | 41 | /* Hooks to allow brcm-em.cpp to intercept poll calls */ 42 | #define poll( pollfd, nfds, timeout ) EMPoll( pollfd, nfds, timeout ) 43 | 44 | /* Hooks to allow brcm-em.cpp to intercept stat calls */ 45 | #define stat( path, buf ) EMStat( (path), (buf) ) 46 | 47 | /* Hooks to allow brcm-em.cpp to intercept opendir,readdir,closdir calls */ 48 | #define opendir( name ) EMOpenDir( name ) 49 | #define readdir( dir ) EMReadDir( dir ) 50 | #define closedir( dir ) EMCloseDir( dir ) 51 | 52 | /* Hooks to allow brcm-em.cpp to intercept open calls */ 53 | #define GET_OPEN_MACRO(_1,_2,_3,NAME,...) NAME 54 | #define open(...) GET_OPEN_MACRO(__VA_ARGS__, EMOpen3, EMOpen2)(__VA_ARGS__) 55 | #define close(fd) EMClose(fd) 56 | #define read( fd, buf, count ) EMRead( fd, buf, count ) 57 | 58 | int EMOpen2( const char *pathname, int flags ); 59 | int EMOpen3( const char *pathname, int flags, mode_t mode ); 60 | int EMClose( int fd ); 61 | ssize_t EMRead( int fd, void *buf, size_t count ) __wur; 62 | int EMIOctl( int fd, int request, void *arg ); 63 | void *EMMmap( void *addr, size_t length, int prot, int flags, int fd, off_t offset ) __THROW; 64 | int EMMunmap( void *addr, size_t length ) __THROW; 65 | int EMPoll( struct pollfd *fds, nfds_t nfds, int timeout ); 66 | int EMStat(const char *path, struct stat *buf) __THROW; 67 | DIR *EMOpenDir(const char *name); 68 | int EMCloseDir(DIR *dirp); 69 | struct dirent *EMReadDir(DIR *dirp); 70 | 71 | #ifdef __cplusplus 72 | } 73 | #endif 74 | 75 | #endif 76 | 77 | -------------------------------------------------------------------------------- /test/brcm-em/soc-tests.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _SOC_TESTS_H 20 | #define _SOC_TESTS_H 21 | 22 | TESTCASE getSocTest( int index ); 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /test/brcm-em/soc-video-src.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _SOC_VIDEO_SRC_H 20 | #define _SOC_VIDEO_SRC_H 21 | 22 | #include 23 | 24 | #include "../westeros-ut-em.h" 25 | 26 | #include 27 | #include 28 | 29 | #define EM_TYPE_VIDEO_SRC em_video_src_get_type() 30 | 31 | #define EM_VIDEO_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), EM_TYPE_VIDEO_SRC, EMVideoSrc)) 32 | #define EM_VIDEO_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EM_TYPE_VIDEO_SRC, EMVideoSrcClass)) 33 | #define EM_IS_VIDEO_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), EM_TYPE_VIDEO_SRC)) 34 | #define EM_IS_VIDEO_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EM_TYPE_VIDEO_SRC)) 35 | #define EM_VIDEO_SRC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), EM_TYPE_VIDEO_SRC, EMVideoSrcClass)) 36 | 37 | typedef struct _EMVideoSrc EMVideoSrc; 38 | typedef struct _EMVideoSrcClass EMVideoSrcClass; 39 | 40 | struct _EMVideoSrc 41 | { 42 | GstBaseSrc parent; 43 | GstPadQueryFunction defaultQueryFunc; 44 | EMCTX *ctx; 45 | EMSimpleVideoDecoder *dec; 46 | bool paused; 47 | int frameNumber; 48 | pthread_mutex_t mutex; 49 | gint64 segStartTime; 50 | gint64 segStopTime; 51 | gdouble segRate; 52 | gdouble segAppliedRate; 53 | bool needSegment; 54 | bool pushEOS; 55 | bool haveEOS; 56 | bool dataPaused; 57 | long long dataPausedEndTime; 58 | }; 59 | 60 | struct _EMVideoSrcClass 61 | { 62 | GstBaseSrcClass parent_class; 63 | }; 64 | 65 | GType em_video_src_get_type() G_GNUC_CONST; 66 | 67 | GstElement* createVideoSrc( EMCTX *emctx, EMSimpleVideoDecoder *dec ); 68 | int videoSrcGetFrameNumber( GstElement *element ); 69 | void videoSrcSetFrameSize( GstElement *element, int width, int height ); 70 | void videoSrcPauseData( GstElement *element, int pausePeriodMS ); 71 | void videoSrcPushEOS( GstElement *element ); 72 | 73 | #endif 74 | 75 | -------------------------------------------------------------------------------- /test/brcm-em/wayland-egl.pc: -------------------------------------------------------------------------------- 1 | prefix=/usr 2 | exec_prefix=${prefix} 3 | libdir=${prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: wayland-egl 7 | Description: Westeros UT EM wayland-egl 8 | Version: 1.1.1 9 | Requires: wayland-client 10 | Libs: -L${libdir} -lwayland-egl 11 | Cflags: -I${includedir} 12 | -------------------------------------------------------------------------------- /test/drm-em/config.site: -------------------------------------------------------------------------------- 1 | CPPFLAGS="-g -I${includedir} -fpermissive -fprofile-arcs -ftest-coverage -O0" 2 | CFLAGS+=" -g -I${includedir} -fpermissive -fprofile-arcs -ftest-coverage -O0" 3 | LDFLAGS="-L${libdir} -lgcov --coverage" 4 | 5 | -------------------------------------------------------------------------------- /test/drm-em/configure.ac: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2018 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | # -*- Autoconf -*- 21 | # Process this file with autoconf to produce a configure script. 22 | 23 | dnl AC_PREREQ([2.65]) 24 | AC_INIT(westeros-unittest, version-1.0, jeff_wannamaker@cable.comcast.com,westeros-unittest) 25 | AC_CONFIG_SRCDIR([]) 26 | AC_CONFIG_HEADERS([cfg/config.h]) 27 | AC_CONFIG_MACRO_DIR([cfg]) 28 | AC_CONFIG_AUX_DIR([cfg]) 29 | AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-bzip2 1.9]) 30 | LT_INIT 31 | 32 | # Checks for programs. 33 | AC_PROG_CC 34 | AC_PROG_INSTALL 35 | AC_PROG_MAKE_SET 36 | AC_PROG_CXX 37 | 38 | # Checks for header files. 39 | AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) 40 | 41 | # Checks for typedefs, structures, and compiler characteristics. 42 | AC_TYPE_SIZE_T 43 | AC_HEADER_STDBOOL 44 | 45 | # Checks for library functions. 46 | #Add the subdirectories to be considered for building. 47 | SUBDIRS=" " 48 | #to setup m4 macros 49 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])], 50 | [AM_DEFAULT_VERBOSITY=1 51 | AC_SUBST(AM_DEFAULT_VERBOSITY)]) 52 | 53 | PKG_CHECK_MODULES([GLIB],[glib-2.0 >= 2.22.5]) 54 | PKG_CHECK_MODULES([GTHREAD],[gthread-2.0 >= 2.38.2]) 55 | PKG_CHECK_MODULES([WAYLAND_CLIENT],[wayland-client >= 1.6.0]) 56 | PKG_CHECK_MODULES([WAYLAND_SERVER],[wayland-server >= 1.6.0]) 57 | PKG_CHECK_MODULES([GST], [gstreamer-1.0 >= 1.4]) 58 | PKG_CHECK_MODULES([GSTBASE], [gstreamer-base-1.0 >= 1.4]) 59 | PKG_CHECK_MODULES([XKBCOMMON],[xkbcommon >= 0.4]) 60 | 61 | WAYLANDLIB="-lwayland-client" 62 | AC_SUBST(WAYLANDLIB) 63 | 64 | AC_CONFIG_FILES([Makefile]) 65 | AC_SUBST(WAYLAND_CFLAGS) 66 | AC_OUTPUT 67 | -------------------------------------------------------------------------------- /test/drm-em/em/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2018 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | AUTOMAKE_OPTIONS = subdir-objects 21 | 22 | lib_LTLIBRARIES = libwesteros-ut-em.la 23 | 24 | libwesteros_ut_em_la_SOURCES = drm-em.cpp protocol/drm-protocol.c 25 | libwesteros_ut_em_la_include_HEADERS = drm-em.h protocol/drm-client-protocol.h 26 | libwesteros_ut_em_la_includedir = $(includedir) 27 | 28 | libwesteros_ut_em_la_CXXFLAGS = $(AM_CXXFLAGS) -g -I$(srcdir)../include -I$(srcdir)/../.. -I$(srcdir)/protocol $(WAYLAND_CLIENT_CFLAGS) $(WAYLAND_SERVER_CFLAGS) 29 | libwesteros_ut_em_la_LDFLAGS = $(AM_LDFLAGS) $(WAYLAND_SERVER_LIBS) $(WAYLAND_CLIENT_LIBS) -ldl 30 | 31 | distcleancheck_listfiles = *-libtool 32 | -------------------------------------------------------------------------------- /test/drm-em/em/configure.ac: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2018 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | # -*- Autoconf -*- 20 | # Process this file with autoconf to produce a configure script. 21 | 22 | dnl AC_PREREQ([2.65]) 23 | AC_INIT(brcm-em, 1.0.0, jeff_wannamaker@cable.comcast.com,brcm-em) 24 | AC_CONFIG_SRCDIR([]) 25 | AC_CONFIG_HEADERS([cfg/config.h]) 26 | AC_CONFIG_MACRO_DIR([cfg]) 27 | AC_CONFIG_AUX_DIR([.]) 28 | AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-bzip2 1.9]) 29 | LT_INIT 30 | 31 | # Checks for programs. 32 | AC_PROG_CC 33 | AC_PROG_INSTALL 34 | AC_PROG_MAKE_SET 35 | AC_PROG_CXX 36 | 37 | # Checks for header files. 38 | AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) 39 | 40 | # Checks for typedefs, structures, and compiler characteristics. 41 | AC_TYPE_SIZE_T 42 | AC_HEADER_STDBOOL 43 | 44 | # Checks for library functions. 45 | #Add the subdirectories to be considered for building. 46 | SUBDIRS=" " 47 | #to setup m4 macros 48 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])], 49 | [AM_DEFAULT_VERBOSITY=1 50 | AC_SUBST(AM_DEFAULT_VERBOSITY)]) 51 | 52 | PKG_CHECK_MODULES([WAYLAND_CLIENT],[wayland-client >= 1.6.0]) 53 | PKG_CHECK_MODULES([WAYLAND_SERVER],[wayland-server >= 1.6.0]) 54 | 55 | AC_CONFIG_FILES([Makefile]) 56 | AC_OUTPUT 57 | 58 | -------------------------------------------------------------------------------- /test/drm-em/em/drm-em.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _DRM_EM_H 20 | #define _DRM_EM_H 21 | 22 | typedef struct _EMCTX EMCTX; 23 | 24 | EMCTX* EMCreateContext( void ); 25 | void EMRDestroyContext( EMCTX* ctx ); 26 | bool EMSetDisplaySize( EMCTX *ctx, int width, int height ); 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /test/drm-em/em/protocol/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2016 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | all: drm-client-header drm-server-header drm-code 21 | 22 | drm-client-header: 23 | $(SCANNER_TOOL) client-header < wayland-drm.xml > drm-client-protocol.h 24 | 25 | drm-server-header: 26 | $(SCANNER_TOOL) server-header < wayland-drm.xml > drm-server-protocol.h 27 | 28 | drm-code: 29 | $(SCANNER_TOOL) code < wayland-drm.xml > drm-protocol.c 30 | 31 | clean: 32 | @rm -f drm-client-protocol.h drm-server-protocol.h drm-protocol.c 33 | 34 | 35 | -------------------------------------------------------------------------------- /test/drm-em/gbm.pc: -------------------------------------------------------------------------------- 1 | prefix=/usr 2 | exec_prefix=/usr 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: gbm 7 | Description: meson gbm library 8 | Version: 12.0.1 9 | Libs: -L${libdir} -lgbm 10 | Cflags: -I${includedir}/ 11 | -------------------------------------------------------------------------------- /test/drm-em/include/GLES2/gl2ext.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _gl2ext_h 20 | #define _gl2ext_h 21 | 22 | #define GL_APIENTRYP * 23 | 24 | #define GL_BGRA_EXT 0x80E1 25 | 26 | #ifndef GL_OES_EGL_image_external 27 | #define GL_OES_EGL_image_external 1 28 | #define GL_TEXTURE_EXTERNAL_OES 0x8D65 29 | #define GL_SAMPLER_EXTERNAL_OES 0x8D66 30 | #endif /* GL_OES_EGL_image_external */ 31 | 32 | typedef void *GLeglImageOES; 33 | 34 | typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); 35 | 36 | GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); 37 | 38 | #endif 39 | 40 | -------------------------------------------------------------------------------- /test/drm-em/include/wayland-egl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | /* 20 | * Copyright © 2011 Kristian Høgsberg 21 | * Copyright © 2011 Benjamin Franzke 22 | * 23 | * Permission to use, copy, modify, distribute, and sell this software and its 24 | * documentation for any purpose is hereby granted without fee, provided that 25 | * the above copyright notice appear in all copies and that both that copyright 26 | * notice and this permission notice appear in supporting documentation, and 27 | * that the name of the copyright holders not be used in advertising or 28 | * publicity pertaining to distribution of the software without specific, 29 | * written prior permission. The copyright holders make no representations 30 | * about the suitability of this software for any purpose. It is provided "as 31 | * is" without express or implied warranty. 32 | * 33 | * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 34 | * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 35 | * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR 36 | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 37 | * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 38 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 39 | * OF THIS SOFTWARE. 40 | */ 41 | #ifndef _wayland_egl_h 42 | #define _wayland_egl_h 43 | 44 | #include "EGL/egl.h" 45 | #include "EGL/eglext.h" 46 | 47 | #ifdef __cplusplus 48 | extern "C" { 49 | #endif 50 | 51 | struct wl_egl_window *wl_egl_window_create(struct wl_surface *surface, int width, int height); 52 | void wl_egl_window_destroy(struct wl_egl_window *egl_window); 53 | void wl_egl_window_resize(struct wl_egl_window *egl_window, int width, int height, int dx, int dy); 54 | void wl_egl_window_get_attached_size(struct wl_egl_window *egl_window, int *width, int *height); 55 | void *wl_egl_get_device_buffer(struct wl_resource *resource); 56 | 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif 62 | 63 | -------------------------------------------------------------------------------- /test/drm-em/include/westeros-ut-open.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _WESTEROS_UT_OPEN_H 20 | #define _WESTEROS_UT_OPEN_H 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #define _SYS_IOCTL_H 1 32 | #include 33 | 34 | /* Hooks to allow drm-em.cpp to intercept ioctl calls */ 35 | #define ioctl( d, r, p ) EMIOctl( (d), (r), (p) ) 36 | 37 | /* Hooks to allow drm-em.cpp to intercept mmap calls */ 38 | #define mmap( addr, length, prot, flags, fd, offset ) EMMmap( addr, length, prot, flags, fd, offset) 39 | #define munmap( addr, length ) EMMunmap( addr, length ) 40 | 41 | /* Hooks to allow drm-em.cpp to intercept poll calls */ 42 | #define poll( pollfd, nfds, timeout ) EMPoll( pollfd, nfds, timeout ) 43 | 44 | /* Hooks to allow drm-em.cpp to intercept stat calls */ 45 | #define stat( path, buf ) EMStat( (path), (buf) ) 46 | 47 | /* Hooks to allow drm-em.cpp to intercept opendir,readdir,closdir calls */ 48 | #define opendir( name ) EMOpenDir( name ) 49 | #define readdir( dir ) EMReadDir( dir ) 50 | #define closedir( dir ) EMCloseDir( dir ) 51 | 52 | /* Hooks to allow drm-em.cpp to intercept open calls */ 53 | #define GET_OPEN_MACRO(_1,_2,_3,NAME,...) NAME 54 | #define open(...) GET_OPEN_MACRO(__VA_ARGS__, EMOpen3, EMOpen2)(__VA_ARGS__) 55 | #define close(fd) EMClose(fd) 56 | #define read( fd, buf, count ) EMRead( fd, buf, count ) 57 | 58 | int EMOpen2( const char *pathname, int flags ); 59 | int EMOpen3( const char *pathname, int flags, mode_t mode ); 60 | int EMClose( int fd ); 61 | ssize_t EMRead( int fd, void *buf, size_t count ) __wur; 62 | int EMIOctl( int fd, int request, void *arg ); 63 | void *EMMmap( void *addr, size_t length, int prot, int flags, int fd, off_t offset ) __THROW; 64 | int EMMunmap( void *addr, size_t length ) __THROW; 65 | int EMPoll( struct pollfd *fds, nfds_t nfds, int timeout ); 66 | int EMStat(const char *path, struct stat *buf) __THROW; 67 | DIR *EMOpenDir(const char *name); 68 | int EMCloseDir(DIR *dirp); 69 | struct dirent *EMReadDir(DIR *dirp); 70 | 71 | #ifdef __cplusplus 72 | } 73 | #endif 74 | 75 | #endif 76 | 77 | -------------------------------------------------------------------------------- /test/drm-em/libdrm.pc: -------------------------------------------------------------------------------- 1 | prefix=/usr 2 | libdir=${prefix}/lib 3 | includedir=${prefix}/include 4 | 5 | Name: libdrm 6 | Description: Userspace interface to kernel DRM services 7 | Version: 2.0.0 8 | Libs: -L${libdir} -ldrm 9 | Cflags: -I${includedir} -I${includedir}/libdrm 10 | -------------------------------------------------------------------------------- /test/drm-em/soc-tests.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _SOC_TESTS_H 20 | #define _SOC_TESTS_H 21 | 22 | TESTCASE getSocTest( int index ); 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /test/drm-em/soc-video-src.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _SOC_VIDEO_SRC_H 20 | #define _SOC_VIDEO_SRC_H 21 | 22 | #include 23 | 24 | #include "../westeros-ut-em.h" 25 | 26 | #include 27 | #include 28 | 29 | #define EM_TYPE_VIDEO_SRC em_video_src_get_type() 30 | 31 | #define EM_VIDEO_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), EM_TYPE_VIDEO_SRC, EMVideoSrc)) 32 | #define EM_VIDEO_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EM_TYPE_VIDEO_SRC, EMVideoSrcClass)) 33 | #define EM_IS_VIDEO_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), EM_TYPE_VIDEO_SRC)) 34 | #define EM_IS_VIDEO_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EM_TYPE_VIDEO_SRC)) 35 | #define EM_VIDEO_SRC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), EM_TYPE_VIDEO_SRC, EMVideoSrcClass)) 36 | 37 | typedef struct _EMVideoSrc EMVideoSrc; 38 | typedef struct _EMVideoSrcClass EMVideoSrcClass; 39 | 40 | struct _EMVideoSrc 41 | { 42 | GstBaseSrc parent; 43 | GstPadQueryFunction defaultQueryFunc; 44 | EMCTX *ctx; 45 | EMSimpleVideoDecoder *dec; 46 | bool paused; 47 | int frameNumber; 48 | pthread_mutex_t mutex; 49 | gint64 segStartTime; 50 | gint64 segStopTime; 51 | gdouble segRate; 52 | gdouble segAppliedRate; 53 | bool needSegment; 54 | bool needStep; 55 | }; 56 | 57 | struct _EMVideoSrcClass 58 | { 59 | GstBaseSrcClass parent_class; 60 | }; 61 | 62 | GType em_video_src_get_type() G_GNUC_CONST; 63 | 64 | GstElement* createVideoSrc( EMCTX *emctx, EMSimpleVideoDecoder *dec ); 65 | int videoSrcGetFrameNumber( GstElement *element ); 66 | void videoSrcSetFrameSize( GstElement *element, int width, int height ); 67 | void videoSrcDoStep( GstElement *element ); 68 | 69 | #endif 70 | 71 | -------------------------------------------------------------------------------- /test/drm-em/wayland-egl.pc: -------------------------------------------------------------------------------- 1 | prefix=/usr 2 | exec_prefix=${prefix} 3 | libdir=${prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: wayland-egl 7 | Description: Westeros UT EM wayland-egl 8 | Version: 1.1.1 9 | Requires: wayland-client 10 | Libs: -L${libdir} -lwayland-egl 11 | Cflags: -I${includedir} 12 | -------------------------------------------------------------------------------- /test/get-coverage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | case $1 in 3 | brcm) 4 | pushd brcm 5 | gcov libwesteros_compositor_la-westeros-compositor.cpp -o .libs/ > /dev/null 2>&1 6 | gcov westeros-render-gl.cpp -o .libs/ > /dev/null 2>&1 7 | gcov westeros-render-embedded.cpp -o .libs/ > /dev/null 2>&1 8 | cd essos 9 | gcov libessos_la-essos.cpp -o .libs/ > /dev/null 2>&1 10 | gcov libessosrmgr_la-essos-resmgr.cpp -o .libs/ > /dev/null 2>&1 11 | cd .. 12 | cd brcm/westeros-sink 13 | gcov libgstwesterossink_la-westeros-sink.c -o .libs/ > /dev/null 2>&1 14 | gcov libgstwesterossink_la-westeros-sink-soc.c -o .libs/ > /dev/null 2>&1 15 | cd ../.. 16 | cd brcm/westeros-render-nexus 17 | gcov westeros-render-nexus.cpp -o .libs/ > /dev/null 2>&1 18 | cd ../.. 19 | cd brcm 20 | gcov westeros-gl/libwesteros_gl_la-westeros-gl.cpp -o westeros-gl/.libs/ > /dev/null 2>&1 21 | cd .. 22 | ../parse-coverage westeros-compositor.cpp.gcov westeros-render-embedded.cpp.gcov westeros-render-gl.cpp.gcov essos/essos.cpp.gcov essos/essos-resmgr.cpp.gcov essos/essos-resmgr-uds.cpp.gcov brcm/westeros-render-nexus/westeros-render-nexus.cpp.gcov brcm/westeros-gl.cpp.gcov brcm/westeros-sink/westeros-sink.c.gcov brcm/westeros-sink/westeros-sink-soc.c.gcov 23 | ;; 24 | drm) 25 | pushd drm 26 | gcov libwesteros_compositor_la-westeros-compositor.cpp -o .libs/ > /dev/null 2>&1 27 | gcov westeros-render-gl.cpp -o .libs/ > /dev/null 2>&1 28 | gcov westeros-render-embedded.cpp -o .libs/ > /dev/null 2>&1 29 | cd essos 30 | gcov libessos_la-essos.cpp -o .libs/ > /dev/null 2>&1 31 | gcov libessosrmgr_la-essos-resmgr.cpp -o .libs/ > /dev/null 2>&1 32 | cd .. 33 | cd v4l2/westeros-sink 34 | gcov libgstwesterossink_la-westeros-sink.c -o .libs/ > /dev/null 2>&1 35 | gcov libgstwesterossink_la-westeros-sink-soc.c -o .libs/ > /dev/null 2>&1 36 | cd ../.. 37 | cd drm 38 | gcov westeros-gl/libwesteros_gl_la-westeros-gl.cpp -o westeros-gl/.libs/ > /dev/null 2>&1 39 | cd .. 40 | ../parse-coverage westeros-compositor.cpp.gcov westeros-render-embedded.cpp.gcov westeros-render-gl.cpp.gcov essos/essos.cpp.gcov essos/essos-resmgr.cpp.gcov essos/essos-resmgr-uds.cpp.gcov drm/westeros-gl.c.gcov v4l2/westeros-sink/westeros-sink.c.gcov v4l2/westeros-sink/westeros-sink-soc.c.gcov 41 | ;; 42 | *) 43 | echo "bad platform" 44 | exit ;; 45 | esac 46 | popd 47 | 48 | -------------------------------------------------------------------------------- /test/run-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | unset LD_PRELOAD 3 | export LD_LIBRARY_PATH=../lib 4 | case $1 in 5 | brcm) 6 | pushd brcm/external/install/bin ;; 7 | drm) 8 | pushd drm/external/install/bin 9 | export LD_PRELOAD=../lib/libwesteros_gl.so.0.0.0 ;; 10 | *) 11 | echo "bad platform" 12 | exit ;; 13 | esac 14 | args="" 15 | argnum=0 16 | for ARG in $@; do 17 | if [ "$argnum" != "0" ] 18 | then 19 | args="$args $ARG" 20 | fi 21 | argnum=$argnum+1 22 | done 23 | killall westeros-unittest 24 | export LD_PRELOAD=$LD_PRELOAD:../lib/libwesteros-ut-em.so 25 | export XDG_RUNTIME_DIR=/tmp 26 | unset WAYLAND_DISPLAY 27 | export GST_REGISTRY=. 28 | export GST_PLUGIN_SYSTEM_PATH=../lib/gstreamer-1.0 29 | #export WESTEROS_SINK_USE_ESSRMGR=1 30 | if [ "$2" = "valgrind" ] 31 | then 32 | valgrind --leak-check=yes --track-origins=yes ./westeros-unittest -w $3 33 | elif [ "$2" = "gdb" ] 34 | then 35 | gdb ./westeros-unittest 36 | else 37 | ./westeros-unittest $args 38 | fi 39 | result=$? 40 | popd 41 | unset LD_PRELOAD 42 | unset LD_LIBRARY_PATH 43 | ./get-coverage.sh $1 44 | echo $result 45 | 46 | -------------------------------------------------------------------------------- /test/test-clientapp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _TEST_CLIENTAPP_H 20 | #define _TEST_CLIENTAPP_H 21 | 22 | #include "westeros-ut-em.h" 23 | 24 | void runClientApp(int argc, const char **argv); 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /test/test-egl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _TEST_EGL_H 20 | #define _TEST_EGL_H 21 | 22 | #include 23 | #include 24 | 25 | typedef struct _TestEGLCtx 26 | { 27 | bool initialized; 28 | EGLDisplay eglDisplay; 29 | EGLConfig eglConfig; 30 | EGLSurface eglSurfaceWindow; 31 | EGLContext eglContext; 32 | } TestEGLCtx; 33 | 34 | bool testSetupEGL( TestEGLCtx *ctx, void *nativeDisplay ); 35 | void testTermEGL( TestEGLCtx *ctx ); 36 | 37 | #endif 38 | 39 | -------------------------------------------------------------------------------- /test/test-essos-erm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _TEST_ESSOS_ERM_H 20 | #define _TEST_ESSOS_ERM_H 21 | 22 | #include "westeros-ut-em.h" 23 | 24 | bool testCaseERMBasicRequestVideo( EMCTX *emctx ); 25 | bool testCaseERMBasicRequestAudio( EMCTX *emctx ); 26 | bool testCaseERMBasicRequestFrontEnd( EMCTX *emctx ); 27 | bool testCaseERMBasicRequestSVPAllocator( EMCTX *emctx ); 28 | bool testCaseERMBasicRequestLoop( EMCTX *emctx ); 29 | bool testCaseERMBasicRequestAsync( EMCTX *emctx ); 30 | bool testCaseERMVideoSizeConstraint( EMCTX *emctx ); 31 | bool testCaseERMRequesterIncreasePriority( EMCTX *emctx ); 32 | bool testCaseERMOwnerDecreasePriority( EMCTX *emctx ); 33 | bool testCaseERMOwnerChangeUsage( EMCTX *emctx ); 34 | bool testCaseERMDualVideo1( EMCTX *emctx ); 35 | bool testCaseERMDualVideo2( EMCTX *emctx ); 36 | bool testCaseERMDualVideo3( EMCTX *emctx ); 37 | bool testCaseERMRevokeTimeout( EMCTX *emctx ); 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /test/test-essos.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _TEST_ESSOS_H 20 | #define _TEST_ESSOS_H 21 | 22 | #include "westeros-ut-em.h" 23 | 24 | bool testCaseEssosUseWayland( EMCTX *emctx ); 25 | bool testCaseEssosUseDirect( EMCTX *emctx ); 26 | bool testCaseEssosName( EMCTX *emctx ); 27 | bool testCaseEssosGetLastErrorDetail( EMCTX *emctx ); 28 | bool testCaseEssosSetKeyRepeatInitialDelay( EMCTX *emctx ); 29 | bool testCaseEssosSetKeyRepeatPeriod( EMCTX *emctx ); 30 | bool testCaseEssosEGLConfigAttributes( EMCTX *emctx ); 31 | bool testCaseEssosEGLSurfaceAttributes( EMCTX *emctx ); 32 | bool testCaseEssosEGLContextAttributes( EMCTX *emctx ); 33 | bool testCaseEssosInitialWindowSize( EMCTX *emctx ); 34 | bool testCaseEssosSetWindowPosition( EMCTX *emctx ); 35 | bool testCaseEssosSwapInterval( EMCTX *emctx ); 36 | bool testCaseEssosInit( EMCTX *emctx ); 37 | bool testCaseEssosGetEGLDisplayType( EMCTX *emctx ); 38 | bool testCaseEssosCreateNativeWindow( EMCTX *emctx ); 39 | bool testCaseEssosDestroyNativeWindow( EMCTX *emctx ); 40 | bool testCaseEssosGetWaylandDisplay( EMCTX *emctx ); 41 | bool testCaseEssosStart( EMCTX *emctx ); 42 | bool testCaseEssosEventLoopThrottle( EMCTX *emctx ); 43 | bool testCaseEssosDisplaySize( EMCTX *emctx ); 44 | bool testCaseEssosDisplaySizeChange( EMCTX *emctx ); 45 | bool testCaseEssosDisplaySafeAreaChange( EMCTX *emctx ); 46 | bool testCaseEssosDisplaySizeChangeWayland( EMCTX *emctx ); 47 | bool testCaseEssosDisplaySafeAreaChangeWayland( EMCTX *emctx ); 48 | bool testCaseEssosKeyboardBasicKeyInputWayland( EMCTX *emctx ); 49 | bool testCaseEssosKeyboardRepeatKeyInputWayland( EMCTX *emctx ); 50 | bool testCaseEssosPointerBasicPointerInputWayland( EMCTX *emctx ); 51 | bool testCaseEssosTerminateListener( EMCTX *emctx ); 52 | bool testCaseEssosGamepadBasic( EMCTX *emctx ); 53 | 54 | #endif 55 | 56 | -------------------------------------------------------------------------------- /test/test-keyboard.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _TEST_KEYBOARD_H 20 | #define _TEST_KEYBOARD_H 21 | 22 | #include "westeros-ut-em.h" 23 | 24 | bool testCaseKeyboardBasicKeyInput( EMCTX *emctx ); 25 | bool testCaseKeyboardBasicKeyInputRepeater( EMCTX *emctx ); 26 | 27 | #endif 28 | 29 | -------------------------------------------------------------------------------- /test/test-pointer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _TEST_POINTER_H 20 | #define _TEST_POINTER_H 21 | 22 | #include "westeros-ut-em.h" 23 | 24 | bool testCasePointerEnterLeave( EMCTX *emctx ); 25 | bool testCasePointerBasicFocus( EMCTX *emctx ); 26 | bool testCasePointerBasicFocusRepeater( EMCTX *emctx ); 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /test/test-render.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _TEST_RENDER_H 20 | #define _TEST_RENDER_H 21 | 22 | #include "westeros-ut-em.h" 23 | 24 | bool testCaseRenderBasicComposition( EMCTX *emctx ); 25 | bool testCaseRenderBasicCompositionEmbedded( EMCTX *emctx ); 26 | bool testCaseRenderBasicCompositionEmbeddedVirtual( EMCTX *emctx ); 27 | bool testCaseRenderBasicCompositionNested( EMCTX *emctx ); 28 | bool testCaseRenderBasicCompositionRepeating( EMCTX *emctx ); 29 | bool testCaseRenderShmRepeater( EMCTX *emctx ); 30 | bool testCaseRenderWaylandThreading( EMCTX *emctx ); 31 | bool testCaseRenderWaylandThreadingEmbedded( EMCTX *emctx ); 32 | bool testCaseRenderBasicCompositionEmbeddedRepeater( EMCTX *emctx ); 33 | 34 | #endif 35 | 36 | -------------------------------------------------------------------------------- /test/test-repeaterapp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _TEST_REPEATERAPP_H 20 | #define _TEST_REPEATERAPP_H 21 | 22 | #include "westeros-ut-em.h" 23 | 24 | void runRepeaterApp(int argc, const char **argv); 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /test/test-simpleshell.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _TEST_SIMPLESHELL_H 20 | #define _TEST_SIMPLESHELL_H 21 | 22 | #include "westeros-ut-em.h" 23 | 24 | bool testCaseSimpleShellBasic( EMCTX *emctx ); 25 | bool testCaseSimpleShellBasicEmbedded( EMCTX *emctx ); 26 | bool testCaseSimpleShellBasicRepeater( EMCTX *emctx ); 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /test/test-touch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _TEST_TOUCH_H 20 | #define _TEST_TOUCH_H 21 | 22 | #include "westeros-ut-em.h" 23 | 24 | bool testCaseTouchBasicTouchInput( EMCTX *emctx ); 25 | bool testCaseTouchBasicTouchInputRepeater( EMCTX *emctx ); 26 | bool testCaseTouchBasicFocus( EMCTX *emctx ); 27 | bool testCaseTouchBasicFocusRepeater( EMCTX *emctx ); 28 | 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /tools/mediacapture/README.md: -------------------------------------------------------------------------------- 1 | # MediaCapture 2 | MediaCapture 3 | 4 | MediaCapture is a tool that can be used with media pipelines that employ westeros-sink to enable 5 | the capture of smaples of media streams. Streams can be captured to a file or sent via http POST 6 | to an endpoint. 7 | 8 | Note that mediacapture makes use of rtRemote for RPC. rtRemote is part of pxscene (https://github.com/pxscene/pxCore). 9 | 10 | To use mediacapture, build and install libmediacapture.so, mediacapture-daemon, 11 | and mediacapture-test. Then ensure the following is defined in the envronment of the process 12 | creating media pipelines: 13 | 14 | export WESTEROSSINK_ENABLE_CAPTURE=1 15 | 16 | First launch the mediacapture-daemon: 17 | 18 | mediacapture-daemon & 19 | 20 | Then start your application that will play media using westeros-sink. 21 | 22 | Finally, run mediacapture-test: 23 | 24 | mediacapture endpoint 25 | 26 | or 27 | 28 | mediacapture file 29 | 30 | where duration is the desired capture duration expressed as decimal value in milliseconds. Press 'l' to list available 31 | pipelines. Press '0' to '9' to start capture from the specified pipeline. To end the capture prior to the end 32 | of the duration, press 's'. Press 'q' to exit the app. 33 | 34 | 35 | --- 36 | # Copyright and license 37 | 38 | If not stated otherwise in this file or this component's Licenses.txt file the 39 | following copyright and licenses apply: 40 | 41 | Copyright 2017 RDK Management 42 | 43 | Licensed under the Apache License, Version 2.0 (the "License"); 44 | you may not use this file except in compliance with the License. 45 | You may obtain a copy of the License at 46 | 47 | http://www.apache.org/licenses/LICENSE-2.0 48 | 49 | Unless required by applicable law or agreed to in writing, software 50 | distributed under the License is distributed on an "AS IS" BASIS, 51 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 52 | See the License for the specific language governing permissions and 53 | limitations under the License. 54 | 55 | -------------------------------------------------------------------------------- /v4l2/westeros-sink: -------------------------------------------------------------------------------- 1 | ../westeros-sink/v4l2/ -------------------------------------------------------------------------------- /westeros-compositor.pc.in: -------------------------------------------------------------------------------- 1 | # 2 | # If not stated otherwise in this file or this component's Licenses.txt file the 3 | # following copyright and licenses apply: 4 | # 5 | # Copyright 2016 RDK Management 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | prefix=@prefix@ 20 | exec_prefix=@exec_prefix@ 21 | datarootdir=@datarootdir@ 22 | pkgdatadir=@datadir@/@PACKAGE@ 23 | libdir=@libdir@ 24 | includedir=@includedir@ 25 | 26 | Name: Westeros Compositor 27 | Description: Westeros Wayland compositor library 28 | Version: @PACKAGE_VERSION@ 29 | Cflags: -I${includedir} 30 | Libs: -L${libdir} -lwesteros_compositor 31 | -------------------------------------------------------------------------------- /westeros-sink/COPYING: -------------------------------------------------------------------------------- 1 | This software is licensed by RDK Management under the GNU Lesser General 2 | Public License version 2.1 only, as per COPYING.LGPL and subject to any 3 | additional licenses included in this file. 4 | Please use the following copyright for source under this directory: 5 | 6 | Copyright 2014 RDK Management 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation, version 2.1 10 | of the license. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public 18 | License along with this library; if not, write to the 19 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 20 | Boston, MA 02110-1301, USA. 21 | -------------------------------------------------------------------------------- /westeros-sink/brcm/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2016 RDK Management 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation; 7 | # version 2.1 of the License. 8 | # 9 | # This library is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # Lesser General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Lesser General Public 15 | # License along with this library; if not, write to the Free Software 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | # 18 | include ${PKG_CONFIG_SYSROOT_DIR}/usr/include/platform_app.inc 19 | 20 | AUTOMAKE_OPTIONS = subdir-objects 21 | 22 | SUBDIRS = 23 | 24 | REFSW_VERSION ?= refsw14.4 25 | 26 | GST_BASE_CFLAGS ?= 27 | GST_BASE_LIBS ?= 28 | LIB_SUB_DIR= gstreamer-0.10 29 | 30 | AM_CFLAGS = $(NEXUS_CFLAGS) $(NXCLIENT_CFLAGS) $(GST_CFLAGS) 31 | 32 | AM_LDFLAGS = $(GST_LIBS) $(GSTBASE_LIBS) $(GSTVIDEO_LIBS) $(WAYLANDLIB) -avoid-version 33 | 34 | if HAVE_GST_VIDEO 35 | AM_CFLAGS += -DUSE_GST_VIDEO 36 | endif 37 | 38 | plugin_LTLIBRARIES = libgstwesterossink.la 39 | 40 | libgstwesterossink_la_SOURCES = westeros-sink.c westeros-sink-soc.c 41 | 42 | libgstwesterossink_la_CFLAGS= \ 43 | $(AM_CFLAGS) \ 44 | $(GST_CFLAGS) 45 | 46 | libgstwesterossink_la_LDFLAGS= \ 47 | $(AM_LDFLAGS) \ 48 | $(GST_LIBS) $(GSTBASE_LIBS) $(WAYLANDLIB) -avoid-version \ 49 | -lwesteros_compositor \ 50 | -lwesteros_simplebuffer_client \ 51 | -lwesteros_simpleshell_client \ 52 | -lessosrmgr \ 53 | -lwayland-egl \ 54 | -lnxclient \ 55 | -lnexus 56 | 57 | distcleancheck_listfiles = *-libtool 58 | 59 | ## IPK Generation Support 60 | libgstwesterossink_IPK_OUTDIR = $(abs_top_builddir)/ipk 61 | libgstwesterossink_IPK_STAGING_DIR=$(abs_top_builddir)/staging_dir 62 | libgstwesterossink_IPK_TMP_DIR=$(libgstwesterossink_IPK_STAGING_DIR)/ipk 63 | 64 | libgstwesterossink_CONTROL_FILES = control 65 | libgstwesterossink_IPK_FILES = debian-binary control.tar.gz data.tar.gz 66 | libgstwesterossink_IPK_OUTPUT = libgstwesterossink.ipk 67 | 68 | package_ipk: 69 | @echo "Generating IPK Package" 70 | $(MAKE) prefix=$(libgstwesterossink_IPK_STAGING_DIR) install 71 | $(mkdir_p) $(libgstwesterossink_IPK_TMP_DIR)/usr/lib/$(LIB_SUB_DIR) 72 | cp -aRf $(libgstwesterossink_IPK_STAGING_DIR)/lib/$(LIB_SUB_DIR)/*.so $(libgstwesterossink_IPK_TMP_DIR)/usr/lib/$(LIB_SUB_DIR) 73 | tar -czvf $(libgstwesterossink_IPK_OUTDIR)/data.tar.gz -C $(libgstwesterossink_IPK_TMP_DIR) usr 74 | tar -czvf $(libgstwesterossink_IPK_OUTDIR)/control.tar.gz -C $(libgstwesterossink_IPK_OUTDIR) $(libgstwesterossink_CONTROL_FILES) 75 | cd $(libgstwesterossink_IPK_OUTDIR) && ar cr $(libgstwesterossink_IPK_OUTPUT) $(libgstwesterossink_IPK_FILES) && cd - 76 | 77 | -------------------------------------------------------------------------------- /westeros-sink/drm/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2016 RDK Management 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation; 7 | # version 2.1 of the License. 8 | # 9 | # This library is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # Lesser General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Lesser General Public 15 | # License along with this library; if not, write to the Free Software 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | # 18 | 19 | AUTOMAKE_OPTIONS = subdir-objects 20 | 21 | SUBDIRS = 22 | 23 | GST_BASE_CFLAGS ?= 24 | GST_BASE_LIBS ?= 25 | LIB_SUB_DIR= gstreamer-0.10 26 | 27 | AM_CFLAGS = $(GST_CFLAGS) 28 | 29 | AM_LDFLAGS = $(GST_LIBS) $(GSTBASE_LIBS) $(WAYLANDLIB) -avoid-version 30 | 31 | plugin_LTLIBRARIES = libgstwesterossink.la 32 | 33 | libgstwesterossink_la_SOURCES = westeros-sink.c westeros-sink-soc.c 34 | 35 | libgstwesterossink_la_CFLAGS= \ 36 | $(AM_CFLAGS) \ 37 | $(GST_CFLAGS) 38 | 39 | libgstwesterossink_la_LDFLAGS= \ 40 | $(AM_LDFLAGS) \ 41 | $(GST_LIBS) $(GSTBASE_LIBS) $(WAYLANDLIB) -avoid-version \ 42 | -lessosrmgr \ 43 | -lwesteros_compositor \ 44 | -lwesteros_simplebuffer_client \ 45 | -lwesteros_simpleshell_client 46 | 47 | distcleancheck_listfiles = *-libtool 48 | 49 | ## IPK Generation Support 50 | libgstwesterossink_IPK_OUTDIR = $(abs_top_builddir)/ipk 51 | libgstwesterossink_IPK_STAGING_DIR=$(abs_top_builddir)/staging_dir 52 | libgstwesterossink_IPK_TMP_DIR=$(libgstwesterossink_IPK_STAGING_DIR)/ipk 53 | 54 | libgstwesterossink_CONTROL_FILES = control 55 | libgstwesterossink_IPK_FILES = debian-binary control.tar.gz data.tar.gz 56 | libgstwesterossink_IPK_OUTPUT = libgstwesterossink.ipk 57 | 58 | package_ipk: 59 | @echo "Generating IPK Package" 60 | $(MAKE) prefix=$(libgstwesterossink_IPK_STAGING_DIR) install 61 | $(mkdir_p) $(libgstwesterossink_IPK_TMP_DIR)/usr/lib/$(LIB_SUB_DIR) 62 | cp -aRf $(libgstwesterossink_IPK_STAGING_DIR)/lib/$(LIB_SUB_DIR)/*.so $(libgstwesterossink_IPK_TMP_DIR)/usr/lib/$(LIB_SUB_DIR) 63 | tar -czvf $(libgstwesterossink_IPK_OUTDIR)/data.tar.gz -C $(libgstwesterossink_IPK_TMP_DIR) usr 64 | tar -czvf $(libgstwesterossink_IPK_OUTDIR)/control.tar.gz -C $(libgstwesterossink_IPK_OUTDIR) $(libgstwesterossink_CONTROL_FILES) 65 | cd $(libgstwesterossink_IPK_OUTDIR) && ar cr $(libgstwesterossink_IPK_OUTPUT) $(libgstwesterossink_IPK_FILES) && cd - 66 | 67 | -------------------------------------------------------------------------------- /westeros-sink/emu/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2016 RDK Management 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation; 7 | # version 2.1 of the License. 8 | # 9 | # This library is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # Lesser General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Lesser General Public 15 | # License along with this library; if not, write to the Free Software 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | # 18 | 19 | SUBDIRS = 20 | AM_CPPFLAGS = -pthread -Wall -DEMU -I./ 21 | plugin_LTLIBRARIES = libgstwesterossink.la 22 | libgstwesterossink_la_SOURCES = westeros-sink.c westeros-sink-soc.c 23 | libgstwesterossink_la_CFLAGS = $(GST_CFLAGS) $(WAYLAND_CLIENT_CFLAGS) $(WAYLAND_SERVER_CFLAGS) 24 | libgstwesterossink_la_LDFLAGS = $(GST_LIBS) 25 | libgstwesterossink_la_LIBADD = -lwayland-client -lgstvideo-1.0 -lgstreamer-1.0 -lgstbase-1.0 -lwesteros_simplebuffer_client -lwesteros_simpleshell_client -lessosrmgr -lwesteros_compositor -lgstvideo-1.0 -ldl -lEGL 26 | libgstwesterossink_la_LDFLAGS += -module -avoid-version 27 | libgstwesterossink_la_LIBTOOLFLAGS = --tag=disable-static 28 | -------------------------------------------------------------------------------- /westeros-sink/emu/README: -------------------------------------------------------------------------------- 1 | #westeros video sink 2 | 3 | Plugin Name : westerossink 4 | 5 | # To get the plugin details do 6 | gst-inspect-1.0 westerossink 7 | 8 | # To test plugin, 9 | gst-launch-1.0 videotestsrc ! westerossink 10 | gst-launch-1.0 playbin uri=file:// video-sink=westerossink 11 | 12 | 13 | -------------------------------------------------------------------------------- /westeros-sink/icegdl/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2016 RDK Management 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation; 7 | # version 2.1 of the License. 8 | # 9 | # This library is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # Lesser General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Lesser General Public 15 | # License along with this library; if not, write to the Free Software 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | # 18 | 19 | AUTOMAKE_OPTIONS = subdir-objects 20 | 21 | SUBDIRS = 22 | 23 | GST_BASE_CFLAGS ?= 24 | GST_BASE_LIBS ?= 25 | LIB_SUB_DIR= gstreamer-0.10 26 | 27 | AM_CFLAGS = $(GST_CFLAGS) 28 | 29 | AM_LDFLAGS = $(GST_LIBS) $(GSTBASE_LIBS) $(WAYLANDLIB) -avoid-version 30 | 31 | plugin_LTLIBRARIES = libwesteros_sink.la 32 | 33 | libwesteros_sink_la_SOURCES = westeros-sink.c westeros-sink-soc.c 34 | 35 | libwesteros_sink_la_CFLAGS= \ 36 | $(AM_CFLAGS) \ 37 | $(GST_CFLAGS) 38 | 39 | libwesteros_sink_la_LDFLAGS= \ 40 | $(AM_LDFLAGS) \ 41 | $(GST_LIBS) $(GSTBASE_LIBS) $(WAYLANDLIB) -avoid-version \ 42 | -lwayland-egl \ 43 | -lessosrmgr \ 44 | -lwesteros_compositor \ 45 | -lwesteros_simplebuffer_client \ 46 | -lwesteros_simpleshell_client \ 47 | -lismd_core \ 48 | -ldl 49 | 50 | distcleancheck_listfiles = *-libtool 51 | 52 | ## IPK Generation Support 53 | libwesteros_sink_IPK_OUTDIR = $(abs_top_builddir)/ipk 54 | libwesteros_sink_IPK_STAGING_DIR=$(abs_top_builddir)/staging_dir 55 | libwesteros_sink_IPK_TMP_DIR=$(libwesteros_sink_IPK_STAGING_DIR)/ipk 56 | 57 | libwesteros_sink_CONTROL_FILES = control 58 | libwesteros_sink_IPK_FILES = debian-binary control.tar.gz data.tar.gz 59 | libwesteros_sink_IPK_OUTPUT = libwesteros_sink.ipk 60 | 61 | package_ipk: 62 | @echo "Generating IPK Package" 63 | $(MAKE) prefix=$(libwesteros_sink_IPK_STAGING_DIR) install 64 | $(mkdir_p) $(libwesteros_sink_IPK_TMP_DIR)/usr/lib/$(LIB_SUB_DIR) 65 | cp -aRf $(libwesteros_sink_IPK_STAGING_DIR)/lib/$(LIB_SUB_DIR)/*.so $(libwesteros_sink_IPK_TMP_DIR)/usr/lib/$(LIB_SUB_DIR) 66 | tar -czvf $(libwesteros_sink_IPK_OUTDIR)/data.tar.gz -C $(libwesteros_sink_IPK_TMP_DIR) usr 67 | tar -czvf $(libwesteros_sink_IPK_OUTDIR)/control.tar.gz -C $(libwesteros_sink_IPK_OUTDIR) $(libwesteros_sink_CONTROL_FILES) 68 | cd $(libwesteros_sink_IPK_OUTDIR) && ar cr $(libwesteros_sink_IPK_OUTPUT) $(libwesteros_sink_IPK_FILES) && cd - 69 | 70 | -------------------------------------------------------------------------------- /westeros-sink/raw/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 RDK Management 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation; 7 | # version 2.1 of the License. 8 | # 9 | # This library is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # Lesser General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Lesser General Public 15 | # License along with this library; if not, write to the Free Software 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | # 18 | 19 | AUTOMAKE_OPTIONS = subdir-objects 20 | 21 | SUBDIRS = 22 | 23 | GST_BASE_CFLAGS ?= 24 | GST_BASE_LIBS ?= 25 | LIB_SUB_DIR= gstreamer-0.10 26 | 27 | AM_CFLAGS = $(GST_CFLAGS) -DUSE_RAW_SINK -D_FILE_OFFSET_BITS=64 28 | 29 | AM_LDFLAGS = $(GST_LIBS) $(GSTBASE_LIBS) $(GSTVIDEO_LIBS) $(GSTALLOCATORS_LIBS) $(WAYLANDLIB) -avoid-version 30 | 31 | if HAVE_GST_VIDEO 32 | AM_CFLAGS += -DUSE_GST_VIDEO 33 | endif 34 | 35 | if HAVE_GST_AFD 36 | AM_CFLAGS += -DUSE_GST_AFD 37 | endif 38 | 39 | if HAVE_GST_ALLOCATORS 40 | AM_CFLAGS += -DUSE_GST_ALLOCATORS 41 | endif 42 | 43 | plugin_LTLIBRARIES = libgstwesterosrawsink.la 44 | 45 | libgstwesterosrawsink_la_SOURCES = westeros-sink.c westeros-sink-soc.c 46 | 47 | libgstwesterosrawsink_la_CFLAGS= \ 48 | $(AM_CFLAGS) \ 49 | $(GST_CFLAGS) \ 50 | -I${STAGING_INCDIR}/libdrm 51 | 52 | libgstwesterosrawsink_la_LDFLAGS= \ 53 | $(AM_LDFLAGS) \ 54 | $(GST_LIBS) $(GSTBASE_LIBS) $(WAYLANDLIB) -avoid-version \ 55 | -ldrm -lgbm \ 56 | -lessosrmgr \ 57 | -lwesteros_compositor \ 58 | -lwesteros_simplebuffer_client \ 59 | -lwesteros_simpleshell_client 60 | 61 | distcleancheck_listfiles = *-libtool 62 | 63 | ## IPK Generation Support 64 | libgstwesterosrawsink_IPK_OUTDIR = $(abs_top_builddir)/ipk 65 | libgstwesterosrawsink_IPK_STAGING_DIR=$(abs_top_builddir)/staging_dir 66 | libgstwesterosrawsink_IPK_TMP_DIR=$(libgstwesterosrawsink_IPK_STAGING_DIR)/ipk 67 | 68 | libgstwesterosrawsink_CONTROL_FILES = control 69 | libgstwesterosrawsink_IPK_FILES = debian-binary control.tar.gz data.tar.gz 70 | libgstwesterosrawsink_IPK_OUTPUT = libgstwesterosrawsink.ipk 71 | 72 | package_ipk: 73 | @echo "Generating IPK Package" 74 | $(MAKE) prefix=$(libgstwesterosrawsink_IPK_STAGING_DIR) install 75 | $(mkdir_p) $(libgstwesterosrawsink_IPK_TMP_DIR)/usr/lib/$(LIB_SUB_DIR) 76 | cp -aRf $(libgstwesterosrawsink_IPK_STAGING_DIR)/lib/$(LIB_SUB_DIR)/*.so $(libgstwesterosrawsink_IPK_TMP_DIR)/usr/lib/$(LIB_SUB_DIR) 77 | tar -czvf $(libgstwesterosrawsink_IPK_OUTDIR)/data.tar.gz -C $(libgstwesterosrawsink_IPK_TMP_DIR) usr 78 | tar -czvf $(libgstwesterosrawsink_IPK_OUTDIR)/control.tar.gz -C $(libgstwesterosrawsink_IPK_OUTDIR) $(libgstwesterosrawsink_CONTROL_FILES) 79 | cd $(libgstwesterosrawsink_IPK_OUTDIR) && ar cr $(libgstwesterosrawsink_IPK_OUTPUT) $(libgstwesterosrawsink_IPK_FILES) && cd - 80 | 81 | -------------------------------------------------------------------------------- /westeros-sink/rpi/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2016 RDK Management 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation; 7 | # version 2.1 of the License. 8 | # 9 | # This library is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # Lesser General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Lesser General Public 15 | # License along with this library; if not, write to the Free Software 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | # 18 | 19 | AUTOMAKE_OPTIONS = subdir-objects 20 | 21 | SUBDIRS = 22 | 23 | GST_BASE_CFLAGS ?= 24 | GST_BASE_LIBS ?= 25 | LIB_SUB_DIR= gstreamer-0.10 26 | 27 | AM_CFLAGS = $(GST_CFLAGS) -DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -Wall -g -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -Wno-psabi 28 | 29 | AM_LDFLAGS = $(GST_LIBS) $(GSTBASE_LIBS) $(WAYLANDLIB) -avoid-version 30 | 31 | plugin_LTLIBRARIES = libgstwesterossink.la 32 | 33 | libgstwesterossink_la_SOURCES = westeros-sink.c westeros-sink-soc.c 34 | 35 | libgstwesterossink_la_CFLAGS= \ 36 | $(AM_CFLAGS) \ 37 | $(GST_CFLAGS) 38 | 39 | libgstwesterossink_la_LDFLAGS= \ 40 | $(AM_LDFLAGS) \ 41 | $(GST_LIBS) $(GSTBASE_LIBS) $(WAYLANDLIB) -avoid-version \ 42 | -lessosrmgr \ 43 | -lwesteros_compositor \ 44 | -lwesteros_simplebuffer_client \ 45 | -lwesteros_simpleshell_client \ 46 | -lwayland-egl \ 47 | -lGLESv2 \ 48 | -lEGL \ 49 | -ldl 50 | 51 | distcleancheck_listfiles = *-libtool 52 | 53 | ## IPK Generation Support 54 | libgstwesterossink_IPK_OUTDIR = $(abs_top_builddir)/ipk 55 | libgstwesterossink_IPK_STAGING_DIR=$(abs_top_builddir)/staging_dir 56 | libgstwesterossink_IPK_TMP_DIR=$(libgstwesterossink_IPK_STAGING_DIR)/ipk 57 | 58 | libgstwesterossink_CONTROL_FILES = control 59 | libgstwesterossink_IPK_FILES = debian-binary control.tar.gz data.tar.gz 60 | libgstwesterossink_IPK_OUTPUT = libgstwesterossink.ipk 61 | 62 | package_ipk: 63 | @echo "Generating IPK Package" 64 | $(MAKE) prefix=$(libgstwesterossink_IPK_STAGING_DIR) install 65 | $(mkdir_p) $(libgstwesterossink_IPK_TMP_DIR)/usr/lib/$(LIB_SUB_DIR) 66 | cp -aRf $(libgstwesterossink_IPK_STAGING_DIR)/lib/$(LIB_SUB_DIR)/*.so $(libgstwesterossink_IPK_TMP_DIR)/usr/lib/$(LIB_SUB_DIR) 67 | tar -czvf $(libgstwesterossink_IPK_OUTDIR)/data.tar.gz -C $(libgstwesterossink_IPK_TMP_DIR) usr 68 | tar -czvf $(libgstwesterossink_IPK_OUTDIR)/control.tar.gz -C $(libgstwesterossink_IPK_OUTDIR) $(libgstwesterossink_CONTROL_FILES) 69 | cd $(libgstwesterossink_IPK_OUTDIR) && ar cr $(libgstwesterossink_IPK_OUTPUT) $(libgstwesterossink_IPK_FILES) && cd - 70 | 71 | -------------------------------------------------------------------------------- /westeros-sink/v4l2/Makefile.am: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2016 RDK Management 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation; 7 | # version 2.1 of the License. 8 | # 9 | # This library is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # Lesser General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU Lesser General Public 15 | # License along with this library; if not, write to the Free Software 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | # 18 | 19 | AUTOMAKE_OPTIONS = subdir-objects 20 | 21 | SUBDIRS = 22 | 23 | GST_BASE_CFLAGS ?= 24 | GST_BASE_LIBS ?= 25 | LIB_SUB_DIR= gstreamer-0.10 26 | 27 | AM_CFLAGS = $(GST_CFLAGS) -D_FILE_OFFSET_BITS=64 28 | 29 | AM_LDFLAGS = $(GST_LIBS) $(GSTBASE_LIBS) $(GSTVIDEO_LIBS) $(GSTALLOCATORS_LIBS) $(WAYLANDLIB) -avoid-version 30 | 31 | if HAVE_GST_VIDEO 32 | AM_CFLAGS += -DUSE_GST_VIDEO 33 | endif 34 | 35 | if HAVE_GST_AFD 36 | AM_CFLAGS += -DUSE_GST_AFD 37 | endif 38 | 39 | if HAVE_GST_ALLOCATORS 40 | AM_CFLAGS += -DUSE_GST_ALLOCATORS 41 | endif 42 | 43 | plugin_LTLIBRARIES = libgstwesterossink.la 44 | 45 | libgstwesterossink_la_SOURCES = westeros-sink.c westeros-sink-soc.c 46 | 47 | libgstwesterossink_la_CFLAGS= \ 48 | $(AM_CFLAGS) \ 49 | $(GST_CFLAGS) \ 50 | -I${STAGING_INCDIR}/libdrm 51 | 52 | libgstwesterossink_la_LDFLAGS= \ 53 | $(AM_LDFLAGS) \ 54 | $(GST_LIBS) $(GSTBASE_LIBS) $(WAYLANDLIB) -avoid-version \ 55 | -ldrm -lgbm \ 56 | -lessosrmgr \ 57 | -lwesteros_compositor \ 58 | -lwesteros_simplebuffer_client \ 59 | -lwesteros_simpleshell_client 60 | 61 | distcleancheck_listfiles = *-libtool 62 | 63 | ## IPK Generation Support 64 | libgstwesterossink_IPK_OUTDIR = $(abs_top_builddir)/ipk 65 | libgstwesterossink_IPK_STAGING_DIR=$(abs_top_builddir)/staging_dir 66 | libgstwesterossink_IPK_TMP_DIR=$(libgstwesterossink_IPK_STAGING_DIR)/ipk 67 | 68 | libgstwesterossink_CONTROL_FILES = control 69 | libgstwesterossink_IPK_FILES = debian-binary control.tar.gz data.tar.gz 70 | libgstwesterossink_IPK_OUTPUT = libgstwesterossink.ipk 71 | 72 | package_ipk: 73 | @echo "Generating IPK Package" 74 | $(MAKE) prefix=$(libgstwesterossink_IPK_STAGING_DIR) install 75 | $(mkdir_p) $(libgstwesterossink_IPK_TMP_DIR)/usr/lib/$(LIB_SUB_DIR) 76 | cp -aRf $(libgstwesterossink_IPK_STAGING_DIR)/lib/$(LIB_SUB_DIR)/*.so $(libgstwesterossink_IPK_TMP_DIR)/usr/lib/$(LIB_SUB_DIR) 77 | tar -czvf $(libgstwesterossink_IPK_OUTDIR)/data.tar.gz -C $(libgstwesterossink_IPK_TMP_DIR) usr 78 | tar -czvf $(libgstwesterossink_IPK_OUTDIR)/control.tar.gz -C $(libgstwesterossink_IPK_OUTDIR) $(libgstwesterossink_CONTROL_FILES) 79 | cd $(libgstwesterossink_IPK_OUTDIR) && ar cr $(libgstwesterossink_IPK_OUTPUT) $(libgstwesterossink_IPK_FILES) && cd - 80 | 81 | -------------------------------------------------------------------------------- /westeros-sink/v4l2/svp/svp-util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 RDK Management 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; 7 | * version 2.1 of the License. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef __WESTEROS_SINK_SOC_SVP_UTIL_H__ 20 | #define __WESTEROS_SINK_SOC_SVP_UTIL_H__ 21 | 22 | #define WESTEROS_SINK_SVP 23 | 24 | static void wstSVPSetInputMemMode( GstWesterosSink *sink, int mode ); 25 | static void wstSVPSetOutputMemMode( GstWesterosSink *sink, int mode ); 26 | static void wstSVPDecoderConfig( GstWesterosSink *sink ); 27 | static bool wstSVPSetupOutputBuffersDmabuf( GstWesterosSink *sink ); 28 | static void wstSVPTearDownOutputBuffersDmabuf( GstWesterosSink *sink ); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /westeros-sink/westeros-sink-sw.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 RDK Management 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; 7 | * version 2.1 of the License. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef __WESTEROS_SINK_SW_H__ 19 | #define __WESTEROS_SINK_SW_H__ 20 | 21 | /* 22 | * Events that may be passed to a swEvent method 23 | */ 24 | typedef enum _SWEvt 25 | { 26 | SWEvt_none= 0, 27 | SWEvt_pause= 1, /* p1: 0 unpause, 1 pause, p2: unused */ 28 | SWEvt_max= 2 29 | } SWEvt; 30 | 31 | /* 32 | * Decoded frame information 33 | */ 34 | typedef struct _SWFrame 35 | { 36 | int width; 37 | int height; 38 | unsigned char *Y; 39 | unsigned char *U; 40 | unsigned char *V; 41 | int Ystride; 42 | int Ustride; 43 | int Vstride; 44 | int frameNumber; 45 | long long pts; 46 | } SWFrame; 47 | 48 | void wstsw_process_caps( GstWesterosSink *sink, GstCaps *caps ); 49 | void wstsw_set_codec_init_data( GstWesterosSink *sink, int initDataLen, uint8_t *initData ); 50 | bool wstsw_render( GstWesterosSink *sink, GstBuffer *buffer, gboolean preroll ); 51 | void wstsw_reset_time( GstWesterosSink *sink ); 52 | static gboolean wstsw_null_to_ready( GstWesterosSink *sink, gboolean *passToDefault ); 53 | static gboolean wstsw_ready_to_paused( GstWesterosSink *sink, gboolean *passToDefault ); 54 | static gboolean wstsw_paused_to_playing( GstWesterosSink *sink, gboolean *passToDefault ); 55 | static gboolean wstsw_playing_to_paused( GstWesterosSink *sink, gboolean *passToDefault ); 56 | static gboolean wstsw_paused_to_ready( GstWesterosSink *sink, gboolean *passToDefault ); 57 | static gboolean wstsw_ready_to_null( GstWesterosSink *sink, gboolean *passToDefault ); 58 | 59 | #endif 60 | 61 | -------------------------------------------------------------------------------- /westeros-version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * If not stated otherwise in this file or this component's Licenses.txt file the 3 | * following copyright and licenses apply: 4 | * 5 | * Copyright 2018 RDK Management 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | #ifndef _WESTEROS_VERSION_H 20 | #define _WESTEROS_VERSION_H 21 | 22 | #define WESTEROS_VERSION_MAJOR (1) 23 | #define WESTEROS_VERSION_MINOR (1) 24 | #define WESTEROS_VERSION_PATCH (41) 25 | #define WESTEROS_VERSION WESTEROS_VERSION_MAJOR, WESTEROS_VERSION_MINOR, WESTEROS_VERSION_PATCH 26 | 27 | #define WESTEROS_VERSION_FMT "%d.%02d.%02d" 28 | 29 | #endif 30 | 31 | --------------------------------------------------------------------------------