⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ifo_print.c

📁 有关mpeg2的deocde代码
💻 C
📖 第 1 页 / 共 3 页
字号:
  printf("%d ", attr->zero1);  printf("%d ", attr->zero2);  printf("%d ", attr->code_extension);    /* Is this correct?  should it not be subp_code_ext here instead? */  switch(attr->lang_extension) {  case 0:    printf("Not specified ");    break;  case 1:    printf("Caption with normal size character ");    break;  case 2:    printf("Caption with bigger size character ");    break;  case 3:     printf("Caption for children ");    break;  case 4:    printf("reserved ");    break;  case 5:    printf("Closed Caption with normal size character ");    break;  case 6:    printf("Closed Caption with bigger size character ");    break;  case 7:    printf("Closed Caption for children ");    break;  case 8:    printf("reserved ");    break;  case 9:    printf("Forced Caption");    break;  case 10:    printf("reserved ");    break;  case 11:    printf("reserved ");    break;  case 12:    printf("reserved ");    break;  case 13:    printf("Director's comments with normal size character ");    break;  case 14:    printf("Director's comments with bigger size character ");    break;  case 15:    printf("Director's comments for children ");    break;  default:    printf("(please send a bug report) ");  }}static void ifoPrint_USER_OPS(user_ops_t *user_ops) {  uint32_t uops;  unsigned char *ptr = (unsigned char *)user_ops;    uops  = (*ptr++ << 24);  uops |= (*ptr++ << 16);  uops |= (*ptr++ << 8);  uops |= (*ptr++);    if(uops == 0) {    printf("None\n");  } else if(uops == 0x01ffffff) {    printf("All\n");  } else {    if(user_ops->title_or_time_play)      printf("Title or Time Play, ");    if(user_ops->chapter_search_or_play)      printf("Chapter Search or Play, ");    if(user_ops->title_play)      printf("Title Play, ");    if(user_ops->stop)      printf("Stop, ");    if(user_ops->go_up)      printf("Go Up, ");    if(user_ops->time_or_chapter_search)      printf("Time or Chapter Search, ");    if(user_ops->prev_or_top_pg_search)      printf("Prev or Top PG Search, ");    if(user_ops->next_pg_search)      printf("Next PG Search, ");    if(user_ops->forward_scan)      printf("Forward Scan, ");    if(user_ops->backward_scan)      printf("Backward Scan, ");    if(user_ops->title_menu_call)      printf("Title Menu Call, ");    if(user_ops->root_menu_call)      printf("Root Menu Call, ");    if(user_ops->subpic_menu_call)      printf("SubPic Menu Call, ");    if(user_ops->audio_menu_call)      printf("Audio Menu Call, ");    if(user_ops->angle_menu_call)      printf("Angle Menu Call, ");    if(user_ops->chapter_menu_call)      printf("Chapter Menu Call, ");    if(user_ops->resume)      printf("Resume, ");    if(user_ops->button_select_or_activate)      printf("Button Select or Activate, ");    if(user_ops->still_off)      printf("Still Off, ");    if(user_ops->pause_on)      printf("Pause On, ");    if(user_ops->audio_stream_change)      printf("Audio Stream Change, ");    if(user_ops->subpic_stream_change)      printf("SubPic Stream Change, ");    if(user_ops->angle_change)      printf("Angle Change, ");    if(user_ops->karaoke_audio_pres_mode_change)      printf("Karaoke Audio Pres Mode Change, ");    if(user_ops->video_pres_mode_change)      printf("Video Pres Mode Change, ");    printf("\n");  }}void ifoPrint_VMGI_MAT(vmgi_mat_t *vmgi_mat) {    printf("VMG Identifier: %.12s\n", vmgi_mat->vmg_identifier);  printf("Last Sector of VMG: %08x\n", vmgi_mat->vmg_last_sector);  printf("Last Sector of VMGI: %08x\n", vmgi_mat->vmgi_last_sector);  printf("Specification version number: %01x.%01x\n", 	 vmgi_mat->specification_version >> 4, 	 vmgi_mat->specification_version & 0xf);  /* Byte 2 of 'VMG Category' (00xx0000) is the Region Code */  printf("VMG Category: %08x\n", vmgi_mat->vmg_category);  printf("VMG Number of Volumes: %i\n", vmgi_mat->vmg_nr_of_volumes);  printf("VMG This Volume: %i\n", vmgi_mat->vmg_this_volume_nr);  printf("Disc side %i\n", vmgi_mat->disc_side);  printf("VMG Number of Title Sets %i\n", vmgi_mat->vmg_nr_of_title_sets);  printf("Provider ID: %.32s\n", vmgi_mat->provider_identifier);  printf("VMG POS Code: %08x", (uint32_t)(vmgi_mat->vmg_pos_code >> 32));  printf("%08x\n", (uint32_t)vmgi_mat->vmg_pos_code);  printf("End byte of VMGI_MAT: %08x\n", vmgi_mat->vmgi_last_byte);  printf("Start byte of First Play PGC FP PGC: %08x\n", 	 vmgi_mat->first_play_pgc);  printf("Start sector of VMGM_VOBS: %08x\n", vmgi_mat->vmgm_vobs);  printf("Start sector of TT_SRPT: %08x\n", vmgi_mat->tt_srpt);  printf("Start sector of VMGM_PGCI_UT: %08x\n", vmgi_mat->vmgm_pgci_ut);  printf("Start sector of PTL_MAIT: %08x\n", vmgi_mat->ptl_mait);  printf("Start sector of VTS_ATRT: %08x\n", vmgi_mat->vts_atrt);  printf("Start sector of TXTDT_MG: %08x\n", vmgi_mat->txtdt_mgi);  printf("Start sector of VMGM_C_ADT: %08x\n", vmgi_mat->vmgm_c_adt);  printf("Start sector of VMGM_VOBU_ADMAP: %08x\n", 	 vmgi_mat->vmgm_vobu_admap);  printf("Video attributes of VMGM_VOBS: ");  ifoPrint_video_attributes(&vmgi_mat->vmgm_video_attr);  printf("\n");  printf("VMGM Number of Audio attributes: %i\n", 	 vmgi_mat->nr_of_vmgm_audio_streams);  if(vmgi_mat->nr_of_vmgm_audio_streams > 0) {    printf("\tstream %i status: ", 1);    ifoPrint_audio_attributes(&vmgi_mat->vmgm_audio_attr);    printf("\n");  }  printf("VMGM Number of Sub-picture attributes: %i\n", 	 vmgi_mat->nr_of_vmgm_subp_streams);  if(vmgi_mat->nr_of_vmgm_subp_streams > 0) {    printf("\tstream %2i status: ", 1);    ifoPrint_subp_attributes(&vmgi_mat->vmgm_subp_attr);    printf("\n");  }}void ifoPrint_VTSI_MAT(vtsi_mat_t *vtsi_mat) {  int i;  printf("VTS Identifier: %.12s\n", vtsi_mat->vts_identifier);  printf("Last Sector of VTS: %08x\n", vtsi_mat->vts_last_sector);  printf("Last Sector of VTSI: %08x\n", vtsi_mat->vtsi_last_sector);  printf("Specification version number: %01x.%01x\n", 	 vtsi_mat->specification_version>>4, 	 vtsi_mat->specification_version&0xf);  printf("VTS Category: %08x\n", vtsi_mat->vts_category);  printf("End byte of VTSI_MAT: %08x\n", vtsi_mat->vtsi_last_byte);  printf("Start sector of VTSM_VOBS:  %08x\n", vtsi_mat->vtsm_vobs);  printf("Start sector of VTSTT_VOBS: %08x\n", vtsi_mat->vtstt_vobs);  printf("Start sector of VTS_PTT_SRPT: %08x\n", vtsi_mat->vts_ptt_srpt);  printf("Start sector of VTS_PGCIT:    %08x\n", vtsi_mat->vts_pgcit);  printf("Start sector of VTSM_PGCI_UT: %08x\n", vtsi_mat->vtsm_pgci_ut);  printf("Start sector of VTS_TMAPT:    %08x\n", vtsi_mat->vts_tmapt);  printf("Start sector of VTSM_C_ADT:      %08x\n", vtsi_mat->vtsm_c_adt);  printf("Start sector of VTSM_VOBU_ADMAP: %08x\n",vtsi_mat->vtsm_vobu_admap);  printf("Start sector of VTS_C_ADT:       %08x\n", vtsi_mat->vts_c_adt);  printf("Start sector of VTS_VOBU_ADMAP:  %08x\n", vtsi_mat->vts_vobu_admap);  printf("Video attributes of VTSM_VOBS: ");  ifoPrint_video_attributes(&vtsi_mat->vtsm_video_attr);  printf("\n");    printf("VTSM Number of Audio attributes: %i\n", 	 vtsi_mat->nr_of_vtsm_audio_streams);  if(vtsi_mat->nr_of_vtsm_audio_streams > 0) {    printf("\tstream %i status: ", 1);    ifoPrint_audio_attributes(&vtsi_mat->vtsm_audio_attr);    printf("\n");  }    printf("VTSM Number of Sub-picture attributes: %i\n", 	 vtsi_mat->nr_of_vtsm_subp_streams);  if(vtsi_mat->nr_of_vtsm_subp_streams > 0) {    printf("\tstream %2i status: ", 1);    ifoPrint_subp_attributes(&vtsi_mat->vtsm_subp_attr);    printf("\n");  }    printf("Video attributes of VTS_VOBS: ");  ifoPrint_video_attributes(&vtsi_mat->vts_video_attr);  printf("\n");    printf("VTS Number of Audio attributes: %i\n", 	 vtsi_mat->nr_of_vts_audio_streams);  for(i = 0; i < vtsi_mat->nr_of_vts_audio_streams; i++) {    printf("\tstream %i status: ", i);    ifoPrint_audio_attributes(&vtsi_mat->vts_audio_attr[i]);    printf("\n");  }    printf("VTS Number of Subpicture attributes: %i\n", 	 vtsi_mat->nr_of_vts_subp_streams);  for(i = 0; i < vtsi_mat->nr_of_vts_subp_streams; i++) {    printf("\tstream %2i status: ", i);    ifoPrint_subp_attributes(&vtsi_mat->vts_subp_attr[i]);    printf("\n");  }    /* FIXME:  Add printing of MultiChannel Extension */}static void ifoPrint_PGC_COMMAND_TBL(pgc_command_tbl_t *cmd_tbl) {  int i;    if(cmd_tbl == NULL) {    printf("No Command table present\n");    return;  }    printf("Number of Pre commands: %i\n", cmd_tbl->nr_of_pre);  for(i = 0; i < cmd_tbl->nr_of_pre; i++) {    ifoPrint_CMD(i, &cmd_tbl->pre_cmds[i]);  }  printf("Number of Post commands: %i\n", cmd_tbl->nr_of_post);  for(i = 0; i < cmd_tbl->nr_of_post; i++) {    ifoPrint_CMD(i, &cmd_tbl->post_cmds[i]);  }  printf("Number of Cell commands: %i\n", cmd_tbl->nr_of_cell);  for(i = 0; i < cmd_tbl->nr_of_cell; i++) {    ifoPrint_CMD(i, &cmd_tbl->cell_cmds[i]);  }}static void ifoPrint_PGC_PROGRAM_MAP(pgc_program_map_t *program_map, int nr) {  int i;    if(program_map == NULL) {    printf("No Program map present\n");    return;  }    for(i = 0; i < nr; i++) {    printf("Program %3i Entry Cell: %3i\n", i + 1, program_map[i]);  }}static void ifoPrint_CELL_PLAYBACK(cell_playback_t *cell_playback, int nr) {  int i;    if(cell_playback == NULL) {    printf("No Cell Playback info present\n");    return;  }    for(i=0;i<nr;i++) {    printf("Cell: %3i ", i + 1);    ifoPrint_time(&cell_playback[i].playback_time);    printf("\t");    if(cell_playback[i].block_mode || cell_playback[i].block_type) {      const char *s;      switch(cell_playback[i].block_mode) {      case 0:	s = "not a"; break;      case 1:	s = "the first"; break;      case 2:      default:	s = ""; break;      case 3:	s = "last"; break;      }      printf("%s cell in the block ", s);            switch(cell_playback[i].block_type) {      case 0:	printf("not part of the block ");	break;      case 1:	printf("angle block ");	break;      case 2:      case 3:	printf("(send bug repport) ");	break;      }    }    if(cell_playback[i].seamless_play)      printf("presented seamlessly ");    if(cell_playback[i].interleaved)      printf("cell is interleaved ");    if(cell_playback[i].stc_discontinuity)      printf("STC_discontinuty ");    if(cell_playback[i].seamless_angle)      printf("only seamless angle ");    if(cell_playback[i].restricted)      printf("restricted cell ");        if(cell_playback[i].still_time)      printf("still time %d ", cell_playback[i].still_time);    if(cell_playback[i].cell_cmd_nr)      printf("cell command %d", cell_playback[i].cell_cmd_nr);        printf("\n\tStart sector: %08x\tFirst ILVU end  sector: %08x\n", 	   cell_playback[i].first_sector, 	   cell_playback[i].first_ilvu_end_sector);    printf("\tEnd   sector: %08x\tLast VOBU start sector: %08x\n", 	   cell_playback[i].last_sector, 	   cell_playback[i].last_vobu_start_sector);  }}static void ifoPrint_CELL_POSITION(cell_position_t *cell_position, int nr) {  int i;    if(cell_position == NULL) {    printf("No Cell Position info present\n");    return;  }    for(i=0;i<nr;i++) {    printf("Cell: %3i has VOB ID: %3i, Cell ID: %3i\n", i + 1, 	   cell_position[i].vob_id_nr, cell_position[i].cell_nr);  }}void ifoPrint_PGC(pgc_t *pgc) {  int i;    printf("Number of Programs: %i\n", pgc->nr_of_programs);  printf("Number of Cells: %i\n", pgc->nr_of_cells);  /* Check that time is 0:0:0:0 also if nr_of_programs==0 */  printf("Playback time: ");  ifoPrint_time(&pgc->playback_time); printf("\n");  /* If no programs/no time then does this mean anything? */  printf("Prohibited user operations: ");  ifoPrint_USER_OPS(&pgc->prohibited_ops);      for(i = 0; i < 8; i++) {      if(pgc->audio_control[i] & 0x8000) { /* The 'is present' bit */	printf("Audio stream %i control: %04x\n", 	       i, pgc->audio_control[i]);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -