feat: CMake port media/origin (#1145)

Issue #1047 (CMake porting)
This commit is contained in:
Bartek Zdanowski 2022-11-30 18:43:58 +01:00 committed by GitHub
parent b1095f6bc3
commit 5d52d5e73c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 25 deletions

View File

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

View File

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

View File

@ -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',
],
},
],
}

View File

@ -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<StreamData> stream_data) {
Status OriginHandler::Process(std::unique_ptr<StreamData> /* ignored */) {
return Status(error::INTERNAL_ERROR,
"An origin handlers should never be a downstream handler.");
}