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 21import "track.proto"; 22 23option java_package = "com.android.tv.tuner.data"; 24option java_outer_classname = "Channel"; 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 50 [default = SERVICE_TYPE_ATSC_DIGITAL_TELEVISION]; 51 optional bool recording_prohibited = 23; 52 optional string video_format = 24; 53 /** 54 * The flag indicating whether this TV channel is locked or not. 55 * This is primarily used for alternative parental control to prevent 56 * unauthorized users from watching the current channel regardless of the 57 * content rating 58 * @see <a 59 * href="https://developer.android.com/reference/android/media/tv/TvContract.Channels.html#COLUMN_LOCKED">link</a> 60 */ 61 optional bool locked = 25; 62 optional DeliverySystemType delivery_system_type = 26; 63} 64 65// Enum describing the types of tuner. 66enum TunerType { 67 TYPE_TUNER = 0; 68 TYPE_FILE = 1; 69 TYPE_NETWORK = 2; 70} 71 72// Enum describing the types of video stream. 73enum VideoStreamType { 74 // Default unset value. The spec says 0 is reserved. 75 UNSET = 0x00; 76 // DEPRECATED: previously used as default or unset value 77 INVALID_STREAMTYPE = -1 [deprecated=true]; 78 // ISO/IEC 11172 Video (MPEG-1) 79 MPEG1 = 0x01; 80 // ISO/IEC 13818-2 (MPEG-2) Video 81 MPEG2 = 0x02; 82 // ISO/IEC 14496-2 (MPEG-4 H.263 based) 83 H263 = 0x10; 84 // ISO/IE 14496-10 (H.264 video) 85 H264 = 0x01b; 86 // ISO/IE 23008-2 (H.265 video) 87 H265 = 0x024; 88} 89 90// Enum describing the types of audio stream. 91enum AudioStreamType { 92 // ISO/IEC 11172 Audio (MPEG-1) 93 MPEG1AUDIO = 0x03; 94 // ISO/IEC 13818-3 Audio (MPEG-2) 95 MPEG2AUDIO = 0x04; 96 // ISO/IEC 13818-7 Audio with ADTS transport syntax 97 MPEG2AACAUDIO = 0x0f; 98 // ISO/IEC 14496-3 (MPEG-4 LOAS multi-format framed audio) 99 MPEG4LATMAACAUDIO = 0x11; 100 // Dolby Digital Audio (ATSC) 101 A52AC3AUDIO = 0x81; 102 // Dolby Digital Plus Audio (ATSC)ISO/IEC 14496-2Video (MPEG-1) 103 EAC3AUDIO = 0x87; 104} 105 106// Enum describing ATSC service types 107// See ATSC Code Points Registry. 108enum AtscServiceType { 109 SERVICE_TYPE_ATSC_RESERVED = 0x0; 110 SERVICE_TYPE_ANALOG_TELEVISION_CHANNELS = 0x1; 111 SERVICE_TYPE_ATSC_DIGITAL_TELEVISION = 0x2; 112 SERVICE_TYPE_ATSC_AUDIO = 0x3; 113 SERVICE_TYPE_ATSC_DATA_ONLY_SERVICE = 0x4; 114 SERVICE_TYPE_SOFTWARE_DOWNLOAD = 0x5; 115 SERVICE_TYPE_UNASSOCIATED_SMALL_SCREEN_SERVICE = 0x6; 116 SERVICE_TYPE_PARAMETERIZED_SERVICE = 0x7; 117 SERVICE_TYPE_ATSC_NRT_SERVICE = 0x8; 118 SERVICE_TYPE_EXTENDED_PARAMERTERIZED_SERVICE = 0x9; 119} 120 121// Enum describing the types of delivery system. 122enum DeliverySystemType { 123 // Do not reorder. Must match Tuner.java 124 DELIVERY_SYSTEM_UNDEFINED = 0; 125 DELIVERY_SYSTEM_ATSC = 1; 126 DELIVERY_SYSTEM_DVBC = 2; 127 DELIVERY_SYSTEM_DVBS = 3; 128 DELIVERY_SYSTEM_DVBS2 = 4; 129 DELIVERY_SYSTEM_DVBT = 5; 130 DELIVERY_SYSTEM_DVBT2 = 6; 131} 132