| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Sierra SOL demuxer | 2 * Sierra SOL demuxer |
| 3 * Copyright Konstantin Shishkov | 3 * Copyright Konstantin Shishkov |
| 4 * | 4 * |
| 5 * This file is part of FFmpeg. | 5 * This file is part of FFmpeg. |
| 6 * | 6 * |
| 7 * FFmpeg is free software; you can redistribute it and/or | 7 * FFmpeg is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Lesser General Public | 8 * modify it under the terms of the GNU Lesser General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2.1 of the License, or (at your option) any later version. | 10 * version 2.1 of the License, or (at your option) any later version. |
| 11 * | 11 * |
| 12 * FFmpeg is distributed in the hope that it will be useful, | 12 * FFmpeg is distributed in the hope that it will be useful, |
| 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 * Lesser General Public License for more details. | 15 * Lesser General Public License for more details. |
| 16 * | 16 * |
| 17 * You should have received a copy of the GNU Lesser General Public | 17 * You should have received a copy of the GNU Lesser General Public |
| 18 * License along with FFmpeg; if not, write to the Free Software | 18 * License along with FFmpeg; if not, write to the Free Software |
| 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 */ | 20 */ |
| 21 | 21 |
| 22 /* | 22 /* |
| 23 * Based on documents from Game Audio Player and own research | 23 * Based on documents from Game Audio Player and own research |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #include "libavutil/bswap.h" | 26 #include "libavutil/bswap.h" |
| 27 #include "avformat.h" | 27 #include "avformat.h" |
| 28 #include "raw.h" | 28 #include "pcm.h" |
| 29 | 29 |
| 30 /* if we don't know the size in advance */ | 30 /* if we don't know the size in advance */ |
| 31 #define AU_UNKNOWN_SIZE ((uint32_t)(~0)) | 31 #define AU_UNKNOWN_SIZE ((uint32_t)(~0)) |
| 32 | 32 |
| 33 static int sol_probe(AVProbeData *p) | 33 static int sol_probe(AVProbeData *p) |
| 34 { | 34 { |
| 35 /* check file header */ | 35 /* check file header */ |
| 36 uint16_t magic; | 36 uint16_t magic; |
| 37 magic=av_le2ne16(*((uint16_t*)p->buf)); | 37 magic=av_le2ne16(*((uint16_t*)p->buf)); |
| 38 if ((magic == 0x0B8D || magic == 0x0C0D || magic == 0x0C8D) && | 38 if ((magic == 0x0B8D || magic == 0x0C0D || magic == 0x0C8D) && |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 AVInputFormat sol_demuxer = { | 144 AVInputFormat sol_demuxer = { |
| 145 "sol", | 145 "sol", |
| 146 NULL_IF_CONFIG_SMALL("Sierra SOL format"), | 146 NULL_IF_CONFIG_SMALL("Sierra SOL format"), |
| 147 0, | 147 0, |
| 148 sol_probe, | 148 sol_probe, |
| 149 sol_read_header, | 149 sol_read_header, |
| 150 sol_read_packet, | 150 sol_read_packet, |
| 151 NULL, | 151 NULL, |
| 152 pcm_read_seek, | 152 pcm_read_seek, |
| 153 }; | 153 }; |
| OLD | NEW |