From 5d52d5e73cb4cc2c1c3e827b6dfc7c4b1dab5115 Mon Sep 17 00:00:00 2001 From: Bartek Zdanowski Date: Wed, 30 Nov 2022 18:43:58 +0100 Subject: [PATCH] feat: CMake port media/origin (#1145) Issue #1047 (CMake porting) --- packager/media/CMakeLists.txt | 1 + packager/media/origin/CMakeLists.txt | 12 ++++++++++++ packager/media/origin/origin.gyp | 24 ------------------------ packager/media/origin/origin_handler.cc | 4 +++- 4 files changed, 16 insertions(+), 25 deletions(-) create mode 100644 packager/media/origin/CMakeLists.txt delete mode 100644 packager/media/origin/origin.gyp diff --git a/packager/media/CMakeLists.txt b/packager/media/CMakeLists.txt index 7285260471..faa696882d 100644 --- a/packager/media/CMakeLists.txt +++ b/packager/media/CMakeLists.txt @@ -6,4 +6,5 @@ # Subdirectories with their own CMakeLists.txt, all of whose targets are built. add_subdirectory(base) +add_subdirectory(origin) add_subdirectory(test) diff --git a/packager/media/origin/CMakeLists.txt b/packager/media/origin/CMakeLists.txt new file mode 100644 index 0000000000..ed822e3bd5 --- /dev/null +++ b/packager/media/origin/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright 2022 Google LLC. All rights reserved. +# +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file or at +# https://developers.google.com/open-source/licenses/bsd + +add_library(media_origin STATIC + origin_handler.cc) + +target_link_libraries(media_origin + status + glog) diff --git a/packager/media/origin/origin.gyp b/packager/media/origin/origin.gyp deleted file mode 100644 index 1cf7032472..0000000000 --- a/packager/media/origin/origin.gyp +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2017 Google LLC. All rights reserved. -# -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file or at -# https://developers.google.com/open-source/licenses/bsd - -{ - 'variables': { - 'shaka_code': 1, - }, - 'targets': [ - { - 'target_name': 'origin', - 'type': '<(component)', - 'sources': [ - 'origin_handler.cc', - 'origin_handler.h', - ], - 'dependencies': [ - '../base/media_base.gyp:media_base', - ], - }, - ], -} diff --git a/packager/media/origin/origin_handler.cc b/packager/media/origin/origin_handler.cc index 4e4de53653..2245babfd1 100644 --- a/packager/media/origin/origin_handler.cc +++ b/packager/media/origin/origin_handler.cc @@ -6,12 +6,14 @@ #include "packager/media/origin/origin_handler.h" +#include "packager/status/status.h" + namespace shaka { namespace media { // Origin handlers are always at the start of a pipeline (chain or handlers) // and therefore should never receive input via |Process|. -Status OriginHandler::Process(std::unique_ptr stream_data) { +Status OriginHandler::Process(std::unique_ptr /* ignored */) { return Status(error::INTERNAL_ERROR, "An origin handlers should never be a downstream handler."); }