Skip to content

Service

dave-p edited this page Jun 30, 2019 · 12 revisions

service/mapper/load

Lists the descriptions, options, current values and defaults of the GUI screen Configuration -> DVB Inputs -> Services. -> Map Services.

Further API functions for manipulating DVB services are in the MPEGts section.

service/mapper/save

Untested. Set the Service Mapper options.

  • node Unknown, possibly the value of class.

service/mapper/stop

Stops a running service mapper operation.

service/mapper/status

Provides the same output as Status -> Service Mapper in the TVH GUI.

{
   "ignore" : 0,
   "ok" : 0,
   "fail" : 0,
   "total" : 0
}

service/list

Lists available services.

  • enum If set to 1 (as an integer without quotes) a short-form list is output containing each service's uuid and name. If set to 0 (the default) a verbose list is generated.
  • list If enum is not 1 this parameter selects which items in the params array are to be output, based on the value of the 'id' field. Multiple entries can be selected, separated by commas, colons or semicolons. A '-' in front of an entry deselects that item (and implicitly selects all others).
curl http://192.168.0.1:9981/api/service/list?enum=1 | jq
{
  "entries": [
    {
      "key": "0172dacd8860f567057a3a2a4ae5533b",
      "val": "Sandy/522MHz/BBC Radio London"
    },
    {
      "key": "01badd8ba1b947976237a5310ad46c75",
      "val": "Sandy/746MHz/5USA+1"
    }, ...
  ]
}
{
curl http://192.168.0.1:9981/api/service/list?list=enabled,encrypted | jq
  "entries": [
    {
      "uuid": "0164730e0123a4c0f387aa3846d45f85",
      "id": "0164730e0123a4c0f387aa3846d45f85",
      "text": "Sandy/522MHz/BBC Radio London",
      "caption": "DVB Inputs - Services",
      "class": "mpegts_service",
      "event": "service",
      "params": [
        {
          "id": "enabled",
          "type": "bool",
          "caption": "Enabled",
          "description": "Enable/Disable service.",
          "default": false,
          "value": false
        },
        {
          "id": "encrypted",
          "type": "bool",
          "caption": "Encrypted",
          "description": "The service's encryption status.",
          "default": false,
          "rdonly": true,
          "nosave": true,
          "value": false
        }
      ]
    }, ...
  ]
}

service/streams

Lists the streams comprising the service.

  • uuid uuid of the service. This parameter is mandatory; it is not possible to list all services.
{
   "streams" : [
      {
         "pid" : 1101,
         "type" : "PCR"
      },
      {
         "pid" : 1100,
         "type" : "PMT"
      },
      {
         "aspect_num" : 0,
         "index" : 1,
         "pid" : 1101,
         "type" : "MPEG2VIDEO",
         "aspect_den" : 0,
         "width" : 0,
         "language" : "",
         "height" : 0,
         "duration" : 0
      },
      {
         "audio_type" : 0,
         "type" : "MPEG2AUDIO",
         "audio_version" : 2,
         "language" : "eng",
         "index" : 2,
         "pid" : 1102
      },
      {
         "language" : "eng",
         "audio_version" : 2,
         "index" : 3,
         "pid" : 1103,
         "type" : "MPEG2AUDIO",
         "audio_type" : 3
      },
      {
         "index" : 4,
         "language" : "eng",
         "pid" : 1131,
         "ancillary_id" : 2,
         "type" : "DVBSUB",
         "composition_id" : 2
      }
   ],
   "name" : "Sandy/498MHz/Channel 4",
   "fstreams" : [
      {
         "pid" : 1101,
         "index" : 1,
         "aspect_num" : 0,
         "width" : 0,
         "aspect_den" : 0,
         "type" : "MPEG2VIDEO",
         "height" : 0,
         "language" : "",
         "duration" : 0
      },
      {
         "audio_type" : 0,
         "type" : "MPEG2AUDIO",
         "language" : "eng",
         "audio_version" : 2,
         "index" : 2,
         "pid" : 1102
      },
      {
         "type" : "MPEG2AUDIO",
         "audio_type" : 3,
         "pid" : 1103,
         "audio_version" : 2,
         "language" : "eng",
         "index" : 3
      },
      {
         "language" : "eng",
         "pid" : 1131,
         "index" : 4,
         "ancillary_id" : 2,
         "type" : "DVBSUB",
         "composition_id" : 2
      }
   ]
}

service/removeunseen

Remove services which have not been seen recently. This call carries out the same action as Configuration -> DVB Inputs -> Services -> Maintenance in the TVH GUI.

  • days The number of unseen days before deletion. The default is 7 days, the minimum is 5 days.
  • type If set to pat the action is the same as "Remove unseen services (PAT/SDT)" in the GUI. Otherwise the action is the same as "Remove all unseen services".

An empty JSON object is always returned.

Clone this wiki locally