Chromium是Google浏览器Chrome的开源版本,但是这两个浏览器在feature上有一些细微的差别,比如在HTML5媒体格式的支持种类上Chromium要少于Chrome。说到HTML5,与HTML4相比最有意义的改进之一就是新增了video tag,可以在网页上直接播放视频而不需要安装插件,至于HTML5 video tag支持哪些种类的视频格式取决于浏览器,目前各家浏览器支持的HTML5视频格式主要有3种:
在Windows上,要给Chromium增加支持H.264,一种办法是安装微软给Chrome提供的WMP扩展(extension),在这里下载:http://www.interoperabilitybridges.com/wmp-extension-for-chrome,当然不是开源的。给Chromium安装这个extension后,如果遇到H.264格式的MP4视频,就会调用Windows Media Player来播放。除此之外,还有没有其他办法?这正是本文要讨论的主题。
至于Chrome,按照网上的说法“由于FFmpeg采用LGPL 2.1许可证,而Chrome是闭源的,所以Google指出Chrome并不会使用FFmpeg库,而是使用本地的视频音频库(Windows上可能是Windows Media Player)”,实际情况是这样吗?我在Chrome的安装路径下看到同样也有前述的那3个FFmpeg的动态库,试一下,如果把这3个.dll删掉,就会发现Chrome无法播放HTML5视频了,可见Chrome仍然是使用FFmpeg来播放视频的,至少我使用的Chrome 20.0.1096.1是这样的。
除掉测试用的代码,一共有两个工程chrome\browser和net\base中的代码使用了宏USE_PROPRIETARY_CODECS,为此在Visual Studio 2010中给这两个工程增添了预定义的宏USE_PROPRIETARY_CODECS,重新编译出chrome.exe,试验结果OK!现在Chromium可以象Chrome一样支持H.264视频了。
2. 除了使用微软给Chrome提供的WMP扩展,如何不使用FFmpeg,改为调用系统提供的音视频解码库比如Windows Media Player或者其他音视频解码库来支持HTML5媒体播放?
另外参考这两篇文章:
chromium video and audio
chromium video
Playing Youtube HTML5 version under Chromium
Chromium is web browser released by Google Inc, it is the base of Chrome browser (close source).
Chrome come with ffmpeg which can decode mp3 and h.264 movies which is commonly used in HTML 5 video sites like Youtube.
But due to license issue, even the ffmpeg source is came with Chromium, it is disabled in build time.
In case you don't care about the license and you won't distribute your build, you can enable it for video support in HTML5
Before running gclient sync:
export GYP_DEFINES="ffmpeg_branding=Chrome werror="
Playing Youtube HTML5 version under Chromium
Chromium is web browser released by Google Inc, it is the base of Chrome browser (close source).
Chrome come with ffmpeg which can decode mp3 and h.264 movies which is commonly used in HTML 5 video sites like Youtube.
But due to license issue, even the ffmpeg source is came with Chromium, it is disabled in build time.
In case you don't care about the license and you won't distribute your build, you can enable it for video support in HTML5
Before running gclient sync:
export GYP_DEFINES="ffmpeg_branding=Chrome werror="
After running gclient sync:
edit src/net/base/mime_util.cc and comment out those CHROME related defines.
Now you can go to http://www.youtube.com/html5/ to enable the HTML5 version of Youtube, in my computer, the HTML5 version run even smoother than flash!
After running gclient sync:
edit src/net/base/mime_util.cc and comment out those CHROME related defines.
Now you can go to http://www.youtube.com/html5/ to enable the HTML5 version of Youtube, in my computer, the HTML5 version run even smoother than flash!
参见该链接,我先试试
node-webkit
build your own
Alternatively, if you are building node-webkit, open src/third_party/ffmpeg/chromium/scripts/build_ffmpeg.sh, go to (approximately, might change) line 379 and change
# Google Chrome & ChromeOS specific configuration.
add_flag_chrome --enable-decoder=aac,h264,mp3
add_flag_chrome --enable-demuxer=mp3,mov
add_flag_chrome --enable-parser=aac,h264,mpegaudio
Then follow the short directions here: http://src.chromium.org/svn/trunk/deps/third_party/ffmpeg/README.chromium
Please also at least turn on the resource loader's support in Chromium's code, or your format will be treated as non supported MIME type and won't be loaded. See src/net/base/mime_util.cc. You might want to look into code in other files guarded by 'USE_PROPRIETARY_CODECS' macro.
Enum是计算机编程语言中的一种数据类型---枚举类型。 在实际问题中,有些变量的取值被限定在一个有限的范围内。 例如,一个星期内只有七天 我们通常这样实现上面的定义:
public String monday;
public String tuesday;
public String wensday;
public String thursday
java.lang.IllegalStateException: No matching PlatformTransactionManager bean found for qualifier 'add' - neither qualifier match nor bean name match!
网上找了好多的资料没能解决,后来发现:项目中使用的是xml配置的方式配置事务,但是
原文:http://stackoverflow.com/questions/15585602/change-limit-for-mysql-row-size-too-large
异常信息:
Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAM
/**
* 格式化时间 2013/6/13 by 半仙 alxw4616@msn.com
* 需要 pad 函数
* 接收可用的时间值.
* 返回替换时间占位符后的字符串
*
* 时间占位符:年 Y 月 M 日 D 小时 h 分 m 秒 s 重复次数表示占位数
* 如 YYYY 4占4位 YY 占2位<p></p>
* MM DD hh mm
在使用下面的命令是可以通过--help来获取更多的信息1,查询当前目录文件列表:ls
ls命令默认状态下将按首字母升序列出你当前文件夹下面的所有内容,但这样直接运行所得到的信息也是比较少的,通常它可以结合以下这些参数运行以查询更多的信息:
ls / 显示/.下的所有文件和目录
ls -l 给出文件或者文件夹的详细信息
ls -a 显示所有文件,包括隐藏文
Spring Tool Suite(简称STS)是基于Eclipse,专门针对Spring开发者提供大量的便捷功能的优秀开发工具。
在3.7.0版本主要做了如下的更新:
将eclipse版本更新至Eclipse Mars 4.5 GA
Spring Boot(JavaEE开发的颠覆者集大成者,推荐大家学习)的配置语言YAML编辑器的支持(包含自动提示,