Skip to content

Commit

Permalink
More transfer to the new IO model -- especially, misc.c and its impli…
Browse files Browse the repository at this point in the history
…cations.

--HG--
extra : convert_revision : svn%3Aeff31bef-be4a-0410-a8fe-e47997df2690/trunk%40136
  • Loading branch information
tibs committed May 3, 2009
1 parent 6b4c838 commit 574a59f
Show file tree
Hide file tree
Showing 18 changed files with 278 additions and 294 deletions.
4 changes: 2 additions & 2 deletions adts.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ extern int read_next_adts_frame(int file,

#if DEBUG
print_msg("ADTS frame\n");
print_data(stdout,"Start",header,JUST_ENOUGH,JUST_ENOUGH);
print_data(TRUE,"Start",header,JUST_ENOUGH,JUST_ENOUGH);
#endif

if (header[0] != 0xFF || (header[1] & 0xF0) != 0xF0)
Expand Down Expand Up @@ -150,7 +150,7 @@ extern int read_next_adts_frame(int file,
return 1;
}
#if DEBUG
print_data(stdout,"Again",data,frame_length,20);
print_data(TRUE,"Again",data,frame_length,20);
#endif

err = build_audio_frame(frame);
Expand Down
6 changes: 3 additions & 3 deletions esreport.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ static void report_ES_units(ES_p es,
report_ES_unit(stdout,&unit);

if (verbose)
print_data(stdout," Data",
print_data(TRUE," Data",
unit.data,unit.data_len,10);

if (max > 0 && count >= max)
Expand Down Expand Up @@ -604,10 +604,10 @@ static void report_h262_items(ES_p es,
count++;

if (!quiet)
report_h262_item(stdout,item);
report_h262_item(item);

if (verbose)
print_data(stdout," Data",
print_data(TRUE," Data",
item->unit.data,item->unit.data_len,10);
free_h262_item(&item);

Expand Down
27 changes: 13 additions & 14 deletions h262.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,21 +161,20 @@ extern void free_h262_item(h262_item_p *item)
}

/*
* Print out useful information about this MPEG2 item, on the given stream.
* Print out useful information about this MPEG2 item
*/
extern void report_h262_item(FILE *stream,
h262_item_p item)
extern void report_h262_item(h262_item_p item)
{
fprintf(stream,OFFSET_T_FORMAT_08 "/%04d: MPEG2 item %02x (",
item->unit.start_posn.infile,
item->unit.start_posn.inpacket,item->unit.start_code);
print_h262_start_code_str(stream,item->unit.start_code);
fprintf(stream,")");
fprint_msg(OFFSET_T_FORMAT_08 "/%04d: MPEG2 item %02x (",
item->unit.start_posn.infile,
item->unit.start_posn.inpacket,item->unit.start_code);
print_h262_start_code_str(stdout,item->unit.start_code); // XXX Fix
print_msg(")");
if (item->unit.start_code == 0)
fprintf(stream," %d (%s)",item->picture_coding_type,
H262_PICTURE_CODING_STR(item->picture_coding_type));
fprintf(stream," size %d",item->unit.data_len);
fprintf(stream,"\n");
fprint_msg(" %d (%s)",item->picture_coding_type,
H262_PICTURE_CODING_STR(item->picture_coding_type));
fprint_msg(" size %d",item->unit.data_len);
print_msg("\n");
}

// ------------------------------------------------------------
Expand Down Expand Up @@ -845,7 +844,7 @@ extern int get_next_h262_single_picture(h262_context_p context,
if (verbose)
{
printf("__ fake AFD ");
print_bits(stdout,4,(*picture)->afd);
print_bits(4,(*picture)->afd);
printf(", i.e., %s",SHORT_AFD_STR((*picture)->afd));
printf("\n");
}
Expand Down Expand Up @@ -1167,7 +1166,7 @@ extern void report_h262_picture(h262_picture_p picture,
printf(" AFD ");
else
printf(" afd ");
print_bits(stdout,4,picture->afd);
print_bits(4,picture->afd);
printf(", i.e., %s",SHORT_AFD_STR(picture->afd));
printf("\n");
}
Expand Down
5 changes: 2 additions & 3 deletions h262_fns.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,9 @@ extern int build_h262_item(h262_item_p *item);
*/
extern void free_h262_item(h262_item_p *item);
/*
* Print out useful information about this MPEG2 item, on the given stream.
* Print out useful information about this MPEG2 item
*/
extern void report_h262_item(FILE *stream,
h262_item_p item);
extern void report_h262_item(h262_item_p item);
// ------------------------------------------------------------
// MPEG2 item *data* stuff
// ------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion l2audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ extern int read_next_l2audio_frame(int file,

#if DEBUG
printf("MPEG layer 2 frame\n");
print_data(stdout,"Start",header,JUST_ENOUGH,JUST_ENOUGH);
print_data(TRUE,"Start",header,JUST_ENOUGH,JUST_ENOUGH);
#endif

while (header[0] != 0xFF || (header[1] & 0xe0) != 0xe0)
Expand Down
Loading

0 comments on commit 574a59f

Please sign in to comment.