RDK Documentation (Open Sourced RDK Components)
FakeAampEvent.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 "AampEvent.h"
21 
22 AAMPEventObject::AAMPEventObject(AAMPEventType type) : mType(type)
23 {
24 }
25 
26 const std::string &MediaErrorEvent::getDescription() const
27 {
28  return mDescription;
29 }
30 
32 {
33  return mType;
34 }
35 
36 ID3MetadataEvent::ID3MetadataEvent(const std::vector<uint8_t> &metadata, const std::string &schIDUri, std::string &id3Value, uint32_t timeScale, uint64_t presentationTime, uint32_t eventDuration, uint32_t id, uint64_t timestampOffset):
38 {
39 }
40 
41 const std::vector<uint8_t> &ID3MetadataEvent::getMetadata() const
42 {
43  return mMetadata;
44 }
45 
47 {
48  return 0;
49 }
50 
51 uint32_t ID3MetadataEvent::getTimeScale() const
52 {
53  return 0;
54 }
55 
56 uint32_t ID3MetadataEvent::getId() const
57 {
58  return 0;
59 }
60 
62 {
63  return 0;
64 }
65 
67 {
68  return 0;
69 }
70 
72 {
73  return 0;
74 }
75 
76 const std::string& ID3MetadataEvent::getValue() const
77 {
78  return mValue;
79 }
80 
81 const std::string& ID3MetadataEvent::getSchemeIdUri() const
82 {
83  return mSchemeIdUri;
84 }
85 
86 MediaMetadataEvent::MediaMetadataEvent(long duration, int width, int height, bool hasDrm, bool isLive, const std::string &DrmType, double programStartTime):
88 {
89 }
90 
92 {
93 }
94 
95 void MediaMetadataEvent::addBitrate(long bitrate)
96 {
97 }
98 
99 void MediaMetadataEvent::addLanguage(const std::string &lang)
100 {
101 }
102 
103 DrmMetaDataEvent::DrmMetaDataEvent(AAMPTuneFailure failure, const std::string &accessStatus, int statusValue, long responseCode, bool secclientErr):
105 {
106 }
107 
109 {
110  return AAMP_TUNE_INIT_FAILED;
111 }
112 
114 {
115  return 0;
116 }
117 
118 const std::string &DrmMetaDataEvent::getAccessStatus() const
119 {
120  return mAccessStatus;
121 }
122 
123 void DrmMetaDataEvent::setAccessStatus(const std::string &status)
124 {
125 }
126 
128 {
129  return 0;
130 }
131 
133 {
134  return false;
135 }
136 
138 {
139  return 0;
140 }
141 
143 {
144  return 0;
145 }
146 
148 {
149  return 0;
150 }
151 
152 DrmMessageEvent::DrmMessageEvent(const std::string &msg):
154 {
155 }
156 
157 AnomalyReportEvent::AnomalyReportEvent(int severity, const std::string &msg):
159 {
160 }
161 
163 {
164  return 0;
165 }
166 
169 {
170 }
171 
173 {
174  return false;
175 }
176 
177 ProgressEvent::ProgressEvent(double duration, double position, double start, double end, float speed, long long pts, double bufferedDuration, std::string seiTimecode):
179 {
180 }
181 
184 {
185 }
186 
187 TimedMetadataEvent::TimedMetadataEvent(const std::string &name, const std::string &id, double time, double duration, const std::string &content):
189 {
190 }
191 
192 CCHandleEvent::CCHandleEvent(unsigned long handle):
194 {
195 }
196 
199 {
200 }
201 
203 {
204 }
205 
206 const std::vector<float> &SupportedSpeedsChangedEvent::getSupportedSpeeds() const
207 {
208  return mSupportedSpeeds;
209 }
210 
212 {
213  return 0;
214 }
215 
216 MediaErrorEvent::MediaErrorEvent(AAMPTuneFailure failure, int code, const std::string &desc, bool shouldRetry, int classCode, int reason, int businessStatus):
218 {
219 }
220 
221 BitrateChangeEvent::BitrateChangeEvent(int time, long bitrate, const std::string &desc, int width, int height, double frameRate, double position, bool cappedProfile, int displayWidth, int displayHeight, VideoScanType videoScanType, int aspectRatioWidth, int aspectRatioHeight):
223 {
224 }
225 
226 BulkTimedMetadataEvent::BulkTimedMetadataEvent(const std::string &content):
228 {
229 }
230 
233 {
234 }
235 
236 SeekedEvent::SeekedEvent(double positionMS):
238 {
239 }
240 
241 TuneProfilingEvent::TuneProfilingEvent(std::string &profilingData):
243 {
244 }
245 
246 AdResolvedEvent::AdResolvedEvent(bool resolveStatus, const std::string &adId, uint64_t startMS, uint64_t durationMs):
248 {
249 }
250 
251 AdReservationEvent::AdReservationEvent(AAMPEventType evtType, const std::string &breakId, uint64_t position):
252  AAMPEventObject(evtType)
253 {
254 }
255 
256 AdPlacementEvent::AdPlacementEvent(AAMPEventType evtType, const std::string &adId, uint32_t position, uint32_t offset, uint32_t duration, int errorCode):
257  AAMPEventObject(evtType)
258 {
259 }
260 
261 const std::string &AdPlacementEvent::getAdId() const
262 {
263  return mAdId;
264 }
265 
266 uint32_t AdPlacementEvent::getPosition() const
267 {
268  return 0;
269 }
270 
271 uint32_t AdPlacementEvent::getOffset() const
272 {
273  return 0;
274 }
275 
276 uint32_t AdPlacementEvent::getDuration() const
277 {
278  return 0;
279 }
280 
283 {
284 }
285 
286 ContentGapEvent::ContentGapEvent(double time, double duration):
288 {
289 }
290 
291 HTTPResponseHeaderEvent::HTTPResponseHeaderEvent(const std::string &header, const std::string &response):
293 {
294 }
295 
296 const std::string &HTTPResponseHeaderEvent::getHeader() const
297 {
298  return mHeaderName;
299 }
300 
301 const std::string &HTTPResponseHeaderEvent::getResponse() const
302 {
303  return mHeaderResponse;
304 }
305 
306 ContentProtectionDataEvent::ContentProtectionDataEvent(const std::vector<uint8_t> &keyID, const std::string &streamType):
308 {
309 }
310 
311 /**
312  * @brief MetricsDataEvent Constructor
313  */
314 MetricsDataEvent::MetricsDataEvent(MetricsDataType dataType, const std::string &uuid, const std::string &data):
316 {
317 }
DrmMetaDataEvent::getSecManagerClassCode
int32_t getSecManagerClassCode() const
Get Response Code.
Definition: AampEvent.cpp:946
ID3MetadataEvent::getId
uint32_t getId() const
Get id.
Definition: AampEvent.cpp:1311
DrmMetaDataEvent::getFailure
AAMPTuneFailure getFailure() const
Get Failure type.
Definition: AampEvent.cpp:872
AAMP_EVENT_DRM_METADATA
@ AAMP_EVENT_DRM_METADATA
Definition: AampEvent.h:71
AAMP_EVENT_BULK_TIMED_METADATA
@ AAMP_EVENT_BULK_TIMED_METADATA
Definition: AampEvent.h:59
MediaErrorEvent::MediaErrorEvent
MediaErrorEvent()=delete
BitrateChangeEvent::BitrateChangeEvent
BitrateChangeEvent()=delete
SupportedSpeedsChangedEvent::getSupportedSpeedCount
int getSupportedSpeedCount() const
Get Supported Speeds Count.
Definition: AampEvent.cpp:794
AdPlacementEvent::getPosition
uint32_t getPosition() const
Get Ad's Position.
Definition: AampEvent.cpp:1182
AAMP_TUNE_INIT_FAILED
@ AAMP_TUNE_INIT_FAILED
Definition: AampEvent.h:110
AAMP_EVENT_CONTENT_GAP
@ AAMP_EVENT_CONTENT_GAP
Definition: AampEvent.h:85
AAMP_EVENT_BUFFERING_CHANGED
@ AAMP_EVENT_BUFFERING_CHANGED
Definition: AampEvent.h:64
DrmMetaDataEvent::mAccessStatus
std::string mAccessStatus
Definition: AampEvent.h:1399
AAMPEventObject::mType
AAMPEventType mType
Definition: AampEvent.h:498
MediaMetadataEvent::addSupportedSpeed
void addSupportedSpeed(float speed)
Add a supported speed.
Definition: AampEvent.cpp:448
AdReservationEvent::AdReservationEvent
AdReservationEvent()=delete
AAMP_EVENT_REPORT_ANOMALY
@ AAMP_EVENT_REPORT_ANOMALY
Definition: AampEvent.h:72
AAMP_EVENT_TUNE_FAILED
@ AAMP_EVENT_TUNE_FAILED
Definition: AampEvent.h:48
WebVttCueEvent::WebVttCueEvent
WebVttCueEvent()=delete
HTTPResponseHeaderEvent::getResponse
const std::string & getResponse() const
Get HTTP Response Header response.
Definition: AampEvent.cpp:1430
AAMP_EVENT_DRM_MESSAGE
@ AAMP_EVENT_DRM_MESSAGE
Definition: AampEvent.h:83
HTTPResponseHeaderEvent::HTTPResponseHeaderEvent
HTTPResponseHeaderEvent()=delete
ID3MetadataEvent::getPresentationTime
uint64_t getPresentationTime() const
Get presentationTime.
Definition: AampEvent.cpp:1321
DrmMetaDataEvent::getResponseCode
long getResponseCode() const
Get Response Code.
Definition: AampEvent.cpp:926
MediaErrorEvent::getDescription
const std::string & getDescription() const
Get Description.
Definition: AampEvent.cpp:154
AdPlacementEvent::getOffset
uint32_t getOffset() const
Get Ad's Offset.
Definition: AampEvent.cpp:1192
BufferingChangedEvent::BufferingChangedEvent
BufferingChangedEvent()=delete
DrmMessageEvent::DrmMessageEvent
DrmMessageEvent()=delete
ID3MetadataEvent::mMetadata
std::vector< uint8_t > mMetadata
Definition: AampEvent.h:1816
AdPlacementEvent::AdPlacementEvent
AdPlacementEvent()=delete
BufferingChangedEvent::buffering
bool buffering() const
Get Buffering Status.
Definition: AampEvent.cpp:851
AdResolvedEvent::AdResolvedEvent
AdResolvedEvent()=delete
AnomalyReportEvent::getSeverity
int getSeverity() const
Get Severity.
Definition: AampEvent.cpp:1044
AdPlacementEvent::getAdId
const std::string & getAdId() const
Get Ad's Identifier.
Definition: AampEvent.cpp:1172
VideoScanType
VideoScanType
VideoScanType - Progressive/Interlaced.
Definition: AampEvent.h:190
SupportedSpeedsChangedEvent::mSupportedSpeeds
std::vector< float > mSupportedSpeeds
Definition: AampEvent.h:1259
BulkTimedMetadataEvent::BulkTimedMetadataEvent
BulkTimedMetadataEvent()=delete
AAMP_EVENT_STATE_CHANGED
@ AAMP_EVENT_STATE_CHANGED
Definition: AampEvent.h:60
AAMP_EVENT_SPEEDS_CHANGED
@ AAMP_EVENT_SPEEDS_CHANGED
Definition: AampEvent.h:61
AAMP_EVENT_SPEED_CHANGED
@ AAMP_EVENT_SPEED_CHANGED
Definition: AampEvent.h:49
SupportedSpeedsChangedEvent::SupportedSpeedsChangedEvent
SupportedSpeedsChangedEvent()
SupportedSpeedsChangedEvent Constructor.
Definition: AampEvent.cpp:765
AAMP_EVENT_AD_RESOLVED
@ AAMP_EVENT_AD_RESOLVED
Definition: AampEvent.h:74
DrmMetaDataEvent::getSecclientError
bool getSecclientError() const
Get secclient error status.
Definition: AampEvent.cpp:1017
AAMP_EVENT_CONTENT_PROTECTION_DATA_UPDATE
@ AAMP_EVENT_CONTENT_PROTECTION_DATA_UPDATE
Definition: AampEvent.h:88
DrmMetaDataEvent::getAccessStatusValue
int getAccessStatusValue() const
Get Access Status.
Definition: AampEvent.cpp:908
ID3MetadataEvent::getEventDuration
uint32_t getEventDuration() const
Get eventDuration.
Definition: AampEvent.cpp:1301
ID3MetadataEvent::getTimeScale
uint32_t getTimeScale() const
Get TimeScale value.
Definition: AampEvent.cpp:1291
TimedMetadataEvent::TimedMetadataEvent
TimedMetadataEvent()=delete
MediaMetadataEvent::addBitrate
void addBitrate(long bitrate)
Add a supported bitrate.
Definition: AampEvent.cpp:390
SupportedSpeedsChangedEvent::getSupportedSpeeds
const std::vector< float > & getSupportedSpeeds() const
Get Supported Speeds.
Definition: AampEvent.cpp:784
AdPlacementEvent::getDuration
uint32_t getDuration() const
Get Ad's Duration.
Definition: AampEvent.cpp:1202
AAMPEventObject::getType
AAMPEventType getType() const
Get Event Type.
Definition: AampEvent.cpp:114
ID3MetadataEvent::getSchemeIdUri
const std::string & getSchemeIdUri() const
Get schemeIdUri.
Definition: AampEvent.cpp:1341
AAMP_EVENT_TUNE_PROFILING
@ AAMP_EVENT_TUNE_PROFILING
Definition: AampEvent.h:63
AdPlacementEvent::mAdId
std::string mAdId
Definition: AampEvent.h:1710
VTTCue
Data structure to hold a VTT cue.
Definition: vttCue.h:39
AAMPTuneFailure
AAMPTuneFailure
AAMP playback error codes.
Definition: AampEvent.h:108
HTTPResponseHeaderEvent::getHeader
const std::string & getHeader() const
Get HTTP Response Header Name.
Definition: AampEvent.cpp:1420
AAMP_EVENT_ID3_METADATA
@ AAMP_EVENT_ID3_METADATA
Definition: AampEvent.h:82
AAMP_EVENT_REPORT_METRICS_DATA
@ AAMP_EVENT_REPORT_METRICS_DATA
Definition: AampEvent.h:81
DrmMetaDataEvent::getBusinessStatus
int32_t getBusinessStatus() const
Get Response Code.
Definition: AampEvent.cpp:956
MediaMetadataEvent::addLanguage
void addLanguage(const std::string &lang)
Add a supported language.
Definition: AampEvent.cpp:362
ID3MetadataEvent::getValue
const std::string & getValue() const
Get value.
Definition: AampEvent.cpp:1351
PrivAAMPState
PrivAAMPState
Mapping all required status codes based on JS player requirement. These requirements may be forced by...
Definition: AampEvent.h:156
MediaErrorEvent::mDescription
std::string mDescription
Definition: AampEvent.h:538
AAMP_EVENT_CC_HANDLE_RECEIVED
@ AAMP_EVENT_CC_HANDLE_RECEIVED
Definition: AampEvent.h:53
SpeedChangedEvent::SpeedChangedEvent
SpeedChangedEvent()=delete
DrmMetaDataEvent::getAccessStatus
const std::string & getAccessStatus() const
Get Access Status.
Definition: AampEvent.cpp:890
AampEvent.h
Events supported by the AAMP player.
AAMP_EVENT_WEBVTT_CUE_DATA
@ AAMP_EVENT_WEBVTT_CUE_DATA
Definition: AampEvent.h:73
AAMP_EVENT_MEDIA_METADATA
@ AAMP_EVENT_MEDIA_METADATA
Definition: AampEvent.h:55
StateChangedEvent::StateChangedEvent
StateChangedEvent()=delete
AAMPEventType
AAMPEventType
Type of the events sending to the JSPP player.
Definition: AampEvent.h:44
HTTPResponseHeaderEvent::mHeaderResponse
std::string mHeaderResponse
Definition: AampEvent.h:2001
HTTPResponseHeaderEvent::mHeaderName
std::string mHeaderName
Definition: AampEvent.h:2000
AnomalyReportEvent::AnomalyReportEvent
AnomalyReportEvent()=delete
AAMPEventObject
Base class of all AAMP events. New AAMP event object for ease of use While defining new event objects...
Definition: AampEvent.h:496
AAMP_EVENT_TIMED_METADATA
@ AAMP_EVENT_TIMED_METADATA
Definition: AampEvent.h:58
AAMP_EVENT_SEEKED
@ AAMP_EVENT_SEEKED
Definition: AampEvent.h:62
DrmMetaDataEvent::setAccessStatus
void setAccessStatus(const std::string &status)
Set Access Status.
Definition: AampEvent.cpp:898
AAMP_EVENT_PROGRESS
@ AAMP_EVENT_PROGRESS
Definition: AampEvent.h:52
DrmMetaDataEvent::getSecManagerReasonCode
int32_t getSecManagerReasonCode() const
Get Response Code.
Definition: AampEvent.cpp:936
ProgressEvent::ProgressEvent
ProgressEvent()=delete
MetricsDataEvent::MetricsDataEvent
MetricsDataEvent()=delete
ContentGapEvent::ContentGapEvent
ContentGapEvent()=delete
TuneProfilingEvent::TuneProfilingEvent
TuneProfilingEvent()=delete
ID3MetadataEvent::getTimestampOffset
uint64_t getTimestampOffset() const
Get timestampOffset.
Definition: AampEvent.cpp:1331
ID3MetadataEvent::getMetadata
const std::vector< uint8_t > & getMetadata() const
Get ID3 metdata.
Definition: AampEvent.cpp:1271
AAMP_EVENT_HTTP_RESPONSE_HEADER
@ AAMP_EVENT_HTTP_RESPONSE_HEADER
Definition: AampEvent.h:86
SupportedSpeedsChangedEvent::addSupportedSpeed
void addSupportedSpeed(float speed)
Add a Supported Speed.
Definition: AampEvent.cpp:774
AAMP_EVENT_BITRATE_CHANGED
@ AAMP_EVENT_BITRATE_CHANGED
Definition: AampEvent.h:57
MediaMetadataEvent::MediaMetadataEvent
MediaMetadataEvent()=delete
ID3MetadataEvent::getMetadataSize
int getMetadataSize() const
Get ID3 metdata size.
Definition: AampEvent.cpp:1281