21
21
22
22
#include " Module.h"
23
23
24
- #define ITEXTTRACK_VERSION 2
24
+ #define ITEXTTRACK_VERSION 3
25
25
26
26
namespace WPEFramework {
27
27
namespace Exchange {
@@ -308,6 +308,7 @@ struct EXTERNAL ITextTrackClosedCaptionsStyle : virtual public Core::IUnknown {
308
308
309
309
/*
310
310
* This is the COM-RPC interface for global TTML style overrides.
311
+ * Added in version 2
311
312
*/
312
313
/* @json 1.0.0 @text:keep */
313
314
struct EXTERNAL ITextTrackTtmlStyle : virtual public Core::IUnknown {
@@ -358,7 +359,7 @@ struct EXTERNAL ITextTrackTtmlStyle : virtual public Core::IUnknown {
358
359
/*
359
360
This is the COM-RPC interface for handling TextTrack sessions.
360
361
*/
361
- /* @json 1.1 .0 @text:keep */
362
+ /* @json 1.3 .0 @text:keep */
362
363
struct EXTERNAL ITextTrack : virtual public Core::IUnknown {
363
364
enum {
364
365
ID = ID_TEXT_TRACK
@@ -374,9 +375,10 @@ struct EXTERNAL ITextTrack : virtual public Core::IUnknown {
374
375
// Sessions
375
376
/* *
376
377
* @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
380
382
* @param sessionId On success the returned session id
381
383
* @text openSession
382
384
*/
@@ -390,7 +392,7 @@ struct EXTERNAL ITextTrack : virtual public Core::IUnknown {
390
392
virtual Core::hresult CloseSession (const uint32_t sessionId) = 0;
391
393
/* *
392
394
* @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()
394
396
* @param sessionId Is the session to reset
395
397
* @text resetSession
396
398
*/
@@ -517,12 +519,30 @@ struct EXTERNAL ITextTrack : virtual public Core::IUnknown {
517
519
* overridden. For styling options, see https://www.w3.org/TR/2018/REC-ttml1-20181108/#styling-vocabulary-style
518
520
* The format of the styling string is "attr:value;attr:value;attr:value" (see vocabulary; NB: not all styling is supported)
519
521
* Styles not mentioned in the list will not be affected.
522
+ * Added in version 2
520
523
* @param sessionId Is the session as returned in the ITextTrack interface.
521
524
* @param style Contains the list of styles to be overridden
522
525
* @text applyCustomTtmlStyleOverridesToSession
523
526
*/
524
527
virtual Core::hresult ApplyCustomTtmlStyleOverridesToSession (const uint32_t sessionId, const string &style) { return Core::ERROR_NOT_SUPPORTED; }
525
528
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
+
526
546
};
527
547
} // namespace Exchange
528
548
} // namespace WPEFramework
0 commit comments