1 /* 2 * Copyright (C) 2019 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 package com.google.android.exoplayer2.util; 17 18 /** Defines constants used by the FLAC extractor. */ 19 public final class FlacConstants { 20 21 /** Size of the FLAC stream marker in bytes. */ 22 public static final int STREAM_MARKER_SIZE = 4; 23 /** Size of the header of a FLAC metadata block in bytes. */ 24 public static final int METADATA_BLOCK_HEADER_SIZE = 4; 25 /** Size of the FLAC stream info block (header included) in bytes. */ 26 public static final int STREAM_INFO_BLOCK_SIZE = 38; 27 /** Minimum size of a FLAC frame header in bytes. */ 28 public static final int MIN_FRAME_HEADER_SIZE = 6; 29 /** Maximum size of a FLAC frame header in bytes. */ 30 public static final int MAX_FRAME_HEADER_SIZE = 16; 31 32 /** Stream info metadata block type. */ 33 public static final int METADATA_TYPE_STREAM_INFO = 0; 34 /** Seek table metadata block type. */ 35 public static final int METADATA_TYPE_SEEK_TABLE = 3; 36 /** Vorbis comment metadata block type. */ 37 public static final int METADATA_TYPE_VORBIS_COMMENT = 4; 38 /** Picture metadata block type. */ 39 public static final int METADATA_TYPE_PICTURE = 6; 40 FlacConstants()41 private FlacConstants() {} 42 } 43