Skip to content

Commit

Permalink
update documents and README
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Apr 5, 2013
1 parent 26c063c commit f249193
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 31 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ Then qmake will create a cache file _.qmake.cache_ in your build dir. Cache file
_WARNING_: If you are in windows mingw with sh.exe environment, you may need run qmake twice.


##### Known Issues

Debug library name may be wrong, you should manually rename the generated library to the name that compiler complains.


#### How To Write a Player

Expand Down
5 changes: 4 additions & 1 deletion doc/BuildQtAV-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ windows 无sh.exe的环境下的 gcc
make

qmake 在第一次运行的时候会检测所依赖的库, 你要保证这些库能被找到。
然后 qmake 会在编译目录生成一个 cache 文件 _.qmake.cache_ . cache 文件包含了检测结果,比如 portaudio 是否支持。 如果你想重新检测, 则需要删除 _**.qmake.cache**_ 再运行 qmake
然后 qmake 会在编译目录生成一个 cache 文件 _.qmake.cache_ . cache 文件包含了检测结果,比如 portaudio 是否支持。 如果你想重新检测, 则可以删除 _**.qmake.cache**_ 再运行 qmake, 也可以直接给 qmake 加个额外参数

qmake QtAV_source_dir/QtAV.pro CONFIG+=recheck


_WARNING_: If you are in windows mingw with sh.exe environment, you may need run qmake twice. I have not find out the reason!

Expand Down
5 changes: 4 additions & 1 deletion doc/BuildQtAV.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ It's strongly recommend not to build in source dir.
make

qmake will run check the required libraries at the first time, so you must make sure those libraries can be found by compiler.
Then qmake will create a cache file _.qmake.cache_ in your build dir. Cache file stores the check results, for example, whether portaudio is available. If you want to recheck, delete _**.qmake.cache**_ and run qmake again
Then qmake will create a cache file _.qmake.cache_ in your build dir. Cache file stores the check results, for example, whether portaudio is available. If you want to recheck, you can either delete _**.qmake.cache**_ and run qmake again, or run

qmake QtAV_source_dir/QtAV.pro CONFIG+=recheck


_WARNING_: If you are in windows mingw with sh.exe environment, you may need run qmake twice. I have not find out the reason!

Expand Down
41 changes: 41 additions & 0 deletions doc/UseQtAVinYourProjects-zh_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
在你的项目中包含 QtAV 非常容易. 因为 QtAV 的qmake工程是精心设计的. (可以参考: https://github.com/wang-bin/LibProjWizard4QtCreator)

你可以参考 QtAV 里的例子来了解如何使用 QtAV, 或者也可以使用以下步骤


###1. 新建一个 subdirs 类型的工程myproject及一个直接调用QtAV的player子工程

myproject/myproject.pro

TEMPLATE = subdirs
SUBDIRS += libQtAV myplayer
myplayer.depends += libQtAV
libQtAV.file = QtAV/src/libQtAV.pro

###2. 把 QtAV 放到myproject

可以在 myproject/ 目录下使用 `git clone [email protected]:wang-bin/QtAV.git`, 或者复制 QtAV 代码到 myproject/. 建议使用git,这样方便获取最新代码.

现在的目录变为

> myproject/myproject.pro
> myproject/myplayer/myplayer.pro
> myproject/QtAV/src/libQtAV.pro
> myproject/QtAV/src/libQtAV.pri
###3. 在player工程中包含 libQtAV.pri

在 myproject/myplayer/myplayer.pro, add

include(../QtAV/src/libQtAV.pri)

###4. 生成 Makefile

`qmake -r BUILD_DIR=some_dir`

必须使用参数 **_-r_****_BUILD_DIR=some_dir_**, 否则可能会出现依赖问题.

如果使用 QtCreator 来构建, 你可以点 _Projects_->_Build Steps_->_qmake_->_Additional arguments_, 添加 BUILD_DIR=your/buid/dir

###5. make
player 会生成在 $$BUILD_DIR/bin. 在windows下, QtAV 的 dll文件也会在那里生成
45 changes: 20 additions & 25 deletions doc/UseQtAVinYourProjects.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,38 @@ It's easy to include QtAV in your project. Because it's pro file are well design
You can see examples in QtAV to know how to use QtAV, or follow the steps below

## Steps
1. Create a subdirs type project in directory myproject
myproject/myplayer.pro
`
###1. Create a subdirs type project and a player project

myproject/myproject.pro

TEMPLATE = subdirs
`
`
SUBDIRS += libQtAV myplayer
`
`
myplayer.depends += libQtAV
`
`
libQtAV.file = QtAV/src/libQtAV.pro
`
2. Clone/Put QtAV to myproject

###2. Put QtAV to myproject

You can use `git clone [email protected]:wang-bin/QtAV.git` in myproject/, or copy QtAV to myproject/. It's recommend to use git so that you can checkout the latest code easily.

the directory now is

> myproject/myproject.pro
> myproject/myplayer/myplayer.pro
> myproject/QtAV/src/libQtAV.pro
> myproject/QtAV/src/libQtAV.pri
3. Add libQtAV.pri in you project
in myproject/myplayer.pro, add
`
include(../QtAV/src/libQtAV.pri)
`
4. generate Makefile
###3. Add libQtAV.pri in you player project
in myproject/myplayer/myplayer.pro, add

qmake
include(../QtAV/src/libQtAV.pri)

###4. generate Makefile

>> If you have problem when building with `qmake`, try `qmake -r BUILD_DIR=some_dir`
>> YOU MUST use parameter **_-r_** and **_BUILD_DIR=some_dir_**, or the dependence will be broken when building due to my pro structure.
>> If you are using QtCreator to build the project, you should go to _Projects_->_Build Steps_->_qmake_->_Additional arguments_, add BUILD_DIR=your/buid/dir
`qmake -r BUILD_DIR=some_dir`

5. make
you player binary will be created in $$BUILD_DIR/bin, BUILD_DIR is your shadow build dir. If you are in windows, the QtAV dll also be there
YOU MUST use parameter **_-r_** and **_BUILD_DIR=some_dir_**, or the dependence will be broken when building due to my pro structure.

### ISSUES
If you are using QtCreator to build the project, you should go to _Projects_->_Build Steps_->_qmake_->_Additional arguments_, add BUILD_DIR=your/buid/dir

If you want to build a debug version, you may get some link errors. It's not your problem, my qmake projects have some little problem. Just fix it manually yourself
###5. make
you player binary will be created in $$BUILD_DIR/bin. If you are in windows, the QtAV dll also be there
11 changes: 11 additions & 0 deletions doc/UsingPipe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FFmpeg supports playing media streams from pipe. Pipe is a protocol in FFmpeg. To use it, you just need to replace the file name with 'pipe:'. for example

cat hello.avi |player pipe:

It also supports streams from file number

pipe:number

'number' can be 0, 1, 2, .... 0 is stdin, 1 is stdout and 2 is stderr. If 'number' is empty, it means stdin.

FFmpeg is powerful, do you think so?

0 comments on commit f249193

Please sign in to comment.