mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2024-12-25 20:32:10 +00:00
Timing for sample #70 corrected.
This commit is contained in:
parent
1b3598b2fe
commit
1513b7c42f
@ -50,7 +50,7 @@ int _CRT_fmode = _O_BINARY;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
long long int last_pes_pts = 0; // PTS of last PES packet (debug purposes)
|
long long int last_pes_pts = 0; // PTS of last PES packet (debug purposes)
|
||||||
int de_ctr = 0; // a keeps count of packets with flag subtitle ON and data packets
|
static int de_ctr = 0; // a keeps count of packets with flag subtitle ON and data packets
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint64_t show_timestamp; // show at timestamp (in ms)
|
uint64_t show_timestamp; // show at timestamp (in ms)
|
||||||
uint64_t hide_timestamp; // hide at timestamp (in ms)
|
uint64_t hide_timestamp; // hide at timestamp (in ms)
|
||||||
@ -955,7 +955,7 @@ void process_telx_packet(struct TeletextCtx *ctx, data_unit_t data_unit_id, tele
|
|||||||
if (m == 0) m = 8;
|
if (m == 0) m = 8;
|
||||||
y = (address >> 3) & 0x1f;
|
y = (address >> 3) & 0x1f;
|
||||||
designation_code = (y > 25) ? unham_8_4(packet->data[0]) : 0x00;
|
designation_code = (y > 25) ? unham_8_4(packet->data[0]) : 0x00;
|
||||||
|
uint8_t flag_subtitle;
|
||||||
if (y == 0)
|
if (y == 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -978,13 +978,11 @@ void process_telx_packet(struct TeletextCtx *ctx, data_unit_t data_unit_id, tele
|
|||||||
ctx->seen_sub_page[thisp]=1;
|
ctx->seen_sub_page[thisp]=1;
|
||||||
mprint ("\rNotice: Teletext page with possible subtitles detected: %03d\n",thisp);
|
mprint ("\rNotice: Teletext page with possible subtitles detected: %03d\n",thisp);
|
||||||
}
|
}
|
||||||
++de_ctr;
|
|
||||||
}
|
}
|
||||||
if ((tlt_config.page == 0) && (flag_subtitle == YES) && (i < 0xff))
|
if ((tlt_config.page == 0) && (flag_subtitle == YES) && (i < 0xff))
|
||||||
{
|
{
|
||||||
tlt_config.page = (m << 8) | (unham_8_4(packet->data[1]) << 4) | unham_8_4(packet->data[0]);
|
tlt_config.page = (m << 8) | (unham_8_4(packet->data[1]) << 4) | unham_8_4(packet->data[0]);
|
||||||
mprint ("- No teletext page specified, first received suitable page is %03x, not guaranteed\n", tlt_config.page);
|
mprint ("- No teletext page specified, first received suitable page is %03x, not guaranteed\n", tlt_config.page);
|
||||||
++de_ctr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Page number and control bits
|
// Page number and control bits
|
||||||
@ -1004,7 +1002,7 @@ void process_telx_packet(struct TeletextCtx *ctx, data_unit_t data_unit_id, tele
|
|||||||
ctx->transmission_mode = (transmission_mode_t) (unham_8_4(packet->data[7]) & 0x01);
|
ctx->transmission_mode = (transmission_mode_t) (unham_8_4(packet->data[7]) & 0x01);
|
||||||
|
|
||||||
// FIXME: Well, this is not ETS 300 706 kosher, however we are interested in DATA_UNIT_EBU_TELETEXT_SUBTITLE only
|
// FIXME: Well, this is not ETS 300 706 kosher, however we are interested in DATA_UNIT_EBU_TELETEXT_SUBTITLE only
|
||||||
if ((ctx->transmission_mode == TRANSMISSION_MODE_PARALLEL) && (data_unit_id != DATA_UNIT_EBU_TELETEXT_SUBTITLE) && !(de_ctr && flag_subtitle)) return;
|
if ((ctx->transmission_mode == TRANSMISSION_MODE_PARALLEL) && (data_unit_id != DATA_UNIT_EBU_TELETEXT_SUBTITLE) && !(de_ctr && flag_subtitle && ctx->receiving_data == YES)) return;
|
||||||
|
|
||||||
if ((ctx->receiving_data == YES) && (
|
if ((ctx->receiving_data == YES) && (
|
||||||
((ctx->transmission_mode == TRANSMISSION_MODE_SERIAL) && (PAGE(page_number) != PAGE(tlt_config.page))) ||
|
((ctx->transmission_mode == TRANSMISSION_MODE_SERIAL) && (PAGE(page_number) != PAGE(tlt_config.page))) ||
|
||||||
@ -1016,7 +1014,7 @@ void process_telx_packet(struct TeletextCtx *ctx, data_unit_t data_unit_id, tele
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Page transmission is terminated, however now we are waiting for our new page
|
// Page transmission is terminated, however now we are waiting for our new page
|
||||||
if (page_number != tlt_config.page && !(de_ctr && flag_subtitle))
|
if (page_number != tlt_config.page && !(de_ctr && flag_subtitle && ctx->receiving_data == YES))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user