我正在使用VLCJ库来开发一款简单的媒体播放器应用程序,可以在Mac和PC上运行。在PC上,所有媒体文件都可以流畅地运行。 但是在Mac上运行该应用程序(在配置Mac .dylib文件后),我已经成功打开了应用程序,并且当我点击进度条时,帧可以正确显示,但是当我想实际播放文件时,会出现以下错误:
/Users/ronenshani/Desktop/Cinenote/CineNotes/resources/icons/control_start_blue.png/Users/ronenshani/Desktop/Cinenote/CineNotes/resources/icons/control_rewind_blue.png/Users/ronenshani/Desktop/Cinenote/CineNotes/resources/icons/control_fastforward_blue.png/Users/ronenshani/Desktop/Cinenote/CineNotes/resources/icons/control_end_blue.pngSep 12 13:48:59 Ronens-MacBook-Pro.local java[59043] <Error>: CGContextGetCTM: invalid context 0x0
Sep 12 13:48:59 Ronens-MacBook-Pro.local java[59043] <Error>: CGContextSetBaseCTM: invalid context 0x0
Sep 12 13:48:59 Ronens-MacBook-Pro.local java[59043] <Error>: CGContextGetCTM: invalid context 0x0
Sep 12 13:48:59 Ronens-MacBook-Pro.local java[59043] <Error>: CGContextSetBaseCTM: invalid context 0x0
mediaChanged
opening
playing
paused
Fontconfig error: Cannot load default config file
Fontconfig error: Cannot load default config file
Fontconfig error: Cannot load default config file
[0x7faeb4413f50] main vout display error: option macosx-video-autoresize does not exist
2012-09-12 13:49:18.133 java[59043:407] -[CocoaAppWindow isFullscreen]: unrecognized selector sent to instance 0x7faeaa4aba90
2012-09-12 13:49:18.134 java[59043:407] -[CocoaAppWindow isFullscreen]: unrecognized selector sent to instance 0x7faeaa4aba90
2012-09-12 13:49:18.166 java[59043:407] (
0 CoreFoundation 0x00007fff8dcf6f56 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff8db84d5e objc_exception_throw + 43
2 CoreFoundation 0x00007fff8dd831be -[NSObject doesNotRecognizeSelector:] + 190
3 CoreFoundation 0x00007fff8dce3e23 ___forwarding___ + 371
4 CoreFoundation 0x00007fff8dce3c38 _CF_forwarding_prep_0 + 232
5 libvout_macosx_plugin.dylib 0x0000000123affc21 -[VLCOpenGLVideoView setWindowFrameWithValue:] + 49
6 CoreFoundation 0x00007fff8dce670d -[NSObject performSelector:withObject:] + 61
7 Foundation 0x00007fff8eba6d70 __NSThreadPerformPerform + 214
8 CoreFoundation 0x00007fff8dc654f1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
9 CoreFoundation 0x00007fff8dc64d5d __CFRunLoopDoSources0 + 253
10 CoreFoundation 0x00007fff8dc8bb49 __CFRunLoopRun + 905
11 CoreFoundation 0x00007fff8dc8b486 CFRunLoopRunSpecific + 230
12 HIToolbox 0x00007fff868174d3 RunCurrentEventLoopInMode + 277
13 HIToolbox 0x00007fff8681e781 ReceiveNextEventCommon + 355
14 HIToolbox 0x00007fff8681e60e BlockUntilNextEventMatchingListInMode + 62
15 AppKit 0x00007fff83befe31 _DPSNextEvent + 659
16 AppKit 0x00007fff83bef735 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135
17 libawt.jnilib 0x0000000118bdcfe3 -[NSApplicationAWT nextEventMatchingMask:untilDate:inMode:dequeue:] + 124
18 AppKit 0x00007fff83bec071 -[NSApplication run] + 470
19 libawt.jnilib 0x0000000118bdb694 +[AWTStarter startAWT:] + 1495
20 libawt.jnilib 0x0000000118bdb00e -[CPerformer perform] + 93
21 CoreFoundation 0x00007fff8dce670d -[NSObject performSelector:withObject:] + 61
22 Foundation 0x00007fff8eba6d70 __NSThreadPerformPerform + 214
23 CoreFoundation 0x00007fff8dc654f1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
24 CoreFoundation 0x00007fff8dc64d5d __CFRunLoopDoSources0 + 253
25 CoreFoundation 0x00007fff8dc8bb49 __CFRunLoopRun + 905
26 CoreFoundation 0x00007fff8dc8b486 CFRunLoopRunSpecific + 230
27 java 0x000000010fa3a843 java + 18499
28 java 0x000000010fa3a29a java + 17050
29 java 0x000000010fa37a98 java + 6808
)
playingAssertion failed: (p->pause_date != VLC_TS_INVALID), function aout_PacketPause, file ../../extras/package/macosx/../../../src/audio_output/output.c, line 431.
我认为这是错误的核心,尽管我不确定:
[0x7faeb4413f50] main vout display error: option macosx-video-autoresize does not exist
2012-09-12 13:49:18.133 java[59043:407] -[CocoaAppWindow isFullscreen]: unrecognized selector sent to instance 0x7faeaa4aba90
2012-09-12 13:49:18.134 java[59043:407] -[CocoaAppWindow isFullscreen]: unrecognized selector sent to instance 0x7faeaa4aba90
该应用程序使用VLCJ包装器访问libvlc库。如果有人对此有一些见解,请告诉我。我已经困扰了几天了,但仍然没有设法弄清楚。谢谢,Tamash。
编辑:在查看代码后,我发现来自VLCJ的以下代码会导致错误:
static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_name )
{
module_config_t *p_config;
**p_config = config_FindConfig( p_this, psz_name );**
/* sanity checks */
if( !p_config )
{
msg_Err( p_this, "option %s does not exist", psz_name );
return NULL;
}
if ( p_config->psz_longtext )
return p_config->psz_longtext;
else if( p_config->psz_text )
return p_config->psz_text;
else
msg_Warn( p_this, "option %s does not include any help", psz_name );
return NULL;
}
这个函数无法加载一些配置文件(这是有道理的,因为在上面的错误消息中指出了一些错误:“Fontconfig error: Cannot load default config file”)。在Mac上我应该在哪里找到这些配置文件并加载它们?