Development of streaming media (2)

zhaozj2021-02-16  60

If you have read the first article or have already a preliminary understanding of xvid. Then you will explain how to get and get the latest XVID code, and how to compile with VC6.0.

The latest version of XVID is currently 1.0.1. Please download.

How to Compile XviD with Microsoft Visual C 6.0OK, you've got your copy of Microsoft Visual C 6.0. You should be able to just download the source code, click on the project file, and a few second later, you'll have The xvid binary. Right? Well, Unfortunately, It's Not That Easy. However, It's.

I. Download Necessary Files

Xvid Depends on a Number of Libraries and Programs That Do Not Come Standard With Microsoft Visual C 6.0.

You ued:

1) Service Pack 5 for Visual Studio 6 - http://msdn.microsoft.com/vstudio/downloads/updates/sp/vs6/sp5/default.aspthe service pack Contains All The Latest bug fixes for Visual C 6.0 As Well AS .

2) Visual C 6.0 Processor Pack -! Http://msdn.microsoft.com/vstudio/downloads/tools/ppack/default.aspxThe processors pack adds support for Intel's SSE, SEE2 and AMD's 3DNow instructions.

3) NASM - The Famous NetWide assembler - http://sourceforge.net/projects/nasm/xvid Uses NASM to "Compile" The code Written in assembly ". Download the win32 binary.

4) DirectX 9.0 SDK - http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.aspTo build the DirectShow filter, you need the DirectX SDK (Software Development Kit) Unfortunately for. Dial-Up Users, The ~ 200MB DirectX SDK IS No Longer Available On CD.

5) (optional) Pthreads for Win32 - http://sources.redhat.com/pthreads-win32/you will need the pthreads library of the xvid.dll. This is not needed for MOST USERS Since Most Users Don't Have Dual Processing Systems.ii. Configuring The Compiler

1) Installing Service Pack 5

The service pack is easy to install since it comes with an install. The installer's filename is "setupsp5.exe". Just Find The File and Double-Click IT.

2) Installing Visual C Processor Pack

Double-Click "vcpp5.exe" to install. 3) Installing and configuring NASM

a) Unzip the file to an easy to remember directory of your choosing (ie, "C: / DEVELOP / NASM") b) Xvid expects the filename to be "nasm.exe" (probably because all other versions except the Win32 version has That name). for Some Reason, The Win32 Version Nasm Has A FileName of "Nasmw.exe." I Recommend Making A Copy of "NASMW.exe" And Renaming It "Nasm.exe." c) Load Up Microsoft Visual C .

I) Click on the "Tools" Menu and SELECT "Options." II) Click on the "Director" Tab.iii) SELECT "Executable File" from the "show Directories for" Dropdown Box.iv) Add the path to NASM EG, "C: / Wevelop / NASM")

4) Installing and configuring the DirectX SDK

THE DIRECTX SDK COMES with An Installer. Just Double-Click on The "setup.exe" File and Follow The Prompts.

To Configure the DirectX SDK:

a) Load Up Microsoft Visual C . b) Click on the "Tools" Menu and SELECT "options." c) Click on The "Director" Tab.D) SELECT "Include Files" from the "show directories for" DROPDOWN BOX. e) Add the following entry: "/ Samples / C / DirectShow / Baseclasses" Where You Replace

With the actual path to the DirectX SDK (i.e., "c: / wevelop / dxsdk").

f) Use the little up arrow icon to move the entries to the top of the list.

Iii. Compiableing XVID

Now You Can Download The Source Code, Click On The Workspace File, And A Few Second Later, You'll Have The Xvid Binary. Just make Sure You Build The xvidcore first.

Iv. Installing xvid

For Windows Users, There Are Really Only Three Files You Have to Be Concerned with:

1) xvid.dll and xvid.inf - Both of these files are in the ""

/ Vfw / bin / "directory. The" xvid.dll "file is the Xvid Video for Windows codec. This file is necessary if you wish to encode any videos using a Video for Windows compliant program (ie, almost every video editor out there ). in theory, you should be able to play back Xvid files in the Windows Media Player using this file as well although this functionality appears to be broken at this point. Therefore, if you wish to play back files in a media player, install The "xvid.ax" File (see Below). The "xvid.inf" File is the setup information file. Basical, this file tells windows how to install "xvid.dll".

To Install the xvid video for Windows Codec (Aka Xvid.dll)

a) Simply Right-Click The "xvid.inf" and select "install" from the context menu.

That's it, you're done. To verify that the file has been installed correctly, go to the Control Panel and select "Multimedia", then click on the "Devices" tab and finally see if "XVID" is listed under the "Video Compression Codecs "Section. If You wish to uninstall the xvid codec, select" xvid mpeg-4 codec "from the" add / remove program "list in the control panel.2) xvid.ax-heis file is in the"

/ Dshow / bin / "directory. The" xvid.ax "file is the Xvid DirectShow filter. Microsoft has decreed that DirectShow shall replace Video for Windows, so in theory you will not need" xvid.dll ". However, this isn 'T true. instead, the directshow filter is buyd. .. ,,,,,,,,,,,

To Install the xvid DirectShow Filter (AKA Xvid.ax)

a) First copy the "xvid.ax" file to a safe place (ie,. "C: / Program Files / xvid") The Video for Windows codec is automatically copied to the Windows system directory when you install it The DirectShow filter. Is Not. Therefore, if You Lose Your DirectShow Filter.B) LOVID.AX "File to A Safe Place, Go to the Start Menu and SELECT" Run. "TYPE"

