RDK Documentation (Open Sourced RDK Components)
FakeOTA.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 "ota_shim.h"
21 
22 StreamAbstractionAAMP_OTA::StreamAbstractionAAMP_OTA(AampLogManager *logObj, class PrivateInstanceAAMP *aamp,double seek_pos, float rate)
23  : StreamAbstractionAAMP(logObj, aamp)
24 {
25 }
26 
28 {
29 }
30 
32 
34 
36 
37 void StreamAbstractionAAMP_OTA::Stop(bool clearChannelData) { }
38 
39 void StreamAbstractionAAMP_OTA::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxAudioOutputFormat, StreamOutputFormat &subtitleOutputFormat) { }
40 
42 
43 double StreamAbstractionAAMP_OTA::GetFirstPTS() { return 0; }
44 
46 
48 
49 double StreamAbstractionAAMP_OTA::GetBufferedDuration (void) { return 0; }
50 
52 
53 int StreamAbstractionAAMP_OTA::GetBWIndex(long bandwidth) { return 0; }
54 
55 std::vector<long> StreamAbstractionAAMP_OTA::GetVideoBitrates(void) { std::vector<long> temp; return temp; }
56 
57 std::vector<long> StreamAbstractionAAMP_OTA::GetAudioBitrates(void) { std::vector<long> temp; return temp; }
58 
60 
62 
63 std::vector<AudioTrackInfo> &StreamAbstractionAAMP_OTA::GetAvailableAudioTracks(bool allTrack) { return mAudioTracks; };
64 
65 std::vector<TextTrackInfo> &StreamAbstractionAAMP_OTA::GetAvailableTextTracks(bool allTrack) { return mTextTracks; };
66 
68 
69 bool StreamAbstractionAAMP_OTA::GetCurrentAudioTrack(AudioTrackInfo &audioTrack) { return false; }
70 
71 void StreamAbstractionAAMP_OTA::SetVideoRectangle(int x, int y, int w, int h) {}
72 
73 std::vector<StreamInfo*> StreamAbstractionAAMP_OTA::GetAvailableVideoTracks(void) { std::vector<StreamInfo*> temp; return temp; }
74 
75 std::vector<StreamInfo*> StreamAbstractionAAMP_OTA::GetAvailableThumbnailTracks(void) { std::vector<StreamInfo*> temp; return temp; }
76 
77 bool StreamAbstractionAAMP_OTA::SetThumbnailTrack(int) { return false; }
78 
79 std::vector<ThumbnailData> StreamAbstractionAAMP_OTA::GetThumbnailRangeData(double, double, std::string*, int*, int*, int*, int*) { std::vector<ThumbnailData> temp; return temp; }
80 
82 
84 
86 
87 void StreamAbstractionAAMP_OTA::DisableContentRestrictions(long grace, long time, bool eventChange) {}
88 
90 
91 StreamInfo* StreamAbstractionAAMP_OTA::GetStreamInfo(int idx) { return nullptr; }
92 
94 {
95  return 0;
96 }
97 
98 
ota_shim.h
shim for dispatching UVE OTA ATSC playback
StreamOutputFormat
StreamOutputFormat
Media output format.
Definition: main_aamp.h:106
StreamInfo
Structure holding the information of a stream.
Definition: StreamAbstractionAAMP.h:69
StreamAbstractionAAMP_OTA::SetAudioTrack
void SetAudioTrack(int index) override
SetAudioTrack sets a specific audio track.
Definition: ota_shim.cpp:809
StreamAbstractionAAMP_OTA::StartInjection
void StartInjection(void) override
Start injecting fragments to StreamSink.
Definition: ota_shim.cpp:1159
StreamAbstractionAAMP_OTA::GetStreamInfo
StreamInfo * GetStreamInfo(int idx) override
Get stream information of a profile from subclass.
Definition: ota_shim.cpp:1047
AudioTrackInfo
Structure for audio track information Holds information about an audio track in playlist.
Definition: main_aamp.h:178
StreamAbstractionAAMP_OTA::Start
void Start() override
Starts streaming.
Definition: ota_shim.cpp:394
TuneType
TuneType
Tune Typea.
Definition: priv_aamp.h:190
StreamAbstractionAAMP_OTA::GetBufferedDuration
double GetBufferedDuration() override
Get the Buffered time.
Definition: ota_shim.cpp:1071
StreamAbstractionAAMP_OTA::GetAvailableVideoTracks
std::vector< StreamInfo * > GetAvailableVideoTracks(void) override
To get the available video tracks.
Definition: ota_shim.cpp:1119
StreamAbstractionAAMP::mTextTracks
std::vector< TextTrackInfo > mTextTracks
Definition: StreamAbstractionAAMP.h:1455
StreamAbstractionAAMP_OTA::GetMediaTrack
MediaTrack * GetMediaTrack(TrackType type) override
Return MediaTrack of requested type.
Definition: ota_shim.cpp:1031
StreamAbstractionAAMP_OTA::GetAudioBitrates
std::vector< long > GetAudioBitrates(void) override
To get the available audio bitrates.
Definition: ota_shim.cpp:1111
StreamAbstractionAAMP_OTA::GetStartTimeOfFirstPTS
double GetStartTimeOfFirstPTS() override
Get Start time PTS of first sample.
Definition: ota_shim.cpp:1063
StreamAbstractionAAMP_OTA::GetFirstPTS
double GetFirstPTS() override
Get PTS of first sample.
Definition: ota_shim.cpp:1055
StreamAbstractionAAMP_OTA::GetStreamFormat
void GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxOutputFormat, StreamOutputFormat &subtitleOutputFormat) override
Get output format of stream.
Definition: ota_shim.cpp:1020
StreamAbstractionAAMP_OTA::GetBWIndex
int GetBWIndex(long bitrate) override
Get index of profile corresponds to bandwidth.
Definition: ota_shim.cpp:1087
AampLogManager
AampLogManager Class.
Definition: AampLogManager.h:150
StreamAbstractionAAMP_OTA::GetThumbnailRangeData
std::vector< ThumbnailData > GetThumbnailRangeData(double, double, std::string *, int *, int *, int *, int *) override
To get the available thumbnail tracks.
Definition: ota_shim.cpp:1144
StreamAbstractionAAMP_OTA::GetMaxBitrate
long GetMaxBitrate(void) override
Gets Max Bitrate avialable for current playback.
Definition: ota_shim.cpp:1103
MediaTrack
Base Class for Media Track.
Definition: StreamAbstractionAAMP.h:159
StreamAbstractionAAMP
StreamAbstraction class of AAMP.
Definition: StreamAbstractionAAMP.h:577
StreamAbstractionAAMP_OTA::DumpProfiles
void DumpProfiles(void) override
Stub implementation.
Definition: ota_shim.cpp:1013
StreamAbstractionAAMP_OTA::Stop
void Stop(bool clearChannelData) override
Stops streaming.
Definition: ota_shim.cpp:482
StreamAbstractionAAMP_OTA::GetStreamPosition
double GetStreamPosition() override
Get current stream position.
Definition: ota_shim.cpp:1039
StreamAbstractionAAMP_OTA::EnableContentRestrictions
void EnableContentRestrictions() override
Enable Content Restriction (lock)
Definition: ota_shim.cpp:997
TrackType
TrackType
Media Track Types.
Definition: StreamAbstractionAAMP.h:48
eAAMPSTATUS_OK
@ eAAMPSTATUS_OK
Definition: priv_aamp.h:207
StreamAbstractionAAMP_OTA::StreamAbstractionAAMP_OTA
StreamAbstractionAAMP_OTA(AampLogManager *logObj, class PrivateInstanceAAMP *aamp, double seekpos, float rate)
StreamAbstractionAAMP_OTA Constructor.
Definition: ota_shim.cpp:342
StreamAbstractionAAMP_OTA::Init
AAMPStatusType Init(TuneType tuneType) override
Initialize a newly created object.
Definition: ota_shim.cpp:303
StreamAbstractionAAMP_OTA::SetVideoRectangle
void SetVideoRectangle(int x, int y, int w, int h) override
SetVideoRectangle sets the position coordinates (x,y) & size (w,h)
Definition: ota_shim.cpp:529
StreamAbstractionAAMP_OTA::SetPreferredAudioLanguages
void SetPreferredAudioLanguages() override
SetPreferredAudioLanguages set the preferred audio language list.
Definition: ota_shim.cpp:634
StreamAbstractionAAMP_OTA::GetAvailableThumbnailTracks
std::vector< StreamInfo * > GetAvailableThumbnailTracks(void) override
To get the available thumbnail tracks.
Definition: ota_shim.cpp:1127
StreamAbstractionAAMP_OTA::~StreamAbstractionAAMP_OTA
~StreamAbstractionAAMP_OTA()
StreamAbstractionAAMP_OTA Distructor.
Definition: ota_shim.cpp:359
PrivateInstanceAAMP
Class representing the AAMP player's private instance, which is not exposed to outside world.
Definition: priv_aamp.h:640
StreamAbstractionAAMP_OTA::IsInitialCachingSupported
bool IsInitialCachingSupported() override
Check if initial Caching is supports.
Definition: ota_shim.cpp:1079
StreamAbstractionAAMP_OTA::GetVideoBitrates
std::vector< long > GetVideoBitrates(void) override
To get the available video bitrates.
Definition: ota_shim.cpp:1095
StreamAbstractionAAMP_OTA::SetAudioTrackByLanguage
void SetAudioTrackByLanguage(const char *lang) override
SetAudioTrackByLanguage set the audio language.
Definition: ota_shim.cpp:692
AAMPStatusType
AAMPStatusType
AAMP Function return values.
Definition: priv_aamp.h:205
StreamAbstractionAAMP::mAudioTracks
std::vector< AudioTrackInfo > mAudioTracks
Definition: StreamAbstractionAAMP.h:1452
StreamAbstractionAAMP_OTA::DisableContentRestrictions
void DisableContentRestrictions(long grace, long time, bool eventChange) override
Disable Restrictions (unlock) till seconds mentioned.
Definition: ota_shim.cpp:965
StreamAbstractionAAMP_OTA::StopInjection
void StopInjection(void) override
Stops injecting fragments to StreamSink.
Definition: ota_shim.cpp:1152
StreamAbstractionAAMP_OTA::SetThumbnailTrack
bool SetThumbnailTrack(int) override
Function to set thumbnail track for processing.
Definition: ota_shim.cpp:1135
StreamAbstractionAAMP_OTA::GetAvailableTextTracks
std::vector< TextTrackInfo > & GetAvailableTextTracks(bool all=false) override
Get the list of available text tracks.
Definition: ota_shim.cpp:831
StreamAbstractionAAMP_OTA::GetCurrentAudioTrack
bool GetCurrentAudioTrack(AudioTrackInfo &audioTrack) override
Get current audio track.
Definition: ota_shim.cpp:610
StreamAbstractionAAMP_OTA::GetAudioTrack
int GetAudioTrack() override
Get current audio track.
Definition: ota_shim.cpp:588
StreamAbstractionAAMP_OTA::GetAvailableAudioTracks
std::vector< AudioTrackInfo > & GetAvailableAudioTracks(bool allTrack=false) override
Get the list of available audio tracks.
Definition: ota_shim.cpp:577