RDK Documentation (Open Sourced RDK Components)
FakeFragmentCollector_MPD.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 "fragmentcollector_mpd.h"
21 
23 {
24  EarlyAvailablePeriodInfo() : periodId(), isLicenseProcessed(false), isLicenseFailed(false), helper(nullptr){}
25  std::string periodId;
26  std::shared_ptr<AampDrmHelper> helper;
27  bool isLicenseProcessed;
28  bool isLicenseFailed;
29 };
30 
31 StreamAbstractionAAMP_MPD::StreamAbstractionAAMP_MPD(AampLogManager *logObj, class PrivateInstanceAAMP *aamp,double seek_pos, float rate)
32  : StreamAbstractionAAMP(logObj, aamp)
33 {
34 }
35 
37 {
38 }
39 
41 {
42  Accessibility accessibilityNode;
43  return accessibilityNode;
44 }
45 
47 
49 
51 
52 void StreamAbstractionAAMP_MPD::Stop(bool clearChannelData) { }
53 
54 void StreamAbstractionAAMP_MPD::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxAudioOutputFormat, StreamOutputFormat &subtitleOutputFormat) { }
55 
57 
58 double StreamAbstractionAAMP_MPD::GetFirstPTS() { return 0; }
59 
61 
63 
64 double StreamAbstractionAAMP_MPD::GetBufferedDuration (void) { return 0; }
65 
66 int StreamAbstractionAAMP_MPD::GetBWIndex(long bandwidth) { return 0; }
67 
68 std::vector<long> StreamAbstractionAAMP_MPD::GetVideoBitrates(void) { std::vector<long> temp; return temp; }
69 
70 std::vector<long> StreamAbstractionAAMP_MPD::GetAudioBitrates(void) { std::vector<long> temp; return temp; }
71 
73 
75 
76 std::vector<StreamInfo*> StreamAbstractionAAMP_MPD::GetAvailableVideoTracks(void) { std::vector<StreamInfo*> temp; return temp; }
77 
78 std::vector<StreamInfo*> StreamAbstractionAAMP_MPD::GetAvailableThumbnailTracks(void) { std::vector<StreamInfo*> temp; return temp; }
79 
80 bool StreamAbstractionAAMP_MPD::SetThumbnailTrack(int) { return false; }
81 
82 std::vector<ThumbnailData> StreamAbstractionAAMP_MPD::GetThumbnailRangeData(double, double, std::string*, int*, int*, int*, int*) { std::vector<ThumbnailData> temp; return temp; }
83 
84 StreamInfo* StreamAbstractionAAMP_MPD::GetStreamInfo(int idx) { return nullptr; }
85 
87 {
88  return 0.0;
89 }
90 
92 {
93  return 0;
94 }
95 
97 {
98  return 0;
99 }
100 
102 {
103  return 0;
104 }
105 
107 {
108  return 0;
109 }
110 
112 {
113 }
114 
116 {
117 }
118 
120 {
121 }
122 
123 std::vector<AudioTrackInfo>& StreamAbstractionAAMP_MPD::GetAvailableAudioTracks(bool allTrack)
124 {
125  return mAudioTracksAll;
126 }
127 
128 std::vector<TextTrackInfo>& StreamAbstractionAAMP_MPD::GetAvailableTextTracks(bool allTrack)
129 {
130  return mTextTracksAll;
131 }
132 
134 {
135 }
136 
138 {
139 }
140 
142 {
143 }
144 
145 void StreamAbstractionAAMP_MPD::ResumeSubtitleOnPlay(bool mute, char *data)
146 {
147 }
148 
149 void StreamAbstractionAAMP_MPD::ResumeSubtitleAfterSeek(bool mute, char *data)
150 {
151 }
152 
154 {
155 }
156 
157 bool StreamAbstractionAAMP_MPD::Is4KStream(int &height, long &bandwidth)
158 {
159  return false;
160 }
161 
162 bool StreamAbstractionAAMP_MPD::SetTextStyle(const std::string &options)
163 {
164  return false;
165 }
StreamOutputFormat
StreamOutputFormat
Media output format.
Definition: main_aamp.h:106
StreamAbstractionAAMP_MPD::MuteSubtitleOnPause
void MuteSubtitleOnPause() override
Mute subtitles on puase.
Definition: fragmentcollector_mpd.cpp:9772
StreamInfo
Structure holding the information of a stream.
Definition: StreamAbstractionAAMP.h:69
fragmentcollector_mpd.h
Fragment collector MPEG DASH declarations.
StreamAbstractionAAMP_MPD::GetCurrPeriodTimeScale
uint32_t GetCurrPeriodTimeScale()
Get timescale from current period.
Definition: fragmentcollector_mpd.cpp:8014
StreamAbstractionAAMP_MPD::InitSubtitleParser
void InitSubtitleParser(char *data) override
Init webvtt subtitle parser for sidecar caption support.
Definition: fragmentcollector_mpd.cpp:9741
TuneType
TuneType
Tune Typea.
Definition: priv_aamp.h:190
StreamAbstractionAAMP_MPD::DumpProfiles
void DumpProfiles(void) override
Stub implementation.
Definition: fragmentcollector_mpd.cpp:10003
StreamAbstractionAAMP_MPD::GetAudioBitrates
std::vector< long > GetAudioBitrates(void) override
To get the available audio bitrates. @ret available audio bitrates.
Definition: fragmentcollector_mpd.cpp:10292
StreamAbstractionAAMP_MPD::GetStreamPosition
double GetStreamPosition() override
Get current stream position.
Definition: fragmentcollector_mpd.cpp:10107
AampLogManager
AampLogManager Class.
Definition: AampLogManager.h:150
StreamAbstractionAAMP_MPD::getAccessibilityNode
static Accessibility getAccessibilityNode(void *adaptationSet)
Definition: fragmentcollector_mpd.cpp:6797
StreamAbstractionAAMP_MPD::ResumeSubtitleOnPlay
void ResumeSubtitleOnPlay(bool mute, char *data) override
Resume subtitle on play.
Definition: fragmentcollector_mpd.cpp:9786
MediaTrack
Base Class for Media Track.
Definition: StreamAbstractionAAMP.h:159
StreamAbstractionAAMP
StreamAbstraction class of AAMP.
Definition: StreamAbstractionAAMP.h:577
StreamAbstractionAAMP_MPD::GetAvailableThumbnailTracks
std::vector< StreamInfo * > GetAvailableThumbnailTracks(void) override
To get the available thumbnail tracks. @ret available thumbnail tracks.
Definition: fragmentcollector_mpd.cpp:10478
StreamAbstractionAAMP_MPD::GetMediaTrack
MediaTrack * GetMediaTrack(TrackType type) override
Return MediaTrack of requested type.
Definition: fragmentcollector_mpd.cpp:10083
StreamAbstractionAAMP_MPD::Init
AAMPStatusType Init(TuneType tuneType) override
Initialize a newly created object.
Definition: fragmentcollector_mpd.cpp:4162
StreamAbstractionAAMP_MPD::GetVideoBitrates
std::vector< long > GetVideoBitrates(void) override
To get the available video bitrates. @ret available video bitrates.
Definition: fragmentcollector_mpd.cpp:10247
TrackType
TrackType
Media Track Types.
Definition: StreamAbstractionAAMP.h:48
StreamAbstractionAAMP_MPD::GetFirstPeriodStartTime
double GetFirstPeriodStartTime(void)
Get Period Start Time.
Definition: fragmentcollector_mpd.cpp:10118
StreamAbstractionAAMP_MPD::SetCDAIObject
virtual void SetCDAIObject(CDAIObject *cdaiObj) override
Set Client Side DAI object instance.
Definition: fragmentcollector_mpd.cpp:10662
StreamAbstractionAAMP_MPD::GetStreamFormat
void GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxOutputFormat, StreamOutputFormat &subtitleOutputFormat) override
Get output format of stream.
Definition: fragmentcollector_mpd.cpp:10029
StreamAbstractionAAMP::mAudioTracksAll
std::vector< AudioTrackInfo > mAudioTracksAll
Definition: StreamAbstractionAAMP.h:1453
StreamAbstractionAAMP_MPD::Stop
void Stop(bool clearChannelData) override
Stops streaming.
Definition: fragmentcollector_mpd.cpp:9897
eAAMPSTATUS_OK
@ eAAMPSTATUS_OK
Definition: priv_aamp.h:207
StreamAbstractionAAMP_MPD::GetAvailableTextTracks
virtual std::vector< TextTrackInfo > & GetAvailableTextTracks(bool allTrack=false) override
Gets all/current available text tracks.
Definition: fragmentcollector_mpd.cpp:11468
StreamAbstractionAAMP_MPD::Start
void Start() override
Starts streaming.
Definition: fragmentcollector_mpd.cpp:9867
StreamAbstractionAAMP_MPD::StopInjection
void StopInjection(void) override
Stops injecting fragments to StreamSink.
Definition: fragmentcollector_mpd.cpp:10616
StreamAbstractionAAMP_MPD::~StreamAbstractionAAMP_MPD
~StreamAbstractionAAMP_MPD()
StreamAbstractionAAMP_MPD Destructor.
Definition: fragmentcollector_mpd.cpp:9828
StreamAbstractionAAMP_MPD::GetAvailableAudioTracks
virtual std::vector< AudioTrackInfo > & GetAvailableAudioTracks(bool allTrack=false) override
To set the audio tracks of current period.
Definition: fragmentcollector_mpd.cpp:11445
StreamAbstractionAAMP_MPD::StartInjection
void StartInjection(void) override
Start injecting fragments to StreamSink.
Definition: fragmentcollector_mpd.cpp:10641
StreamAbstractionAAMP_MPD::ResumeSubtitleAfterSeek
void ResumeSubtitleAfterSeek(bool mute, char *data) override
Resume subtitle after seek.
Definition: fragmentcollector_mpd.cpp:9812
StreamAbstractionAAMP_MPD::GetBufferedDuration
double GetBufferedDuration()
Function to get the buffer duration of stream.
Definition: fragmentcollector_mpd.cpp:10089
StreamAbstractionAAMP_MPD::GetStreamInfo
StreamInfo * GetStreamInfo(int idx) override
Get stream information of a profile from subclass.
Definition: fragmentcollector_mpd.cpp:10177
StreamAbstractionAAMP_MPD::ResetSubtitle
void ResetSubtitle() override
Reset subtitle parser created for sidecar caption support.
Definition: fragmentcollector_mpd.cpp:9760
PrivateInstanceAAMP
Class representing the AAMP player's private instance, which is not exposed to outside world.
Definition: priv_aamp.h:640
StreamAbstractionAAMP_MPD::SetThumbnailTrack
bool SetThumbnailTrack(int) override
Definition: fragmentcollector_mpd.cpp:10494
AAMPStatusType
AAMPStatusType
AAMP Function return values.
Definition: priv_aamp.h:205
StreamAbstractionAAMP_MPD::GetStartTimeOfFirstPTS
double GetStartTimeOfFirstPTS() override
Get Start time PTS of first sample.
Definition: fragmentcollector_mpd.cpp:10215
StreamAbstractionAAMP_MPD::StreamAbstractionAAMP_MPD
StreamAbstractionAAMP_MPD(AampLogManager *logObj, class PrivateInstanceAAMP *aamp, double seekpos, float rate)
StreamAbstractionAAMP_MPD Constructor.
Definition: fragmentcollector_mpd.cpp:290
StreamAbstractionAAMP_MPD::GetProfileCount
int GetProfileCount()
Gets number of profiles.
Definition: fragmentcollector_mpd.cpp:10127
CDAIObject
Base class for the client side DAI object.
Definition: AdManagerBase.h:57
StreamAbstractionAAMP_MPD::GetFirstPTS
double GetFirstPTS() override
Get PTS of first sample.
Definition: fragmentcollector_mpd.cpp:10204
StreamAbstractionAAMP_MPD::Is4KStream
virtual bool Is4KStream(int &height, long &bandwidth) override
check if current stream have 4K content
Definition: fragmentcollector_mpd.cpp:4980
StreamAbstractionAAMP_MPD::GetBWIndex
int GetBWIndex(long bitrate) override
Get index of profile corresponds to bandwidth.
Definition: fragmentcollector_mpd.cpp:10224
StreamAbstractionAAMP_MPD::SetTextStyle
bool SetTextStyle(const std::string &options) override
Set the text style of the subtitle to the options passed.
Definition: fragmentcollector_mpd.cpp:12606
StreamAbstractionAAMP_MPD::GetMaxBitrate
long GetMaxBitrate(void) override
Gets Max bitrate supported.
Definition: fragmentcollector_mpd.cpp:10271
Accessibility
Data type to store Accessibility Node data.
Definition: Accessibility.hpp:29
StreamAbstractionAAMP::mTextTracksAll
std::vector< TextTrackInfo > mTextTracksAll
Definition: StreamAbstractionAAMP.h:1454
StreamAbstractionAAMP_MPD::MuteSidecarSubtitles
void MuteSidecarSubtitles(bool mute) override
Mute/unmute subtitles.
Definition: fragmentcollector_mpd.cpp:9801
StreamAbstractionAAMP_MPD::GetProfileIndexForBandwidth
int GetProfileIndexForBandwidth(long mTsbBandwidth)
Get profile index for TsbBandwidth.
Definition: fragmentcollector_mpd.cpp:10149
StreamAbstractionAAMP_MPD::PauseSubtitleParser
void PauseSubtitleParser(bool pause) override
Pause/unpause subtitles.
Definition: fragmentcollector_mpd.cpp:6765
StreamAbstractionAAMP_MPD::GetThumbnailRangeData
std::vector< ThumbnailData > GetThumbnailRangeData(double, double, std::string *, int *, int *, int *, int *) override
Definition: fragmentcollector_mpd.cpp:10524
EarlyAvailablePeriodInfo
Period Information available at early.
Definition: fragmentcollector_mpd.cpp:275
StreamAbstractionAAMP_MPD::StartSubtitleParser
void StartSubtitleParser() override
Kicks off subtitle display - sent at start of video presentation.
Definition: fragmentcollector_mpd.cpp:6749
AampJsonObject
Utility class to construct a JSON string.
Definition: AampJsonObject.h:37