mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2024-12-24 20:01:42 +00:00
Merge branch 'pr/n62_rkuchumov'
This commit is contained in:
commit
714906b5c2
@ -2,7 +2,9 @@
|
||||
|
||||
void write_stringz_as_sami(char *string, struct s_context_cc608 *context, LLONG ms_start, LLONG ms_end)
|
||||
{
|
||||
sprintf ((char *) str,"<SYNC start=%llu><P class=\"UNKNOWNCC\">\r\n",ms_start);
|
||||
sprintf ((char *) str,
|
||||
"<SYNC start=%llu><P class=\"UNKNOWNCC\">\r\n",
|
||||
(unsigned long long)ms_start);
|
||||
if (ccx_options.encoding!=CCX_ENC_UNICODE)
|
||||
{
|
||||
dbg_print(CCX_DMT_608, "\r%s\n", str);
|
||||
@ -56,7 +58,9 @@ void write_stringz_as_sami(char *string, struct s_context_cc608 *context, LLONG
|
||||
}
|
||||
enc_buffer_used=encode_line (enc_buffer,(unsigned char *) str);
|
||||
write(context->out->fh, enc_buffer, enc_buffer_used);
|
||||
sprintf ((char *) str,"<SYNC start=%llu><P class=\"UNKNOWNCC\"> </P></SYNC>\r\n\r\n",ms_end);
|
||||
sprintf ((char *) str,
|
||||
"<SYNC start=%llu><P class=\"UNKNOWNCC\"> </P></SYNC>\r\n\r\n",
|
||||
(unsigned long long)ms_end);
|
||||
if (ccx_options.encoding!=CCX_ENC_UNICODE)
|
||||
{
|
||||
dbg_print(CCX_DMT_608, "\r%s\n", str);
|
||||
@ -79,7 +83,9 @@ int write_cc_buffer_as_sami(struct eia608_screen *data, struct s_context_cc608 *
|
||||
|
||||
endms = get_visible_end()+subs_delay;
|
||||
endms--; // To prevent overlapping with next line.
|
||||
sprintf ((char *) str,"<SYNC start=%llu><P class=\"UNKNOWNCC\">\r\n",startms);
|
||||
sprintf ((char *) str,
|
||||
"<SYNC start=%llu><P class=\"UNKNOWNCC\">\r\n",
|
||||
(unsigned long long)startms);
|
||||
if (ccx_options.encoding!=CCX_ENC_UNICODE)
|
||||
{
|
||||
dbg_print(CCX_DMT_608, "\r%s\n", str);
|
||||
@ -110,7 +116,9 @@ int write_cc_buffer_as_sami(struct eia608_screen *data, struct s_context_cc608 *
|
||||
}
|
||||
enc_buffer_used=encode_line (enc_buffer,(unsigned char *) str);
|
||||
write(context->out->fh, enc_buffer, enc_buffer_used);
|
||||
sprintf ((char *) str,"<SYNC start=%llu><P class=\"UNKNOWNCC\"> </P></SYNC>\r\n\r\n",endms);
|
||||
sprintf ((char *) str,
|
||||
"<SYNC start=%llu><P class=\"UNKNOWNCC\"> </P></SYNC>\r\n\r\n",
|
||||
(unsigned long long)endms);
|
||||
if (ccx_options.encoding!=CCX_ENC_UNICODE)
|
||||
{
|
||||
dbg_print(CCX_DMT_608, "\r%s\n", str);
|
||||
|
@ -143,7 +143,7 @@ void clearTV (cc708_service_decoder *decoder, int buffer) // Buffer => 1 or 2
|
||||
|
||||
void printTVtoSRT (cc708_service_decoder *decoder, int which)
|
||||
{
|
||||
tvscreen *tv = (which==1)? &decoder->tv1:&decoder->tv2;
|
||||
/* tvscreen *tv = (which==1)? &decoder->tv1:&decoder->tv2; */
|
||||
unsigned h1,m1,s1,ms1;
|
||||
unsigned h2,m2,s2,ms2;
|
||||
LLONG ms_start= decoder->current_visible_start_ms;
|
||||
@ -209,7 +209,7 @@ void printTVtoSRT (cc708_service_decoder *decoder, int which)
|
||||
|
||||
void printTVtoConsole (cc708_service_decoder *decoder, int which)
|
||||
{
|
||||
tvscreen *tv = (which==1)? &decoder->tv1:&decoder->tv2;
|
||||
/* tvscreen *tv = (which==1)? &decoder->tv1:&decoder->tv2; */
|
||||
char tbuf1[15],tbuf2[15];
|
||||
print_mstime2buf (decoder->current_visible_start_ms,tbuf1);
|
||||
print_mstime2buf (get_visible_end(),tbuf2);
|
||||
|
@ -796,8 +796,8 @@ LLONG asf_getmoredata(void)
|
||||
int MediaObjectSize = 0;
|
||||
int PresentationTimems = 0; //Payload ms time stamp
|
||||
int extsize = 0;
|
||||
int32_t dwVersion = 0;
|
||||
int32_t unknown = 0;
|
||||
// int32_t dwVersion = 0;
|
||||
// int32_t unknown = 0;
|
||||
int64_t rtStart = 0; // dvr-ms 100ns time stamp start
|
||||
int64_t rtEnd = 0; // dvr-ms 100ns time stamp end
|
||||
|
||||
@ -827,8 +827,8 @@ LLONG asf_getmoredata(void)
|
||||
}
|
||||
if ( PayloadExtPTSEntry[PayloadStreamNumber] > 0 )
|
||||
{
|
||||
dwVersion = *((uint32_t*)(reppos+0));
|
||||
unknown = *((uint32_t*)(reppos+4));
|
||||
// dwVersion = *((uint32_t*)(reppos+0));
|
||||
// unknown = *((uint32_t*)(reppos+4));
|
||||
rtStart = *((int64_t*)(reppos+8));
|
||||
rtEnd = *((int64_t*)(reppos+16));
|
||||
|
||||
|
@ -38,7 +38,6 @@ long num_unexpected_sei_length=0;
|
||||
double roundportable(double x) { return floor(x + 0.5); }
|
||||
|
||||
int ebsp_to_rbsp(char* rbsp, char* ebsp, int length);
|
||||
static char s_rbsp[1024*1024];
|
||||
|
||||
void init_avc(void)
|
||||
{
|
||||
@ -821,6 +820,7 @@ void slice_header (unsigned char *heabuf, unsigned char *heaend, int nal_unit_ty
|
||||
{
|
||||
fatal(EXIT_BUG_BUG, "AVC: pic_order_cnt_type == 1 not yet supported.");
|
||||
}
|
||||
#if 0
|
||||
else
|
||||
{
|
||||
/* CFS: Warning!!: Untested stuff, copied from specs (8.2.1.3) */
|
||||
@ -857,6 +857,7 @@ void slice_header (unsigned char *heabuf, unsigned char *heaend, int nal_unit_ty
|
||||
//TODO
|
||||
// Calculate picture order count (POC) according to 8.2.1
|
||||
}
|
||||
#endif
|
||||
// The rest of the data in slice_header() is currently unused.
|
||||
|
||||
// A reference pic (I or P is always the last displayed picture of a POC
|
||||
|
@ -36,6 +36,8 @@ struct bitstream
|
||||
#define read_i32(bstream) (int32_t)bitstream_get_num(bstream,4,1)
|
||||
#define read_i64(bstream) (int64_t)bitstream_get_num(bstream,8,1)
|
||||
|
||||
#define skip_u32(bstream) (void)bitstream_get_num(bstream,4,1)
|
||||
|
||||
#define next_u8(bstream) (uint8_t)bitstream_get_num(bstream,1,0)
|
||||
#define next_u16(bstream) (uint16_t)bitstream_get_num(bstream,2,0)
|
||||
#define next_u32(bstream) (uint32_t)bitstream_get_num(bstream,4,0)
|
||||
|
@ -253,7 +253,7 @@ static int es_video_sequence(struct bitstream *esstream)
|
||||
// Sequence_end_code
|
||||
if (startcode == 0xB7)
|
||||
{
|
||||
read_u32(esstream); // Advance bitstream
|
||||
skip_u32(esstream); // Advance bitstream
|
||||
no_bitstream_error = 0;
|
||||
break;
|
||||
}
|
||||
@ -488,7 +488,7 @@ static int sequence_ext(struct bitstream *esstream)
|
||||
return 0;
|
||||
}
|
||||
|
||||
read_u32(esstream); // Advance
|
||||
skip_u32(esstream); // Advance
|
||||
|
||||
// Read extension_start_code_identifier
|
||||
unsigned extension_id = (unsigned) read_bits(esstream, 4);
|
||||
@ -905,7 +905,7 @@ static int pic_coding_ext(struct bitstream *esstream)
|
||||
return 0;
|
||||
}
|
||||
|
||||
read_u32(esstream); // Advance
|
||||
skip_u32(esstream); // Advance
|
||||
|
||||
// Read extension_start_code_identifier
|
||||
unsigned extension_id = (unsigned int) read_bits(esstream, 4);
|
||||
@ -996,7 +996,7 @@ static int extension_and_user_data(struct bitstream *esstream, int udtype)
|
||||
|
||||
if ( startcode == 0xB2 || startcode == 0xB5 )
|
||||
{
|
||||
read_u32(esstream); // Advance bitstream
|
||||
skip_u32(esstream); // Advance bitstream
|
||||
unsigned char *dstart = esstream->pos;
|
||||
|
||||
// Advanve esstream to the next startcode. Verify that
|
||||
@ -1114,7 +1114,7 @@ static int read_pic_data(struct bitstream *esstream)
|
||||
|
||||
if ( startcode >= 0x01 && startcode <= 0xAF )
|
||||
{
|
||||
read_u32(esstream); // Advance bitstream
|
||||
skip_u32(esstream); // Advance bitstream
|
||||
search_start_code(esstream); // Skip this slice
|
||||
}
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ int user_data(struct bitstream *ustream, int udtype)
|
||||
unsigned field_number;
|
||||
unsigned cc_data1;
|
||||
unsigned cc_data2;
|
||||
unsigned marker;
|
||||
/* unsigned marker; */
|
||||
for (unsigned j=0;j<cc_count;j++)
|
||||
{
|
||||
skip_bits(ustream,2); // priority - unused
|
||||
@ -161,7 +161,7 @@ int user_data(struct bitstream *ustream, int udtype)
|
||||
skip_bits(ustream,5); // line_offset - unused
|
||||
cc_data1 = (unsigned int) read_bits(ustream,8);
|
||||
cc_data2 = (unsigned int) read_bits(ustream,8);
|
||||
marker = (unsigned int)read_bits(ustream,1); // TODO: Add syntax check
|
||||
/* marker = (unsigned int)read_bits(ustream,1); // TODO: Add syntax check */
|
||||
|
||||
if (ustream->bitsleft < 0)
|
||||
fatal(EXIT_BUG_BUG, "Oops!");
|
||||
|
@ -38,8 +38,6 @@ enum ccx_frame_type current_picture_coding_type = CCX_FRAME_TYPE_RESET_OR_UNKNOW
|
||||
// and the expected unrecognized first header for TiVo files.
|
||||
int strangeheader=0;
|
||||
|
||||
static int non_compliant_DVD = 0; // Found extra captions in DVDs?
|
||||
|
||||
unsigned char *filebuffer;
|
||||
LLONG filebuffer_start; // Position of buffer start relative to file
|
||||
int filebuffer_pos; // Position of pointer relative to buffer start
|
||||
@ -273,7 +271,7 @@ void processhex (char *filename)
|
||||
{
|
||||
size_t max=(size_t) inputsize+1; // Enough for the whole thing. Hex dumps are small so we can be lazy here
|
||||
char *line=(char *) malloc (max);
|
||||
const char *mpeg_header="00 00 01 b2 43 43 01 f8 "; // Always present
|
||||
/* const char *mpeg_header="00 00 01 b2 43 43 01 f8 "; // Always present */
|
||||
FILE *fr = fopen (filename, "rt");
|
||||
unsigned char *bytes=NULL;
|
||||
unsigned byte_count=0;
|
||||
@ -281,7 +279,7 @@ void processhex (char *filename)
|
||||
while(fgets(line, max-1, fr) != NULL)
|
||||
{
|
||||
char *c1, *c2=NULL; // Positions for first and second colons
|
||||
int len;
|
||||
/* int len; */
|
||||
long timing;
|
||||
if (line[0]==';') // Skip comments
|
||||
continue;
|
||||
@ -291,7 +289,7 @@ void processhex (char *filename)
|
||||
continue;
|
||||
*c1=0;
|
||||
*c2=0;
|
||||
len=atoi (line);
|
||||
/* len=atoi (line); */
|
||||
timing=atol (c1+2)*(MPEG_CLOCK_FREQ/1000);
|
||||
current_pts=timing;
|
||||
if (pts_set==0)
|
||||
@ -382,10 +380,10 @@ void processhex (char *filename)
|
||||
else
|
||||
{
|
||||
unsigned char magic=bytes[0];
|
||||
unsigned extra_field_flag=magic&1;
|
||||
/* unsigned extra_field_flag=magic&1; */
|
||||
unsigned caption_count=((magic>>1)&0x1F);
|
||||
unsigned filler=((magic>>6)&1);
|
||||
unsigned pattern=((magic>>7)&1);
|
||||
/* unsigned pattern=((magic>>7)&1); */
|
||||
int always_ff=1;
|
||||
int current_field=0;
|
||||
if (filler==0 && caption_count*6==byte_count-1) // Note that we are ignoring the extra field for now...
|
||||
|
@ -24,11 +24,6 @@ static struct {
|
||||
unsigned type[32];
|
||||
}s_nalu_stats;
|
||||
|
||||
static struct {
|
||||
unsigned total;
|
||||
unsigned type[256];
|
||||
}s_sei_stats;
|
||||
|
||||
static int process_avc_sample(u32 timescale, GF_AVCConfig* c, GF_ISOSample* s)
|
||||
{
|
||||
int status = 0;
|
||||
@ -73,7 +68,7 @@ static int process_avc_sample(u32 timescale, GF_AVCConfig* c, GF_ISOSample* s)
|
||||
}
|
||||
static int process_xdvb_track(const char* basename, GF_ISOFile* f, u32 track)
|
||||
{
|
||||
u32 timescale, i, sample_count, last_sdi = 0;
|
||||
u32 timescale, i, sample_count;
|
||||
|
||||
int status;
|
||||
if((sample_count = gf_isom_get_sample_count(f, track)) < 1){
|
||||
@ -262,7 +257,7 @@ int processmp4 (char *file)
|
||||
if (avc_track_count && ccx_options.mp4vidtrack)
|
||||
continue;
|
||||
|
||||
unsigned num_streams = gf_isom_get_sample_description_count (f,i+1);
|
||||
/* unsigned num_streams = gf_isom_get_sample_description_count (f,i+1); */
|
||||
unsigned num_samples = gf_isom_get_sample_count (f,i+1);
|
||||
|
||||
u32 ProcessingStreamDescriptionIndex = 0; // Current track we are processing, 0 = we don't know yet
|
||||
@ -287,7 +282,7 @@ int processmp4 (char *file)
|
||||
if (sample==NULL)
|
||||
continue;
|
||||
// mprint ("Data length: %lu\n",sample->dataLength);
|
||||
const LLONG timestamp = (LLONG )((sample->DTS + sample->CTS_Offset) * 1000) / timescale;
|
||||
/* const LLONG timestamp = (LLONG )((sample->DTS + sample->CTS_Offset) * 1000) / timescale; */
|
||||
current_pts=(LLONG )(sample->DTS + sample->CTS_Offset)*MPEG_CLOCK_FREQ/timescale ; // Convert frequency to official one
|
||||
if (pts_set==0)
|
||||
pts_set=1;
|
||||
|
@ -1419,7 +1419,7 @@ void stbl_AppendPadding(GF_SampleTableBox *stbl, u8 padding)
|
||||
|
||||
pad_bits = (u8*)gf_malloc(sizeof(u8) * stbl->SampleSize->sampleCount);
|
||||
if (!pad_bits) return;
|
||||
memset(pad_bits, 0, sizeof(pad_bits));
|
||||
memset(pad_bits, 0, sizeof(u8) * stbl->SampleSize->sampleCount);
|
||||
// for (i=0; i<stbl->SampleSize->sampleCount; i++) pad_bits[i] = 0;
|
||||
for (i=0; i<stbl->PaddingBits->SampleCount; i++) pad_bits[i] = stbl->PaddingBits->padbits[i];
|
||||
pad_bits[stbl->SampleSize->sampleCount-1] = padding;
|
||||
|
17
src/myth.c
17
src/myth.c
@ -286,9 +286,11 @@ static AVPacket av;
|
||||
int get_be16()
|
||||
{
|
||||
unsigned char a,b;
|
||||
buffered_read_byte (&a);
|
||||
unsigned char *a_p = &a; // Just to suppress warnings
|
||||
unsigned char *b_p = &b;
|
||||
buffered_read_byte (a_p);
|
||||
past++;
|
||||
buffered_read_byte (&b);
|
||||
buffered_read_byte (b_p);
|
||||
past++;
|
||||
return (a<<8) | b;
|
||||
}
|
||||
@ -296,7 +298,8 @@ int get_be16()
|
||||
int get_byte ()
|
||||
{
|
||||
unsigned char b;
|
||||
buffered_read_byte(&b);
|
||||
unsigned char *b_p = &b;
|
||||
buffered_read_byte(b_p);
|
||||
if (result==1)
|
||||
{
|
||||
past++;
|
||||
@ -341,8 +344,9 @@ static int find_next_start_code(int *size_ptr,
|
||||
while (n > 0)
|
||||
{
|
||||
unsigned char cx;
|
||||
buffered_read_byte (&cx);
|
||||
if (result!=1)
|
||||
unsigned char *cx_p = &cx;
|
||||
buffered_read_byte (cx_p);
|
||||
if (result!=1)
|
||||
break;
|
||||
past++;
|
||||
v = cx;
|
||||
@ -401,9 +405,8 @@ static int mpegps_read_pes_header(int *pstart_code,
|
||||
LLONG *ppts, LLONG *pdts)
|
||||
{
|
||||
int len, size, startcode, c, flags, header_len;
|
||||
LLONG pts, dts, last_pos;
|
||||
LLONG pts, dts;
|
||||
|
||||
last_pos = -1;
|
||||
redo:
|
||||
/* next start code (should be immediately after) */
|
||||
header_state = 0xff;
|
||||
|
@ -206,7 +206,6 @@ slant:
|
||||
* @param ch Character height in pixels.
|
||||
*
|
||||
* Draw blank character.
|
||||
*/
|
||||
static void
|
||||
draw_blank(int canvas_type, uint8_t *canvas, unsigned int rowstride,
|
||||
unsigned int color, int cw, int ch)
|
||||
@ -220,6 +219,7 @@ draw_blank(int canvas_type, uint8_t *canvas, unsigned int rowstride,
|
||||
canvas += rowstride;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@ -159,8 +159,8 @@ int detect_myth( void )
|
||||
memcpy (uc,startbytes,3);
|
||||
for (int i=3;i<startbytes_avail;i++)
|
||||
{
|
||||
if ((uc[0]=='t') && (uc[1]=='v') && (uc[2] == '0') ||
|
||||
(uc[0]=='T') && (uc[1]=='V') && (uc[2] == '0'))
|
||||
if (((uc[0]=='t') && (uc[1]=='v') && (uc[2] == '0')) ||
|
||||
((uc[0]=='T') && (uc[1]=='V') && (uc[2] == '0')))
|
||||
vbi_blocks++;
|
||||
uc[0]=uc[1];
|
||||
uc[1]=uc[2];
|
||||
@ -174,7 +174,7 @@ int detect_myth( void )
|
||||
}
|
||||
int read_pts_pes(unsigned char*header, int len)
|
||||
{
|
||||
unsigned int peslen = 0;
|
||||
/* unsigned int peslen = 0; */
|
||||
LLONG bits_9;
|
||||
unsigned int bits_10;
|
||||
unsigned int bits_11;
|
||||
@ -189,7 +189,7 @@ int read_pts_pes(unsigned char*header, int len)
|
||||
return -1;
|
||||
|
||||
|
||||
peslen = header[4] << 8 | header[5];
|
||||
/* peslen = header[4] << 8 | header[5]; */
|
||||
|
||||
if (header[7] & 0x80)
|
||||
{
|
||||
@ -261,7 +261,7 @@ int read_video_pes_header (unsigned char *nextheader, int *headerlength, int sbu
|
||||
}
|
||||
*headerlength += (int) nextheader[8];
|
||||
int falsepes = 0;
|
||||
int pesext = 0;
|
||||
/* int pesext = 0; */
|
||||
|
||||
// Avoid false positives, check --- not really needed
|
||||
if ( (nextheader[7]&0xC0) == 0x80 ) {
|
||||
@ -318,7 +318,7 @@ int read_video_pes_header (unsigned char *nextheader, int *headerlength, int sbu
|
||||
falsepes = 1;
|
||||
}
|
||||
hskip += 1;
|
||||
pesext = 1;
|
||||
/* pesext = 1; */
|
||||
}
|
||||
|
||||
if ( !falsepes ) {
|
||||
|
@ -12,7 +12,7 @@ static unsigned pmt_warning_shown=0; // Only display warning once
|
||||
void *cxx_dvb_context = NULL;
|
||||
|
||||
// PMTs table
|
||||
struct PAT_entry pmt_array[TS_PMT_MAP_SIZE] = { 0 };
|
||||
struct PAT_entry pmt_array[TS_PMT_MAP_SIZE] = {{ 0 }};
|
||||
uint16_t pmt_array_length = 0;
|
||||
|
||||
void process_ccx_mpeg_descriptor (unsigned char *data, unsigned length);
|
||||
@ -658,7 +658,7 @@ void process_ccx_mpeg_descriptor (unsigned char *data, unsigned length)
|
||||
{
|
||||
char c1=data[i+2], c2=data[i+3], c3=data[i+4];
|
||||
unsigned teletext_type=(data[i+5]&0xF8)>>3; // 5 MSB
|
||||
unsigned magazine_number=data[i+5]&0x7; // 3 LSB
|
||||
// unsigned magazine_number=data[i+5]&0x7; // 3 LSB
|
||||
unsigned teletext_page_number=data[i+6];
|
||||
dbg_print (CCX_DMT_PMT, " ISO639: %c%c%c\n",c1>=0x20?c1:' ',
|
||||
c2>=0x20?c2:' ',
|
||||
|
@ -416,7 +416,6 @@ LLONG get_data(struct wtv_chunked_buffer *cb) {
|
||||
|
||||
LLONG wtv_getmoredata(void)
|
||||
{
|
||||
static long parsebufsize = 1024;
|
||||
static struct wtv_chunked_buffer cb;
|
||||
if(firstcall)
|
||||
{
|
||||
|
21
src/xds.c
21
src/xds.c
@ -8,7 +8,6 @@ static int current_xds_month=-1;
|
||||
static int current_program_type_reported=0; // No.
|
||||
static int xds_start_time_shown=0;
|
||||
static int xds_program_length_shown=0;
|
||||
static int xds_program_type_shown=0;
|
||||
static char xds_program_description[8][33];
|
||||
|
||||
static char current_xds_network_name[33];
|
||||
@ -377,18 +376,18 @@ void xds_do_copy_generation_management_system (unsigned c1, unsigned c2)
|
||||
static char rcd[256];
|
||||
int changed=0;
|
||||
unsigned c1_6=(c1&0x40)>>6;
|
||||
unsigned unused1=(c1&0x20)>>5;
|
||||
/* unsigned unused1=(c1&0x20)>>5; */
|
||||
unsigned cgms_a_b4=(c1&0x10)>>4;
|
||||
unsigned cgms_a_b3=(c1&0x8)>>3;
|
||||
unsigned aps_b2=(c1&0x4)>>2;
|
||||
unsigned aps_b1=(c1&0x2)>>1;
|
||||
unsigned asb_0=(c1&0x1);
|
||||
/* unsigned asb_0=(c1&0x1); */
|
||||
unsigned c2_6=(c2&0x40)>>6;
|
||||
unsigned c2_5=(c2&0x20)>>5;
|
||||
unsigned c2_4=(c2&0x10)>>4;
|
||||
unsigned c2_3=(c2&0x8)>>3;
|
||||
unsigned c2_2=(c2&0x4)>>2;
|
||||
unsigned c2_1=(c2&0x2)>>1;
|
||||
/* unsigned c2_5=(c2&0x20)>>5; */
|
||||
/* unsigned c2_4=(c2&0x10)>>4; */
|
||||
/* unsigned c2_3=(c2&0x8)>>3; */
|
||||
/* unsigned c2_2=(c2&0x4)>>2; */
|
||||
/* unsigned c2_1=(c2&0x2)>>1; */
|
||||
unsigned rcd0=(c2&0x1);
|
||||
if (!c1_6 || !c2_6) // These must be high. If not, not following specs
|
||||
return;
|
||||
@ -538,13 +537,13 @@ int xds_do_current_and_future ()
|
||||
int hour = cur_xds_payload[3] & 0x1f; // 5 bits
|
||||
int date = cur_xds_payload[4] & 0x1f; // 5 bits
|
||||
int month = cur_xds_payload[5] & 0xf; // 4 bits
|
||||
int changed=0;
|
||||
/* int changed=0; */
|
||||
if (current_xds_min!=min ||
|
||||
current_xds_hour!=hour ||
|
||||
current_xds_date!=date ||
|
||||
current_xds_month!=month)
|
||||
{
|
||||
changed=1;
|
||||
/* changed=1; */
|
||||
xds_start_time_shown=0;
|
||||
current_xds_min=min;
|
||||
current_xds_hour=hour;
|
||||
@ -835,7 +834,7 @@ int xds_do_misc ()
|
||||
was_proc=1;
|
||||
if (cur_xds_payload_length<5) // We need 2 data bytes
|
||||
break;
|
||||
int b6 = (cur_xds_payload[2] & 0x40) >>6; // Bit 6 should always be 1
|
||||
// int b6 = (cur_xds_payload[2] & 0x40) >>6; // Bit 6 should always be 1
|
||||
int dst = (cur_xds_payload[2] & 0x20) >>5; // Daylight Saving Time
|
||||
int hour = cur_xds_payload[2] & 0x1f; // 5 bits
|
||||
dbg_print(CCX_DMT_XDS, "Local Time Zone: %02d DST: %d\n",
|
||||
|
Loading…
Reference in New Issue
Block a user