2 * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __TIZEN_MEDIA_TRANSPORTER_RECEIVER_SRT_H__
18 #define __TIZEN_MEDIA_TRANSPORTER_RECEIVER_SRT_H__
24 #include "MediaTransporter.h"
25 #include "MediaTransporterBase.h"
26 #include "MediaTransporterReceiver.h"
27 #include "MediaTransporterGst.h"
28 #include "MediaTransporterParam.h"
30 namespace tizen_media_transporter {
32 class MediaTransporterReceiverSrt : public MediaTransporterReceiver
35 MediaTransporterReceiverSrt();
36 ~MediaTransporterReceiverSrt();
38 void buildPipeline() override;
39 void startPipeline() override;
40 void stopPipeline() override;
42 void setConnection(std::string name, std::string value) override;
43 std::string getConnection(std::string name) override;
45 void setSenderAddress(std::string address) override;
46 std::string getSenderAddress() override { return _senderAddress; }
48 mtprConnectionType type() override { return MTPR_CONNECTION_TYPE_SRT_RECEIVER; }
49 void foreachConnectionStats(InvokablePtr callback) override;
52 static void _demuxPadAddedCallback(GstElement* demux, GstPad* new_pad, gpointer userData);
53 static void _demuxNoMorePadsCallback(GstElement* demux, gpointer userData);
55 param::srt::connectionParam _connectionParam;
56 std::string _senderAddress;
57 GstElement* _srtSrc { nullptr };
63 #endif // __TIZEN_MEDIA_TRANSPORTER_RECEIVER_SRT_H__