Commit a527e9d0 authored by Felix Paul Kühne's avatar Felix Paul Kühne

libvlc: replace existing title menu bool with int bit mask

parent 03581271
......@@ -57,11 +57,17 @@ typedef struct libvlc_track_description_t
/**
* Description for titles
*/
enum
{
libvlc_title_menu = 0x01,
libvlc_title_interactive = 0x02
};
typedef struct libvlc_title_description_t
{
int64_t i_duration; /**< duration in milliseconds */
char *psz_name; /**< title name */
bool b_menu; /**< info if item was recognized as a menu by the demuxer */
unsigned i_flags; /**< info if item was recognized as a menu, interactive or plain content by the demuxer */
} libvlc_title_description_t;
/**
......
......@@ -84,8 +84,8 @@ static inline seekpoint_t *vlc_seekpoint_Duplicate( const seekpoint_t *src )
*****************************************************************************/
/* input_title_t.i_flags field */
#define INPUT_TITLE_MENU 0x0001 /* Menu title */
#define INPUT_TITLE_INTERACTIVE 0x0002 /* Interactive title. Playback position has no meaning. */
#define INPUT_TITLE_MENU 0x01 /* Menu title */
#define INPUT_TITLE_INTERACTIVE 0x02 /* Interactive title. Playback position has no meaning. */
typedef struct input_title_t
{
......@@ -93,7 +93,7 @@ typedef struct input_title_t
int64_t i_length; /* Length(microsecond) if known, else 0 */
int i_flags; /* Is it a menu or a normal entry */
unsigned i_flags; /* Is it a menu or a normal entry */
/* Title seekpoint */
int i_seekpoint;
......
......@@ -1476,7 +1476,7 @@ int libvlc_media_player_get_full_title_descriptions( libvlc_media_player_t *p_mi
/* we want to return milliseconds to match the rest of the API */
title->i_duration = p_input_title[i]->i_length / 1000;
title->b_menu = p_input_title[i]->i_flags & INPUT_TITLE_MENU;
title->i_flags = p_input_title[i]->i_flags;
if( p_input_title[i]->psz_name )
title->psz_name = strdup( p_input_title[i]->psz_name );
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment