OLD | NEW |
1 /* | 1 /* |
2 * MPEG2 transport stream (aka DVB) demuxer | 2 * MPEG2 transport stream (aka DVB) demuxer |
3 * Copyright (c) 2002-2003 Fabrice Bellard | 3 * Copyright (c) 2002-2003 Fabrice Bellard |
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. |
(...skipping 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1292 fec_score = analyze(p->buf, TS_FEC_PACKET_SIZE *check_count, TS_FEC_PACKET_S
IZE , NULL)*CHECK_COUNT/check_count; | 1292 fec_score = analyze(p->buf, TS_FEC_PACKET_SIZE *check_count, TS_FEC_PACKET_S
IZE , NULL)*CHECK_COUNT/check_count; |
1293 // av_log(NULL, AV_LOG_DEBUG, "score: %d, dvhs_score: %d, fec_score: %d \n",
score, dvhs_score, fec_score); | 1293 // av_log(NULL, AV_LOG_DEBUG, "score: %d, dvhs_score: %d, fec_score: %d \n",
score, dvhs_score, fec_score); |
1294 | 1294 |
1295 // we need a clear definition for the returned score otherwise things will becom
e messy sooner or later | 1295 // we need a clear definition for the returned score otherwise things will becom
e messy sooner or later |
1296 if (score > fec_score && score > dvhs_score && score > 6) return AVPROBE
_SCORE_MAX + score - CHECK_COUNT; | 1296 if (score > fec_score && score > dvhs_score && score > 6) return AVPROBE
_SCORE_MAX + score - CHECK_COUNT; |
1297 else if(dvhs_score > score && dvhs_score > fec_score && dvhs_score > 6) retu
rn AVPROBE_SCORE_MAX + dvhs_score - CHECK_COUNT; | 1297 else if(dvhs_score > score && dvhs_score > fec_score && dvhs_score > 6) retu
rn AVPROBE_SCORE_MAX + dvhs_score - CHECK_COUNT; |
1298 else if( fec_score > 6) return AVPROBE_SCORE_MAX + fec_score
- CHECK_COUNT; | 1298 else if( fec_score > 6) return AVPROBE_SCORE_MAX + fec_score
- CHECK_COUNT; |
1299 else return -1; | 1299 else return -1; |
1300 #else | 1300 #else |
1301 /* only use the extension for safer guess */ | 1301 /* only use the extension for safer guess */ |
1302 if (match_ext(p->filename, "ts")) | 1302 if (av_match_ext(p->filename, "ts")) |
1303 return AVPROBE_SCORE_MAX; | 1303 return AVPROBE_SCORE_MAX; |
1304 else | 1304 else |
1305 return 0; | 1305 return 0; |
1306 #endif | 1306 #endif |
1307 } | 1307 } |
1308 | 1308 |
1309 /* return the 90kHz PCR and the extension for the 27MHz PCR. return | 1309 /* return the 90kHz PCR and the extension for the 27MHz PCR. return |
1310 (-1) if not available */ | 1310 (-1) if not available */ |
1311 static int parse_pcr(int64_t *ppcr_high, int *ppcr_low, | 1311 static int parse_pcr(int64_t *ppcr_high, int *ppcr_low, |
1312 const uint8_t *packet) | 1312 const uint8_t *packet) |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1763 mpegts_read_header, | 1763 mpegts_read_header, |
1764 mpegts_raw_read_packet, | 1764 mpegts_raw_read_packet, |
1765 mpegts_read_close, | 1765 mpegts_read_close, |
1766 read_seek, | 1766 read_seek, |
1767 mpegts_get_pcr, | 1767 mpegts_get_pcr, |
1768 .flags = AVFMT_SHOW_IDS|AVFMT_TS_DISCONT, | 1768 .flags = AVFMT_SHOW_IDS|AVFMT_TS_DISCONT, |
1769 #ifdef USE_SYNCPOINT_SEARCH | 1769 #ifdef USE_SYNCPOINT_SEARCH |
1770 .read_seek2 = read_seek2, | 1770 .read_seek2 = read_seek2, |
1771 #endif | 1771 #endif |
1772 }; | 1772 }; |
OLD | NEW |