vweb2010_trickmode_lib_src
所属分类:WEB开发
开发工具:Unix_Linux
文件大小:316KB
下载次数:63
上传日期:2007-02-01 16:27:21
上 传 者:
eltonhuang
说明: 这是一次偶然机会在台湾一个网站上搜到的vweb2010 做DVR的trickmode部分单独出来的LIB库所有源码,根据比较,和供应商提供的基本一致,只是版本老一点。
(This is a fortuitous opportunity for a site in Taiwan found on the DVR vweb2010 do the tric kmode separate part of the source code of all the LIB, according to earlier, and the suppliers to provide consistent, Old version only 1:00.)
文件列表:
247253\vweb2010_trickmode_lib_src\avi2smux (68320, 2005-06-04)
247253\vweb2010_trickmode_lib_src\bmp2osd (50, 2005-06-04)
247253\vweb2010_trickmode_lib_src\codec (56789, 2005-06-04)
247253\vweb2010_trickmode_lib_src\decoder (38560, 2005-06-04)
247253\vweb2010_trickmode_lib_src\encoder (47134, 2005-06-04)
247253\vweb2010_trickmode_lib_src\install_libvwSDK (117, 2005-06-04)
247253\vweb2010_trickmode_lib_src\looptest (104, 2005-06-04)
247253\vweb2010_trickmode_lib_src\Makefile (38040, 2005-06-04)
247253\vweb2010_trickmode_lib_src\mp42ps (73773, 2005-06-04)
247253\vweb2010_trickmode_lib_src\app_struct.h (1614, 2005-06-04)
247253\vweb2010_trickmode_lib_src\BoundedQueue.h (2701, 2005-06-04)
247253\vweb2010_trickmode_lib_src\cfifobuf.h (5151, 2005-06-04)
247253\vweb2010_trickmode_lib_src\file_io.h (14994, 2005-06-04)
247253\vweb2010_trickmode_lib_src\i2caudvid.h (1339, 2005-06-04)
247253\vweb2010_trickmode_lib_src\i2ctest.h (805, 2005-06-04)
247253\vweb2010_trickmode_lib_src\ioctldef.h (20367, 2005-06-04)
247253\vweb2010_trickmode_lib_src\keyboard.h (2741, 2005-06-04)
247253\vweb2010_trickmode_lib_src\linuxdef.h (1678, 2005-06-04)
247253\vweb2010_trickmode_lib_src\network.h (2869, 2005-06-04)
247253\vweb2010_trickmode_lib_src\parse_args.h (3162, 2005-06-04)
247253\vweb2010_trickmode_lib_src\srec.h (1670, 2005-06-04)
247253\vweb2010_trickmode_lib_src\StdAfx.h (778, 2005-06-04)
247253\vweb2010_trickmode_lib_src\threads.h (13513, 2005-06-04)
247253\vweb2010_trickmode_lib_src\tuner_api.h (6858, 2005-06-04)
247253\vweb2010_trickmode_lib_src\tvtuner.h (5078, 2005-06-04)
247253\vweb2010_trickmode_lib_src\types.h (6350, 2005-06-04)
247253\vweb2010_trickmode_lib_src\vw2010_defs.h (38588, 2005-06-04)
247253\vweb2010_trickmode_lib_src\vwosd.h (11385, 2005-06-04)
247253\vweb2010_trickmode_lib_src\vwSDK.h (1012, 2005-06-04)
247253\vweb2010_trickmode_lib_src\vwSDKbase.h (21089, 2005-06-04)
247253\vweb2010_trickmode_lib_src\vwSDK_ConfigUtil.h (14986, 2005-06-04)
247253\vweb2010_trickmode_lib_src\vwSDK_DisplayConstants.h (2841, 2005-06-04)
247253\vweb2010_trickmode_lib_src\vwSDK_vw2010impl.h (39290, 2005-06-04)
247253\vweb2010_trickmode_lib_src\windowdef.h (837, 2005-06-04)
247253\vweb2010_trickmode_lib_src\xfersize.h (3358, 2005-06-04)
247253\vweb2010_trickmode_lib_src\bug_vwSDK_ConfigUtil.cpp (29450, 2005-06-04)
247253\vweb2010_trickmode_lib_src\codec.cpp (46961, 2005-06-04)
247253\vweb2010_trickmode_lib_src\ctrlhandler.cpp (3644, 2005-06-04)
247253\vweb2010_trickmode_lib_src\decoder.cpp (21024, 2005-06-04)
247253\vweb2010_trickmode_lib_src\encoder.cpp (24433, 2005-06-04)
... ...
- readme.linux.txt -
----------------------------------------------------------------------------------
Linux System Requirements
- Redhat 7.3 (Kernel 2.4.18-3) or
Redhat 9.0 (Kernel 2.4.20)
- 256MB of system memory
- Vweb Encore PCI VW2010 (Codec)
Vweb VForce PCI VW2005 (Encoder only)
Vweb WIN10 PCI VW2002 (Decoder only)
- DiVX Software Decoder for Linux can be downloaded from
http://www.divx.com
-----------------------------------------------------------------------------------
HOW TO INSTALL THE BOARD?
- Insert the WIN10 board into a free PCI slot and be sure to
screw it in properly.
- Connect the DVI adapter A/V cable to a good audio/video input
source. The DVI adapter A/V cable has all the A/V connections
labeled on the cable.
HOW TO OPEN UP THE ZIPPED TARBALL?
1) Go to the directory in which you wish to setup the source code
2) tar zxvf linux_sdk2_src-.tar.gz
NOTE: may vary depending on the release version
3) The directory stucture is as follows
- OSDLIB Binary/Source packages
OSDLIB - Home path of OSDLIB project
OSDLIB\bin - OSD programs that illustrate the OSD library functions
OSDLIB\bitmaps - additional OSD bitmaps that can be used (i.e. osdview program)
- OSDLIB Source Package also includes these folders
OSDLIB\alldemo - demo combining many OSD samples together
OSDLIB\common - commonly shared header and source files for the OSD Library
OSDLIB\menudemo - a menu demo illustrating OSD
OSDLIB\osdclock - OSD clock that shows the most up to date time
OSDLIB\osdview - OSD View (displays OSD bitmaps) from the command line
OSDLIB\vwosdlib - Vweb OSD Shared Library
- Note: Please see these files for more information about the OSD Library
OSDLIB\readme.txt
OSDLIB\bin\readme.txt
- SDK2 Binary/Source packages
SDK2 - SDK2 samples and libraries
SDK2\driver_linux - Directory for vw2002/vw2005/vw2010 driver
SDK2\html - Documentation for SDK2 classes and functions
SDK2\mpeg2divx - MPEG-4PS to DiVX conversion program
SDK2\option_files - series of INI script files for SDK2 samples
- MPEG-4 Software Decoder player (rh7.3 and rh9.0)
mp4player_rh73 - MPEG-4 PS Software Player Redhat 7.3, see (readme.txt)
mp4player_rh90 - MPEG-4 PS Software Player Redhat 9.0, see (readme.txt)
Please follow the directions in readme.txt for MPEG-4 PS software
playback.
- DEBUG FIRMWARE LOG (project)
log\getlog - program to display the firmware LOG
HOW DO I LOAD THE VW2002/VW2005/VW2010 DRIVER?
1) Make sure the VW2010 PCI linux driver has been loaded. The
linux driver is a dynamic module, and must be loaded via hte
command line:
cd /SDK2/driver_linux
./modload (to load the driver)
./modunload (to remove the driver)
Note: if you are using VW2002 (decoder only), you will need to specify -vw2002 in
the command line program ./decoder
HOW DO I INSTALL THE SHARED LIBRARIES?
1) The Vweb SDK2 has two shared libraries, and must be installed accordingly:
cd /SDK2
./install_libvwSDK
cd /OSDLIB
./install_libvwOSD
HOW DO I RUN THE DEBUG FIRMWARE LOG?
1) To run getlog with a specific board,
// for VW2010 Board #0:, type
./getlog -board0
// for VW2010 Board #10, type
./getlog -board10
If no -boardnum is used, Board #0 will be used as default
HOW TO BUILD THE PROJECT?
Note: [This is for the source code package only]
1) Make sure the VW2010 PCI linux driver has been loaded. The
linux driver is a dynamic module, and must be loaded via hte
command line:
cd /SDK2/driver
./modload (to load the driver)
./modunload (to remove the driver)
2) Change to the "release" directory
To build encoder, decoder, codec, transcode:
or to build all, just type:
> make exe
To clean up all the build binaries and executables, just type:
> make cleanall
- All the .ini files are configuration files which have been tested and
verified to be working by our QA.
WHERE ARE THE DOCUMENTATION?
- Documentation consist of this file plus a set of html files that indicates the
entry points, configuration parameters, etc. in SDK2. You can find the SDK2
documentation in the "/sdk2/html" directory
HOW DO I TRY OUT THE SDK2?
If you type ./decoder or ./encoder you can run the one of the ini
scripts at the command line. Here is an example:
All of these examples are assuming S-Video input, with NTSC source
[Encoding MPEG-4 Program Stream]
> ./encoder option_files/enc_mp4ps_ntsc_03m.ini mpeg4ps_03m.mpg
[Encoding MPEG-2 Transport Stream]
> ./encoder option_files/enc_mp2ts_ntsc_03m.ini mpeg4ts_03m.mpg
[Decoding MPEG-4 Program Stream] (add -vw2002 if VW2002 board)
> ./decoder option_files/dec_mp4ps_ntsc.ini mpeg4ps_03m.mpg
[Decoding MPEG-2 Transport Stream] (add -vw2002 if VW2002 board)
> ./decoder option_files/dec_mp2ts_ntsc.ini mpeg2ts_03m.mpg
[Codec MPEG-4 Program Stream]
- 1st Connect Audio/Video input to a Video Source
- 2nd Connect Audio/Video output cables to a TV for viewing
- This assumes S-Video input source
> ./codec option_files/codec_mp4ps_ntsc_03m.ini
- To run with a composite source type the following
> ./codec option_files/codec_mp4ps_ntsc_03m.ini video_input_device=0xc40242
[Codec MPEG-4 Transport Stream]
- 1st Connect Audio/Video input to a Video Source
- 2nd Connect Audio/Video output cables to a TV for viewing
- This assumes S-Video input source
> ./codec option_files/codec_mp2ts_ntsc_03m.ini
- To run with a composite source type the following
> ./codec option_files/codec_mp2ts_ntsc_03m.ini video_input_device=0xc40242
[TRANSCODING - HOW DO I USE IT]?
Note, there are more Transcoding INI Files available.
Steps how to use transcoding:
1) to capture higher bit rate, such as 4Mbps, of MPEG video;
Note that vbr and telecine parameters should be set to zeros in the corresponding initialization file.
(program stream)
vid_vbr=0
vid_inverse_telecine=0
(example from SDK2)
encoder option_files/enc_mp2ps_ntsc_04m_cbr.ini mp2ps_ntsc_cbr_4m.mpg
2) Connect both the audio & video outputs to audio & video inputs (you may need to disconnect
existing connects) to do this. This is the external connect such that the Video Decoder
output is routed to the Video Encoder input.
To transcode mpeg2 video and audio into lower bit rate, such as 2Mbps, mpeg4 video and AC3 audio:
Note that vbr and telecine parameters should be set to zeros in the corresponding initialization file.
(program stream)
vid_vbr=0
vid_inverse_telecine=0
(example from SDK2):
./transcode option_files/xcode_mp1ac3_mp2ps_mp4ps_ntsc.ini -source mp2ps_ntsc_cbr_4mb.mpg -output ac3_mp4ps_ntsc_2m.mpg
4) The resulting Transcoded file can be played back with the hardware decoder.
In this case, to playback this file, you need to use the AC3 decoder firmware.
There is an INI file that demonstrates this.
Before you do this, please re-connect the Audio & Video outputs (from the board) to a TV monitor
(example of SDK2)
./decoder option_files/dec_ac3_mp4ps_ntsc.ini ac3_mp4ps_ntsc_2m.mpg
OW DO I CREATE DIVX AVI FILE from MPEG-4 PS?
- there is a command line program to convert MPEG-4 PS to DIVX
> ./ps2divx mpeg4ps.mpg divx_file.avi
HOW DO I CREATE DIVX AVI FILE from the encoder?
- there is an "-divx" option in the encoder program. Add "-divx" to the end,
and it will automatically do the DIVX conversion. For the example below,
a file mpeg4ps_ac3.mpg.avi will be generated after encoding stops.
./encoder enc_ac3_mp4ps_ntsc.ini mpeg4ps_ac3.mpg -divx
HOW DO I ENCODE with COMPOSITE?
- To encode with composite, there is an override feature with encoder
and codec. Simply add the following to the end of the command line:
video_input_device=0xc40242
./encoder enc_mp4ps_ntsc_03m_cbr.ini mpeg4ps_ntsc.mpg video_input_device=0xc40242
HOW TO I TRY ?
A multitude of configuration options are exposed through the .ini configuration
file. This includes most of the settings mentioned in the "Chapter 8: Encoder
TS ioctl() Reference" and "Chapter 9: Encoder PS ioctl() Reference" of the
VW2010 Programmer's Refernce Manual.
It is recommended for programmers to use that as the reference.
A list of the configuration parameters available to be set via the .ini file
and their default value is in the "Documentation" section of the
ConfigParser.html page in the /html directory.
Some common setting modifications include:
1. Setting bit rates for encoding:
a. constant bit rate (program stream)
modify vid_average_bit_rate to desired bit rate
modify vid_bit_rate to desired bit rate (should be same as vid_average_bit_rate)
either do not movidy vid_vbr (default = 0) or set it to 0.
b. variable bit rate (program stream)
modify vid_average_bit_rate to desired average bit rate
modify vid_bit_rate to maximum bit rate (should be greater than vid_average_bit_rate)
modify the vid_vbr to 1
c. transport stream
modify video_bit_rate to desired bit rate
2. Setting different MPEG / Stream / Signal types
The best way to configure these is to copy the corresponding .ini file and modify accordingly.
Example - MPEG2 / Program Stream / PAL:
ps_stream_type=4
vid_stream_type=2
vid_video_format=1
for details on the valid values of these parameters see either "Chapter 8: Encoder TS ioctl() Reference"
or "Chapter 9: Endoer PS ioctl() Reference" of the VW2010 Programmer's Refernce Manual.
Other configurable features include 3:2 pull down (telecine mode), video GOP (gop structure),
vbv buffer size,
HOW DO I USE THE TV TUNER AS AN INPUT?
1. Requirements:
SDK2 2.00 (release post 08/22/03)
Either:
NTSC USA channel 3 signal -or-
PAL GERMANY channel 24 signal -or-
PAL CHINA channel 24 signal
Note that other signal types are not currently supported in the sample
application.
2. There are several options you can use to select the TV-Tuner.
For PAL TV-Tuners, the sample code sets the Philips 1216ME
or compatible tuner. The sample supports PAL-D or PAL-G.
For NTSC TV-Tuners, the sample code sets the Philips 1236 or
compatible tuner. The same supports NTSC.
To run with TV-Tuner set to ***, channel 24, PAL-D
> ./encoder tv_pal.ini -tvtunerPALD
To run with TV-Tuner set to Germany, channel 24, PAL-G
> ./encoder tv_pal.ini -tvtunerPALG
To run with TV-Tuner set to USA, channel 3, NTSC
> ./encoder tv_ntsc.ini -tvtunerNTSC
Note that the tv_pal.ini and tv_ntsc.ini are provided as examples. It is
possible to set up other modes for encoding the same.
NOTES ON ADVANCED FEATURES
WHERE IS PREVIEW AND ENCODING?
For simultaneous preview and encode (P&E) please contact
(support@vwebcorp.com) for sample application codes.
NOTE: only SIF resolution (raw data) is supported for Preview and Encoding.
WHAT IS MAR?
Motion activated recording (MAR) is used for video surveillance
applications. The user can specify up to 9 regions to detect motion
activities. Each region is defined by (X and Y) macroblock positions,
with motion vector threshold for each region. Using this information
read back from the hardware, the user application can determine whether
there is the motion activity from any of the 9 regions. Then the
application can decide whether to trigger a remote alarm or start
recording. When no activity is present, the recording can be stopped
to save storage space. For sample code and details, please contact
support@vwebcorp.com.
NOTE: only I and P frame, M=1 is supported for MAR.
HOW TO PROGRAM MAR (MOTION ACTIVATED RECORDING)?
Requirements:
You should have a copy of the VW2010 External Register Spec.
1. You can set the REG_MDRC (Motion Detection Region Control) via the
vid_MD_enable configuration variable. The setting is as follows (0 = disable,
1 = enable):
Bit 15 - enable motion detection
9-14 - reserved
8 - enable region I
7 - enable region H
6 - enable region G
5 - enable region F
4 - enable region E
3 - enable region D
2 - enable region C
1 - enable region B
0 - enable region A
2. You can set each of the REG_MD0 (Motion Detection Region
Horizontal Coordinates) via the vid_MD_x configuration variable
(Example: to set REG_MDA0, set the configuration variable vid_MDA_x). The
setting is as follows:
Bit 8-15 left-most macroblock number
0-7 right-most macroblock number plus one
3. You can set each of the REG_MD1 (Motion Detection Region
Vertical Coordinates) via the vid_MD_y configuration variable
(Example: to set REG_MDA1, set the configuration variable vid_MDA_y). The
setting is as follows:
Bit 8-15 top-most macroblock number
0-7 bottom-most macroblock number plus one
4. You can set each of the REG_MD2 (Motion Detection Region
Motion Vector Threshold) via the vid_MD_thresh configuration
variable. (Example to set REG_MDA2, set the configuration variable
vid_MDA_thresh). The setting is as follows:
16-bit short of the threshold: mv_thresh = |mv.x| + |mv.y|
5. To read back the result, use the getMotionDetectionResult(...) function
from the SDK. Alternatively, read off the shared memory region 0x271 for the
motion detection result.
The result is 5 DWORDs each DWORD representing the count for two regions.
WHAT IS eVBI?
- PSMUX supports Extended Vertical Resolution (512), PAL (608)
to encode Extended VBI (eVBI) resolution, it adds 32 lines ontop
of the video active area.
WHAT IS LFR AND LBR?
- Low Delay and Skip Frame mode is supported in PSMUX and TSMUX
firmwares. This option changes the number of frames to skip
from the Encoder and allows for lower frame rates (LFR) as well
as very low bitrates (LBR).
- Use MinQ/MaxQ for I, BP pictures to help adjust the quality for low bitrate video.
- For low bitrate with QSIF resolution, PSMUX (lowest 100kbps) and
TSMUX (lowest 128kbps) must have skip frame enabled. The
minimum # of frames to skip must be set greater than zero for
low bitrate.
(Enable Skip frame also works for other resolutions, but it will
capture with higher bitrates than 100kps or 128kps respectively)
HOW DO I OPTIMIZE VIDEO RESULT FOR VCR SOURCE?
- PSMUX Enables Closed GOP for encoding video from VCR sources.
WHAT DO I DO WITH VIDEO SOURCE WITH POOR VIDEO SYNC?
- PSMUX will automatically enable Detection of Bad Video Sync
(for video sources with poor video sync)
近期下载者:
相关文件:
收藏者: