Changeset 16395c1ad2758aec7aabd7fda70b5dbca232a36e
- Timestamp:
- 01/04/04 09:21:19
(5 years ago)
- Author:
- Gildas Bazin <gbazin@videolan.org>
- git-committer:
- Gildas Bazin <gbazin@videolan.org> 1080804079 +0000
- git-parent:
[556b8276d65efafedb61fd02f17806c83c023741]
- git-author:
- Gildas Bazin <gbazin@videolan.org> 1080804079 +0000
- Message:
* modules/access/vcdx/access.c: use input_Control(INPUT_ADD_INFO).
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r6cbedca |
r16395c1 |
|
| 1014 | 1014 | |
|---|
| 1015 | 1015 | static inline void |
|---|
| 1016 | | MetaInfoAddStr(input_thread_t *p_input, input_info_category_t *p_cat, |
|---|
| 1017 | | playlist_t *p_playlist, char *title, |
|---|
| 1018 | | const char *str) |
|---|
| | 1016 | MetaInfoAddStr(input_thread_t *p_input, char *p_cat, |
|---|
| | 1017 | char *title, const char *str) |
|---|
| 1019 | 1018 | { |
|---|
| 1020 | 1019 | thread_vcd_data_t *p_vcd = (thread_vcd_data_t *) p_input->p_access_data; |
|---|
| 1021 | | playlist_item_t *p_item; |
|---|
| 1022 | 1020 | if ( str ) { |
|---|
| 1023 | 1021 | dbg_print( INPUT_DBG_META, "field: %s: %s\n", title, str); |
|---|
| 1024 | | input_AddInfo( p_cat, title, "%s", str ); |
|---|
| 1025 | | |
|---|
| 1026 | | vlc_mutex_lock( &p_playlist->object_lock ); |
|---|
| 1027 | | p_item = playlist_ItemGetByPos( p_playlist, -1 ); |
|---|
| 1028 | | vlc_mutex_unlock( &p_playlist->object_lock ); |
|---|
| 1029 | | |
|---|
| 1030 | | vlc_mutex_lock( &p_item->lock ); |
|---|
| 1031 | | playlist_ItemAddInfo( p_item, p_cat->psz_name, title, |
|---|
| 1032 | | "%s",str ); |
|---|
| 1033 | | vlc_mutex_unlock( &p_item->lock ); |
|---|
| | 1022 | input_Control( p_input, INPUT_ADD_INFO, p_cat, title, "%s", str); |
|---|
| 1034 | 1023 | } |
|---|
| 1035 | 1024 | } |
|---|
| … | … | |
| 1037 | 1026 | |
|---|
| 1038 | 1027 | static inline void |
|---|
| 1039 | | MetaInfoAddNum(input_thread_t *p_input, input_info_category_t *p_cat, |
|---|
| 1040 | | playlist_t *p_playlist, char *title, int num) |
|---|
| | 1028 | MetaInfoAddNum(input_thread_t *p_input, char *p_cat, char *title, int num) |
|---|
| 1041 | 1029 | { |
|---|
| 1042 | 1030 | thread_vcd_data_t *p_vcd = (thread_vcd_data_t *) p_input->p_access_data; |
|---|
| 1043 | | playlist_item_t *p_item; |
|---|
| 1044 | | |
|---|
| 1045 | | vlc_mutex_lock( &p_playlist->object_lock ); |
|---|
| 1046 | | p_item = playlist_ItemGetByPos( p_playlist, -1 ); |
|---|
| 1047 | | vlc_mutex_unlock( &p_playlist->object_lock ); |
|---|
| 1048 | | |
|---|
| 1049 | 1031 | dbg_print( INPUT_DBG_META, "field %s: %d\n", title, num); |
|---|
| 1050 | | input_AddInfo( p_cat, title, "%d", num ); |
|---|
| 1051 | | |
|---|
| 1052 | | vlc_mutex_lock( &p_item->lock ); |
|---|
| 1053 | | playlist_ItemAddInfo( p_item , p_cat->psz_name, title, "%d",num ); |
|---|
| 1054 | | vlc_mutex_unlock( &p_item->lock ); |
|---|
| | 1032 | input_Control( p_input, INPUT_ADD_INFO, p_cat, title, "%d", num ); |
|---|
| 1055 | 1033 | } |
|---|
| 1056 | 1034 | |
|---|
| 1057 | 1035 | #define addstr(title, str) \ |
|---|
| 1058 | | MetaInfoAddStr( p_input, p_cat, p_playlist, title, str ); |
|---|
| | 1036 | MetaInfoAddStr( p_input, p_cat, title, str ); |
|---|
| 1059 | 1037 | |
|---|
| 1060 | 1038 | #define addnum(title, num) \ |
|---|
| 1061 | | MetaInfoAddNum( p_input, p_cat, p_playlist, title, num ); |
|---|
| | 1039 | MetaInfoAddNum( p_input, p_cat, title, num ); |
|---|
| 1062 | 1040 | |
|---|
| 1063 | 1041 | static void InformationCreate( input_thread_t *p_input ) |
|---|
| … | … | |
| 1066 | 1044 | unsigned int i_nb = vcdinfo_get_num_entries(p_vcd->vcd); |
|---|
| 1067 | 1045 | unsigned int last_entry = 0; |
|---|
| 1068 | | input_info_category_t *p_cat; |
|---|
| | 1046 | char *p_cat; |
|---|
| 1069 | 1047 | track_t i_track; |
|---|
| 1070 | | playlist_t *p_playlist = vlc_object_find( p_input, VLC_OBJECT_PLAYLIST, |
|---|
| 1071 | | FIND_PARENT ); |
|---|
| 1072 | | |
|---|
| 1073 | | p_cat = input_InfoCategory( p_input, "General" ); |
|---|
| | 1048 | |
|---|
| | 1049 | p_cat = _("General"); |
|---|
| 1074 | 1050 | |
|---|
| 1075 | 1051 | addstr( _("VCD Format"), vcdinfo_get_format_version_str(p_vcd->vcd) ); |
|---|
| … | … | |
| 1097 | 1073 | i_track); |
|---|
| 1098 | 1074 | snprintf(psz_track, TITLE_MAX, "%s%02d", _("Track "), i_track); |
|---|
| 1099 | | p_cat = input_InfoCategory( p_input, psz_track ); |
|---|
| | 1075 | p_cat = psz_track; |
|---|
| 1100 | 1076 | |
|---|
| 1101 | 1077 | if (p_vcd->b_svd) { |
|---|