Skip to content

Commit f6e35ce

Browse files
committed
Without programme
1 parent d0232ee commit f6e35ce

File tree

2 files changed

+2
-45
lines changed

2 files changed

+2
-45
lines changed

include/fastotv/types/input_uri.h

-8
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include <fastotv/types/drm_key.h>
2020
#include <fastotv/types/input_url.h>
2121
#include <fastotv/types/ndi_prop.h>
22-
#include <fastotv/types/programme.h>
2322
#include <fastotv/types/pyfastostream.h>
2423
#include <fastotv/types/srt_key.h>
2524
#include <fastotv/types/webrtc_prop.h>
@@ -49,7 +48,6 @@ class InputUri : public InputUrl {
4948
// srt
5049
typedef common::Optional<SrtKey> srt_key_t;
5150
typedef common::Optional<SrtMode> srt_mode_t;
52-
typedef common::Optional<Programme> programme_t;
5351
// rtmp
5452
typedef common::Optional<RtmpSrcType> rtmpsrc_type_t;
5553
// ndi
@@ -99,9 +97,6 @@ class InputUri : public InputUrl {
9997
srt_key_t GetSrtKey() const;
10098
void SetSrtKey(const srt_key_t& pass);
10199

102-
programme_t GetProgramme() const;
103-
void SetProgramme(const programme_t& programme);
104-
105100
rtmpsrc_type_t GetRtmpSrcType() const;
106101
void SetRtmpSrcType(const rtmpsrc_type_t& type);
107102

@@ -140,9 +135,6 @@ class InputUri : public InputUrl {
140135
srt_mode_t srt_mode_;
141136
srt_key_t srt_key_;
142137

143-
// programme
144-
programme_t programme_;
145-
146138
// rtmp
147139
rtmpsrc_type_t rtmpsrc_type_;
148140
// webrtc

src/types/input_uri.cpp

+2-37
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#define MULTICAST_IFACE_FIELD "multicast_iface"
2525
#define SRT_KEY_FIELD "srt_key"
2626
#define SRT_MODE_FIELD "srt_mode"
27-
#define PROGRAMME_FIELD "programme"
2827
#define RTMPSRC_TYPE_FILED "rtmpsrc_type"
2928
#define WEBRTC_FIELD "webrtc"
3029
#define NDI_FIELD "ndi"
@@ -48,7 +47,6 @@ InputUri::InputUri(uri_id_t id, const url_t& input)
4847
iface_(),
4948
srt_mode_(),
5049
srt_key_(),
51-
programme_(),
5250
rtmpsrc_type_(),
5351
webrtc_(),
5452
ndi_(),
@@ -82,7 +80,6 @@ void InputUri::SetKeys(keys_t keys) {
8280
keys_ = keys;
8381
}
8482

85-
8683
InputUri::whep_t InputUri::GetWhep() const {
8784
return whep_;
8885
}
@@ -139,14 +136,6 @@ void InputUri::SetSrtKey(const srt_key_t& pass) {
139136
srt_key_ = pass;
140137
}
141138

142-
InputUri::programme_t InputUri::GetProgramme() const {
143-
return programme_;
144-
}
145-
146-
void InputUri::SetProgramme(const programme_t& programme) {
147-
programme_ = programme;
148-
}
149-
150139
InputUri::rtmpsrc_type_t InputUri::GetRtmpSrcType() const {
151140
return rtmpsrc_type_;
152141
}
@@ -190,8 +179,8 @@ void InputUri::SetAWS(const aws_t& aws) {
190179
bool InputUri::Equals(const InputUri& url) const {
191180
return base_class::Equals(url) && url.user_agent_ == user_agent_ && stream_url_ == url.stream_url_ &&
192181
http_proxy_url_ == url.http_proxy_url_ && keys_ == url.keys_ && wpe_ == url.wpe_ && cef_ == url.cef_ &&
193-
whep_ == url.whep_ && program_number_ == url.program_number_ && iface_ == url.iface_ && srt_key_ == url.srt_key_ &&
194-
srt_mode_ == url.srt_mode_ && programme_ == url.programme_ && webrtc_ == url.webrtc_ && ndi_ == url.ndi_ &&
182+
whep_ == url.whep_ && program_number_ == url.program_number_ && iface_ == url.iface_ &&
183+
srt_key_ == url.srt_key_ && srt_mode_ == url.srt_mode_ && webrtc_ == url.webrtc_ && ndi_ == url.ndi_ &&
195184
aws_ == url.aws_;
196185
}
197186

@@ -285,12 +274,6 @@ common::Optional<InputUri> InputUri::Make(common::HashValue* hash) {
285274
url.SetSrtKey(SrtKey::Make(srt_key));
286275
}
287276

288-
common::HashValue* programme;
289-
common::Value* programme_field = hash->Find(PROGRAMME_FIELD);
290-
if (programme_field && programme_field->GetAsHash(&programme)) {
291-
url.SetProgramme(Programme::Make(programme));
292-
}
293-
294277
int64_t rtmpsrc;
295278
common::Value* rtmpsrc_field = hash->Find(RTMPSRC_TYPE_FILED);
296279
if (rtmpsrc_field && rtmpsrc_field->GetAsInteger64(&rtmpsrc)) {
@@ -371,16 +354,6 @@ common::Error InputUri::DoDeSerialize(json_object* serialized) {
371354
}
372355
}
373356

374-
json_object* jprogramme = nullptr;
375-
err = GetObjectField(serialized, PROGRAMME_FIELD, &jprogramme);
376-
if (!err) {
377-
Programme prog;
378-
err = prog.DeSerialize(jprogramme);
379-
if (!err) {
380-
res.SetProgramme(prog);
381-
}
382-
}
383-
384357
SrtMode srt_mode;
385358
err = GetEnumField(serialized, SRT_MODE_FIELD, &srt_mode);
386359
if (!err) {
@@ -516,14 +489,6 @@ common::Error InputUri::SerializeFields(json_object* deserialized) const {
516489
}
517490
}
518491

519-
if (programme_) {
520-
json_object* jprogramme = nullptr;
521-
err = programme_->Serialize(&jprogramme);
522-
if (!err) {
523-
ignore_result(SetObjectField(deserialized, PROGRAMME_FIELD, jprogramme));
524-
}
525-
}
526-
527492
const auto hurl = GetHttpProxyUrl();
528493
if (hurl) {
529494
const std::string proxy = hurl->spec();

0 commit comments

Comments
 (0)