1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
4 * Copyright (C) Philippe Rouquier 2005-2009 <bonfire-app@wanadoo.fr>
6 * Libbrasero-media is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * The Libbrasero-media authors hereby grant permission for non-GPL compatible
12 * GStreamer plugins to be used and distributed together with GStreamer
13 * and Libbrasero-media. This permission is above and beyond the permissions granted
14 * by the GPL license by which Libbrasero-media is covered. If you modify this code
15 * you may extend this exception to your version of the code, but you are not
16 * obligated to do so. If you do not wish to do so, delete this exception
17 * statement from your version.
19 * Libbrasero-media is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Library General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to:
26 * The Free Software Foundation, Inc.,
27 * 51 Franklin Street, Fifth Floor
28 * Boston, MA 02110-1301, USA.
33 #include "scsi-base.h"
35 #ifndef _SCSI_READ_TRACK_INFORMATION_H
36 #define _SCSI_READ_TRACK_INFORMATION_H
41 BRASERO_SCSI_DATA_MODE_1
= 0x01,
42 BRASERO_SCSI_DATA_MODE_2_XA
= 0x02,
43 BRASERO_SCSI_DATA_BLOCK_TYPE
= 0x0F
44 } BraseroScsiDataMode
;
46 #if G_BYTE_ORDER == G_LITTLE_ENDIAN
48 struct _BraseroScsiTrackInfo
{
52 uchar session_num_low
;
59 uchar layer_jmp_rcd_status
:2;
62 /* the 4 next bits indicate the track status */
63 uchar fixed_packet
:1;
66 uchar reserved_track
:1;
68 uchar next_wrt_address_valid
:1;
69 uchar last_recorded_blk_valid
:1;
73 uchar next_wrt_address
[4];
74 uchar free_blocks
[4];
75 uchar packet_size
[4];
77 uchar last_recorded_blk
[4];
80 uchar session_num_high
;
82 uchar reserved2
[2]; /* 36 bytes MMC1 */
84 uchar rd_compat_lba
[4]; /* 40 bytes */
85 uchar next_layer_jmp
[4];
86 uchar last_layer_jmp
[4]; /* 48 bytes */
91 struct _BraseroScsiTrackInfo
{
95 uchar session_num_low
;
99 uchar layer_jmp_rcd_status
:2;
104 /* the 4 next bits indicate the track status */
105 uchar reserved_track
:1;
108 uchar fixed_packet
:1;
112 uchar last_recorded_blk_valid
:1;
113 uchar next_wrt_address_valid
:1;
116 uchar next_wrt_address
[4];
117 uchar free_blocks
[4];
118 uchar packet_size
[4];
119 uchar track_size
[4];
120 uchar last_recorded_blk
[4];
122 uchar track_num_high
;
123 uchar session_num_high
;
127 uchar rd_compat_lba
[4];
128 uchar next_layer_jmp
[4];
129 uchar last_layer_jmp
[4];
134 typedef struct _BraseroScsiTrackInfo BraseroScsiTrackInfo
;
136 #define BRASERO_SCSI_TRACK_NUM(track) (((track).track_num_high << 8) + (track).track_num_low)
137 #define BRASERO_SCSI_SESSION_NUM(track) (((track).session_num_high << 8) + (track).session_num_low)
138 #define BRASERO_SCSI_TRACK_NUM_PTR(track) (((track)->track_num_high << 8) + (track)->track_num_low)
139 #define BRASERO_SCSI_SESSION_NUM_PTR(track) (((track)->session_num_high << 8) + (track)->session_num_low)
143 #endif /* _SCSI_READ_TRACK_INFORMATION_H */