Changeset 1886ae1a376ebd893ed2941197e8872d27f8d6c0
- Timestamp:
- 27/03/08 15:08:14 (7 months ago)
- git-parent:
- Files:
-
- extras/package/macosx/Resources/English.lproj/MediaInfo.nib/classes.nib (modified) (2 diffs)
- extras/package/macosx/Resources/English.lproj/MediaInfo.nib/info.nib (modified) (1 diff)
- extras/package/macosx/Resources/English.lproj/MediaInfo.nib/keyedobjects.nib (modified) (previous)
- modules/gui/macosx/playlistinfo.h (modified) (1 diff)
- modules/gui/macosx/playlistinfo.m (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
extras/package/macosx/Resources/English.lproj/MediaInfo.nib/classes.nib
raa9bce0 r1886ae1 15 15 <dict> 16 16 <key>CLASS</key> 17 <string>NSTextField</string> 18 <key>LANGUAGE</key> 19 <string>ObjC</string> 20 <key>SUPERCLASS</key> 21 <string>NSControl</string> 22 </dict> 23 <dict> 24 <key>CLASS</key> 17 25 <string>NSObject</string> 18 26 <key>LANGUAGE</key> … … 26 34 <key>deleteOutlineGroup</key> 27 35 <string>id</string> 36 <key>metaFieldChanged</key> 37 <string>id</string> 28 38 <key>saveMetaData</key> 29 <string>id</string>30 <key>toggleInfoPanel</key>31 <string>id</string>32 <key>togglePlaylistInfoPanel</key>33 39 <string>id</string> 34 40 </dict> extras/package/macosx/Resources/English.lproj/MediaInfo.nib/info.nib
raa9bce0 r1886ae1 11 11 <key>IBOpenObjects</key> 12 12 <array> 13 <integer> 8</integer>13 <integer>3</integer> 14 14 </array> 15 15 <key>IBSystem Version</key> modules/gui/macosx/playlistinfo.h
raa9bce0 r1886ae1 100 100 101 101 - (void)initPanel; 102 - (IBAction)metaFieldChanged:(id)sender; 102 103 - (IBAction)saveMetaData:(id)sender; 103 104 - (void)updatePanel; modules/gui/macosx/playlistinfo.m
raa9bce0 r1886ae1 86 86 [o_nowPlaying_lbl setStringValue: _NS(VLC_META_NOW_PLAYING)]; 87 87 [o_publisher_lbl setStringValue: _NS(VLC_META_PUBLISHER)]; 88 88 89 89 /* statistics */ 90 90 [o_input_box setTitle: _NS("Input")]; … … 93 93 [o_demux_bytes_lbl setStringValue: _NS("Demuxed")]; 94 94 [o_demux_bitrate_lbl setStringValue: _NS("Stream bitrate")]; 95 95 96 96 [o_video_box setTitle: _NS("Video")]; 97 97 [o_video_decoded_lbl setStringValue: _NS("Decoded blocks")]; … … 99 99 [o_lost_frames_lbl setStringValue: _NS("Lost frames")]; 100 100 [o_fps_lbl setStringValue: _NS("Frames per Second")]; 101 101 102 102 [o_sout_box setTitle: _NS("Streaming")]; 103 103 [o_sent_packets_lbl setStringValue: _NS("Sent packets")]; 104 104 [o_sent_bytes_lbl setStringValue: _NS("Sent bytes")]; 105 105 [o_sent_bitrate_lbl setStringValue: _NS("Send rate")]; 106 106 107 107 [o_audio_box setTitle: _NS("Audio")]; 108 108 [o_audio_decoded_lbl setStringValue: _NS("Decoded blocks")]; 109 109 [o_played_abuffers_lbl setStringValue: _NS("Played buffers")]; 110 110 [o_lost_abuffers_lbl setStringValue: _NS("Lost buffers")]; 111 112 [o_info_window setInitialFirstResponder: o_uri_txt]; 111 113 } 112 114 … … 157 159 158 160 /* fill uri info */ 159 char *psz_uri = input_item_GetURI( p_item->p_input ); 160 if( psz_uri ) 161 { 162 [o_uri_txt setStringValue: [NSString stringWithUTF8String:psz_uri]]; 163 } 164 free( psz_uri ); 161 if( input_item_GetURI( p_item->p_input ) != NULL ) 162 { 163 [o_uri_txt setStringValue: [NSString stringWithUTF8String: input_item_GetURI( p_item->p_input ) ]]; 164 } 165 165 166 166 #define SET( foo, bar ) \ … … 180 180 SET( language, Language ); 181 181 SET( date, Date ); 182 SET( description, Description ); 182 183 183 184 #undef SET 184 185 185 186 char *psz_meta; 186 187 NSImage *o_image; 187 /* FIXME!! 188 psz_meta = input_item_GetArtURL( p_item ); 188 psz_meta = input_item_GetArtURL( p_item->p_input ); 189 189 if( psz_meta && !strncmp( psz_meta, "file://", 7 ) ) 190 190 o_image = [[NSImage alloc] initWithContentsOfURL: [NSURL URLWithString: [NSString stringWithUTF8String: psz_meta]]]; 191 else */191 else 192 192 o_image = [[NSImage imageNamed: @"noart.png"] retain]; 193 193 [o_image_well setImage: o_image]; 194 194 [o_image release]; 195 //free( psz_meta );195 FREENULL( psz_meta ); 196 196 197 197 /* reload the advanced table */ … … 207 207 if( psz_meta != NULL && *psz_meta) 208 208 [theItem setStringValue: [NSString stringWithUTF8String:psz_meta]]; 209 else 210 [theItem setStringValue: @""]; 209 211 } 210 212 … … 230 232 [o_lost_frames_txt setIntValue: p_item->p_input->p_stats->i_lost_pictures]; 231 233 float f_fps = 0; 232 /* FIXME !input_Control( p_item->p_input, INPUT_GET_VIDEO_FPS, &f_fps ); */234 /* FIXME: input_Control( p_item->p_input, INPUT_GET_VIDEO_FPS, &f_fps ); */ 233 235 [o_fps_txt setFloatValue: f_fps]; 234 236 … … 249 251 } 250 252 253 - (IBAction)metaFieldChanged:(id)sender 254 { 255 [o_saveMetaData_btn setEnabled: YES]; 256 } 257 251 258 - (IBAction)saveMetaData:(id)sender 252 259 { 253 /* TODO: implement this feature254 260 intf_thread_t * p_intf = VLCIntf; 255 261 playlist_t * p_playlist = pl_Yield( p_intf ); … … 258 264 if( [self isItemInPlaylist: p_item] ) 259 265 { 260 input_item_SetName( p_item->p_input, (char*) 261 [[o_title_txt stringValue] UTF8String] ); 262 input_item_SetURI( p_item->p_input, (char*) 263 [[o_uri_txt stringValue] UTF8String] ); 264 input_item_SetArtist( p_item->p_input, (char*) 265 [[o_author_txt stringValue] UTF8String] ); 266 meta_export_t p_export; 267 p_export.p_item = p_item->p_input; 268 269 if( p_item->p_input == NULL ) 270 goto end; 271 272 /* we can write meta data only in a file */ 273 vlc_mutex_lock( &p_item->p_input->lock ); 274 int i_type = p_item->p_input->i_type; 275 vlc_mutex_unlock( &p_item->p_input->lock ); 276 if( i_type == ITEM_TYPE_FILE ) 277 { 278 char *psz_uri_orig = input_item_GetURI( p_item->p_input ); 279 char *psz_uri = psz_uri_orig; 280 if( !strncmp( psz_uri, "file://", 7 ) ) 281 psz_uri += 7; /* strlen("file://") = 7 */ 282 283 p_export.psz_file = strndup( psz_uri, PATH_MAX ); 284 free( psz_uri_orig ); 285 } 286 else 287 goto end; 288 289 #define utf8( o_blub ) \ 290 [[o_blub stringValue] UTF8String] 291 292 input_item_SetName( p_item->p_input, utf8( o_title_txt ) ); 293 input_item_SetTitle( p_item->p_input, utf8( o_title_txt ) ); 294 input_item_SetArtist( p_item->p_input, utf8( o_author_txt ) ); 295 input_item_SetAlbum( p_item->p_input, utf8( o_collection_txt ) ); 296 input_item_SetGenre( p_item->p_input, utf8( o_genre_txt ) ); 297 input_item_SetTrackNum( p_item->p_input, utf8( o_seqNum_txt ) ); 298 input_item_SetDate( p_item->p_input, utf8( o_date_txt ) ); 299 input_item_SetCopyright( p_item->p_input, utf8( o_copyright_txt ) ); 300 input_item_SetPublisher( p_item->p_input, utf8( o_publisher_txt ) ); 301 input_item_SetDescription( p_item->p_input, utf8( o_description_txt ) ); 302 input_item_SetLanguage( p_item->p_input, utf8( o_language_txt ) ); 303 304 PL_LOCK; 305 p_playlist->p_private = &p_export; 306 307 module_t *p_mod = module_Need( p_playlist, "meta writer", NULL, 0 ); 308 if( p_mod ) 309 module_Unneed( p_playlist, p_mod ); 310 PL_UNLOCK; 266 311 267 312 val.b_bool = VLC_TRUE; 268 313 var_Set( p_playlist, "intf-change", val ); 269 } 270 vlc_object_release( p_playlist );*/ 314 [self updatePanel]; 315 } 316 317 end: 318 vlc_object_release( p_playlist ); 319 [o_saveMetaData_btn setEnabled: NO]; 271 320 } 272 321
