Browse Source

libvlc: replace existing title menu bool with int bit mask

pull/38/head
Felix Paul Kühne 11 years ago
parent
commit
a527e9d086
  1. 8
      include/vlc/libvlc_media_player.h
  2. 6
      include/vlc_input.h
  3. 2
      lib/media_player.c

8
include/vlc/libvlc_media_player.h

@ -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;
/**

6
include/vlc_input.h

@ -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;

2
lib/media_player.c

@ -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

Loading…
Cancel
Save