mirror of
https://github.com/fastogt/fastocloud.git
synced 2025-03-09 23:18:50 +00:00
Without test life
This commit is contained in:
parent
607333b79a
commit
f6577062bc
8 changed files with 2 additions and 191 deletions
|
@ -36,7 +36,7 @@ bool ChildStream::IsCOD() const {
|
||||||
|
|
||||||
void ChildStream::CleanUp() {
|
void ChildStream::CleanUp() {
|
||||||
if (conf_.type == fastotv::VOD_ENCODE || conf_.type == fastotv::VOD_RELAY || conf_.type == fastotv::CATCHUP ||
|
if (conf_.type == fastotv::VOD_ENCODE || conf_.type == fastotv::VOD_RELAY || conf_.type == fastotv::CATCHUP ||
|
||||||
conf_.type == fastotv::TIMESHIFT_RECORDER || conf_.type == fastotv::TEST_LIFE) {
|
conf_.type == fastotv::TIMESHIFT_RECORDER) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,6 @@ SET(STREAM_BUILDERS_HEADERS
|
||||||
${CMAKE_SOURCE_DIR}/src/stream/streams/builders/timeshift/timeshift_player_stream_builder.h
|
${CMAKE_SOURCE_DIR}/src/stream/streams/builders/timeshift/timeshift_player_stream_builder.h
|
||||||
${CMAKE_SOURCE_DIR}/src/stream/streams/builders/timeshift/timeshift_recorder_stream_builder.h
|
${CMAKE_SOURCE_DIR}/src/stream/streams/builders/timeshift/timeshift_recorder_stream_builder.h
|
||||||
|
|
||||||
${CMAKE_SOURCE_DIR}/src/stream/streams/builders/test/test_life_stream_builder.h
|
|
||||||
${CMAKE_SOURCE_DIR}/src/stream/streams/builders/test/test_input_stream_builder.h
|
${CMAKE_SOURCE_DIR}/src/stream/streams/builders/test/test_input_stream_builder.h
|
||||||
${CMAKE_SOURCE_DIR}/src/stream/streams/builders/display/display_input_stream_builder.h
|
${CMAKE_SOURCE_DIR}/src/stream/streams/builders/display/display_input_stream_builder.h
|
||||||
)
|
)
|
||||||
|
@ -104,7 +103,6 @@ SET(STREAM_BUILDERS_SOURCES
|
||||||
${CMAKE_SOURCE_DIR}/src/stream/streams/builders/timeshift/timeshift_player_stream_builder.cpp
|
${CMAKE_SOURCE_DIR}/src/stream/streams/builders/timeshift/timeshift_player_stream_builder.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/stream/streams/builders/timeshift/timeshift_recorder_stream_builder.cpp
|
${CMAKE_SOURCE_DIR}/src/stream/streams/builders/timeshift/timeshift_recorder_stream_builder.cpp
|
||||||
|
|
||||||
${CMAKE_SOURCE_DIR}/src/stream/streams/builders/test/test_life_stream_builder.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/src/stream/streams/builders/test/test_input_stream_builder.cpp
|
${CMAKE_SOURCE_DIR}/src/stream/streams/builders/test/test_input_stream_builder.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/stream/streams/builders/display/display_input_stream_builder.cpp
|
${CMAKE_SOURCE_DIR}/src/stream/streams/builders/display/display_input_stream_builder.cpp
|
||||||
)
|
)
|
||||||
|
@ -131,7 +129,6 @@ SET(STREAMS_HEADERS
|
||||||
${CMAKE_SOURCE_DIR}/src/stream/streams/timeshift/itimeshift_recorder_stream.h
|
${CMAKE_SOURCE_DIR}/src/stream/streams/timeshift/itimeshift_recorder_stream.h
|
||||||
${CMAKE_SOURCE_DIR}/src/stream/streams/timeshift/timeshift_recorder_stream.h
|
${CMAKE_SOURCE_DIR}/src/stream/streams/timeshift/timeshift_recorder_stream.h
|
||||||
|
|
||||||
${CMAKE_SOURCE_DIR}/src/stream/streams/test/test_life_stream.h
|
|
||||||
${CMAKE_SOURCE_DIR}/src/stream/streams/test/test_stream.h
|
${CMAKE_SOURCE_DIR}/src/stream/streams/test/test_stream.h
|
||||||
${CMAKE_SOURCE_DIR}/src/stream/streams/display/display_stream.h
|
${CMAKE_SOURCE_DIR}/src/stream/streams/display/display_stream.h
|
||||||
|
|
||||||
|
@ -160,7 +157,6 @@ SET(STREAMS_SOURCES
|
||||||
${CMAKE_SOURCE_DIR}/src/stream/streams/timeshift/itimeshift_recorder_stream.cpp
|
${CMAKE_SOURCE_DIR}/src/stream/streams/timeshift/itimeshift_recorder_stream.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/stream/streams/timeshift/timeshift_recorder_stream.cpp
|
${CMAKE_SOURCE_DIR}/src/stream/streams/timeshift/timeshift_recorder_stream.cpp
|
||||||
|
|
||||||
${CMAKE_SOURCE_DIR}/src/stream/streams/test/test_life_stream.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/src/stream/streams/test/test_stream.cpp
|
${CMAKE_SOURCE_DIR}/src/stream/streams/test/test_stream.cpp
|
||||||
${CMAKE_SOURCE_DIR}/src/stream/streams/display/display_stream.cpp
|
${CMAKE_SOURCE_DIR}/src/stream/streams/display/display_stream.cpp
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ common::Error make_config(const StreamConfig& config_args, Config** config) {
|
||||||
aconf.SetLoop(loop);
|
aconf.SetLoop(loop);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream_type == fastotv::RELAY || stream_type == fastotv::TIMESHIFT_PLAYER || stream_type == fastotv::TEST_LIFE ||
|
if (stream_type == fastotv::RELAY || stream_type == fastotv::TIMESHIFT_PLAYER ||
|
||||||
stream_type == fastotv::VOD_RELAY || stream_type == fastotv::COD_RELAY) {
|
stream_type == fastotv::VOD_RELAY || stream_type == fastotv::COD_RELAY) {
|
||||||
streams::RelayConfig* rconfig = new streams::RelayConfig(aconf);
|
streams::RelayConfig* rconfig = new streams::RelayConfig(aconf);
|
||||||
|
|
||||||
|
|
|
@ -1,67 +0,0 @@
|
||||||
/* Copyright (C) 2014-2022 FastoGT. All right reserved.
|
|
||||||
This file is part of fastocloud.
|
|
||||||
fastocloud is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
fastocloud is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with fastocloud. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "stream/streams/builders/test/test_life_stream_builder.h"
|
|
||||||
|
|
||||||
#include "stream/pad/pad.h" // for Pads
|
|
||||||
|
|
||||||
#include "stream/elements/sink/test.h"
|
|
||||||
|
|
||||||
namespace fastocloud {
|
|
||||||
namespace stream {
|
|
||||||
namespace streams {
|
|
||||||
namespace builders {
|
|
||||||
namespace test {
|
|
||||||
|
|
||||||
TestLifeStreamBuilder::TestLifeStreamBuilder(const RelayConfig* api, SrcDecodeBinStream* observer)
|
|
||||||
: RelayStreamBuilder(api, observer) {}
|
|
||||||
|
|
||||||
Connector TestLifeStreamBuilder::BuildOutput(Connector conn) {
|
|
||||||
return BuildTestOutput(conn);
|
|
||||||
}
|
|
||||||
|
|
||||||
Connector TestLifeStreamBuilder::BuildTestOutput(Connector conn) {
|
|
||||||
const RelayConfig* config = static_cast<const RelayConfig*>(GetConfig());
|
|
||||||
if (config->HaveVideo()) {
|
|
||||||
elements::sink::ElementTestSink* video = elements::sink::make_test_sink(0);
|
|
||||||
ElementAdd(video);
|
|
||||||
auto sink_pad = video->StaticPad("sink");
|
|
||||||
if (sink_pad) {
|
|
||||||
HandleOutputSinkPadCreated(sink_pad.get(), 0, common::uri::GURL(), false);
|
|
||||||
}
|
|
||||||
if (conn.video) {
|
|
||||||
ElementLink(conn.video, video);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config->HaveAudio()) {
|
|
||||||
elements::sink::ElementTestSink* audio = elements::sink::make_test_sink(1);
|
|
||||||
ElementAdd(audio);
|
|
||||||
auto sink_pad = audio->StaticPad("sink");
|
|
||||||
if (sink_pad) {
|
|
||||||
HandleOutputSinkPadCreated(sink_pad.get(), 0, common::uri::GURL(), false);
|
|
||||||
}
|
|
||||||
if (conn.audio) {
|
|
||||||
ElementLink(conn.audio, audio);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return conn;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace test
|
|
||||||
} // namespace builders
|
|
||||||
} // namespace streams
|
|
||||||
} // namespace stream
|
|
||||||
} // namespace fastocloud
|
|
|
@ -1,39 +0,0 @@
|
||||||
/* Copyright (C) 2014-2022 FastoGT. All right reserved.
|
|
||||||
This file is part of fastocloud.
|
|
||||||
fastocloud is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
fastocloud is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with fastocloud. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "stream/streams/builders/relay/relay_stream_builder.h"
|
|
||||||
|
|
||||||
namespace fastocloud {
|
|
||||||
namespace stream {
|
|
||||||
namespace streams {
|
|
||||||
namespace builders {
|
|
||||||
namespace test {
|
|
||||||
|
|
||||||
class TestLifeStreamBuilder : public RelayStreamBuilder {
|
|
||||||
public:
|
|
||||||
TestLifeStreamBuilder(const RelayConfig* api, SrcDecodeBinStream* observer);
|
|
||||||
|
|
||||||
Connector BuildOutput(Connector conn) override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
Connector BuildTestOutput(Connector conn);
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace test
|
|
||||||
} // namespace builders
|
|
||||||
} // namespace streams
|
|
||||||
} // namespace stream
|
|
||||||
} // namespace fastocloud
|
|
|
@ -1,39 +0,0 @@
|
||||||
/* Copyright (C) 2014-2022 FastoGT. All right reserved.
|
|
||||||
This file is part of fastocloud.
|
|
||||||
fastocloud is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
fastocloud is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with fastocloud. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "stream/streams/test/test_life_stream.h"
|
|
||||||
|
|
||||||
#include "stream/streams/builders/test/test_life_stream_builder.h"
|
|
||||||
|
|
||||||
namespace fastocloud {
|
|
||||||
namespace stream {
|
|
||||||
namespace streams {
|
|
||||||
namespace test {
|
|
||||||
|
|
||||||
TestLifeStream::TestLifeStream(const RelayConfig* config, IStreamClient* client, StreamStruct* stats)
|
|
||||||
: RelayStream(config, client, stats) {}
|
|
||||||
|
|
||||||
const char* TestLifeStream::ClassName() const {
|
|
||||||
return "TestLifeStream";
|
|
||||||
}
|
|
||||||
|
|
||||||
IBaseBuilder* TestLifeStream::CreateBuilder() {
|
|
||||||
const RelayConfig* econf = static_cast<const RelayConfig*>(GetConfig());
|
|
||||||
return new builders::test::TestLifeStreamBuilder(econf, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace test
|
|
||||||
} // namespace streams
|
|
||||||
} // namespace stream
|
|
||||||
} // namespace fastocloud
|
|
|
@ -1,36 +0,0 @@
|
||||||
/* Copyright (C) 2014-2022 FastoGT. All right reserved.
|
|
||||||
This file is part of fastocloud.
|
|
||||||
fastocloud is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
fastocloud is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with fastocloud. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "stream/streams/relay/relay_stream.h"
|
|
||||||
|
|
||||||
namespace fastocloud {
|
|
||||||
namespace stream {
|
|
||||||
namespace streams {
|
|
||||||
namespace test {
|
|
||||||
|
|
||||||
class TestLifeStream : public RelayStream {
|
|
||||||
public:
|
|
||||||
TestLifeStream(const RelayConfig* config, IStreamClient* client, StreamStruct* stats);
|
|
||||||
const char* ClassName() const override;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
IBaseBuilder* CreateBuilder() override;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace test
|
|
||||||
} // namespace streams
|
|
||||||
} // namespace stream
|
|
||||||
} // namespace fastocloud
|
|
|
@ -26,7 +26,6 @@
|
||||||
#include "stream/streams/encoding/rtsp_encoding_stream.h"
|
#include "stream/streams/encoding/rtsp_encoding_stream.h"
|
||||||
#include "stream/streams/relay/playlist_relay_stream.h"
|
#include "stream/streams/relay/playlist_relay_stream.h"
|
||||||
#include "stream/streams/relay/rtsp_relay_stream.h"
|
#include "stream/streams/relay/rtsp_relay_stream.h"
|
||||||
#include "stream/streams/test/test_life_stream.h"
|
|
||||||
#include "stream/streams/test/test_stream.h"
|
#include "stream/streams/test/test_stream.h"
|
||||||
#include "stream/streams/timeshift/catchup_stream.h"
|
#include "stream/streams/timeshift/catchup_stream.h"
|
||||||
#include "stream/streams/timeshift/timeshift_player_stream.h"
|
#include "stream/streams/timeshift/timeshift_player_stream.h"
|
||||||
|
@ -116,9 +115,6 @@ IBaseStream* StreamsFactory::CreateStream(const Config* config,
|
||||||
} else if (type == fastotv::CATCHUP) {
|
} else if (type == fastotv::CATCHUP) {
|
||||||
const streams::TimeshiftConfig* tconfig = static_cast<const streams::TimeshiftConfig*>(config);
|
const streams::TimeshiftConfig* tconfig = static_cast<const streams::TimeshiftConfig*>(config);
|
||||||
return new streams::CatchupStream(tconfig, tinfo, client, stats);
|
return new streams::CatchupStream(tconfig, tinfo, client, stats);
|
||||||
} else if (type == fastotv::TEST_LIFE) {
|
|
||||||
const streams::RelayConfig* rconfig = static_cast<const streams::RelayConfig*>(config);
|
|
||||||
return new streams::test::TestLifeStream(rconfig, client, stats);
|
|
||||||
} else if (type == fastotv::VOD_RELAY) {
|
} else if (type == fastotv::VOD_RELAY) {
|
||||||
const streams::VodRelayConfig* vconfig = static_cast<const streams::VodRelayConfig*>(config);
|
const streams::VodRelayConfig* vconfig = static_cast<const streams::VodRelayConfig*>(config);
|
||||||
if (!vconfig->GetLoop()) {
|
if (!vconfig->GetLoop()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue