mirror of
https://github.com/AirenSoft/OvenMediaEngine.git
synced 2025-03-14 09:57:40 +00:00
Allows mux stream can be encoded
Some checks are pending
Docker Image CI / Push Docker image to Docker Hub (push) Waiting to run
Some checks are pending
Docker Image CI / Push Docker image to Docker Hub (push) Waiting to run
This commit is contained in:
@ -206,7 +206,15 @@ namespace pvd
|
||||
// Create Stream
|
||||
auto stream_info = info::Stream(*this, IssueUniqueStreamId(), StreamSourceType::Multiplex);
|
||||
stream_info.SetName(multiplex_profile->GetOutputStreamName());
|
||||
stream_info.SetRepresentationType(StreamRepresentationType::Relay);
|
||||
|
||||
if (multiplex_profile->IsBypassTranscoder())
|
||||
{
|
||||
stream_info.SetRepresentationType(StreamRepresentationType::Relay);
|
||||
}
|
||||
else
|
||||
{
|
||||
stream_info.SetRepresentationType(StreamRepresentationType::Source);
|
||||
}
|
||||
|
||||
auto stream = MultiplexStream::Create(GetSharedPtrAs<Application>(), stream_info, multiplex_profile);
|
||||
if (stream == nullptr)
|
||||
|
@ -62,6 +62,11 @@ namespace pvd
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_bypass_transcoder != other._bypass_transcoder)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_source_streams.size() != other._source_streams.size())
|
||||
{
|
||||
return false;
|
||||
@ -129,6 +134,12 @@ namespace pvd
|
||||
|
||||
_output_stream_name = name_object.asString().c_str();
|
||||
|
||||
auto bypass_transcoder_object = output_stream_object["bypassTranscoder"];
|
||||
if (bypass_transcoder_object.isNull() == false)
|
||||
{
|
||||
_bypass_transcoder = bypass_transcoder_object.asBool();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -378,6 +389,12 @@ namespace pvd
|
||||
|
||||
_output_stream_name = name.text().as_string();
|
||||
|
||||
auto bypass_transcoder = output_stream_node.child("BypassTranscoder");
|
||||
if (bypass_transcoder)
|
||||
{
|
||||
_bypass_transcoder = bypass_transcoder.text().as_bool();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -578,6 +595,7 @@ namespace pvd
|
||||
// OutputStream
|
||||
auto output_stream_node = root_node.append_child("OutputStream");
|
||||
output_stream_node.append_child("Name").text().set(_output_stream_name.CStr());
|
||||
output_stream_node.append_child("BypassTranscoder").text().set(_bypass_transcoder);
|
||||
|
||||
// SourceStreams
|
||||
auto source_streams_node = root_node.append_child("SourceStreams");
|
||||
@ -665,6 +683,7 @@ namespace pvd
|
||||
// OutputStream
|
||||
Json::Value output_stream_object;
|
||||
output_stream_object["name"] = _output_stream_name.CStr();
|
||||
output_stream_object["bypassTranscoder"] = _bypass_transcoder;
|
||||
root_object["outputStream"] = output_stream_object;
|
||||
|
||||
// SourceStreams
|
||||
@ -770,6 +789,11 @@ namespace pvd
|
||||
return _output_stream_name;
|
||||
}
|
||||
|
||||
bool MultiplexProfile::IsBypassTranscoder() const
|
||||
{
|
||||
return _bypass_transcoder;
|
||||
}
|
||||
|
||||
const std::vector<std::shared_ptr<info::Playlist>> &MultiplexProfile::GetPlaylists() const
|
||||
{
|
||||
return _playlists;
|
||||
|
@ -21,9 +21,10 @@
|
||||
|
||||
<OutputStream>
|
||||
<Name>tv1</Name>
|
||||
<BypassTranscoder>true</BypassTranscoder> <!-- defualt : true -->
|
||||
</OutputStream>
|
||||
|
||||
<Playlists>
|
||||
<Playlists> <!-- only available when BypassTranscoder is true -->
|
||||
<Playlist>
|
||||
<Name>LLHLS ABR</Name>
|
||||
<FileName>abr</FileName> <!-- FileName must be unique in the application -->
|
||||
@ -312,6 +313,7 @@ namespace pvd
|
||||
ov::String GetFilePath() const;
|
||||
std::chrono::system_clock::time_point GetCreatedTime() const;
|
||||
ov::String GetOutputStreamName() const;
|
||||
bool IsBypassTranscoder() const;
|
||||
const std::vector<std::shared_ptr<info::Playlist>> &GetPlaylists() const;
|
||||
const std::vector<std::shared_ptr<SourceStream>> &GetSourceStreams() const;
|
||||
|
||||
@ -337,6 +339,7 @@ namespace pvd
|
||||
ov::String _file_path; // when loaded from file
|
||||
|
||||
ov::String _output_stream_name;
|
||||
bool _bypass_transcoder = true;
|
||||
std::vector<std::shared_ptr<info::Playlist>> _playlists;
|
||||
std::vector<std::shared_ptr<SourceStream>> _source_streams;
|
||||
|
||||
|
Reference in New Issue
Block a user