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
54// Enum describing the types of tuner.
55enum TunerType {
56  TYPE_TUNER = 0;
57  TYPE_FILE = 1;
58  TYPE_NETWORK = 2;
59}
60
61// Enum describing the types of video stream.
62enum VideoStreamType {
63  // ISO/IEC 11172 Video (MPEG-1)
64  MPEG1 = 0x01;
65  // ISO/IEC 13818-2 (MPEG-2) Video
66  MPEG2 = 0x02;
67  // ISO/IEC 14496-2 (MPEG-4 H.263 based)
68  H263 = 0x10;
69  // ISO/IE 14496-10 (H.264 video)
70  H264 = 0x01b;
71  // ISO/IE 23008-2 (H.265 video)
72  H265 = 0x024;
73}
74
75// Enum describing the types of audio stream.
76enum AudioStreamType {
77  // ISO/IEC 11172 Audio (MPEG-1)
78  MPEG1AUDIO = 0x03;
79  // ISO/IEC 13818-3 Audio (MPEG-2)
80  MPEG2AUDIO = 0x04;
81  // ISO/IEC 13818-7 Audio with ADTS transport syntax
82  MPEG2AACAUDIO = 0x0f;
83  // ISO/IEC 14496-3 (MPEG-4 LOAS multi-format framed audio)
84  MPEG4LATMAACAUDIO = 0x11;
85  // Dolby Digital Audio (ATSC)
86  A52AC3AUDIO = 0x81;
87  // Dolby Digital Plus Audio (ATSC)ISO/IEC 14496-2Video (MPEG-1)
88  EAC3AUDIO = 0x87;
89}
90
91// Enum describing ATSC service types
92// See ATSC Code Points Registry.
93enum AtscServiceType {
94  SERVICE_TYPE_ATSC_RESERVED = 0x0;
95  SERVICE_TYPE_ANALOG_TELEVISION_CHANNELS = 0x1;
96  SERVICE_TYPE_ATSC_DIGITAL_TELEVISION = 0x2;
97  SERVICE_TYPE_ATSC_AUDIO = 0x3;
98  SERVICE_TYPE_ATSC_DATA_ONLY_SERVICE = 0x4;
99  SERVICE_TYPE_SOFTWARE_DOWNLOAD = 0x5;
100  SERVICE_TYPE_UNASSOCIATED_SMALL_SCREEN_SERVICE = 0x6;
101  SERVICE_TYPE_PARAMETERIZED_SERVICE = 0x7;
102  SERVICE_TYPE_ATSC_NRT_SERVICE = 0x8;
103  SERVICE_TYPE_EXTENDED_PARAMERTERIZED_SERVICE = 0x9;
104}
105