/ system / regsvr32

/XVID.AX "(i.e, c: / windows / system / regsvr32 c: / program files / xvid.ax).

That's it, you're done. There really is no easy way to verify that the DirectShow filter was properly installed other than to play a Xvid encoded video. To uninstall the DirectShow filter, go to the Start Menu and select "Run." Type "

/ SYSTEM / RegSVR32 / U

/XVID.AX "

V. Troubleshooting Faqq. Why do I get the folowing error message:

Assembling ../../src/utils/x86_asm/mem_transfer_mmx.asmbad Command OR File Name

A. You Did Not Correctly Install NASM.

Q. What Causes this error: "CXVIDDECODER.OBJ: ERROR LNK2001: Unresolved External Symbol _mediasubtype_iyuv"?

A. this is caused by an outdated strmbase.lib. You need to build a new one. The path to the project file is

/Samples/c /directshow/baseclasses/baseclasses.dsw. After you build the library, i recomment you copy the strmbase.lib file to

/ lib.

Q. I have ffdshow, do I need to install the xvid DirectShow Filter?

A. NO, Not really.

Q. When Trying to open a workspace file (.dsw), I get an "empty" Workspace (IE, there no source files listed) and / or when useing to open a project file (.dsp), I get a " This makefile was not generated by developer studio "Error.

A. OFTEN, this Can Be Caused by Having UNIX Line Breaks (LF) in The .dsw and .dsp Files, AS Opposed to Windows Line Breaks (CR / LF). It is intending to note this .dsw and .dsp Files Are just text files; you can open them up in any text editor If you open the .dsw and .dsp files in a text editor that can not handle UNIX line breaks (namely Notepad) you will probably see big, black squares at the. End of lines. You can "fix" this error by Following this Procedure.

a) Do NOT let Microsoft Visual C attempt to fix the problem! Press "No" when prompted.b) Open the .dsw and .dsp files in a text editor that understands UNIX line breaks. WordPad is one and it is available with most copies of Windows.c) Once open, simply re-save the file (In WordPad, make sure you set the save as type to "Text Document"). All UNIX line breaks should be converted to Windows line breaks.Also, I have noticed that some "archive" utilities like Winzip will perform the UNIX -> Windows line break conversion automatically so I recommend you use those utilities At the time of writing, archive utilities that do not perform this conversion include PowerArchiver and WinRAR..

Q. I Get Lots of Error Messages Similar To The Following:

../../src/quant/x86_asm/quantize_mmmx.asm:429: Parser: instruction expected ../../ src / quant / x86_asm / quantize_mmx.asm: 430: Symbol `MOVDQA 'Redefined

A. You are useing an old version of nasm, download a new version from http://sourceforge.net/projects/nasm/

Q. I get a few "Fatal: Unable to open incrude file` colorspace_mmx.inc '"Errors.

A. this is apparently caused by Versions of Nasm NASM NASINER THAN 0.98.37. For Whate Reason, NASM Seems To Have Trouble DEALING WIX TO FIX THE PROBLEM:

a) Open up the project settings by pressing ALT-F7 or selecting "Settings" from the "Project" menu.b) Find the following three files under "xvidcore / image / image_asm": 1) colorspace_rgb_mmx.asm2) colorspace_yuy_mmx.asm3) Colorspace_yuyv_mmmx.asm

For Each of the Files, Click on The "Custom Build" Tab and Change The Line in The "Commands" Box To Read:

"NASM -F WIN32 -DPREFIX -I" $ (InputDir) "/ -o $ (intDir) / $ (InputName) .Obj $ (InputPath) INSTEAD OF:

"NASM -F WIN32 -DPREFIX -I" $ (Inputdir) "-o $ (InputName) .Obj $ (InputPath)

NOTICE The Extra "/" BetWeen THE "" and "-o".

Alternately, You Could Just Downgrade Back to NASM 0.98.36.

Q. What Does "error C2520: Conversion from unsigned __int64 to double not mailmented, use sign __int64" mean?

A. IT means you need to install the Visual C Processor Pack.

Q. I Have Visual C 6.0 Standard. Microsoft Says I Need The Professional or Enterprise Edition in Order To Install The Processor Pack. Does This Mean I am Out of luck?

A. NO. But it does mean you can't Use the installer. INSTALL, you have to manually install the processor pack. Bascially, You Have to:

a) Extract the files to a temporary directory using your favorite archive utilitly (ie, Winzip) .b) Find the "vcpp.inf" file in the temporary directory and open it. Inside that file is all the information you need to install the Processor Pack Manually.

Hint: an entry Like:

[CopyTomsdev98bin] enablesimd.reg, enabl__1.reg, 32

Means you shop rename "enable__1.reg" to "enablesimd.reg" and copy it to the

/ MSDEV98 / BIN DIRECTORY.

c) Using the information in "vcpp.inf", Copy The Files from The Temporary Directory to The Proper Director, Renaming If Necessary.

Q. What Causes this error/QPEL.C (84): Fatal Error C1083: Cannot Open include file: 'c: //xvid/src//Image//qpel.c ': No such file or directory. "

A. NOT SACTLY Sure Why That Happens - IT Should Work. A Quick Fix Is To Open "QPEL.C" and Replace Every Instance of # include __file__

WITH

#include "qpel.c"

转载请注明原文地址:https://www.9cbs.com/read-19332.html

New Post(0)