vs2010vlc編譯
① 如果我想在iOS中使用vlc,需要編譯什麼源代碼
有兩種選擇:
選擇一:可以編譯VLC(iOS)的源代碼。VLC(iOS)調用了libVLC。
選擇二:可以只編譯libVLC的源代碼。
② vlc for android 源碼能不能在windows環境下編譯
1. 准備編譯環境
基本上按照這篇wiki的介紹就足夠了,為了順利完成編譯,建議首先保證相關的軟體或者依賴庫都已經下載好了,我再強調一下幾個重點注意事項。
(1) Android SDK:必須使用SDK Platform Android 5.0, API 21,因為VLC-for-android用到了Android 5.0 的一些API。
(2) 最好通過apt-get install 把下面這些依賴的軟體都安裝一遍,或更新到最新版
git,apache-ant (or ant), autoconf, automake, autopoint, cmake,
gawk (or nawk), gcc, g++, libtool, m4, patch, pkg-config, ragel,
subversion, unzip.
2. 下載源碼包
直接通過git下載VLC-for-android最新的源碼即可:
git clone git://git.videolan.org/vlc-ports/android.git
3. 編譯VLC源碼和VLC Android工程
(1) 配置編譯環境變數
具體參考wiki的介紹,你可以寫個shell腳本來執行,避免每次編譯都要配置,下面是我的環境變數,可以根據你的路徑修改:
#! /bin/sh
export ANDROID_SDK=/opt/android/sdk/
export ANDROID_NDK=/opt/android/android-ndk-r10/
export ANT_DIR=/opt/android/ant/
export PATH=$PATH:$ANDROID_SDK/platform-tools:$ANDROID_SDK/tools:$ANT_DIR
export ANDROID_ABI=armeabi-v7a
(2) 執行編譯
sh compile.sh
VLC不愧是使用這么廣泛的播放器,它的編譯腳本寫得非常強大和智能,直接通過執行compile.sh,它會自動check所有的依賴,並通過網路去下載缺失的庫。
首先,它會下載vlc的源碼,並存放在當前目錄下。然後去下載依賴的第三方庫文件。
當然,由於GFW的存在,有的時候下載會失敗,這個時候,就需要你手動去Google搜索它正在下載的依賴文件,手動下載好了之後放到 vlc/contrib/tarballs目錄下,然後再回到命令行重新執行 sh compile.sh
它依賴的全部第三方庫文件如圖所示:
(3) 編譯問題
編譯過程還算順利,只出現過一個大問題,如下:
google/protobuf/unittest.proto:853:21: Missing field number.
google/protobuf/unittest.proto:862:1: Reached end of input in message definition (missing '}').
make[3]: *** [unittest_proto_middleman] Error 1
網上也搜不到解決方案,我看了下GitHub上Protobuf的Readme,然後下載了最新的protobuf放到vlc/contrib
/tarballs/contrib-android-arm-linux-androideabi/protobuf目錄下,執行.
/configure --disable-shared,再編譯,沒想到就直接過了。
4. 載入VLC-For-Android的Java工程
編譯通過後,就可以直接在vlc-android/bin目錄下看到debug版的apk了,下面簡單說說在Eclipse中載入vlc-android的整個工程。
打開Eclipse,選擇Import,把vlc-for-android目錄下所有的工程到導入到Eclipse中(我去掉了TV工程),如圖所
示,有5個必須的工程,其中,VLC是主工程,其他四個都是Lib工程。沒有什麼意外的話,直接運行VLC工程,就可以在Android手機上看到VLC
播放器應用了!
③ 如何編譯vlc-qt-vs2013
出現這個提示是因為你的項目生成的目標是個dll,而調試的時候默認是啟動項目生成的目標的,dll是不能運行的,就出現了這個提示
④ 編譯VLC出錯,請幫我看看是怎麼回事
運行./compile 的出現兩個error:
ERROR : glx.c:49: 36: X11/extensions/XShm.h: No such file or directory
In file included from glx.c:57:
ERROR : xcommon.h: 357: expected specifier-qualifier-list before 'XShmSegmentInfo'
make: *** [all] Error 2
-------------------------------------------------------------------------------------
好像都是X11/extensions的問題,裝xorg-dev這個包
⑤ VLC源代碼包如何在linux下編譯+調試
你是為了裝軟體還是為了學習?如果只是裝個軟體,為什麼不裝二進製版的呢(.deb .rpm)。自己編譯挺麻煩的。
如果非想自己編譯,一般都是(我沒編譯過VLC,編譯過其他的,感覺像VLC這么大的軟體應該得較長時間!):先解壓下載的源碼包(tar.bz),然後從終端進入解壓後的源碼目錄,在終端輸入:一 ./configure ;二 make ;三 make install ;
一,好像是為了檢查當前系統參數,也可以在後面加環境變數參數(./configure [options])。如果沒問題便生成makefile
二,根據makefile編譯
三,編譯安裝。(二,可省略)
其實,不管是windows還是linux下載了軟體解壓後第一件事是讀readme!!!!!!!!!!!(其實你應該自己看readme和install,因為別人也不知道你下的軟體什麼情況,這兩個文件一般都會告訴你怎樣安裝以及軟體依賴什麼包!!)
再是讀install ,這是基本素質。要養成自覺性,這在linux下尤為重要!
至於調試,比較麻煩,不過如果只是裝軟體而不改代碼的情況下,不用專門調試(難道你還要用專門工具調試?) 既然說是菜鳥,又稿這么復雜的東西,並且搞這么復雜的東西又不在更專業的地方提問,網路知道一般是解決日常問題的地方!!!
不過一般情況下執行上述三步時會報錯,根據它報錯情況自己想辦法解決,一般來說是依賴不能滿足!
⑥ vlc源代碼如何使用
如果是用VC 6的打開dsw 後綴的文件,如果是VS 20003 打開sln 文件
如果是VS2005則打開 vcproject(這個名稱比較長,忘了,不知是不是這個,不過差不多的)
⑦ windows平台下編譯vlc,使用的是mingw+msys,到了make prebuilt,出現了pkg-config command not found
做這么專業的工作,還用WINDOWS。
⑧ vlc播放器是用什麼寫出來的
以下是編譯VLC源代碼時所需的庫:
Third party libraries used by VLC
You'll find a complete list on the wiki.
But, here are the most important libraries.
Audio/Video codecs
liba52 - an ATSC A/52 (aka AC3) audio decoder
libmad - an MPEG audio decoder
libmpeg2 - an MPEG1/2 video decoder
libavcodec (ffmpeg) - an extensive audio/video codec library which supports several formats like MPEG4, H263, WMV/A etc...
libogg - an Ogg bitstream parser
libvorbis - a Vorbis audio decoder
libflac - a FLAC (Free Lossless Audio Codec) audio decoder
libspeex - a Speex (Free speech codec) audio decoder
libtheora - a Theora video decoder
libfaad2 - an AAC audio decoder
libdv - a DV video decoder (deprecated in favor of libavcodec)
libxvidcore (xvid) - an ISO MPEG-4 compliant video codec (deprecated in favor of libavcodec)
libdca - A DTS Coherent Acoustics decoding library.
GUI framework libraries
wxWidgets - a cross-platform C++ GUI framework that keeps the look and feel of each platform
QT4 - a C++ Cross-Platform Rich Client Development Framework
Audio/Video output libraries
libsdl - a cross-platform multimedia library designed to provide level access to audio, and 2D video framebuffer
Miscellaneous libraries
libdvdcss - a library for accessing encrypted DVDs
libdvdnav - a library for DVD navigation
libdvdread - a library for reading DVD-Video images
libdvbpsi - a library designed for decoding and generation of MPEG TS and DVB PSI tables
libopenslp - an open-source implementation of Service Location Protocol
gettext - a set of tools that provides a framework to help applications proce multi-lingual messages
libfreetype2 - a software font engine that is designed to be small, efficient, highly customizable and portable while capable of procing high-quality output (glyph images).
fribidi - A Free Implementation of the Unicode Bidirectional Algorithm
liveMedia - C++ libraries for multimedia streaming (RTP/RTCP, RTSP, SIP)
matroska - a new, extensible open standard Audio/Video container format
If you're using those libs to compile VLC for windows with mingw-gcc 3.3.1, you can use our Win32 contribs.
如果需要更權威的回答,這里是VLC官方提供的源碼下載:
http://download.videolan.org/pub/vlc/
⑨ 用vs2010的c#調用vlc時出現: PInvoke 簽名的調用約定和參數與非託管的目標簽 名是否匹配。
[DllImport("libvlc.dll", EntryPoint = "libvlc_new", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[SuppressUnmanagedCodeSecurity]
private static extern IntPtr libvlc_new(int argc, IntPtr argv);
改一下參數就好了
⑩ 編譯VLC: 出現錯誤 non-system libraries in linker flags: -lhardware
開始然後點擊運行,輸入cmd,回車,在命令提示符下 直接復制以下命令,然後右鍵點擊命令提示符,再點擊粘貼
for %1 in (%windir%\system32\*.ocx) do regsvr32 /s %1
回車,滾動完畢後,再輸入:
for %1 in (%windir%\system32\*.dll) do regsvr32.exe /s %1
回車!直到屏幕滾動停止為止,重啟電腦 按照以上操作即可