Skip to content

Commit

Permalink
Erizo Subtree merged in erizo
Browse files Browse the repository at this point in the history
  • Loading branch information
jcague committed Nov 28, 2012
2 parents 47366dd + 92a6a72 commit 8e16c57
Show file tree
Hide file tree
Showing 27 changed files with 4,478 additions and 0 deletions.
1 change: 1 addition & 0 deletions erizo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
52 changes: 52 additions & 0 deletions erizo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Erizo, a C/C++ Multipoint Control Unit (MCU) Library for WebRTC

Erizo is a project that aims to implement a library able to communicate with WebRTC (http://www.webrtc.org) browser clients in order to provide advanced communication services. Currently it is tested on Ubuntu 11.10 and above but it should be able to be compiled on other distributions.

Updated code documentation can be found at http://ging.github.com/erizo

## Directory structure

- /src - The root source directory
- /src/erizo - The source of the main library
- /src/examples - Examples and tests

## Requirements

- CMake >= 2.8
- libSRTP version >= 1.4.4
- Libnice version >= 1.10
- boost_threads >= 1.48
- boost_regex >= 1.48 (optional, only for examples)
- boost_asio >= 1.48 (optional, only for examples)
- boost_system >= 1.48 (optional, only for examples)

## Building Instructions

This project is built using CMake.

The easiest way to build it is to use the provided scripts:
- Run ./generateProject.sh to run cmake, test the dependencies and generate the Makefile.
- Run ./buildProyect.sh to build the project after generating the Makefile. It simply runs make in the build directory.
- Run ./generateEclipseProyect.sh to generate an Eclipse CDT project which can be imported and used to work with the code.

If doxygen is availabe a "doc" target is generated. HTML documentation can be built by running "make doc" in the build directory.

##Examples

As of now, the only application built using the library is a streaming application that connects via TCP to a server application built on top of node.js.

The node.js app is not released but the code should provide an example on how the SDP exchange is made.
The examples are unusable as of now, but they can help to understand the API.
In the future, we will include here tests and updated examples.

## License

The MIT License

Copyright (C) 2012 Universidad Politecnica de Madrid.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13 changes: 13 additions & 0 deletions erizo/buildProject.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
runcmake() {
cmake ../src
echo "Done"
}
BIN_DIR="build"
if [ -d $BIN_DIR ]; then
cd $BIN_DIR
make
else
echo "Error, build directory does not exist, run generateProject.sh first"
fi

52 changes: 52 additions & 0 deletions erizo/cmake/FindGlib.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
pkg_check_modules(GLIB_PKG glib-2.0)

if (GLIB_PKG_FOUND)
find_path(GLIB_INCLUDE_DIR NAMES glib.h PATH_SUFFIXES glib-2.0
PATHS
${GLIB_PKG_INCLUDE_DIRS}
/usr/include/glib-2.0
/usr/include
/usr/local/include
)
find_path(GLIB_CONFIG_INCLUDE_DIR NAMES glibconfig.h PATHS ${GLIB_PKG_LIBDIR} PATH_SUFFIXES glib-2.0/include)
find_library(GLIB_LIBRARIES2 NAMES glib-2.0
PATHS
${GLIB_PKG_LIBRARY_DIRS}
/usr/lib
/usr/local/lib
)

find_library(GOBJECT_LIBRARIES NAMES gobject-2.0
PATHS
${GLIB_PKG_LIBRARY_DIRS}
/usr/lib
/usr/local/lib
)

find_library(GTHREAD_LIBRARIES NAMES gthread-2.0
PATHS
${GLIB_PKG_LIBRARY_DIRS}
/usr/lib
/usr/local/lib
)

set(GLIB_LIBRARIES ${GLIB_LIBRARIES2} ${GOBJECT_LIBRARIES} ${GTHREAD_LIBRARIES})

else (GLIB_PKG_FOUND)
message (FATAL_ERROR "pkg-config is needed")
return()
endif (GLIB_PKG_FOUND)

if (GLIB_INCLUDE_DIR AND GLIB_CONFIG_INCLUDE_DIR AND GLIB_LIBRARIES)
set(GLIB_INCLUDE_DIRS ${GLIB_INCLUDE_DIR} ${GLIB_CONFIG_INCLUDE_DIR})
endif (GLIB_INCLUDE_DIR AND GLIB_CONFIG_INCLUDE_DIR AND GLIB_LIBRARIES)

if(GLIB_INCLUDE_DIRS AND GLIB_LIBRARIES)
set(GLIB_FOUND TRUE CACHE INTERNAL "glib-2.0 found")
message(STATUS "Found glib-2.0: ${GLIB_INCLUDE_DIR}, ${GLIB_LIBRARIES}")
else(GLIB_INCLUDE_DIRS AND GLIB_LIBRARIES)
set(GLIB_FOUND FALSE CACHE INTERNAL "glib-2.0 found")
message(STATUS "glib-2.0 not found.")
endif(GLIB_INCLUDE_DIRS AND GLIB_LIBRARIES)

mark_as_advanced(GLIB_INCLUDE_DIR GLIB_CONFIG_INCLUDE_DIR GLIB_INCLUDE_DIRS GLIB_LIBRARIES)
12 changes: 12 additions & 0 deletions erizo/generateEclipseProject.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
BIN_DIR="build"
if [ -d $BIN_DIR ]; then
cd $BIN_DIR
# Set to Debug to be able to debug in Eclipse
cmake -G"Eclipse CDT4 - Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug ../src
echo "Done"
cd ..
else
echo "Error, build directory does not exist, run generateProject.sh first"
fi

15 changes: 15 additions & 0 deletions erizo/generateProject.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
runcmake() {
cmake ../src
echo "Done"
}
BIN_DIR="build"
if [ -d $BIN_DIR ]; then
cd $BIN_DIR
runcmake
else
mkdir $BIN_DIR
cd $BIN_DIR
runcmake
fi

21 changes: 21 additions & 0 deletions erizo/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
cmake_minimum_required(VERSION 2.8)

project (ERIZO_ALL)
set (COMPILE_EXAMPLES OFF)
add_subdirectory(${ERIZO_ALL_SOURCES}erizo)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
find_package (Doxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
endif(DOXYGEN_FOUND)

if(COMPILE_EXAMPLES)
include_directories(${ERIZO_ALL_SOURCES}erizo)
set (EXTRA_LIBS ${EXTRA_LIBS} erizo)
add_subdirectory(${ERIZO_ALL_SOURCES}examples)
endif(COMPILE_EXAMPLES)
Loading

0 comments on commit 8e16c57

Please sign in to comment.