Callbacks

CdTextDataCallback (code, type, track, data, *user_data)

EnumFilterStreamInfoCallback (info, *user_data)

EnumFragmentCallback (fragment, *user_data)

EnumIndexCallback (index, *user_data)

EnumLanguageCallback (language, *user_data)

EnumParserInfoCallback (info, *user_data)

EnumSessionCallback (session, *user_data)

EnumTrackCallback (track, *user_data)

EnumWriterInfoCallback (info, *user_data)

PasswordFunction (*user_data)

Details

Mirage.CdTextDataCallback(code, type, track, data, *user_data)
Parameters:
  • code (int) – language code

  • type (int) – pack type

  • track (int) – track number

  • data (bytes) – data

  • user_data (object or None) – user data

Returns:

True on success, False on failure

Return type:

bool

Specifies the type of callback functions that can be passed to Mirage.cdtext_decoder_get_data().

code is the language code assigned to the block which data belongs to. track is the number of track to which data belongs to, or 0 if data is global (belongs to session/disc). data is buffer containing data and data_len is the length of data in the buffer.

data points to buffer that belongs to decoder and therefore should not be freed.

Mirage.EnumFilterStreamInfoCallback(info, *user_data)
Parameters:
Returns:

True on success, otherwise False

Return type:

bool

Callback function type used with Mirage.enumerate_filter_streams(). A pointer to filter stream information structure is stored in info; the structure belongs to the filter stream object and should not be modified. user_data is user data passed to enumeration function.

Mirage.EnumFragmentCallback(fragment, *user_data)
Parameters:
Returns:

True on success, otherwise False

Return type:

bool

Callback function type used with Mirage.Track.enumerate_fragments(). A pointer to a fragment object is stored in fragment, without incrementing its reference counter. user_data is user data passed to enumeration function.

Mirage.EnumIndexCallback(index, *user_data)
Parameters:
Returns:

True on success, otherwise False

Return type:

bool

Callback function type used with Mirage.Track.enumerate_indices(). A pointer to an index object is stored in index, without incrementing its reference counter. user_data is user data passed to enumeration function.

Mirage.EnumLanguageCallback(language, *user_data)
Parameters:
Returns:

True on success, otherwise False

Return type:

bool

Callback function type used with Mirage.Session.enumerate_languages() and Mirage.Track.enumerate_languages(). A pointer to a language object is stored in language, without incrementing its reference counter. user_data is user data passed to enumeration function.

Mirage.EnumParserInfoCallback(info, *user_data)
Parameters:
Returns:

True on success, otherwise False

Return type:

bool

Callback function type used with Mirage.enumerate_parsers(). A pointer to parser information structure is stored in info; the structure belongs to the parser object and should not be modified. user_data is user data passed to enumeration function.

Mirage.EnumSessionCallback(session, *user_data)
Parameters:
Returns:

True on success, otherwise False

Return type:

bool

Callback function type used with Mirage.Disc.enumerate_sessions(). A pointer to a session object is stored in session, without incrementing its reference counter. user_data is user data passed to enumeration function.

Mirage.EnumTrackCallback(track, *user_data)
Parameters:
Returns:

True on success, otherwise False

Return type:

bool

Callback function type used with Mirage.Session.enumerate_tracks(). A pointer to a track object is stored in track, without incrementing its reference counter. user_data is user data passed to enumeration function.

Mirage.EnumWriterInfoCallback(info, *user_data)
Parameters:
Returns:

True on success, otherwise False

Return type:

bool

Callback function type used with Mirage.enumerate_writers(). A pointer to writer information structure is stored in info; the structure belongs to the writer object and should not be modified. user_data is user data passed to enumeration function.

Mirage.PasswordFunction(*user_data)
Parameters:

user_data (object or None) – user data passed to password function

Returns:

password string on success, otherwise None. Password string should be a copy, allocated via function such as GLib.strdup(), and will be freed after it is used.

Return type:

str

Password function type used to obtain password for encrypted images. A password function needs to be set to Mirage.Context via Mirage.Context.set_password_function(), along with user_data that the password function should be called with.