RDK Documentation (Open Sourced RDK Components)
FakeFragmentCollector_HLS.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_hls.h"
21 
22 StreamAbstractionAAMP_HLS::StreamAbstractionAAMP_HLS(AampLogManager *logObj, class PrivateInstanceAAMP *aamp,double seekpos, float rate) : StreamAbstractionAAMP(logObj, aamp)
23 {
24 }
25 
27 {
28 }
29 
31 
33 
35 
36 void StreamAbstractionAAMP_HLS::Stop(bool clearChannelData) { }
37 
38 void StreamAbstractionAAMP_HLS::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxAudioOutputFormat, StreamOutputFormat &subtitleOutputFormat) { }
39 
40 double StreamAbstractionAAMP_HLS::GetFirstPTS() { return 0; }
41 
43 
44 double StreamAbstractionAAMP_HLS::GetBufferedDuration (void) { return 0; }
45 
46 int StreamAbstractionAAMP_HLS::GetBWIndex(long bandwidth) { return 0; }
47 
48 std::vector<long> StreamAbstractionAAMP_HLS::GetVideoBitrates(void) { std::vector<long> temp; return temp; }
49 
50 std::vector<long> StreamAbstractionAAMP_HLS::GetAudioBitrates(void) { std::vector<long> temp; return temp; }
51 
53 
55 
56 std::vector<StreamInfo*> StreamAbstractionAAMP_HLS::GetAvailableVideoTracks(void) { std::vector<StreamInfo*> temp; return temp; }
57 
58 std::vector<StreamInfo*> StreamAbstractionAAMP_HLS::GetAvailableThumbnailTracks(void) { std::vector<StreamInfo*> temp; return temp; }
59 
60 bool StreamAbstractionAAMP_HLS::SetThumbnailTrack(int) { return false; }
61 
62 std::vector<ThumbnailData> StreamAbstractionAAMP_HLS::GetThumbnailRangeData(double, double, std::string*, int*, int*, int*, int*) { std::vector<ThumbnailData> temp; return temp; }
63 
64 StreamInfo* StreamAbstractionAAMP_HLS::GetStreamInfo(int idx) { return nullptr; }
65 
67 
69 
70 void StreamAbstractionAAMP_HLS::NotifyFirstVideoPTS(unsigned long long pts, unsigned long timeScale){ }
71 
72 void StreamAbstractionAAMP_HLS::SeekPosUpdate(double secondsRelativeToTuneTime) { }
73 
75 
76 bool StreamAbstractionAAMP_HLS::Is4KStream(int &height, long &bandwidth) { return false; }
StreamOutputFormat
StreamOutputFormat
Media output format.
Definition: main_aamp.h:106
StreamInfo
Structure holding the information of a stream.
Definition: StreamAbstractionAAMP.h:69
StreamAbstractionAAMP_HLS::ChangeMuxedAudioTrackIndex
void ChangeMuxedAudioTrackIndex(std::string &index) override
Change muxed audio track index.
Definition: fragmentcollector_hls.cpp:7764
fragmentcollector_hls.h
This file handles HLS Streaming functionality for AAMP player
StreamAbstractionAAMP_HLS::Init
AAMPStatusType Init(TuneType tuneType) override
Function to initialize member variables,download main manifest and parse.
Definition: fragmentcollector_hls.cpp:3732
TuneType
TuneType
Tune Typea.
Definition: priv_aamp.h:190
StreamAbstractionAAMP_HLS::GetBufferedDuration
double GetBufferedDuration() override
Function to get the buffer duration of stream.
Definition: fragmentcollector_hls.cpp:5132
StreamAbstractionAAMP_HLS::SeekPosUpdate
void SeekPosUpdate(double secondsRelativeToTuneTime) override
Function to update seek position.
Definition: fragmentcollector_hls.cpp:7640
StreamAbstractionAAMP_HLS::StartInjection
void StartInjection(void) override
starts fragment injection
Definition: fragmentcollector_hls.cpp:6925
StreamAbstractionAAMP_HLS::Start
void Start() override
Function to start track initiaziation.
Definition: fragmentcollector_hls.cpp:5623
StreamAbstractionAAMP_HLS::GetStreamInfo
StreamInfo * GetStreamInfo(int idx) override
Get stream information of a profile from subclass.
Definition: fragmentcollector_hls.cpp:7740
AampLogManager
AampLogManager Class.
Definition: AampLogManager.h:150
StreamAbstractionAAMP_HLS::StartSubtitleParser
void StartSubtitleParser() override
Signal start of subtitle renderering - should be sent at start of video presentation.
Definition: fragmentcollector_hls.cpp:6018
MediaTrack
Base Class for Media Track.
Definition: StreamAbstractionAAMP.h:159
StreamAbstractionAAMP
StreamAbstraction class of AAMP.
Definition: StreamAbstractionAAMP.h:577
StreamAbstractionAAMP_HLS::GetStreamFormat
void GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxOutputFormat, StreamOutputFormat &subOutputFormat) override
Get output format of stream.
Definition: fragmentcollector_hls.cpp:5769
StreamAbstractionAAMP_HLS::Stop
void Stop(bool clearChannelData) override
Function to stop the HLS streaming Function to handle stop processing of all tracks within stream.
Definition: fragmentcollector_hls.cpp:5643
StreamAbstractionAAMP_HLS::DumpProfiles
void DumpProfiles(void) override
Function to log all debug information on Stream/Media information.
Definition: fragmentcollector_hls.cpp:5713
TrackType
TrackType
Media Track Types.
Definition: StreamAbstractionAAMP.h:48
StreamAbstractionAAMP_HLS::PauseSubtitleParser
void PauseSubtitleParser(bool pause) override
Set subtitle pause state.
Definition: fragmentcollector_hls.cpp:6032
eAAMPSTATUS_OK
@ eAAMPSTATUS_OK
Definition: priv_aamp.h:207
StreamAbstractionAAMP_HLS::SetThumbnailTrack
bool SetThumbnailTrack(int) override
Function to set thumbnail track for processing.
Definition: fragmentcollector_hls.cpp:5891
StreamAbstractionAAMP_HLS::GetBWIndex
int GetBWIndex(long bitrate) override
Function to get bandwidth index corresponding to bitrate.
Definition: fragmentcollector_hls.cpp:6342
StreamAbstractionAAMP_HLS::StreamAbstractionAAMP_HLS
StreamAbstractionAAMP_HLS(AampLogManager *logObj, class PrivateInstanceAAMP *aamp, double seekpos, float rate)
Constructor function.
Definition: fragmentcollector_hls.cpp:5405
PrivateInstanceAAMP
Class representing the AAMP player's private instance, which is not exposed to outside world.
Definition: priv_aamp.h:640
StreamAbstractionAAMP_HLS::GetAvailableThumbnailTracks
std::vector< StreamInfo * > GetAvailableThumbnailTracks(void) override
Function to get available thumbnail tracks.
Definition: fragmentcollector_hls.cpp:5827
StreamAbstractionAAMP_HLS::GetFirstPTS
double GetFirstPTS() override
Function to return first PTS.
Definition: fragmentcollector_hls.cpp:5104
AAMPStatusType
AAMPStatusType
AAMP Function return values.
Definition: priv_aamp.h:205
StreamAbstractionAAMP_HLS::StopInjection
void StopInjection(void) override
Function to stop fragment injection.
Definition: fragmentcollector_hls.cpp:6877
StreamAbstractionAAMP_HLS::GetVideoBitrates
std::vector< long > GetVideoBitrates(void) override
Get available video bitrates.
Definition: fragmentcollector_hls.cpp:5779
StreamAbstractionAAMP_HLS::GetAudioBitrates
std::vector< long > GetAudioBitrates(void) override
Function to get available audio bitrates.
Definition: fragmentcollector_hls.cpp:5801
StreamAbstractionAAMP_HLS::GetThumbnailRangeData
std::vector< ThumbnailData > GetThumbnailRangeData(double, double, std::string *, int *, int *, int *, int *) override
Function to fetch the thumbnail data.
Definition: fragmentcollector_hls.cpp:5939
StreamAbstractionAAMP_HLS::Is4KStream
virtual bool Is4KStream(int &height, long &bandwidth) override
Check whether stream is 4K stream or not.
Definition: fragmentcollector_hls.cpp:7069
StreamAbstractionAAMP_HLS::NotifyFirstVideoPTS
void NotifyFirstVideoPTS(unsigned long long pts, unsigned long timeScale) override
Function to notify first video pts value from tsprocessor/demux Kept public as its called from outsid...
Definition: fragmentcollector_hls.cpp:6009
StreamAbstractionAAMP_HLS::GetMediaTrack
MediaTrack * GetMediaTrack(TrackType type) override
Function to get Media information for track type.
Definition: fragmentcollector_hls.cpp:6131
StreamAbstractionAAMP_HLS::~StreamAbstractionAAMP_HLS
~StreamAbstractionAAMP_HLS()
Destructor function for StreamAbstractionAAMP_HLS.
Definition: fragmentcollector_hls.cpp:5576