RDK Documentation (Open Sourced RDK Components)
FakeHDMIIN.cpp
1 /*
2 * If not stated otherwise in this file or this component's license file the
3 * following copyright and licenses apply:
4 *
5 * Copyright 2022 RDK Management
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19 
20 #include "videoin_shim.h"
21 #include "hdmiin_shim.h"
22 #include "compositein_shim.h"
23 
24 #define HDMIINPUT_CALLSIGN "org.rdk.HdmiInput.1"
25 #define COMPOSITEINPUT_CALLSIGN "org.rdk.CompositeInput.1"
26 
27 StreamAbstractionAAMP_VIDEOIN::StreamAbstractionAAMP_VIDEOIN( const std::string name, const std::string callSign, AampLogManager *logObj, class PrivateInstanceAAMP *aamp,double seek_pos, float rate)
28  : StreamAbstractionAAMP(logObj, aamp)
29 {
30 }
31 
33 {
34 }
35 
37 
39 
41 
42 void StreamAbstractionAAMP_VIDEOIN::Stop(bool clearChannelData) { }
43 
44 void StreamAbstractionAAMP_VIDEOIN::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxAudioOutputFormat, StreamOutputFormat &subtitleOutputFormat) { }
45 
47 
49 
51 
53 
55 
57 
58 int StreamAbstractionAAMP_VIDEOIN::GetBWIndex(long bandwidth) { return 0; }
59 
60 std::vector<long> StreamAbstractionAAMP_VIDEOIN::GetVideoBitrates(void) { std::vector<long> temp; return temp; }
61 
62 std::vector<long> StreamAbstractionAAMP_VIDEOIN::GetAudioBitrates(void) { std::vector<long> temp; return temp; }
63 
65 
67 
69 
71 {
72  return 0;
73 }
74 
75 void StreamAbstractionAAMP_VIDEOIN::SetVideoRectangle(int x, int y, int w, int h)
76 {
77 }
78 
80  : StreamAbstractionAAMP_VIDEOIN("HDMIIN", HDMIINPUT_CALLSIGN,logObj,aamp,seek_pos,rate)
81 {
82 }
83 
85 {
86 }
87 
89 {
90  return eAAMPSTATUS_OK;
91 }
92 
94 {
95 }
96 
97 void StreamAbstractionAAMP_HDMIIN::Stop(bool clearChannelData)
98 {
99 }
100 
101 std::vector<StreamInfo*> StreamAbstractionAAMP_HDMIIN::GetAvailableVideoTracks(void)
102 {
103  return std::vector<StreamInfo*>();
104 }
105 
107 {
108  return std::vector<StreamInfo*>();
109 }
110 
112 {
113  return false;
114 }
115 
116 std::vector<ThumbnailData> StreamAbstractionAAMP_HDMIIN::GetThumbnailRangeData(double start, double end, std::string *baseurl, int *raw_w, int *raw_h, int *width, int *height)
117 {
118  return std::vector<ThumbnailData>();
119 }
120 
122  : StreamAbstractionAAMP_VIDEOIN("COMPOSITEIN", COMPOSITEINPUT_CALLSIGN, logObj, aamp,seek_pos,rate)
123 {
124 }
125 
127 {
128 }
129 
131 {
132  return eAAMPSTATUS_OK;
133 }
134 
136 {
137 }
138 
139 void StreamAbstractionAAMP_COMPOSITEIN::Stop(bool clearChannelData)
140 {
141 }
142 
144 {
145  return std::vector<StreamInfo*>();
146 }
147 
149 {
150  return std::vector<StreamInfo*>();
151 }
152 
154 {
155  return false;
156 }
157 
158 std::vector<ThumbnailData> StreamAbstractionAAMP_COMPOSITEIN::GetThumbnailRangeData(double start, double end, std::string *baseurl, int *raw_w, int *raw_h, int *width, int *height)
159 {
160  return std::vector<ThumbnailData>();
161 }
StreamAbstractionAAMP_COMPOSITEIN::GetAvailableVideoTracks
std::vector< StreamInfo * > GetAvailableVideoTracks(void) override
To get the available video tracks.
Definition: compositein_shim.cpp:86
HDMIINPUT_CALLSIGN
#define HDMIINPUT_CALLSIGN
Definition: hdmiin_shim.cpp:37
compositein_shim.h
shim for dispatching UVE Composite input playback
StreamAbstractionAAMP_VIDEOIN::Start
void Start() override
Starts streaming.
Definition: FakeHDMIIN.cpp:40
StreamOutputFormat
StreamOutputFormat
Media output format.
Definition: main_aamp.h:106
StreamAbstractionAAMP_COMPOSITEIN::GetAvailableThumbnailTracks
std::vector< StreamInfo * > GetAvailableThumbnailTracks(void) override
To get the available thumbnail tracks.
Definition: compositein_shim.cpp:96
StreamInfo
Structure holding the information of a stream.
Definition: StreamAbstractionAAMP.h:69
StreamAbstractionAAMP_VIDEOIN::StreamAbstractionAAMP_VIDEOIN
StreamAbstractionAAMP_VIDEOIN(const std::string name, const std::string callSign, AampLogManager *logObj, class PrivateInstanceAAMP *aamp, double seekpos, float rate)
StreamAbstractionAAMP_VIDEOIN Constructor.
Definition: FakeHDMIIN.cpp:27
videoin_shim.h
shim for dispatching UVE Video input playback
TuneType
TuneType
Tune Typea.
Definition: priv_aamp.h:190
StreamAbstractionAAMP_HDMIIN::GetThumbnailRangeData
std::vector< ThumbnailData > GetThumbnailRangeData(double, double, std::string *, int *, int *, int *, int *) override
To get thumbnail range data.
Definition: hdmiin_shim.cpp:126
StreamAbstractionAAMP_VIDEOIN::GetStreamInfo
StreamInfo * GetStreamInfo(int idx) override
Get stream information of a profile from subclass.
Definition: FakeHDMIIN.cpp:68
StreamAbstractionAAMP_VIDEOIN::~StreamAbstractionAAMP_VIDEOIN
~StreamAbstractionAAMP_VIDEOIN()
StreamAbstractionAAMP_VIDEOIN Destructor.
Definition: FakeHDMIIN.cpp:32
StreamAbstractionAAMP_VIDEOIN::GetStartTimeOfFirstPTS
double GetStartTimeOfFirstPTS() override
Get Start time PTS of first sample.
Definition: FakeHDMIIN.cpp:50
StreamAbstractionAAMP_HDMIIN::GetAvailableVideoTracks
std::vector< StreamInfo * > GetAvailableVideoTracks(void) override
To get the available video tracks.
Definition: hdmiin_shim.cpp:96
AampLogManager
AampLogManager Class.
Definition: AampLogManager.h:150
StreamAbstractionAAMP_VIDEOIN::GetVideoBitrates
std::vector< long > GetVideoBitrates(void) override
To get the available video bitrates.
Definition: FakeHDMIIN.cpp:60
StreamAbstractionAAMP_VIDEOIN::GetAudioBitrates
std::vector< long > GetAudioBitrates(void) override
To get the available audio bitrates.
Definition: FakeHDMIIN.cpp:62
MediaTrack
Base Class for Media Track.
Definition: StreamAbstractionAAMP.h:159
StreamAbstractionAAMP
StreamAbstraction class of AAMP.
Definition: StreamAbstractionAAMP.h:577
StreamAbstractionAAMP_COMPOSITEIN::GetThumbnailRangeData
std::vector< ThumbnailData > GetThumbnailRangeData(double tStart, double tEnd, std::string *baseurl, int *raw_w, int *raw_h, int *width, int *height) override
Function to fetch the thumbnail data.
Definition: compositein_shim.cpp:116
StreamAbstractionAAMP_VIDEOIN::DumpProfiles
void DumpProfiles(void) override
Stub implementation.
Definition: FakeHDMIIN.cpp:36
StreamAbstractionAAMP_VIDEOIN::GetBufferedDuration
double GetBufferedDuration() override
Get the Duration of buffer.
Definition: FakeHDMIIN.cpp:54
TrackType
TrackType
Media Track Types.
Definition: StreamAbstractionAAMP.h:48
StreamAbstractionAAMP_HDMIIN::~StreamAbstractionAAMP_HDMIIN
~StreamAbstractionAAMP_HDMIIN()
StreamAbstractionAAMP_HDMIIN Destructor.
Definition: hdmiin_shim.cpp:51
StreamAbstractionAAMP_VIDEOIN::SetVideoRectangle
void SetVideoRectangle(int x, int y, int w, int h) override
SetVideoRectangle sets the position coordinates (x,y) & size (w,h)
Definition: FakeHDMIIN.cpp:75
StreamAbstractionAAMP_VIDEOIN::Init
AAMPStatusType Init(TuneType tuneType) override
Initialize a newly created object.
Definition: FakeHDMIIN.cpp:38
StreamAbstractionAAMP_COMPOSITEIN::StreamAbstractionAAMP_COMPOSITEIN
StreamAbstractionAAMP_COMPOSITEIN(AampLogManager *logObj, class PrivateInstanceAAMP *aamp, double seekpos, float rate)
StreamAbstractionAAMP_COMPOSITEIN Constructor.
Definition: compositein_shim.cpp:37
eAAMPSTATUS_OK
@ eAAMPSTATUS_OK
Definition: priv_aamp.h:207
StreamAbstractionAAMP_HDMIIN::Stop
void Stop(bool clearChannelData) override
Stops streaming.
Definition: hdmiin_shim.cpp:87
StreamAbstractionAAMP_VIDEOIN::Stop
void Stop(bool clearChannelData) override
Stops streaming.
Definition: FakeHDMIIN.cpp:42
StreamAbstractionAAMP_VIDEOIN::StopInjection
void StopInjection(void) override
Stops injecting fragments to StreamSink.
Definition: FakeHDMIIN.cpp:64
StreamAbstractionAAMP_COMPOSITEIN::Stop
void Stop(bool clearChannelData) override
Stops streaming.
Definition: compositein_shim.cpp:77
StreamAbstractionAAMP_VIDEOIN::GetMaxBitrate
long GetMaxBitrate(void) override
Gets Max Bitrate avialable for current playback.
Definition: FakeHDMIIN.cpp:70
StreamAbstractionAAMP_VIDEOIN::GetMediaTrack
MediaTrack * GetMediaTrack(TrackType type) override
Return MediaTrack of requested type.
Definition: FakeHDMIIN.cpp:52
PrivateInstanceAAMP
Class representing the AAMP player's private instance, which is not exposed to outside world.
Definition: priv_aamp.h:640
StreamAbstractionAAMP_HDMIIN::SetThumbnailTrack
bool SetThumbnailTrack(int) override
To set the thumbnail track by index.
Definition: hdmiin_shim.cpp:116
StreamAbstractionAAMP_VIDEOIN::StartInjection
void StartInjection(void) override
Start injecting fragments to StreamSink.
Definition: FakeHDMIIN.cpp:66
AAMPStatusType
AAMPStatusType
AAMP Function return values.
Definition: priv_aamp.h:205
StreamAbstractionAAMP_VIDEOIN::GetFirstPTS
double GetFirstPTS() override
Get PTS of first sample.
Definition: FakeHDMIIN.cpp:48
StreamAbstractionAAMP_HDMIIN::Init
AAMPStatusType Init(TuneType tuneType) override
Initialize a newly created object.
Definition: hdmiin_shim.cpp:59
StreamAbstractionAAMP_VIDEOIN::IsInitialCachingSupported
bool IsInitialCachingSupported() override
Check if Initial caching is supported.
Definition: FakeHDMIIN.cpp:56
StreamAbstractionAAMP_VIDEOIN::GetStreamPosition
double GetStreamPosition() override
Get current stream position.
Definition: FakeHDMIIN.cpp:46
StreamAbstractionAAMP_HDMIIN::StreamAbstractionAAMP_HDMIIN
StreamAbstractionAAMP_HDMIIN(AampLogManager *logObj, class PrivateInstanceAAMP *aamp, double seekpos, float rate)
StreamAbstractionAAMP_HDMIIN Constructor.
Definition: hdmiin_shim.cpp:42
StreamAbstractionAAMP_HDMIIN::Start
void Start() override
Starts streaming.
Definition: hdmiin_shim.cpp:74
StreamAbstractionAAMP_COMPOSITEIN::SetThumbnailTrack
bool SetThumbnailTrack(int) override
To set the available thumbnail tracks.
Definition: compositein_shim.cpp:105
hdmiin_shim.h
shim for dispatching UVE HDMI input playback
StreamAbstractionAAMP_VIDEOIN::GetBWIndex
int GetBWIndex(long bitrate) override
Get index of profile corresponds to bandwidth.
Definition: FakeHDMIIN.cpp:58
StreamAbstractionAAMP_COMPOSITEIN::~StreamAbstractionAAMP_COMPOSITEIN
~StreamAbstractionAAMP_COMPOSITEIN()
StreamAbstractionAAMP_COMPOSITEIN Destructor.
Definition: compositein_shim.cpp:46
StreamAbstractionAAMP_COMPOSITEIN::Start
void Start() override
Starts streaming.
Definition: compositein_shim.cpp:64
StreamAbstractionAAMP_VIDEOIN::GetStreamFormat
void GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxOutputFormat, StreamOutputFormat &subtitleOutputFormat) override
Get output format of stream.
Definition: FakeHDMIIN.cpp:44
StreamAbstractionAAMP_VIDEOIN
Fragment collector for MPEG DASH.
Definition: videoin_shim.h:42
StreamAbstractionAAMP_HDMIIN::GetAvailableThumbnailTracks
std::vector< StreamInfo * > GetAvailableThumbnailTracks(void) override
To get the available thumbnail tracks.
Definition: hdmiin_shim.cpp:106
StreamAbstractionAAMP_COMPOSITEIN::Init
AAMPStatusType Init(TuneType tuneType) override
Initialize a newly created object.
Definition: compositein_shim.cpp:54