#include <DVDSubtitlesLibass.h>
|
| CDVDSubtitlesLibass () |
|
| ~CDVDSubtitlesLibass () |
|
void | Configure () |
| Configure libass. This method groups any configurations that might change throughout the lifecycle of libass (e.g. fonts)
|
|
ASS_Image * | RenderImage (double pts, KODI::SUBTITLES::STYLE::renderOpts opts, bool updateStyle, const std::shared_ptr< struct KODI::SUBTITLES::STYLE::style > &subStyle, int *changes=NULL) |
|
ASS_Event * | GetEvents () |
|
int | GetNrOfEvents () const |
| Get the number of events (subtitle entries) in the ASS track.
|
|
bool | DecodeHeader (char *data, int size) |
| Decode Header of ASS/SSA, needed to properly decode demux packets with DecodeDemuxPkt.
|
|
bool | DecodeDemuxPkt (const char *data, int size, double start, double duration) |
| Decode ASS/SSA demux packet (depends from DecodeHeader)
|
|
bool | CreateTrack (char *buf, size_t size) |
| Create a new ASS track based on an SSA buffer.
|
|
void | FlushEvents () |
| Flush buffered events.
|
|
int | GetPlayResY () |
| Get PlayResY value.
|
|
◆ CDVDSubtitlesLibass()
CDVDSubtitlesLibass::CDVDSubtitlesLibass |
( |
| ) |
|
◆ ~CDVDSubtitlesLibass()
CDVDSubtitlesLibass::~CDVDSubtitlesLibass |
( |
| ) |
|
◆ AddEvent() [1/2]
int CDVDSubtitlesLibass::AddEvent |
( |
const char * | text, |
|
|
double | startTime, |
|
|
double | stopTime ) |
|
protected |
Add an ASS event to show a subtitle on a specified time.
- Parameters
-
text | The subtitle text |
startTime | The PTS start time of the Event |
stopTime | The PTS stop time of the Event |
- Returns
- Return the Event ID, otherwise ASS_NO_ID if fails
◆ AddEvent() [2/2]
Add an ASS event to show a subtitle on a specified time.
- Parameters
-
text | The subtitle text |
startTime | The PTS start time of the Event |
stopTime | The PTS stop time of the Event |
opts | Subtitle options |
- Returns
- Return the Event ID, otherwise ASS_NO_ID if fails
◆ AppendTextToEvent()
void CDVDSubtitlesLibass::AppendTextToEvent |
( |
int | eventId, |
|
|
const char * | text ) |
|
protected |
Append text to the specified event.
◆ ChangeEventStopTime()
void CDVDSubtitlesLibass::ChangeEventStopTime |
( |
int | eventId, |
|
|
double | stopTime ) |
|
protected |
Change the stop time of an Event with the specified time.
- Parameters
-
eventId | The ASS Event ID |
stopTime | The PTS stop time |
◆ Configure()
void CDVDSubtitlesLibass::Configure |
( |
| ) |
|
Configure libass. This method groups any configurations that might change throughout the lifecycle of libass (e.g. fonts)
◆ CreateStyle()
bool CDVDSubtitlesLibass::CreateStyle |
( |
| ) |
|
|
protected |
Create a new empty ASS style.
- Returns
- True if success, false if error
◆ CreateTrack() [1/2]
bool CDVDSubtitlesLibass::CreateTrack |
( |
| ) |
|
|
protected |
Create a new empty ASS track.
- Returns
- True if success, false if error
◆ CreateTrack() [2/2]
bool CDVDSubtitlesLibass::CreateTrack |
( |
char * | buf, |
|
|
size_t | size ) |
Create a new ASS track based on an SSA buffer.
- Returns
- True if success, false if error
◆ DecodeDemuxPkt()
bool CDVDSubtitlesLibass::DecodeDemuxPkt |
( |
const char * | data, |
|
|
int | size, |
|
|
double | start, |
|
|
double | duration ) |
Decode ASS/SSA demux packet (depends from DecodeHeader)
- Returns
- True if success, false if error
- Bug
- libass isn't const correct
◆ DecodeHeader()
bool CDVDSubtitlesLibass::DecodeHeader |
( |
char * | data, |
|
|
int | size ) |
Decode Header of ASS/SSA, needed to properly decode demux packets with DecodeDemuxPkt.
- Returns
- True if success, false if error
◆ DeleteEvents()
int CDVDSubtitlesLibass::DeleteEvents |
( |
int | nEvents, |
|
|
int | threshold ) |
|
protected |
Delete old events only if the total number of events reaches the threshold.
- Parameters
-
nEvents | The number of events to delete |
threshold | Start deleting only when the number of events is reached |
- Returns
- The updated ID of the last Event, otherwise ASS_NO_ID if error or no events
◆ FlushEvents()
void CDVDSubtitlesLibass::FlushEvents |
( |
| ) |
|
◆ GetEvents()
ASS_Event * CDVDSubtitlesLibass::GetEvents |
( |
| ) |
|
◆ GetNrOfEvents()
int CDVDSubtitlesLibass::GetNrOfEvents |
( |
| ) |
const |
Get the number of events (subtitle entries) in the ASS track.
- Returns
- The number of events in the ASS track
◆ GetPlayResY()
int CDVDSubtitlesLibass::GetPlayResY |
( |
| ) |
|
Get PlayResY value.
- Returns
- The PlayResY value of current track
◆ RenderImage()
◆ SetSubtitleType()
Specify whether the subtitles are native (loaded from ASS/SSA file or stream) or adapted (converted from other types e.g. SubRip)
◆ CSubtitlesAdapter
The documentation for this class was generated from the following files: