diff options
Diffstat (limited to 'tuner/proto/channel.proto')
-rw-r--r-- | tuner/proto/channel.proto | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/tuner/proto/channel.proto b/tuner/proto/channel.proto new file mode 100644 index 00000000..1f994522 --- /dev/null +++ b/tuner/proto/channel.proto @@ -0,0 +1,111 @@ +/* + * Copyright (C) 2015 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +syntax = 'proto2'; + +package com.android.tv.tuner.data; + +option java_package = "com.android.tv.tuner.data"; +option java_outer_classname = "Channel"; + +import "track.proto"; + +// Holds information about a channel used in the tuners. +message TunerChannelProto { + optional TunerType type = 1; + optional string short_name = 2; + optional string long_name = 3; + optional int32 frequency = 4; + optional string modulation = 5; + optional string filepath = 6; + optional int32 program_number = 7; + optional int32 virtual_major = 8; + optional int32 virtual_minor = 9; + optional int64 channel_id = 10; + optional string description = 11; + optional int32 tsid = 12; + optional int32 video_pid = 13; + optional VideoStreamType video_stream_type = 14; + optional int32 pcr_pid = 15; + repeated AtscAudioTrack audio_tracks = 16; + repeated int32 audio_pids = 17; + repeated AudioStreamType audio_stream_types = 18; + optional int32 audio_track_index = 19; + repeated AtscCaptionTrack caption_tracks = 20; + optional bool has_caption_track = 21; + optional AtscServiceType service_type = 22 [default = SERVICE_TYPE_ATSC_DIGITAL_TELEVISION]; + optional bool recording_prohibited = 23; + optional string video_format = 24; + /** + * The flag indicating whether this TV channel is locked or not. + * This is primarily used for alternative parental control to prevent unauthorized users from + * watching the current channel regardless of the content rating + * @see <a href="https://developer.android.com/reference/android/media/tv/TvContract.Channels.html#COLUMN_LOCKED">link</a> + */ + optional bool locked = 25; +} + +// Enum describing the types of tuner. +enum TunerType { + TYPE_TUNER = 0; + TYPE_FILE = 1; + TYPE_NETWORK = 2; +} + +// Enum describing the types of video stream. +enum VideoStreamType { + // ISO/IEC 11172 Video (MPEG-1) + MPEG1 = 0x01; + // ISO/IEC 13818-2 (MPEG-2) Video + MPEG2 = 0x02; + // ISO/IEC 14496-2 (MPEG-4 H.263 based) + H263 = 0x10; + // ISO/IE 14496-10 (H.264 video) + H264 = 0x01b; + // ISO/IE 23008-2 (H.265 video) + H265 = 0x024; +} + +// Enum describing the types of audio stream. +enum AudioStreamType { + // ISO/IEC 11172 Audio (MPEG-1) + MPEG1AUDIO = 0x03; + // ISO/IEC 13818-3 Audio (MPEG-2) + MPEG2AUDIO = 0x04; + // ISO/IEC 13818-7 Audio with ADTS transport syntax + MPEG2AACAUDIO = 0x0f; + // ISO/IEC 14496-3 (MPEG-4 LOAS multi-format framed audio) + MPEG4LATMAACAUDIO = 0x11; + // Dolby Digital Audio (ATSC) + A52AC3AUDIO = 0x81; + // Dolby Digital Plus Audio (ATSC)ISO/IEC 14496-2Video (MPEG-1) + EAC3AUDIO = 0x87; +} + +// Enum describing ATSC service types +// See ATSC Code Points Registry. +enum AtscServiceType { + SERVICE_TYPE_ATSC_RESERVED = 0x0; + SERVICE_TYPE_ANALOG_TELEVISION_CHANNELS = 0x1; + SERVICE_TYPE_ATSC_DIGITAL_TELEVISION = 0x2; + SERVICE_TYPE_ATSC_AUDIO = 0x3; + SERVICE_TYPE_ATSC_DATA_ONLY_SERVICE = 0x4; + SERVICE_TYPE_SOFTWARE_DOWNLOAD = 0x5; + SERVICE_TYPE_UNASSOCIATED_SMALL_SCREEN_SERVICE = 0x6; + SERVICE_TYPE_PARAMETERIZED_SERVICE = 0x7; + SERVICE_TYPE_ATSC_NRT_SERVICE = 0x8; + SERVICE_TYPE_EXTENDED_PARAMERTERIZED_SERVICE = 0x9; +} |