Skip to content

Commit dc48a08

Browse files
authored
Merge pull request #432 from rdkcentral/topic/RDKEMW-6132-LPC
RDKEMW-6132 : Add LinearPlaybackControl json interface
2 parents ddae0f9 + 8747330 commit dc48a08

File tree

1 file changed

+267
-0
lines changed

1 file changed

+267
-0
lines changed
Lines changed: 267 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,267 @@
1+
{
2+
"$schema": "interface.schema.json",
3+
"jsonrpc": "2.0",
4+
"info": {
5+
"title": "Linear Playback Control API",
6+
"class": "LinearPlaybackControl",
7+
"description": "Linear Playback Control JSON-RPC interface"
8+
},
9+
"common": {
10+
"$ref": "../common.json"
11+
},
12+
"definitions": {
13+
"channel":{
14+
"type": "object",
15+
"properties": {
16+
"channel": {
17+
"description": "Channel address.",
18+
"type": "string",
19+
"example": "chan_select"
20+
}
21+
},
22+
"required": [
23+
"channel"
24+
]
25+
},
26+
"seek":{
27+
"type": "object",
28+
"properties": {
29+
"seekPosInSeconds": {
30+
"description": "TSB seek position offset from live in seconds. The value must be an unsigned integer. If the value exceeds the current TSB size, the seek position will be reduced accordingly.",
31+
"type": "number",
32+
"size": 64,
33+
"example": 0
34+
}
35+
},
36+
"required": [
37+
"seekPosInSeconds"
38+
]
39+
},
40+
"trickplay":{
41+
"type": "object",
42+
"properties": {
43+
"speed": {
44+
"description": "Trick play speed. The direction is defined by the sign of speed, where a negative value means rewind and positive value means fast forward.",
45+
"type": "number",
46+
"size": 16,
47+
"signed": true,
48+
"example": -4
49+
}
50+
},
51+
"required": [
52+
"speed"
53+
]
54+
},
55+
"status":{
56+
"type": "object",
57+
"properties": {
58+
"maxSizeInBytes": {
59+
"description": "Maximum TSB size in bytes.",
60+
"type": "number",
61+
"size": 64,
62+
"example": 0
63+
},
64+
"currentSizeInBytes": {
65+
"description": "Current TSB size in bytes.",
66+
"type": "number",
67+
"size": 64,
68+
"example": 0
69+
},
70+
"currentSizeInSeconds": {
71+
"description": "Current TSB size in seconds.",
72+
"type": "number",
73+
"size": 64,
74+
"example": 0
75+
},
76+
"seekPosInBytes": {
77+
"description": "Current TSB seek position offset from live in bytes. The value is an unsigned integer and cannot exceed the current TSB size in bytes.",
78+
"type": "number",
79+
"size": 64,
80+
"example": 0
81+
},
82+
"seekPosInSeconds": {
83+
"description": "Current TSB seek position offset from live in seconds. The value is an unsigned integer and cannot exceed the current TSB size in seconds.",
84+
"type": "number",
85+
"size": 64,
86+
"example": 0
87+
},
88+
"trickPlaySpeed": {
89+
"description": "Current trick play speed and direction. The direction is defined by the sign of speed, where a negative value means rewind and positive value means fast forward.",
90+
"type": "number",
91+
"size": 16,
92+
"signed": true,
93+
"example": -4
94+
},
95+
"streamSourceLost": {
96+
"description": "Boolean indicating if the buffer source is lost (true) as a result of e.g. network connectivity issues or not (false).",
97+
"type": "boolean",
98+
"example": false
99+
},
100+
"streamSourceLossCount": {
101+
"description": "Number of times the streaming is lost and the TSB stopped receiving data from the stream source, during a valid channel selected.",
102+
"type": "number",
103+
"size": 64,
104+
"example": 0
105+
}
106+
},
107+
"required": [
108+
"maxSizeInBytes",
109+
"currentSizeInBytes",
110+
"currentSizeInSeconds",
111+
"seekPosInBytes",
112+
"seekPosInSeconds",
113+
"trickPlaySpeed",
114+
"streamSourceLost",
115+
"streamSourceLossCount"
116+
]
117+
},
118+
"tracing":{
119+
"type": "object",
120+
"properties": {
121+
"tracing": {
122+
"description": "Tracing enable (true) / disable (false).",
123+
"type": "boolean",
124+
"example": true
125+
}
126+
}
127+
}
128+
},
129+
"properties": {
130+
"channel": {
131+
"summary": "Current channel",
132+
"readonly": false,
133+
"params": {
134+
"$ref": "#/definitions/channel"
135+
},
136+
"index": {
137+
"name": "muxId",
138+
"example": "0"
139+
},
140+
"errors": [
141+
{
142+
"description": "Bad JSON param data format.",
143+
"$ref": "#/common/errors/badrequest"
144+
},
145+
{
146+
"description": "Error reading file or parsing one or more values.",
147+
"$ref": "#/common/errors/readerror"
148+
},
149+
{
150+
"description": "Error writing to file.",
151+
"$ref": "#/common/errors/writeerror"
152+
}
153+
]
154+
},
155+
"seek": {
156+
"summary": "TSB seek position offset, from live position, in seconds.",
157+
"readonly": false,
158+
"params": {
159+
"$ref": "#/definitions/seek"
160+
},
161+
"index": {
162+
"name": "muxId",
163+
"example": "0"
164+
},
165+
"errors": [
166+
{
167+
"description": "Bad JSON param data format.",
168+
"$ref": "#/common/errors/badrequest"
169+
},
170+
{
171+
"description": "Error reading file or parsing one or more values.",
172+
"$ref": "#/common/errors/readerror"
173+
},
174+
{
175+
"description": "Error writing to file.",
176+
"$ref": "#/common/errors/writeerror"
177+
}
178+
]
179+
},
180+
"trickPlay": {
181+
"summary": "Trick play speed and direction.",
182+
"readonly": false,
183+
"params": {
184+
"$ref": "#/definitions/trickplay"
185+
},
186+
"index": {
187+
"name": "muxId",
188+
"example": "0"
189+
},
190+
"errors": [
191+
{
192+
"description": "Bad JSON param data format.",
193+
"$ref": "#/common/errors/badrequest"
194+
},
195+
{
196+
"description": "Error reading file or parsing one or more values.",
197+
"$ref": "#/common/errors/readerror"
198+
},
199+
{
200+
"description": "Error writing to file.",
201+
"$ref": "#/common/errors/writeerror"
202+
}
203+
]
204+
},
205+
"status": {
206+
"summary": "Current TSB status information containing buffer size, seek position and health status.",
207+
"readonly": true,
208+
"params": {
209+
"$ref": "#/definitions/status"
210+
},
211+
"index": {
212+
"name": "muxId",
213+
"example": "0"
214+
},
215+
"errors": [
216+
{
217+
"description": "Error reading file or parsing one or more values.",
218+
"$ref": "#/common/errors/readerror"
219+
}
220+
]
221+
},
222+
"tracing": {
223+
"summary": "Tracing enable/disable flag.",
224+
"readonly": false,
225+
"params": {
226+
"$ref": "#/definitions/tracing"
227+
},
228+
"errors": [
229+
{
230+
"description": "General failure.",
231+
"$ref": "#/common/errors/general"
232+
},
233+
{
234+
"description": "Bad JSON param data format.",
235+
"$ref": "#/common/errors/badrequest"
236+
}
237+
]
238+
}
239+
},
240+
"events": {
241+
"speedchanged": {
242+
"summary": "Indicates that the trick play speed has changed",
243+
"params": {
244+
"type": "object",
245+
"properties": {
246+
"speed": {
247+
"description": "New trick play speed. The direction is defined by the sign of speed, where a negative value means rewind and positive value means fast forward.",
248+
"type": "number",
249+
"size": 16,
250+
"signed": true,
251+
"example": -4
252+
},
253+
"muxId": {
254+
"description": "Stream muxId",
255+
"type": "number",
256+
"size": 8,
257+
"example": 0
258+
}
259+
},
260+
"required": [
261+
"speed",
262+
"muxId"
263+
]
264+
}
265+
}
266+
}
267+
}

0 commit comments

Comments
 (0)