Skip to content

Commit 74b1283

Browse files
Merge pull request #441 from rdkcentral/feature/rdkemw-6446
RDKEMW-6742: Add CC HAL support to ITextTrack
2 parents 8fba2bd + 88e9692 commit 74b1283

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

apis/TextTrack/ITextTrack.h

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#include "Module.h"
2323

24-
#define ITEXTTRACK_VERSION 2
24+
#define ITEXTTRACK_VERSION 3
2525

2626
namespace WPEFramework {
2727
namespace Exchange {
@@ -308,6 +308,7 @@ struct EXTERNAL ITextTrackClosedCaptionsStyle : virtual public Core::IUnknown {
308308

309309
/*
310310
* This is the COM-RPC interface for global TTML style overrides.
311+
* Added in version 2
311312
*/
312313
/* @json 1.0.0 @text:keep */
313314
struct EXTERNAL ITextTrackTtmlStyle : virtual public Core::IUnknown {
@@ -358,7 +359,7 @@ struct EXTERNAL ITextTrackTtmlStyle : virtual public Core::IUnknown {
358359
/*
359360
This is the COM-RPC interface for handling TextTrack sessions.
360361
*/
361-
/* @json 1.1.0 @text:keep */
362+
/* @json 1.3.0 @text:keep */
362363
struct EXTERNAL ITextTrack : virtual public Core::IUnknown {
363364
enum {
364365
ID = ID_TEXT_TRACK
@@ -374,9 +375,10 @@ struct EXTERNAL ITextTrack : virtual public Core::IUnknown {
374375
// Sessions
375376
/**
376377
* @brief Opens a new renderSession.
377-
* @details If a session is already running on the supplied the supplied displayHandle already has a running session, the sessionId for this session is
378-
* returned
379-
* @param displayHandle The displayHandle is an encoding of the wayland display name optionally including the and window ID
378+
* @details If a session is already running on the supplied displayHandle, the sessionId for this session is
379+
* returned. If the session is instead newly opened, the session type is not set and display is muted. Use one
380+
* of the "selection" functions to select a session type, and UnMuteSession() to get subtitles displayed.
381+
* @param displayHandle is an encoding of the wayland display name
380382
* @param sessionId On success the returned session id
381383
* @text openSession
382384
*/
@@ -390,7 +392,7 @@ struct EXTERNAL ITextTrack : virtual public Core::IUnknown {
390392
virtual Core::hresult CloseSession(const uint32_t sessionId) = 0;
391393
/**
392394
* @brief Resets a previously opened render session back to its opened state.
393-
* @details The text render display is cleared by the render session.
395+
* @details The state will be like after calling OpenSession()
394396
* @param sessionId Is the session to reset
395397
* @text resetSession
396398
*/
@@ -517,12 +519,30 @@ struct EXTERNAL ITextTrack : virtual public Core::IUnknown {
517519
* overridden. For styling options, see https://www.w3.org/TR/2018/REC-ttml1-20181108/#styling-vocabulary-style
518520
* The format of the styling string is "attr:value;attr:value;attr:value" (see vocabulary; NB: not all styling is supported)
519521
* Styles not mentioned in the list will not be affected.
522+
* Added in version 2
520523
* @param sessionId Is the session as returned in the ITextTrack interface.
521524
* @param style Contains the list of styles to be overridden
522525
* @text applyCustomTtmlStyleOverridesToSession
523526
*/
524527
virtual Core::hresult ApplyCustomTtmlStyleOverridesToSession(const uint32_t sessionId, const string &style) { return Core::ERROR_NOT_SUPPORTED; }
525528

529+
/**
530+
* @brief Associate a video decoder with the given session
531+
* @details This will ask TextTrack to subscribe to Closed Captions data from the decoder and display
532+
* these in the given session. Depending on the support on the platform, this may not be possible to do.
533+
* The assocation is active until CloseSession() or ResetSession() is called, and can also be
534+
* cancelled by calling AssociateVideoDecoder() with an empty string for handle.
535+
* After associating the video decoder, further calls to SendSessionData will be ignored.
536+
* Added in version 3
537+
* @param sessionId is the session
538+
* @param handle is a textual representation of the video decoder handle
539+
* @text associateVideoDecoder
540+
* @returns ERROR_NOT_SUPPORTED if the function is not implemented
541+
* @returns ERROR_GENERAL if the association failed (whether bad handle is used or lack of support on the platform).
542+
* @returns ERROR_OK on success
543+
*/
544+
virtual Core::hresult AssociateVideoDecoder(const uint32_t sessionId, const string &handle) { return Core::ERROR_NOT_SUPPORTED; }
545+
526546
};
527547
} // namespace Exchange
528548
} // namespace WPEFramework

0 commit comments

Comments
 (0)