Streaming media technology: VS2012 RTP Open Source Protocol library Jrtplib 3.9.1 compilation

Source: Internet
Author: User

I. Jrtplib INTRODUCTION

RTP is the best way to solve the problem of streaming media real-time transmission, and Jrtplib is a C + + language implementation of the RTP library, it is fully compliant with RFC 1889 design, now can run in Windows, Linux, FreeBSD, Solaris, UNIX and VxWorks and many other operating systems. Before you can use Jrtplib, you need to compile it.

Two. Platforms and software used

Operating system: Windows 7
Software: CMake 3.2.3 + Visual Studio 2012

Two. Download link

Because you want to jrtplib compile and jrtplib rely on jthread it, you need to download the following:

jrtplib: Http://research.edm.uhasselt.be/jori/jrtplib/jrtplib-3.9.1.zip

jthread: Http://research.edm.uhasselt.be/~jori/page/index.php?n=CS.Jthread

cmake: http://www.cmake.org/cmake/resources/software.html

Three. Compile steps

1. Install cmake-gui .

2. Unzip the downloaded jrtplib and jthread compressed packages while creating and folders in the same directory jrtplib_build jthread_build .

3. The following process is primarily compiled and jthread generated jthread.lib jthread_d.lib .

3.1 Open cmake-gui , first add input (where..) and output path (where to ...) Point configure , Target select vs 2010 default compiler. Then follow the check parameters, confirm the error point once again configure , the last point: generate , generate VS2012 project file:

3.2 Enter the jthread_build directory, open the SLn file with VS2012, and compile it by selecting the solution in Solution Explorer jthread , running rebuild solution, and if no error occurs, select the Install project and run build. debugand release each of these operations can be done.

3.3 If the compilation succeeds (for example), the C:\Program Files\jthread\include\jthread header file is generated under, and the file is generated under the lib folder lib cmake .

4. The following processes are primarily jrtplib compiled jrtplib.lib and generated jrtplib_d.lib .

4.1 The approximate steps are the same as above, but you configure need to add some configuration at compile time and the same input (where:). and output path (where to ...) Point configure, Target select VS2012 default compiler, the initial configuration results are as follows:

Where you need to add ADDITIONAL_DEBUG_LIBRARIES , ADDITIONAL_RELEASE_LIBRARIES and ADDITIONAL_INCLUDE_DIRS the path:

Confirm the error again, point configure to the last point: generate , generate VS2012 project file:

4.2 Open the SLn file and rebuild the solution:

Finally, in debug and release below are generated jrtplib_d.lib separately jrtplib.lib and:

View the following path discovery generates a series of header files, and the lib files are generated under Folders jrtplib_d.lib jrtplib.lib cmake .

Iv. Examples of Use

1. Add a library

Step One:

Method 1. Copy the compiled build jrtplib.lib and jthread.lib library to the “*:\Program Files\Microsoft Visual Studio 10.0\VC\lib” following;
Method 2. Copy the compiled four lib library to the current project's CPP file

Step Two:

Method 1. Add-on, input-and additional dependencies, configuration properties, “jrtplib.lib; jthread.lib; WS2_32.lib” Properties-
Method 2. pragmamethod, add the following to the stdafx.h file:

#ifdef DEBUG    #pragma comment(lib, "jrtplib_d.lib")     #pragma comment(lib,"jthread_d.lib")    #pragma comment(lib,"WS2_32.lib")#else    #pragma comment(lib, "jrtplib.lib")     #pragma comment(lib,"jthread.lib")    #pragma comment(lib,"WS2_32.lib")#endif

2. Add a header file

Step one: Put all the. h files together, such as myJRTPLIBHeader inside, and then add include .

Step Two: Configuration Properties---Properties---add include directories, general--

Five. Reference links

Http://www.cnblogs.com/skyseraph/archive/2012/04/07/2435540.html

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Streaming media technology: VS2012 RTP Open Source Protocol library Jrtplib 3.9.1 compilation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.