RDK Documentation (Open Sourced RDK Components)
WebvttSubtecDevParser.hpp
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 2020 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 #pragma once
21 
22 #include "webvttParser.h"
23 #include "vttCue.h"
24 #include "SubtecChannel.hpp"
25 
27 {
28 public:
30 
32  WebVTTSubtecDevParser& operator=(const WebVTTSubtecDevParser&) = delete;
33 
34  bool init(double startPosSeconds, unsigned long long basePTS) override;
35  bool processData(char* buffer, size_t bufferLen, double position, double duration) override;
36  void reset() override;
37  void sendCueData() override;
38  void setProgressEventOffset(double offset) override {}
39  void updateTimestamp(unsigned long long positionMs) override;
40  void pause(bool pause) override;
41  void mute(bool mute) override;
42 protected:
43  std::unique_ptr<SubtecChannel> m_channel;
44 private:
45  std::string getVttAsTtml();
46 };
vttCue.h
Provides data structure to hold a WebVTT cue data.
webvttParser.h
WebVTT parser implementation for AAMP.
AampLogManager
AampLogManager Class.
Definition: AampLogManager.h:150
WebVTTSubtecDevParser
Definition: WebvttSubtecDevParser.hpp:26
SubtitleMimeType
SubtitleMimeType
Subtitle data types.
Definition: subtitleParser.h:37
PrivateInstanceAAMP
Class representing the AAMP player's private instance, which is not exposed to outside world.
Definition: priv_aamp.h:640
WebVTTParser
WebVTT parser class.
Definition: webvttParser.h:56