• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = 'proto2';
18
19package com.android.tv.tuner.data;
20
21option java_package = "com.android.tv.tuner.data";
22option java_outer_classname = "Channel";
23
24
25// AOSP_Comment_Out import "third_party/android/nanoproto/nano_descriptor.proto";
26
27import "track.proto";
28
29// Holds information about a channel used in the tuners.
30message TunerChannelProto {
31// AOSP_Comment_Out   option (proto2.nano.message_as_lite) = false;
32
33  optional TunerType type = 1;
34  optional string short_name = 2;
35  optional string long_name = 3;
36  optional int32 frequency = 4;
37  optional string modulation = 5;
38  optional string filepath = 6;
39  optional int32 program_number = 7;
40  optional int32 virtual_major = 8;
41  optional int32 virtual_minor = 9;
42  optional int64 channel_id = 10;
43  optional string description = 11;
44  optional int32 tsid = 12;
45  optional int32 video_pid = 13;
46  optional VideoStreamType video_stream_type = 14;
47  optional int32 pcr_pid = 15;
48  repeated AtscAudioTrack audio_tracks = 16;
49  repeated int32 audio_pids = 17;
50  repeated AudioStreamType audio_stream_types = 18;
51  optional int32 audio_track_index = 19;
52  repeated AtscCaptionTrack caption_tracks = 20;
53  optional bool has_caption_track = 21;
54  optional AtscServiceType service_type = 22 [default = SERVICE_TYPE_ATSC_DIGITAL_TELEVISION];
55  optional bool recording_prohibited = 23;
56  optional string video_format = 24;
57  /**
58   * The flag indicating whether this TV channel is locked or not.
59   * This is primarily used for alternative parental control to prevent unauthorized users from
60   * watching the current channel regardless of the content rating
61   * @see <a href="https://developer.android.com/reference/android/media/tv/TvContract.Channels.html#COLUMN_LOCKED">link</a>
62   */
63  optional bool locked = 25;
64}
65
66// Enum describing the types of tuner.
67enum TunerType {
68// AOSP_Comment_Out   option (proto2.nano.enum_as_lite) = false;
69
70  TYPE_TUNER = 0;
71  TYPE_FILE = 1;
72  TYPE_NETWORK = 2;
73}
74
75// Enum describing the types of video stream.
76enum VideoStreamType {
77// AOSP_Comment_Out   option (proto2.nano.enum_as_lite) = false;
78
79  // ISO/IEC 11172 Video (MPEG-1)
80  MPEG1 = 0x01;
81  // ISO/IEC 13818-2 (MPEG-2) Video
82  MPEG2 = 0x02;
83  // ISO/IEC 14496-2 (MPEG-4 H.263 based)
84  H263 = 0x10;
85  // ISO/IE 14496-10 (H.264 video)
86  H264 = 0x01b;
87  // ISO/IE 23008-2 (H.265 video)
88  H265 = 0x024;
89}
90
91// Enum describing the types of audio stream.
92enum AudioStreamType {
93// AOSP_Comment_Out   option (proto2.nano.enum_as_lite) = false;
94
95  // ISO/IEC 11172 Audio (MPEG-1)
96  MPEG1AUDIO = 0x03;
97  // ISO/IEC 13818-3 Audio (MPEG-2)
98  MPEG2AUDIO = 0x04;
99  // ISO/IEC 13818-7 Audio with ADTS transport syntax
100  MPEG2AACAUDIO = 0x0f;
101  // ISO/IEC 14496-3 (MPEG-4 LOAS multi-format framed audio)
102  MPEG4LATMAACAUDIO = 0x11;
103  // Dolby Digital Audio (ATSC)
104  A52AC3AUDIO = 0x81;
105  // Dolby Digital Plus Audio (ATSC)ISO/IEC 14496-2Video (MPEG-1)
106  EAC3AUDIO = 0x87;
107}
108
109// Enum describing ATSC service types
110// See ATSC Code Points Registry.
111enum AtscServiceType {
112// AOSP_Comment_Out   option (proto2.nano.enum_as_lite) = false;
113
114  SERVICE_TYPE_ATSC_RESERVED = 0x0;
115  SERVICE_TYPE_ANALOG_TELEVISION_CHANNELS = 0x1;
116  SERVICE_TYPE_ATSC_DIGITAL_TELEVISION = 0x2;
117  SERVICE_TYPE_ATSC_AUDIO = 0x3;
118  SERVICE_TYPE_ATSC_DATA_ONLY_SERVICE = 0x4;
119  SERVICE_TYPE_SOFTWARE_DOWNLOAD = 0x5;
120  SERVICE_TYPE_UNASSOCIATED_SMALL_SCREEN_SERVICE = 0x6;
121  SERVICE_TYPE_PARAMETERIZED_SERVICE = 0x7;
122  SERVICE_TYPE_ATSC_NRT_SERVICE = 0x8;
123  SERVICE_TYPE_EXTENDED_PARAMERTERIZED_SERVICE = 0x9;
124}
125