Skip to content

Commit

Permalink
[Examples] Create common tv-app sources (#27408)
Browse files Browse the repository at this point in the history
Move cluster handlers, app platform and shell command implementations,
ZCL callbacks from Linux to tv-common directory.
Create source set with tv-app source files.
Create cmake macro to add common tv-app sources to the
specific target.
Use common tv-app sources in Linux tv-app example.

Sources can now be easily shared across platform implementations.

Signed-off-by: ATmobica <artur.tynecki@arm.com>
  • Loading branch information
ATmobica authored and pull[bot] committed Aug 2, 2023
1 parent b6d4267 commit 3cb3eab
Show file tree
Hide file tree
Showing 38 changed files with 405 additions and 400 deletions.
36 changes: 2 additions & 34 deletions examples/tv-app/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -20,43 +20,12 @@ import("${chip_root}/src/lib/lib.gni")
assert(chip_build_tools)

executable("chip-tv-app") {
sources = [
"${chip_root}/examples/tv-app/tv-common/include/CHIPProjectAppConfig.h",
"AppImpl.cpp",
"AppImpl.h",
"ZclCallbacks.cpp",
"include/account-login/AccountLoginManager.cpp",
"include/account-login/AccountLoginManager.h",
"include/application-basic/ApplicationBasicManager.cpp",
"include/application-basic/ApplicationBasicManager.h",
"include/application-launcher/ApplicationLauncherManager.cpp",
"include/application-launcher/ApplicationLauncherManager.h",
"include/audio-output/AudioOutputManager.cpp",
"include/audio-output/AudioOutputManager.h",
"include/channel/ChannelManager.cpp",
"include/channel/ChannelManager.h",
"include/cluster-change-attribute.cpp",
"include/cluster-init.cpp",
"include/content-launcher/ContentLauncherManager.cpp",
"include/content-launcher/ContentLauncherManager.h",
"include/keypad-input/KeypadInputManager.cpp",
"include/keypad-input/KeypadInputManager.h",
"include/low-power/LowPowerManager.cpp",
"include/low-power/LowPowerManager.h",
"include/media-input/MediaInputManager.cpp",
"include/media-input/MediaInputManager.h",
"include/media-playback/MediaPlaybackManager.cpp",
"include/media-playback/MediaPlaybackManager.h",
"include/target-navigator/TargetNavigatorManager.cpp",
"include/target-navigator/TargetNavigatorManager.h",
"include/wake-on-lan/WakeOnLanManager.cpp",
"include/wake-on-lan/WakeOnLanManager.h",
"main.cpp",
]
sources = [ "main.cpp" ]

deps = [
"${chip_root}/examples/platform/linux:app-main",
"${chip_root}/examples/tv-app/tv-common",
"${chip_root}/examples/tv-app/tv-common:tv-common-sources",
"${chip_root}/src/lib",
"${chip_root}/third_party/inipp",
]
Expand All @@ -71,7 +40,6 @@ executable("chip-tv-app") {

if (chip_build_libshell) {
defines += [ "ENABLE_CHIP_SHELL" ]
sources += [ "AppPlatformShellCommands.cpp" ]
}

output_dir = root_out_dir
Expand Down
17 changes: 9 additions & 8 deletions examples/tv-app/linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,15 @@ As an app platform, Content Apps can be launched and assigned to endpoints
following (see Video Player Architecture in the Device Library spec).

There is a dummy app platform included in the linux tv-app which includes a
small number of hardcoded apps. See AppImpl.h/.cpp for this dummy
implementation. These apps have hardcoded values for many operations - on a real
device, these apps would usually be developed by streaming video content
providers and the native platform may or may not provide Matter interfaces to
these apps. In some cases, the video player platform will bridge its existing
internal interfaces to Matter, allowing apps to continue to not be Matter-aware,
while other platforms may provide Matter interfaces to Content Apps so that they
can directly respond to each Matter cluster.
small number of hardcoded apps. See `examples/tv-app/tv-common/src/AppTv.h` and
`examples/tv-app/tv-common/src/AppTv.cpp` for this dummy implementation. These
apps have hardcoded values for many operations - on a real device, these apps
would usually be developed by streaming video content providers and the native
platform may or may not provide Matter interfaces to these apps. In some cases,
the video player platform will bridge its existing internal interfaces to
Matter, allowing apps to continue to not be Matter-aware, while other platforms
may provide Matter interfaces to Content Apps so that they can directly respond
to each Matter cluster.

On Linux, there are shell commands to start and stop the dummy apps (by vendor
id):
Expand Down
70 changes: 0 additions & 70 deletions examples/tv-app/linux/ZclCallbacks.cpp

This file was deleted.

67 changes: 0 additions & 67 deletions examples/tv-app/linux/include/cluster-change-attribute.cpp

This file was deleted.

54 changes: 0 additions & 54 deletions examples/tv-app/linux/include/cluster-init.cpp

This file was deleted.

Loading

0 comments on commit 3cb3eab

Please sign in to comment.