Changeset 6c4b8e5ab8d18bc08ac68d2fcec1d5ae7f1a0b6d
- Timestamp:
- 29/07/04 17:18:04
(4 years ago)
- Author:
- Derk-Jan Hartman <hartman@videolan.org>
- git-committer:
- Derk-Jan Hartman <hartman@videolan.org> 1091114284 +0000
- git-parent:
[a3c3b3a8cac06c4539f48b5109e8b0ae1fa5d403]
- git-author:
- Derk-Jan Hartman <hartman@videolan.org> 1091114284 +0000
- Message:
* vcdx Coding style fixes.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r05c9649 |
r6c4b8e5 |
|
| 74 | 74 | static char *VCDParse ( input_thread_t *, |
|---|
| 75 | 75 | /*out*/ vcdinfo_itemid_t * p_itemid , |
|---|
| 76 | | /*out*/ bool *play_single_item ); |
|---|
| | 76 | /*out*/ vlc_bool_t *play_single_item ); |
|---|
| 77 | 77 | |
|---|
| 78 | 78 | static void VCDUpdateVar( input_thread_t *p_input, int i_entry, int i_action, |
|---|
| … | … | |
| 441 | 441 | thread_vcd_data_t * p_vcd= (thread_vcd_data_t *)p_input->p_access_data; |
|---|
| 442 | 442 | input_area_t * p_area; |
|---|
| 443 | | bool b_was_still; |
|---|
| | 443 | vlc_bool_t b_was_still; |
|---|
| 444 | 444 | |
|---|
| 445 | 445 | dbg_print(INPUT_DBG_CALL, "itemid.num: %d, itemid.type: %d\n", |
|---|
| … | … | |
| 462 | 462 | return VLC_EGENERIC; |
|---|
| 463 | 463 | } |
|---|
| 464 | | p_vcd->in_still = false; |
|---|
| | 464 | p_vcd->in_still = VLC_FALSE; |
|---|
| 465 | 465 | p_area = area[itemid.num]; |
|---|
| 466 | 466 | p_area->i_part = p_area->i_plugin_data; |
|---|
| … | … | |
| 490 | 490 | case VCDINFO_FILES_VIDEO_PAL_STILL2: |
|---|
| 491 | 491 | p_input->stream.b_seekable = 0; |
|---|
| 492 | | p_vcd->in_still = true; |
|---|
| | 492 | p_vcd->in_still = VLC_TRUE; |
|---|
| 493 | 493 | break; |
|---|
| 494 | 494 | default: |
|---|
| 495 | 495 | p_input->stream.b_seekable = 1; |
|---|
| 496 | | p_vcd->in_still = false; |
|---|
| | 496 | p_vcd->in_still = VLC_FALSE; |
|---|
| 497 | 497 | } |
|---|
| 498 | 498 | } |
|---|
| … | … | |
| 547 | 547 | } else { |
|---|
| 548 | 548 | track_t cur_track = vcdinfo_get_track(p_vcd->vcd, itemid.num); |
|---|
| 549 | | p_vcd->in_still = false; |
|---|
| | 549 | p_vcd->in_still = VLC_FALSE; |
|---|
| 550 | 550 | p_area = area[cur_track]; |
|---|
| 551 | 551 | p_area->i_part = itemid.num; |
|---|
| … | … | |
| 634 | 634 | msg_Warn( p_input, "wrong track number found in entry points" ); |
|---|
| 635 | 635 | } |
|---|
| 636 | | p_vcd->b_valid_ep = true; |
|---|
| | 636 | p_vcd->b_valid_ep = VLC_TRUE; |
|---|
| 637 | 637 | return 0; |
|---|
| 638 | 638 | } |
|---|
| … | … | |
| 770 | 770 | if (vcdinfo_read_psd (p_vcd->vcd)) { |
|---|
| 771 | 771 | |
|---|
| 772 | | vcdinfo_visit_lot (p_vcd->vcd, false); |
|---|
| | 772 | vcdinfo_visit_lot (p_vcd->vcd, VLC_FALSE); |
|---|
| 773 | 773 | |
|---|
| 774 | 774 | #if FIXED |
|---|
| … | … | |
| 780 | 780 | */ |
|---|
| 781 | 781 | if (vcdinfo_get_psd_x_size(p_vcd->vcd)) |
|---|
| 782 | | vcdinfo_visit_lot (p_vcd->vcd, true); |
|---|
| | 782 | vcdinfo_visit_lot (p_vcd->vcd, VLC_TRUE); |
|---|
| 783 | 783 | #endif |
|---|
| 784 | 784 | } |
|---|
| … | … | |
| 795 | 795 | static char * |
|---|
| 796 | 796 | VCDParse( input_thread_t * p_input, /*out*/ vcdinfo_itemid_t * p_itemid, |
|---|
| 797 | | /*out*/ bool *play_single_item ) |
|---|
| | 797 | /*out*/ vlc_bool_t *play_single_item ) |
|---|
| 798 | 798 | { |
|---|
| 799 | 799 | thread_vcd_data_t *p_vcd = (thread_vcd_data_t *)p_input->p_access_data; |
|---|
| … | … | |
| 802 | 802 | char * psz_next; |
|---|
| 803 | 803 | |
|---|
| 804 | | if ( config_GetInt( p_input, MODULE_STRING "-PBC" ) ) { |
|---|
| 805 | | p_itemid->type=VCDINFO_ITEM_TYPE_LID; |
|---|
| 806 | | p_itemid->num=1; |
|---|
| 807 | | *play_single_item=false; |
|---|
| 808 | | } else { |
|---|
| 809 | | p_itemid->type=VCDINFO_ITEM_TYPE_ENTRY; |
|---|
| 810 | | p_itemid->num=0; |
|---|
| | 804 | if( config_GetInt( p_input, MODULE_STRING "-PBC" ) ) { |
|---|
| | 805 | p_itemid->type = VCDINFO_ITEM_TYPE_LID; |
|---|
| | 806 | p_itemid->num = 1; |
|---|
| | 807 | *play_single_item = VLC_FALSE; |
|---|
| | 808 | } |
|---|
| | 809 | else |
|---|
| | 810 | { |
|---|
| | 811 | p_itemid->type = VCDINFO_ITEM_TYPE_ENTRY; |
|---|
| | 812 | p_itemid->num = 0; |
|---|
| 811 | 813 | } |
|---|
| 812 | 814 | |
|---|
| … | … | |
| 845 | 847 | p_itemid->type = VCDINFO_ITEM_TYPE_ENTRY; |
|---|
| 846 | 848 | ++psz_parser; |
|---|
| 847 | | *play_single_item = true; |
|---|
| | 849 | *play_single_item = VLC_TRUE; |
|---|
| 848 | 850 | break; |
|---|
| 849 | 851 | case 'P': |
|---|
| 850 | 852 | p_itemid->type = VCDINFO_ITEM_TYPE_LID; |
|---|
| 851 | 853 | ++psz_parser; |
|---|
| 852 | | *play_single_item = false; |
|---|
| | 854 | *play_single_item = VLC_FALSE; |
|---|
| 853 | 855 | break; |
|---|
| 854 | 856 | case 'S': |
|---|
| 855 | 857 | p_itemid->type = VCDINFO_ITEM_TYPE_SEGMENT; |
|---|
| 856 | 858 | ++psz_parser; |
|---|
| 857 | | *play_single_item = true; |
|---|
| | 859 | *play_single_item = VLC_TRUE; |
|---|
| 858 | 860 | break; |
|---|
| 859 | 861 | case 'T': |
|---|
| 860 | 862 | p_itemid->type = VCDINFO_ITEM_TYPE_TRACK; |
|---|
| 861 | 863 | ++psz_parser; |
|---|
| 862 | | *play_single_item = true; |
|---|
| | 864 | *play_single_item = VLC_TRUE; |
|---|
| 863 | 865 | break; |
|---|
| 864 | 866 | default: ; |
|---|
| … | … | |
| 886 | 888 | if( !psz_source || 0==strlen(psz_source) ) { |
|---|
| 887 | 889 | /* Scan for a CD-ROM drive with a VCD in it. */ |
|---|
| 888 | | char **cd_drives = cdio_get_devices_with_cap(NULL, |
|---|
| 889 | | (CDIO_FS_ANAL_SVCD|CDIO_FS_ANAL_CVD |
|---|
| 890 | | |CDIO_FS_ANAL_VIDEOCD|CDIO_FS_UNKNOWN), |
|---|
| 891 | | true); |
|---|
| 892 | | if (NULL == cd_drives) return NULL; |
|---|
| 893 | | if (cd_drives[0] == NULL) { |
|---|
| 894 | | cdio_free_device_list(cd_drives); |
|---|
| | 890 | char **cd_drives = cdio_get_devices_with_cap( NULL, |
|---|
| | 891 | ( CDIO_FS_ANAL_SVCD | CDIO_FS_ANAL_CVD |
|---|
| | 892 | |CDIO_FS_ANAL_VIDEOCD | CDIO_FS_UNKNOWN ), |
|---|
| | 893 | VLC_TRUE ); |
|---|
| | 894 | if( NULL == cd_drives ) return NULL; |
|---|
| | 895 | if( cd_drives[0] == NULL ) |
|---|
| | 896 | { |
|---|
| | 897 | cdio_free_device_list( cd_drives ); |
|---|
| 895 | 898 | return NULL; |
|---|
| 896 | 899 | } |
|---|
| 897 | | psz_source = strdup(cd_drives[0]); |
|---|
| 898 | | cdio_free_device_list(cd_drives); |
|---|
| | 900 | psz_source = strdup( cd_drives[0] ); |
|---|
| | 901 | cdio_free_device_list( cd_drives ); |
|---|
| 899 | 902 | } |
|---|
| 900 | 903 | } |
|---|
| … | … | |
| 975 | 978 | vcdsector_t vcd_sector; |
|---|
| 976 | 979 | |
|---|
| 977 | | if (cdio_read_mode2_sector(vcdinfo_get_cd_image(p_vcd), |
|---|
| 978 | | &vcd_sector, cur_lsn, true) |
|---|
| | 980 | if( cdio_read_mode2_sector( vcdinfo_get_cd_image( p_vcd ), |
|---|
| | 981 | &vcd_sector, cur_lsn, VLC_TRUE ) |
|---|
| 979 | 982 | != 0) |
|---|
| 980 | | { |
|---|
| | 983 | { |
|---|
| 981 | 984 | msg_Warn( p_this, "Could not read LSN %lu", |
|---|
| 982 | 985 | (long unsigned int) cur_lsn ); |
|---|
| 983 | 986 | return -1; |
|---|
| 984 | | } |
|---|
| | 987 | } |
|---|
| 985 | 988 | |
|---|
| 986 | 989 | memcpy (p_buffer, vcd_sector.data, M2F2_SECTOR_SIZE); |
|---|
| … | … | |
| 1097 | 1100 | tp += len; \ |
|---|
| 1098 | 1101 | } \ |
|---|
| 1099 | | saw_control_prefix = false; \ |
|---|
| | 1102 | saw_control_prefix = VLC_FALSE; \ |
|---|
| 1100 | 1103 | } \ |
|---|
| 1101 | 1104 | } |
|---|
| 1102 | 1105 | |
|---|
| 1103 | | #define add_format_num_info(val, fmt) \ |
|---|
| | 1106 | #define add_format_num_info( val, fmt ) \ |
|---|
| 1104 | 1107 | { \ |
|---|
| 1105 | 1108 | char num_str[10]; \ |
|---|
| 1106 | 1109 | unsigned int len; \ |
|---|
| 1107 | 1110 | sprintf(num_str, fmt, val); \ |
|---|
| 1108 | | len=strlen(num_str); \ |
|---|
| 1109 | | if (len != 0) { \ |
|---|
| | 1111 | len = strlen(num_str); \ |
|---|
| | 1112 | if( len != 0 ) \ |
|---|
| | 1113 | { \ |
|---|
| 1110 | 1114 | strncat(tp, num_str, TEMP_STR_LEN-(tp-temp_str)); \ |
|---|
| 1111 | 1115 | tp += len; \ |
|---|
| 1112 | 1116 | } \ |
|---|
| 1113 | | saw_control_prefix = false; \ |
|---|
| | 1117 | saw_control_prefix = VLC_FALSE; \ |
|---|
| 1114 | 1118 | } |
|---|
| 1115 | 1119 | |
|---|
| … | … | |
| 1144 | 1148 | #define TEMP_STR_LEN (TEMP_STR_SIZE-1) |
|---|
| 1145 | 1149 | static char temp_str[TEMP_STR_SIZE]; |
|---|
| 1146 | | size_t i; |
|---|
| 1147 | | char * tp = temp_str; |
|---|
| 1148 | | bool saw_control_prefix = false; |
|---|
| 1149 | | size_t format_len = strlen(format_str); |
|---|
| | 1150 | size_t i; |
|---|
| | 1151 | char * tp = temp_str; |
|---|
| | 1152 | vlc_bool_t saw_control_prefix = VLC_FALSE; |
|---|
| | 1153 | size_t format_len = strlen(format_str); |
|---|
| 1150 | 1154 | |
|---|
| 1151 | 1155 | memset(temp_str, 0, TEMP_STR_SIZE); |
|---|
| … | … | |
| 1155 | 1159 | if (!saw_control_prefix && format_str[i] != '%') { |
|---|
| 1156 | 1160 | *tp++ = format_str[i]; |
|---|
| 1157 | | saw_control_prefix = false; |
|---|
| | 1161 | saw_control_prefix = VLC_FALSE; |
|---|
| 1158 | 1162 | continue; |
|---|
| 1159 | 1163 | } |
|---|
| … | … | |
| 1210 | 1214 | ; |
|---|
| 1211 | 1215 | } |
|---|
| 1212 | | saw_control_prefix = false; |
|---|
| | 1216 | saw_control_prefix = VLC_FALSE; |
|---|
| 1213 | 1217 | } |
|---|
| 1214 | 1218 | break; |
|---|
| … | … | |
| 1221 | 1225 | tp += strlen(num_str); |
|---|
| 1222 | 1226 | } |
|---|
| 1223 | | saw_control_prefix = false; |
|---|
| | 1227 | saw_control_prefix = VLC_FALSE; |
|---|
| 1224 | 1228 | break; |
|---|
| 1225 | 1229 | |
|---|
| … | … | |
| 1249 | 1253 | tp += strlen(seg_type_str); |
|---|
| 1250 | 1254 | } |
|---|
| 1251 | | saw_control_prefix = false; |
|---|
| | 1255 | saw_control_prefix = VLC_FALSE; |
|---|
| 1252 | 1256 | break; |
|---|
| 1253 | 1257 | |
|---|
| … | … | |
| 1267 | 1271 | *tp++ = '%'; |
|---|
| 1268 | 1272 | *tp++ = format_str[i]; |
|---|
| 1269 | | saw_control_prefix = false; |
|---|
| | 1273 | saw_control_prefix = VLC_FALSE; |
|---|
| 1270 | 1274 | } |
|---|
| 1271 | 1275 | } |
|---|
| … | … | |
| 1327 | 1331 | VCDFixupPlayList( input_thread_t *p_input, thread_vcd_data_t *p_vcd, |
|---|
| 1328 | 1332 | const char *psz_source, vcdinfo_itemid_t *itemid, |
|---|
| 1329 | | bool play_single_item ) |
|---|
| | 1333 | vlc_bool_t play_single_item ) |
|---|
| 1330 | 1334 | { |
|---|
| 1331 | 1335 | unsigned int i; |
|---|
| … | … | |
| 1451 | 1455 | char * psz_source; |
|---|
| 1452 | 1456 | vcdinfo_itemid_t itemid; |
|---|
| 1453 | | bool b_play_ok; |
|---|
| 1454 | | bool play_single_item = false; |
|---|
| | 1457 | vlc_bool_t b_play_ok; |
|---|
| | 1458 | vlc_bool_t play_single_item = VLC_FALSE; |
|---|
| 1455 | 1459 | |
|---|
| 1456 | 1460 | p_input->pf_read = VCDRead; |
|---|
| … | … | |
| 1469 | 1473 | p_input->p_access_data = (void *)p_vcd; |
|---|
| 1470 | 1474 | p_vcd->i_debug = config_GetInt( p_this, MODULE_STRING "-debug" ); |
|---|
| 1471 | | p_vcd->in_still = false; |
|---|
| | 1475 | p_vcd->in_still = VLC_FALSE; |
|---|
| 1472 | 1476 | p_vcd->play_item.type = VCDINFO_ITEM_TYPE_NOTFOUND; |
|---|
| 1473 | 1477 | |
|---|
| … | … | |
| 1511 | 1515 | } |
|---|
| 1512 | 1516 | |
|---|
| 1513 | | p_vcd->b_svd= vcdinfo_get_tracksSVD(p_vcd->vcd);; |
|---|
| | 1517 | p_vcd->b_svd= (vlc_bool_t) vcdinfo_get_tracksSVD(p_vcd->vcd);; |
|---|
| 1514 | 1518 | |
|---|
| 1515 | 1519 | /* Get track information. */ |
|---|
| … | … | |
| 1548 | 1552 | { |
|---|
| 1549 | 1553 | msg_Warn( p_input, "could not read entry points, will not use them" ); |
|---|
| 1550 | | p_vcd->b_valid_ep = false; |
|---|
| | 1554 | p_vcd->b_valid_ep = VLC_FALSE; |
|---|
| 1551 | 1555 | } |
|---|
| 1552 | 1556 | |
|---|
| rfd05dc6 |
r6c4b8e5 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 1998-2001 VideoLAN |
|---|
| 5 | | * $Id: cdrom.c,v 1.1 2003/10/04 18:55:13 gbazin Exp $ |
|---|
| | 5 | * $Id$ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Johan Bilien <jobi@via.ecp.fr> |
|---|
| … | … | |
| 135 | 135 | vcdsector_t vcd_sector; |
|---|
| 136 | 136 | |
|---|
| 137 | | if (cdio_read_mode2_sector(p_cddev->cdio, &vcd_sector, i_sector, true) |
|---|
| | 137 | if( cdio_read_mode2_sector(p_cddev->cdio, &vcd_sector, i_sector, VLC_TRUE) |
|---|
| 138 | 138 | != 0) |
|---|
| 139 | | { |
|---|
| | 139 | { |
|---|
| 140 | 140 | // msg_Err( p_this, "Could not read sector %d", i_sector ); |
|---|
| 141 | 141 | return -1; |
|---|
| 142 | | } |
|---|
| | 142 | } |
|---|
| 143 | 143 | |
|---|
| 144 | 144 | memcpy (p_buffer, vcd_sector.data, M2F2_SECTOR_SIZE); |
|---|
| r5b96a62 |
r6c4b8e5 |
|
| 4 | 4 | ***************************************************************************** |
|---|
| 5 | 5 | * Copyright (C) 2003 VideoLAN |
|---|
| 6 | | * $Id: vcd.h,v 1.4 2003/11/26 02:41:02 rocky Exp $ |
|---|
| | 6 | * $Id$ |
|---|
| 7 | 7 | * |
|---|
| 8 | 8 | * Authors: Rocky Bernstein <rocky@panix.com> |
|---|
| … | … | |
| 41 | 41 | |
|---|
| 42 | 42 | int i_still_time; |
|---|
| 43 | | bool b_end_of_cell; |
|---|
| | 43 | vlc_bool_t b_end_of_cell; |
|---|
| 44 | 44 | |
|---|
| 45 | 45 | #if FINISHED |
|---|
| r8295771 |
r6c4b8e5 |
|
| 49 | 49 | |
|---|
| 50 | 50 | /*! |
|---|
| 51 | | Return true if playback control (PBC) is on |
|---|
| | 51 | Return VLC_TRUE if playback control (PBC) is on |
|---|
| 52 | 52 | */ |
|---|
| 53 | | bool |
|---|
| 54 | | vcdplayer_pbc_is_on(const thread_vcd_data_t *p_vcd) |
|---|
| | 53 | vlc_bool_t vcdplayer_pbc_is_on( const thread_vcd_data_t *p_vcd ) |
|---|
| 55 | 54 | { |
|---|
| 56 | 55 | return VCDINFO_INVALID_ENTRY != p_vcd->cur_lid; |
|---|
| 57 | 56 | } |
|---|
| 58 | 57 | |
|---|
| 59 | | static void |
|---|
| 60 | | vcdplayer_update_entry( input_thread_t * p_input, uint16_t ofs, |
|---|
| | 58 | static void vcdplayer_update_entry( input_thread_t * p_input, uint16_t ofs, |
|---|
| 61 | 59 | uint16_t *entry, const char *label) |
|---|
| 62 | 60 | { |
|---|
| … | … | |
| 80 | 78 | is to do something that's probably right or helpful. |
|---|
| 81 | 79 | |
|---|
| 82 | | return true if the caller should return. |
|---|
| | 80 | return VLC_TRUE if the caller should return. |
|---|
| 83 | 81 | */ |
|---|
| 84 | | vcdplayer_read_status_t |
|---|
| 85 | | vcdplayer_non_pbc_nav ( input_thread_t * p_input ) |
|---|
| | 82 | vcdplayer_read_status_t vcdplayer_non_pbc_nav ( input_thread_t * p_input ) |
|---|
| 86 | 83 | { |
|---|
| 87 | 84 | thread_vcd_data_t * p_vcd= (thread_vcd_data_t *)p_input->p_access_data; |
|---|
| … | … | |
| 261 | 258 | "next" field of a LID which moves us to a different LID. |
|---|
| 262 | 259 | */ |
|---|
| 263 | | bool |
|---|
| 264 | | vcdplayer_inc_play_item( input_thread_t *p_input ) |
|---|
| | 260 | vlc_bool_t vcdplayer_inc_play_item( input_thread_t *p_input ) |
|---|
| 265 | 261 | { |
|---|
| 266 | 262 | thread_vcd_data_t * p_vcd= (thread_vcd_data_t *)p_input->p_access_data; |
|---|
| … | … | |
| 270 | 266 | dbg_print(INPUT_DBG_CALL, "called pli: %d", p_vcd->pdi); |
|---|
| 271 | 267 | |
|---|
| 272 | | if ( NULL == p_vcd || NULL == p_vcd->pxd.pld ) return false; |
|---|
| | 268 | if ( NULL == p_vcd || NULL == p_vcd->pxd.pld ) return VLC_FALSE; |
|---|
| 273 | 269 | |
|---|
| 274 | 270 | noi = vcdinf_pld_get_noi(p_vcd->pxd.pld); |
|---|
| 275 | 271 | |
|---|
| 276 | | if ( noi <= 0 ) return false; |
|---|
| | 272 | if ( noi <= 0 ) return VLC_FALSE; |
|---|
| 277 | 273 | |
|---|
| 278 | 274 | /* Handle delays like autowait or wait here? */ |
|---|
| … | … | |
| 280 | 276 | p_vcd->pdi++; |
|---|
| 281 | 277 | |
|---|
| 282 | | if ( p_vcd->pdi < 0 || p_vcd->pdi >= noi ) return false; |
|---|
| | 278 | if ( p_vcd->pdi < 0 || p_vcd->pdi >= noi ) return VLC_FALSE; |
|---|
| 283 | 279 | |
|---|
| 284 | 280 | else { |
|---|
| … | … | |
| 287 | 283 | vcdinfo_itemid_t trans_itemid; |
|---|
| 288 | 284 | |
|---|
| 289 | | if (VCDINFO_INVALID_ITEMID == trans_itemid_num) return false; |
|---|
| | 285 | if (VCDINFO_INVALID_ITEMID == trans_itemid_num) return VLC_FALSE; |
|---|
| 290 | 286 | |
|---|
| 291 | 287 | vcdinfo_classify_itemid(trans_itemid_num, &trans_itemid); |
|---|
| … | … | |
| 299 | 295 | Play item assocated with the "default" selection. |
|---|
| 300 | 296 | |
|---|
| 301 | | Return false if there was some problem. |
|---|
| | 297 | Return VLC_FALSE if there was some problem. |
|---|
| 302 | 298 | */ |
|---|
| 303 | | bool |
|---|
| 304 | | vcdplayer_play_default( input_thread_t * p_input ) |
|---|
| | 299 | vlc_bool_t vcdplayer_play_default( input_thread_t * p_input ) |
|---|
| 305 | 300 | { |
|---|
| 306 | 301 | thread_vcd_data_t *p_vcd= (thread_vcd_data_t *)p_input->p_access_data; |
|---|
| … | … | |
| 340 | 335 | case PSD_TYPE_SELECTION_LIST: |
|---|
| 341 | 336 | case PSD_TYPE_EXT_SELECTION_LIST: |
|---|
| 342 | | if (p_vcd->pxd.psd == NULL) return false; |
|---|
| | 337 | if (p_vcd->pxd.psd == NULL) return VLC_FALSE; |
|---|
| 343 | 338 | vcdplayer_update_entry( p_input, |
|---|
| 344 | 339 | vcdinfo_get_default_offset(p_vcd->vcd, |
|---|
| … | … | |
| 351 | 346 | case PSD_TYPE_COMMAND_LIST: |
|---|
| 352 | 347 | LOG_WARN( "There is no PBC 'default' selection here" ); |
|---|
| 353 | | return false; |
|---|
| | 348 | return VLC_FALSE; |
|---|
| 354 | 349 | } |
|---|
| 355 | 350 | #endif /* LIBVCD_VERSION (< 0.7.21) */ |
|---|
| … | … | |
| 373 | 368 | Play item assocated with the "next" selection. |
|---|
| 374 | 369 | |
|---|
| 375 | | Return false if there was some problem. |
|---|
| | 370 | Return VLC_FALSE if there was some problem. |
|---|
| 376 | 371 | */ |
|---|
| 377 | | bool |
|---|
| 378 | | vcdplayer_play_next( input_thread_t * p_input ) |
|---|
| | 372 | vlc_bool_t vcdplayer_play_next( input_thread_t * p_input ) |
|---|
| 379 | 373 | { |
|---|
| 380 | 374 | thread_vcd_data_t *p_vcd= (thread_vcd_data_t *)p_input->p_access_data; |
|---|
| … | … | |
| 383 | 377 | vcdinfo_itemid_t itemid; |
|---|
| 384 | 378 | |
|---|
| 385 | | if (!p_vcd) return false; |
|---|
| | 379 | if (!p_vcd) return VLC_FALSE; |
|---|
| 386 | 380 | |
|---|
| 387 | 381 | dbg_print( (INPUT_DBG_CALL|INPUT_DBG_PBC), |
|---|
| … | … | |
| 399 | 393 | case PSD_TYPE_SELECTION_LIST: |
|---|
| 400 | 394 | case PSD_TYPE_EXT_SELECTION_LIST: |
|---|
| 401 | | if (p_vcd->pxd.psd == NULL) return false; |
|---|
| | 395 | if (p_vcd->pxd.psd == NULL) return VLC_FALSE; |
|---|
| 402 | 396 | vcdplayer_update_entry( p_input, |
|---|
| 403 | 397 | vcdinf_psd_get_next_offset(p_vcd->pxd.psd), |
|---|
| … | … | |
| 407 | 401 | |
|---|
| 408 | 402 | case PSD_TYPE_PLAY_LIST: |
|---|
| 409 | | if (p_vcd->pxd.pld == NULL) return false; |
|---|
| | 403 | if (p_vcd->pxd.pld == NULL) return VLC_FALSE; |
|---|
| 410 | 404 | vcdplayer_update_entry( p_input, |
|---|
| 411 | 405 | vcdinf_pld_get_next_offset(p_vcd->pxd.pld), |
|---|
| … | … | |
| 417 | 411 | case PSD_TYPE_COMMAND_LIST: |
|---|
| 418 | 412 | LOG_WARN( "There is no PBC 'next' selection here" ); |
|---|
| 419 | | return false; |
|---|
| | 413 | return VLC_FALSE; |
|---|
| 420 | 414 | } |
|---|
| 421 | 415 | } else { |
|---|
| … | … | |
| 447 | 441 | } else { |
|---|
| 448 | 442 | LOG_WARN( "At the end - non-PBC 'next' not possible here" ); |
|---|
| 449 | | return false; |
|---|
| | 443 | return VLC_FALSE; |
|---|
| 450 | 444 | } |
|---|
| 451 | 445 | |
|---|
| … | … | |
| 456 | 450 | /* Should have handled above. */ |
|---|
| 457 | 451 | LOG_WARN( "Internal inconsistency - should not have gotten here." ); |
|---|
| 458 | | return false; |
|---|
| | 452 | return VLC_FALSE; |
|---|
| 459 | 453 | } |
|---|
| 460 | 454 | default: |
|---|
| 461 | | return false; |
|---|
| | 455 | return VLC_FALSE; |
|---|
| 462 | 456 | } |
|---|
| 463 | 457 | } |
|---|
| … | … | |
| 471 | 465 | Play item assocated with the "prev" selection. |
|---|
| 472 | 466 | |
|---|
| 473 | | Return false if there was some problem. |
|---|
| | 467 | Return VLC_FALSE if there was some problem. |
|---|
| 474 | 468 | */ |
|---|
| 475 | | bool |
|---|
| 476 | | vcdplayer_play_prev( input_thread_t * p_input ) |
|---|
| | 469 | vlc_bool_t vcdplayer_play_prev( input_thread_t * p_input ) |
|---|
| 477 | 470 | { |
|---|
| 478 | 471 | thread_vcd_data_t *p_vcd= (thread_vcd_data_t *)p_input->p_access_data; |
|---|
| … | … | |
| 493 | 486 | case PSD_TYPE_SELECTION_LIST: |
|---|
| 494 | 487 | case PSD_TYPE_EXT_SELECTION_LIST: |
|---|
| 495 | | if (p_vcd->pxd.psd == NULL) return false; |
|---|
| | 488 | if (p_vcd->pxd.psd == NULL) return VLC_FALSE; |
|---|
| 496 | 489 | vcdplayer_update_entry( p_input, |
|---|
| 497 | 490 | vcdinf_psd_get_prev_offset(p_vcd->pxd.psd), |
|---|
| … | … | |
| 501 | 494 | |
|---|
| 502 | 495 | case PSD_TYPE_PLAY_LIST: |
|---|
| 503 | | if (p_vcd->pxd.pld == NULL) return false; |
|---|
| | 496 | if (p_vcd->pxd.pld == NULL) return VLC_FALSE; |
|---|
| 504 | 497 | vcdplayer_update_entry( p_input, |
|---|
| 505 | 498 | vcdinf_pld_get_prev_offset(p_vcd->pxd.pld), |
|---|
| … | … | |
| 511 | 504 | case PSD_TYPE_COMMAND_LIST: |
|---|
| 512 | 505 | LOG_WARN( "There is no PBC 'prev' selection here" ); |
|---|
| 513 | | return false; |
|---|
| | 506 | return VLC_FALSE; |
|---|
| 514 | 507 | } |
|---|
| 515 | 508 | } else { |
|---|
| … | … | |
| 524 | 517 | } else { |
|---|
| 525 | 518 | LOG_WARN( "At the beginning - non-PBC 'prev' not possible here" ); |
|---|
| 526 | | return false; |
|---|
| | 519 | return VLC_FALSE; |
|---|
| 527 | 520 | } |
|---|
| 528 | 521 | |
|---|
| … | … | |
| 537 | 530 | Play item assocated with the "return" selection. |
|---|
| 538 | 531 | |
|---|
| 539 | | Return false if there was some problem. |
|---|
| | 532 | Return VLC_FALSE if there was some problem. |
|---|
| 540 | 533 | */ |
|---|
| 541 | | bool |
|---|
| 542 | | vcdplayer_play_return( input_thread_t * p_input ) |
|---|
| | 534 | vlc_bool_t vcdplayer_play_return( input_thread_t * p_input ) |
|---|
| 543 | 535 | { |
|---|
| 544 | 536 | thread_vcd_data_t *p_vcd= (thread_vcd_data_t *)p_input->p_access_data; |
|---|
| … | … | |
| 559 | 551 | case PSD_TYPE_SELECTION_LIST: |
|---|
| 560 | 552 | case PSD_TYPE_EXT_SELECTION_LIST: |
|---|
| 561 | | if (p_vcd->pxd.psd == NULL) return false; |
|---|
| | 553 | if (p_vcd->pxd.psd == NULL) return VLC_FALSE; |
|---|
| 562 | 554 | vcdplayer_update_entry( p_input, |
|---|
| 563 | 555 | vcdinf_psd_get_return_offset(p_vcd->pxd.psd), |
|---|
| … | … | |
| 567 | 559 | |
|---|
| 568 | 560 | case PSD_TYPE_PLAY_LIST: |
|---|
| 569 | | if (p_vcd->pxd.pld == NULL) return false; |
|---|
| | 561 | if (p_vcd->pxd.pld == NULL) return VLC_FALSE; |
|---|
| 570 | 562 | vcdplayer_update_entry( p_input, |
|---|
| 571 | 563 | vcdinf_pld_get_return_offset(p_vcd->pxd.pld), |
|---|
| … | … | |
| 577 | 569 | case PSD_TYPE_COMMAND_LIST: |
|---|
| 578 | 570 | LOG_WARN( "There is no PBC 'return' selection here" ); |
|---|
| 579 | | return false; |
|---|
| | 571 | return VLC_FALSE; |
|---|
| 580 | 572 | } |
|---|
| 581 | 573 | } else { |
|---|
| rba3b263 |
r6c4b8e5 |
|
| 66 | 66 | { |
|---|
| 67 | 67 | vcdinfo_obj_t *vcd; /* CD device descriptor */ |
|---|
| 68 | | bool in_still; /* true if in still */ |
|---|
| 69 | | bool b_svd; /* true if we have SVD info */ |
|---|
| | 68 | vlc_bool_t in_still; /* true if in still */ |
|---|
| | 69 | vlc_bool_t b_svd; /* true if we have SVD info */ |
|---|
| 70 | 70 | unsigned int num_tracks; /* Nb of tracks (titles) */ |
|---|
| 71 | 71 | unsigned int num_segments; /* Nb of segments */ |
|---|
| … | … | |
| 100 | 100 | lsn_t * p_entries; /* Entry points */ |
|---|
| 101 | 101 | lsn_t * p_segments; /* Segments */ |
|---|
| 102 | | bool b_valid_ep; /* Valid entry points flag */ |
|---|
| | 102 | vlc_bool_t b_valid_ep; /* Valid entry points flag */ |
|---|
| 103 | 103 | vlc_bool_t b_end_of_track; /* If the end of track was reached */ |
|---|
| 104 | 104 | int i_debug; /* Debugging mask */ |
|---|
| … | … | |
| 118 | 118 | "next" field of a LID which moves us to a different LID. |
|---|
| 119 | 119 | */ |
|---|
| 120 | | bool vcdplayer_inc_play_item( input_thread_t *p_input ); |
|---|
| | 120 | vlc_bool_t vcdplayer_inc_play_item( input_thread_t *p_input ); |
|---|
| 121 | 121 | |
|---|
| 122 | 122 | /*! |
|---|
| 123 | 123 | Return true if playback control (PBC) is on |
|---|
| 124 | 124 | */ |
|---|
| 125 | | bool vcdplayer_pbc_is_on(const thread_vcd_data_t *p_this); |
|---|
| | 125 | vlc_bool_t vcdplayer_pbc_is_on(const thread_vcd_data_t *p_this); |
|---|
| 126 | 126 | |
|---|
| 127 | 127 | /*! |
|---|
| … | … | |
| 130 | 130 | Return false if there was some problem. |
|---|
| 131 | 131 | */ |
|---|
| 132 | | bool vcdplayer_play_default( input_thread_t * p_input ); |
|---|
| | 132 | vlc_bool_t vcdplayer_play_default( input_thread_t * p_input ); |
|---|
| 133 | 133 | |
|---|
| 134 | 134 | /*! |
|---|
| … | … | |
| 137 | 137 | Return false if there was some problem. |
|---|
| 138 | 138 | */ |
|---|
| 139 | | bool vcdplayer_play_next( input_thread_t * p_input ); |
|---|
| | 139 | vlc_bool_t vcdplayer_play_next( input_thread_t * p_input ); |
|---|
| 140 | 140 | |
|---|
| 141 | 141 | /*! |
|---|
| … | … | |
| 144 | 144 | Return false if there was some problem. |
|---|
| 145 | 145 | */ |
|---|
| 146 | | bool vcdplayer_play_prev( input_thread_t * p_input ); |
|---|
| | 146 | vlc_bool_t vcdplayer_play_prev( input_thread_t * p_input ); |
|---|
| 147 | 147 | |
|---|
| 148 | 148 | /*! |
|---|
| … | … | |
| 151 | 151 | Return false if there was some problem. |
|---|
| 152 | 152 | */ |
|---|
| 153 | | bool |
|---|
| | 153 | vlc_bool_t |
|---|
| 154 | 154 | vcdplayer_play_return( input_thread_t * p_input ); |
|---|
| 155 | 155 | |
|---|