00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef LIBVLC_EVENTS_H
00026 #define LIBVLC_EVENTS_H 1
00027
00028
00029
00030
00031
00032
00033 # ifdef __cplusplus
00034 extern "C" {
00035 # endif
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 enum libvlc_event_e {
00046
00047
00048
00049 libvlc_MediaMetaChanged=0,
00050 libvlc_MediaSubItemAdded,
00051 libvlc_MediaDurationChanged,
00052 libvlc_MediaParsedChanged,
00053 libvlc_MediaFreed,
00054 libvlc_MediaStateChanged,
00055
00056 libvlc_MediaPlayerMediaChanged=0x100,
00057 libvlc_MediaPlayerNothingSpecial,
00058 libvlc_MediaPlayerOpening,
00059 libvlc_MediaPlayerBuffering,
00060 libvlc_MediaPlayerPlaying,
00061 libvlc_MediaPlayerPaused,
00062 libvlc_MediaPlayerStopped,
00063 libvlc_MediaPlayerForward,
00064 libvlc_MediaPlayerBackward,
00065 libvlc_MediaPlayerEndReached,
00066 libvlc_MediaPlayerEncounteredError,
00067 libvlc_MediaPlayerTimeChanged,
00068 libvlc_MediaPlayerPositionChanged,
00069 libvlc_MediaPlayerSeekableChanged,
00070 libvlc_MediaPlayerPausableChanged,
00071 libvlc_MediaPlayerTitleChanged,
00072 libvlc_MediaPlayerSnapshotTaken,
00073 libvlc_MediaPlayerLengthChanged,
00074
00075 libvlc_MediaListItemAdded=0x200,
00076 libvlc_MediaListWillAddItem,
00077 libvlc_MediaListItemDeleted,
00078 libvlc_MediaListWillDeleteItem,
00079
00080 libvlc_MediaListViewItemAdded=0x300,
00081 libvlc_MediaListViewWillAddItem,
00082 libvlc_MediaListViewItemDeleted,
00083 libvlc_MediaListViewWillDeleteItem,
00084
00085 libvlc_MediaListPlayerPlayed=0x400,
00086 libvlc_MediaListPlayerNextItemSet,
00087 libvlc_MediaListPlayerStopped,
00088
00089 libvlc_MediaDiscovererStarted=0x500,
00090 libvlc_MediaDiscovererEnded,
00091
00092 libvlc_VlmMediaAdded=0x600,
00093 libvlc_VlmMediaRemoved,
00094 libvlc_VlmMediaChanged,
00095 libvlc_VlmMediaInstanceStarted,
00096 libvlc_VlmMediaInstanceStopped,
00097 libvlc_VlmMediaInstanceStatusInit,
00098 libvlc_VlmMediaInstanceStatusOpening,
00099 libvlc_VlmMediaInstanceStatusPlaying,
00100 libvlc_VlmMediaInstanceStatusPause,
00101 libvlc_VlmMediaInstanceStatusEnd,
00102 libvlc_VlmMediaInstanceStatusError,
00103 };
00104
00105
00106
00107
00108 typedef struct libvlc_event_t
00109 {
00110 int type;
00111 void *p_obj;
00112 union
00113 {
00114
00115 struct
00116 {
00117 libvlc_meta_t meta_type;
00118 } media_meta_changed;
00119 struct
00120 {
00121 libvlc_media_t * new_child;
00122 } media_subitem_added;
00123 struct
00124 {
00125 int64_t new_duration;
00126 } media_duration_changed;
00127 struct
00128 {
00129 int new_status;
00130 } media_parsed_changed;
00131 struct
00132 {
00133 libvlc_media_t * md;
00134 } media_freed;
00135 struct
00136 {
00137 libvlc_state_t new_state;
00138 } media_state_changed;
00139
00140
00141 struct
00142 {
00143 float new_position;
00144 } media_player_position_changed;
00145 struct
00146 {
00147 libvlc_time_t new_time;
00148 } media_player_time_changed;
00149 struct
00150 {
00151 int new_title;
00152 } media_player_title_changed;
00153 struct
00154 {
00155 int new_seekable;
00156 } media_player_seekable_changed;
00157 struct
00158 {
00159 int new_pausable;
00160 } media_player_pausable_changed;
00161
00162
00163 struct
00164 {
00165 libvlc_media_t * item;
00166 int index;
00167 } media_list_item_added;
00168 struct
00169 {
00170 libvlc_media_t * item;
00171 int index;
00172 } media_list_will_add_item;
00173 struct
00174 {
00175 libvlc_media_t * item;
00176 int index;
00177 } media_list_item_deleted;
00178 struct
00179 {
00180 libvlc_media_t * item;
00181 int index;
00182 } media_list_will_delete_item;
00183
00184
00185 struct
00186 {
00187 libvlc_media_t * item;
00188 } media_list_player_next_item_set;
00189
00190
00191 struct
00192 {
00193 char* psz_filename ;
00194 } media_player_snapshot_taken ;
00195
00196
00197 struct
00198 {
00199 libvlc_time_t new_length;
00200 } media_player_length_changed;
00201
00202
00203 struct
00204 {
00205 const char * psz_media_name;
00206 const char * psz_instance_name;
00207 } vlm_media_event;
00208
00209
00210 struct
00211 {
00212 libvlc_media_t * new_media;
00213 } media_player_media_changed;
00214 } u;
00215 } libvlc_event_t;
00216
00217
00218
00219
00220 # ifdef __cplusplus
00221 }
00222 # endif
00223
00224 #endif