Skip to content

Commit 409382d

Browse files
committed
docs(audiosink,videosink): define UNDEFINED and a valid decoder ID
gh #742 - state that Id.UNDEFINED means no decoder source is associated, that it may be passed to clear an existing association, and that a valid ID is one returned by the decoder manager. Matches the existing attachClock(IAVClock.Id.UNDEFINED) contract in the same interfaces.
1 parent 5f8fcf6 commit 409382d

4 files changed

Lines changed: 321 additions & 14 deletions

File tree

audiosink/current/com/rdk/hal/audiosink/IAudioSinkController.aidl

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,19 @@ interface IAudioSinkController {
6565
/**
6666
* Sets the audio decoder ID linked to this audio sink.
6767
*
68-
* When the audio sink is opened, the default is set to
69-
* `IAudioDecoder.Id.UNDEFINED`.
68+
* `IAudioDecoder.Id.UNDEFINED` means that no audio decoder source is
69+
* associated. It is the default when the audio sink is opened and may be
70+
* passed here to clear an existing association, equivalent in effect to
71+
* the state at `open()`.
7072
*
71-
* A valid audio decoder association is required before the pipeline is
72-
* started in both tunnelled and non-tunnelled modes.
73+
* A valid audio decoder ID is one returned by
74+
* `IAudioDecoderManager.getAudioDecoderIds()`. A valid association is
75+
* required before the pipeline is started in both tunnelled and
76+
* non-tunnelled modes.
7377
*
74-
* @param[in] audioDecoderId The ID of the audio decoder source.
78+
* @param[in] audioDecoderId The ID of the audio decoder source, or
79+
* `IAudioDecoder.Id.UNDEFINED` to clear
80+
* the association.
7581
*
7682
* @exception binder::Status::Exception::EX_NONE
7783
* Operation completed successfully.
@@ -81,9 +87,11 @@ interface IAudioSinkController {
8187
*
8288
* @returns boolean
8389
* @retval true
84-
* The audio decoder ID was set successfully.
90+
* The audio decoder ID was set, or the association was cleared with
91+
* `IAudioDecoder.Id.UNDEFINED`.
8592
* @retval false
86-
* Invalid audio decoder ID.
93+
* The ID is not one returned by
94+
* `IAudioDecoderManager.getAudioDecoderIds()`.
8795
*
8896
* @pre The resource must be in State::READY.
8997
*
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
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 2026 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+
/* Generated by kvcc from audiosink.kvc — vocabulary 1.0, schema 1.
21+
* Do not edit. Regenerate to change. */
22+
#ifndef KVC_AUDIO_SINK_VOCABULARY_H
23+
#define KVC_AUDIO_SINK_VOCABULARY_H
24+
25+
#include <stdint.h>
26+
27+
#define KVC_AUDIO_SINK_VOCABULARY "1.0"
28+
#define KVC_AUDIO_SINK_SCHEMA 1
29+
30+
/* Kind decides how a key may legitimately be read. */
31+
typedef enum {
32+
KVC_KIND_COUNTER = 0,
33+
KVC_KIND_CURRENT = 1,
34+
KVC_KIND_HIGH_WATER = 2,
35+
KVC_KIND_CONFIG = 3,
36+
KVC_KIND_ATTRIBUTE = 4, /* dimensions an occurrence */
37+
} KvcKind;
38+
39+
/* av.audio_sink — the element itself. */
40+
static const int64_t KVC_AUDIO_SINK_ELEMENT = 0x37836ba549d3c210;
41+
42+
/* av.audio_sink.underflowed — int64, episodes, counter, read. */
43+
static const int64_t KVC_AUDIO_SINK_UNDERFLOWED = 0x142f899619c8c4a9;
44+
/* av.audio_sink.underflow_duration_ms — int64, ms, counter, read. */
45+
static const int64_t KVC_AUDIO_SINK_UNDERFLOW_DURATION_MS = 0x4ce68288bc2f93b2;
46+
/* av.audio_sink.silence_duration_ms — int64, ms, counter, read. */
47+
static const int64_t KVC_AUDIO_SINK_SILENCE_DURATION_MS = 0x09fdcdf6715ef048;
48+
/* av.audio_sink.silence_event_count — int64, events, counter, read. */
49+
static const int64_t KVC_AUDIO_SINK_SILENCE_EVENT_COUNT = 0x357a57be2601412e;
50+
/* av.audio_sink.buffer_depth_ms — int64, ms, current, read. */
51+
static const int64_t KVC_AUDIO_SINK_BUFFER_DEPTH_MS = 0x1aea4fc8a27262b7;
52+
/* av.audio_sink.last_underflow_trigger — int64, none, current, read. */
53+
static const int64_t KVC_AUDIO_SINK_LAST_UNDERFLOW_TRIGGER = 0x40771a4a2b2ee087;
54+
/* av.audio_sink.last_underflow_duration_ms — int64, ms, current, read. */
55+
static const int64_t KVC_AUDIO_SINK_LAST_UNDERFLOW_DURATION_MS = 0x638f410fc657c525;
56+
/* av.audio_sink.last_silence_duration_ms — int64, ms, current, read. */
57+
static const int64_t KVC_AUDIO_SINK_LAST_SILENCE_DURATION_MS = 0x1cf88c9352312e83;
58+
/* av.audio_sink.silence_threshold_ms — int64, ms, config, read. */
59+
static const int64_t KVC_AUDIO_SINK_SILENCE_THRESHOLD_MS = 0x02c4359649749c70;
60+
61+
/* av.audio_sink.underflow — event. */
62+
static const int64_t KVC_AUDIO_SINK_EVENT_UNDERFLOW = 0x04bd3affe9b839b9;
63+
/* av.audio_sink.underflow_end — event. */
64+
static const int64_t KVC_AUDIO_SINK_EVENT_UNDERFLOW_END = 0x345a8515da6f3c17;
65+
/* av.audio_sink.silence — event. */
66+
static const int64_t KVC_AUDIO_SINK_EVENT_SILENCE = 0x2f6b025842e93317;
67+
/* av.audio_sink.silence_end — event. */
68+
static const int64_t KVC_AUDIO_SINK_EVENT_SILENCE_END = 0x7d6df873d14dbb94;
69+
70+
static const int64_t KVC_AUDIO_SINK_UNDERFLOW_TRIGGER = 0x09a5326ee175d8ec;
71+
static const int64_t KVC_AUDIO_SINK_UNDERFLOW_END_DURATION_MS = 0x6ca9e3e276c7ece3;
72+
static const int64_t KVC_AUDIO_SINK_SILENCE_ELAPSED_MS = 0x25e863e9bb2888c4;
73+
static const int64_t KVC_AUDIO_SINK_SILENCE_END_DURATION_MS = 0x0292d87cd65e7240;
74+
75+
/* Closed vocabulary of av.audio_sink.last_underflow_trigger.
76+
* Generated here and never into the interface: a member is a value the key
77+
* carries, so adding one must not be an interface change. */
78+
typedef enum {
79+
KVC_LAST_UNDERFLOW_TRIGGER_NONE = 0, /* No underflow episode has been recorded. */
80+
KVC_LAST_UNDERFLOW_TRIGGER_STARTUP_PREFILL = 1, /* The pipeline had not yet filled at the start of presentation. Expected. */
81+
KVC_LAST_UNDERFLOW_TRIGGER_MID_STREAM = 2, /* Starvation during steady-state playback, with no seek, trickplay or content boundary to explain it. This is the one that indicates a defect. */
82+
KVC_LAST_UNDERFLOW_TRIGGER_SEEK_RECOVERY = 3, /* The pipeline was refilling after a seek. Expected. */
83+
KVC_LAST_UNDERFLOW_TRIGGER_TRICKPLAY_RECOVERY = 4, /* The pipeline was refilling after a trickplay rate change. Expected. */
84+
KVC_LAST_UNDERFLOW_TRIGGER_CONTENT_BOUNDARY = 5, /* The stream crossed a discontinuity such as a period or advert boundary. Expected. */
85+
} KvcLastUnderflowTrigger;
86+
87+
/* Closed vocabulary of av.audio_sink.underflow_trigger.
88+
* Generated here and never into the interface: a member is a value the key
89+
* carries, so adding one must not be an interface change. */
90+
typedef enum {
91+
KVC_UNDERFLOW_TRIGGER_NONE = 0, /* No cause was determined. */
92+
KVC_UNDERFLOW_TRIGGER_STARTUP_PREFILL = 1, /* The pipeline had not yet filled. Expected. */
93+
KVC_UNDERFLOW_TRIGGER_MID_STREAM = 2, /* Starvation during steady-state playback with nothing to explain it. Indicates a defect. */
94+
KVC_UNDERFLOW_TRIGGER_SEEK_RECOVERY = 3, /* The pipeline was refilling after a seek. Expected. */
95+
KVC_UNDERFLOW_TRIGGER_TRICKPLAY_RECOVERY = 4, /* The pipeline was refilling after a trickplay rate change. Expected. */
96+
KVC_UNDERFLOW_TRIGGER_CONTENT_BOUNDARY = 5, /* The stream crossed a discontinuity such as a period or advert boundary. Expected. */
97+
} KvcUnderflowTrigger;
98+
99+
/* Every key in this vocabulary, so an identifier seen in a log or a
100+
* diagnostic can be resolved back to the name it came from. */
101+
typedef struct {
102+
int64_t id;
103+
const char *name;
104+
const char *unit;
105+
KvcKind kind;
106+
} KvcKeyDescriptor;
107+
108+
static const KvcKeyDescriptor KVC_AUDIO_SINK_KEYS[] = {
109+
{ 0x142f899619c8c4a9, "av.audio_sink.underflowed", "episodes", KVC_KIND_COUNTER },
110+
{ 0x4ce68288bc2f93b2, "av.audio_sink.underflow_duration_ms", "ms", KVC_KIND_COUNTER },
111+
{ 0x09fdcdf6715ef048, "av.audio_sink.silence_duration_ms", "ms", KVC_KIND_COUNTER },
112+
{ 0x357a57be2601412e, "av.audio_sink.silence_event_count", "events", KVC_KIND_COUNTER },
113+
{ 0x1aea4fc8a27262b7, "av.audio_sink.buffer_depth_ms", "ms", KVC_KIND_CURRENT },
114+
{ 0x40771a4a2b2ee087, "av.audio_sink.last_underflow_trigger", "none", KVC_KIND_CURRENT },
115+
{ 0x638f410fc657c525, "av.audio_sink.last_underflow_duration_ms", "ms", KVC_KIND_CURRENT },
116+
{ 0x1cf88c9352312e83, "av.audio_sink.last_silence_duration_ms", "ms", KVC_KIND_CURRENT },
117+
{ 0x02c4359649749c70, "av.audio_sink.silence_threshold_ms", "ms", KVC_KIND_CONFIG },
118+
{ 0x09a5326ee175d8ec, "av.audio_sink.underflow.trigger", "none", KVC_KIND_ATTRIBUTE },
119+
{ 0x6ca9e3e276c7ece3, "av.audio_sink.underflow_end.duration_ms", "ms", KVC_KIND_CURRENT },
120+
{ 0x25e863e9bb2888c4, "av.audio_sink.silence.elapsed_ms", "ms", KVC_KIND_CURRENT },
121+
{ 0x0292d87cd65e7240, "av.audio_sink.silence_end.duration_ms", "ms", KVC_KIND_CURRENT },
122+
};
123+
#define KVC_AUDIO_SINK_KEY_COUNT 13
124+
125+
#endif /* KVC_AUDIO_SINK_VOCABULARY_H */

videosink/current/com/rdk/hal/videosink/IVideoSinkController.aidl

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,19 @@ interface IVideoSinkController
8282
/**
8383
* Sets the Video Decoder ID linked to this Video Sink.
8484
*
85-
* When the Video Sink is opened, the default is set to
86-
* `IVideoDecoder.Id.UNDEFINED`.
85+
* `IVideoDecoder.Id.UNDEFINED` means that no Video Decoder source is
86+
* associated. It is the default when the Video Sink is opened and may be
87+
* passed here to clear an existing association, equivalent in effect to
88+
* the state at `open()`.
8789
*
88-
* A valid Video Decoder association is required before the pipeline is
89-
* started in both tunnelled and non-tunnelled modes.
90+
* A valid Video Decoder ID is one returned by
91+
* `IVideoDecoderManager.getVideoDecoderIds()`. A valid association is
92+
* required before the pipeline is started in both tunnelled and
93+
* non-tunnelled modes.
9094
*
9195
* @param[in] videoDecoderId
92-
* The ID of the Video Decoder source.
96+
* The ID of the Video Decoder source, or `IVideoDecoder.Id.UNDEFINED`
97+
* to clear the association.
9398
*
9499
* @exception binder::Status::Exception::EX_NONE
95100
* Operation completed successfully.
@@ -99,10 +104,12 @@ interface IVideoSinkController
99104
*
100105
* @returns boolean
101106
* @retval true
102-
* The Video Decoder ID was set successfully.
107+
* The Video Decoder ID was set, or the association was cleared with
108+
* `IVideoDecoder.Id.UNDEFINED`.
103109
*
104110
* @retval false
105-
* Invalid Video Decoder ID.
111+
* The ID is not one returned by
112+
* `IVideoDecoderManager.getVideoDecoderIds()`.
106113
*
107114
* @pre The resource must be in State::READY.
108115
*

0 commit comments

Comments
 (0)