aboutsummaryrefslogtreecommitdiff
path: root/tuner/proto/channel.proto
blob: 1f9945223b2babbd83432eb235ec09411a185bc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/*
 * Copyright (C) 2015 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

syntax = 'proto2';

package com.android.tv.tuner.data;

option java_package = "com.android.tv.tuner.data";
option java_outer_classname = "Channel";

import "track.proto";

// Holds information about a channel used in the tuners.
message TunerChannelProto {
  optional TunerType type = 1;
  optional string short_name = 2;
  optional string long_name = 3;
  optional int32 frequency = 4;
  optional string modulation = 5;
  optional string filepath = 6;
  optional int32 program_number = 7;
  optional int32 virtual_major = 8;
  optional int32 virtual_minor = 9;
  optional int64 channel_id = 10;
  optional string description = 11;
  optional int32 tsid = 12;
  optional int32 video_pid = 13;
  optional VideoStreamType video_stream_type = 14;
  optional int32 pcr_pid = 15;
  repeated AtscAudioTrack audio_tracks = 16;
  repeated int32 audio_pids = 17;
  repeated AudioStreamType audio_stream_types = 18;
  optional int32 audio_track_index = 19;
  repeated AtscCaptionTrack caption_tracks = 20;
  optional bool has_caption_track = 21;
  optional AtscServiceType service_type = 22 [default = SERVICE_TYPE_ATSC_DIGITAL_TELEVISION];
  optional bool recording_prohibited = 23;
  optional string video_format = 24;
  /**
   * The flag indicating whether this TV channel is locked or not.
   * This is primarily used for alternative parental control to prevent unauthorized users from
   * watching the current channel regardless of the content rating
   * @see <a href="https://developer.android.com/reference/android/media/tv/TvContract.Channels.html#COLUMN_LOCKED">link</a>
   */
  optional bool locked = 25;
}

// Enum describing the types of tuner.
enum TunerType {
  TYPE_TUNER = 0;
  TYPE_FILE = 1;
  TYPE_NETWORK = 2;
}

// Enum describing the types of video stream.
enum VideoStreamType {
  // ISO/IEC 11172 Video (MPEG-1)
  MPEG1 = 0x01;
  // ISO/IEC 13818-2 (MPEG-2) Video
  MPEG2 = 0x02;
  // ISO/IEC 14496-2 (MPEG-4 H.263 based)
  H263 = 0x10;
  // ISO/IE 14496-10 (H.264 video)
  H264 = 0x01b;
  // ISO/IE 23008-2 (H.265 video)
  H265 = 0x024;
}

// Enum describing the types of audio stream.
enum AudioStreamType {
  // ISO/IEC 11172 Audio (MPEG-1)
  MPEG1AUDIO = 0x03;
  // ISO/IEC 13818-3 Audio (MPEG-2)
  MPEG2AUDIO = 0x04;
  // ISO/IEC 13818-7 Audio with ADTS transport syntax
  MPEG2AACAUDIO = 0x0f;
  // ISO/IEC 14496-3 (MPEG-4 LOAS multi-format framed audio)
  MPEG4LATMAACAUDIO = 0x11;
  // Dolby Digital Audio (ATSC)
  A52AC3AUDIO = 0x81;
  // Dolby Digital Plus Audio (ATSC)ISO/IEC 14496-2Video (MPEG-1)
  EAC3AUDIO = 0x87;
}

// Enum describing ATSC service types
// See ATSC Code Points Registry.
enum AtscServiceType {
  SERVICE_TYPE_ATSC_RESERVED = 0x0;
  SERVICE_TYPE_ANALOG_TELEVISION_CHANNELS = 0x1;
  SERVICE_TYPE_ATSC_DIGITAL_TELEVISION = 0x2;
  SERVICE_TYPE_ATSC_AUDIO = 0x3;
  SERVICE_TYPE_ATSC_DATA_ONLY_SERVICE = 0x4;
  SERVICE_TYPE_SOFTWARE_DOWNLOAD = 0x5;
  SERVICE_TYPE_UNASSOCIATED_SMALL_SCREEN_SERVICE = 0x6;
  SERVICE_TYPE_PARAMETERIZED_SERVICE = 0x7;
  SERVICE_TYPE_ATSC_NRT_SERVICE = 0x8;
  SERVICE_TYPE_EXTENDED_PARAMERTERIZED_SERVICE = 0x9;
}