RDK Documentation (Open Sourced RDK Components)
TtmlSubtecParser.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 "
subtitleParser.h
"
23
#include "
isobmffbuffer.h
"
24
#include "SubtecChannel.hpp"
25
26
class
TtmlSubtecParser
:
public
SubtitleParser
27
{
28
public
:
29
TtmlSubtecParser
(
AampLogManager
*logObj,
PrivateInstanceAAMP
*aamp,
SubtitleMimeType
type);
30
31
TtmlSubtecParser
(
const
TtmlSubtecParser
&) =
delete
;
32
TtmlSubtecParser
& operator=(
const
TtmlSubtecParser
&) =
delete
;
33
34
35
bool
init(
double
startPosSeconds,
unsigned
long
long
basePTS);
36
bool
processData(
char
* buffer,
size_t
bufferLen,
double
position,
double
duration);
37
bool
close() {
return
true
; }
38
void
reset();
39
void
setProgressEventOffset(
double
offset) {}
40
void
updateTimestamp(
unsigned
long
long
positionMs);
41
void
pause(
bool
pause)
override
;
42
void
mute(
bool
mute)
override
;
43
44
void
isLinear(
bool
isLinear)
override
{ m_isLinear = isLinear; }
45
46
protected
:
47
std::unique_ptr<SubtecChannel> m_channel;
48
bool
m_isLinear =
false
;
49
bool
m_parsedFirstPacket =
false
;
50
bool
m_sentOffset =
false
;
51
double
m_firstBeginOffset = 0.0;
52
};
subtitleParser.h
This file provides interfaces for a subtitle parser in AAMP.
TtmlSubtecParser
Definition:
TtmlSubtecParser.hpp:26
AampLogManager
AampLogManager Class.
Definition:
AampLogManager.h:150
SubtitleMimeType
SubtitleMimeType
Subtitle data types.
Definition:
subtitleParser.h:37
isobmffbuffer.h
Header file for ISO Base Media File Format Buffer.
PrivateInstanceAAMP
Class representing the AAMP player's private instance, which is not exposed to outside world.
Definition:
priv_aamp.h:640
SubtitleParser
Subtitle parser class.
Definition:
subtitleParser.h:52
components
generic
aamp
subtec
subtecparser
TtmlSubtecParser.hpp
Generated on Thu Feb 9 2023 06:32:28 for RDK Documentation (Open Sourced RDK Components) by
1.8.17