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