• 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
24import "track.proto";
25
26// Holds information about a channel used in the tuners.
27message TunerChannelProto {
28  optional TunerType type = 1;
29  optional string short_name = 2;
30  optional string long_name = 3;
31  optional int32 frequency = 4;
32  optional string modulation = 5;
33  optional string filepath = 6;
34  optional int32 program_number = 7;
35  optional int32 virtual_major = 8;
36  optional int32 virtual_minor = 9;
37  optional int64 channel_id = 10;
38  optional string description = 11;
39  optional int32 tsid = 12;
40  optional int32 video_pid = 13;
41  optional VideoStreamType video_stream_type = 14;
42  optional int32 pcr_pid = 15;
43  repeated AtscAudioTrack audio_tracks = 16;
44  repeated int32 audio_pids = 17;
45  repeated AudioStreamType audio_stream_types = 18;
46  optional int32 audio_track_index = 19;
47  repeated AtscCaptionTrack caption_tracks = 20;
48  optional bool has_caption_track = 21;
49  optional AtscServiceType service_type = 22 [default = SERVICE_TYPE_ATSC_DIGITAL_TELEVISION];
50  optional bool recording_prohibited = 23;
51  optional string video_format = 24;
52  /**
53   * The flag indicating whether this TV channel is locked or not.
54   * This is primarily used for alternative parental control to prevent unauthorized users from
55   * watching the current channel regardless of the content rating
56   * @see <a href="https://developer.android.com/reference/android/media/tv/TvContract.Channels.html#COLUMN_LOCKED">link</a>
57   */
58  optional bool locked = 25;
59}
60
61// Enum describing the types of tuner.
62enum TunerType {
63  TYPE_TUNER = 0;
64  TYPE_FILE = 1;
65  TYPE_NETWORK = 2;
66}
67
68// Enum describing the types of video stream.
69enum VideoStreamType {
70  // ISO/IEC 11172 Video (MPEG-1)
71  MPEG1 = 0x01;
72  // ISO/IEC 13818-2 (MPEG-2) Video
73  MPEG2 = 0x02;
74  // ISO/IEC 14496-2 (MPEG-4 H.263 based)
75  H263 = 0x10;
76  // ISO/IE 14496-10 (H.264 video)
77  H264 = 0x01b;
78  // ISO/IE 23008-2 (H.265 video)
79  H265 = 0x024;
80}
81
82// Enum describing the types of audio stream.
83enum AudioStreamType {
84  // ISO/IEC 11172 Audio (MPEG-1)
85  MPEG1AUDIO = 0x03;
86  // ISO/IEC 13818-3 Audio (MPEG-2)
87  MPEG2AUDIO = 0x04;
88  // ISO/IEC 13818-7 Audio with ADTS transport syntax
89  MPEG2AACAUDIO = 0x0f;
90  // ISO/IEC 14496-3 (MPEG-4 LOAS multi-format framed audio)
91  MPEG4LATMAACAUDIO = 0x11;
92  // Dolby Digital Audio (ATSC)
93  A52AC3AUDIO = 0x81;
94  // Dolby Digital Plus Audio (ATSC)ISO/IEC 14496-2Video (MPEG-1)
95  EAC3AUDIO = 0x87;
96}
97
98// Enum describing ATSC service types
99// See ATSC Code Points Registry.
100enum AtscServiceType {
101  SERVICE_TYPE_ATSC_RESERVED = 0x0;
102  SERVICE_TYPE_ANALOG_TELEVISION_CHANNELS = 0x1;
103  SERVICE_TYPE_ATSC_DIGITAL_TELEVISION = 0x2;
104  SERVICE_TYPE_ATSC_AUDIO = 0x3;
105  SERVICE_TYPE_ATSC_DATA_ONLY_SERVICE = 0x4;
106  SERVICE_TYPE_SOFTWARE_DOWNLOAD = 0x5;
107  SERVICE_TYPE_UNASSOCIATED_SMALL_SCREEN_SERVICE = 0x6;
108  SERVICE_TYPE_PARAMETERIZED_SERVICE = 0x7;
109  SERVICE_TYPE_ATSC_NRT_SERVICE = 0x8;
110  SERVICE_TYPE_EXTENDED_PARAMERTERIZED_SERVICE = 0x9;
111}
112