Skip to content

Commit

Permalink
千牛主播项目 tblive V2.0版本框架
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenshan committed Sep 10, 2016
1 parent f2dc0a0 commit 4fc2dc2
Show file tree
Hide file tree
Showing 3,838 changed files with 700,862 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.DS_Store
.idea
*.log
*.tlog
*.sdf
*.opensdf
*.suo
*.user
*.ilk
*.o
*.obj
*.pch
*.idb
*.exp
additional_install_files/
build/
121 changes: 121 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
cmake_minimum_required(VERSION 2.8.12)

project(tblive)

if(WIN32)
set(DepsPath "${CMAKE_SOURCE_DIR}/third_party/win32/include")
set(FFmpegPath "${CMAKE_SOURCE_DIR}/third_party/win32/include")
set(x264Path "${CMAKE_SOURCE_DIR}/third_party/win32/include")
set(curlPath "${CMAKE_SOURCE_DIR}/third_party/win32/include")
set(PrgPath "${CMAKE_SOURCE_DIR}/deps/peregrine/Win32")
set(AuthSDKPath "${CMAKE_SOURCE_DIR}/deps/AuthSDK/AliAuthSDK/pack/bin/win32")
set(D3DPath "${CMAKE_SOURCE_DIR}/deps/d3d/win32")
elseif(APPLE)
set(PrgPath "${CMAKE_SOURCE_DIR}/deps/peregrine/Mac64")
endif()

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")

include(ObsHelpers)
include(ObsCpack)

if(MSVC AND NOT EXISTS "${CMAKE_BINARY_DIR}/ALL_BUILD.vcxproj.user")
file(GENERATE
OUTPUT "${CMAKE_BINARY_DIR}/ALL_BUILD.vcxproj.user"
INPUT "${CMAKE_SOURCE_DIR}/cmake/ALL_BUILD.vcxproj.user.in")
endif()

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RelWithDebInfo)
endif()

find_package(CXX11 REQUIRED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11_FLAGS}")

if(${CMAKE_C_COMPILER_ID} MATCHES "Clang" OR ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
set(CMAKE_COMPILER_IS_CLANG TRUE)
endif()

if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-function -Werror-implicit-function-declaration -Wno-missing-field-initializers ${CMAKE_CXX_FLAGS} -fno-strict-aliasing")
set(CMAKE_C_FLAGS "-Wall -Wextra -Wno-unused-function -Werror-implicit-function-declaration -Wno-missing-braces -Wno-missing-field-initializers ${CMAKE_C_FLAGS} -std=gnu99 -fno-strict-aliasing")

option(USE_LIBC++ "Use libc++ instead of libstdc++" ${APPLE})
if(USE_LIBC++)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
endif()
elseif(MSVC)
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif()

# Disable pointless constant condition warnings
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4127 /wd4201")
endif()

if(WIN32)
add_definitions(-DUNICODE -D_UNICODE)
endif()

if(MSVC)
set(CMAKE_C_FLAGS_DEBUG "/DDEBUG=1 /D_DEBUG=1 ${CMAKE_C_FLAGS_DEBUG}")
set(CMAKE_CXX_FLAGS_DEBUG "/DDEBUG=1 /D_DEBUG=1 ${CMAKE_C_FLAGS_DEBUG}")

if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO")
endif()
else()
if(MINGW)
set(CMAKE_WIDL "widl" CACHE STRING "wine IDL header file generation program")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_WIN32_WINNT=0x0600 -DWINVER=0x0600")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WIN32_WINNT=0x0600 -DWINVER=0x0600")
endif()
set(CMAKE_C_FLAGS_DEBUG "-DDEBUG=1 -D_DEBUG=1 ${CMAKE_C_FLAGS_DEBUG}")
set(CMAKE_CXX_FLAGS_DEBUG "-DDEBUG=1 -D_DEBUG=1 ${CMAKE_C_FLAGS_DEBUG}")
endif()

if(APPLE)
set(CMAKE_MACOSX_RPATH TRUE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
list(APPEND CMAKE_INSTALL_RPATH "@loader_path/" "@executable_path/")
elseif(UNIX)
option(USE_XDG "Utilize XDG Base Directory Specification" ON)
if(USE_XDG)
add_definitions(-DUSE_XDG)
endif()

if(NOT UNIX_STRUCTURE)
list(APPEND CMAKE_INSTALL_RPATH "$ORIGIN")
endif()
endif()

option(BUILD_TESTS "Build test directory (includes test sources and possibly a platform test executable)" FALSE)
mark_as_advanced(BUILD_TESTS)

if(NOT INSTALLER_RUN)
add_subdirectory(deps)


if(WIN32)
add_subdirectory(libobs-d3d11)
endif()

add_subdirectory(libobs-opengl)
add_subdirectory(libobs)
add_subdirectory(obs)
add_subdirectory(shell)
add_subdirectory(plugins)
if (BUILD_TESTS)
add_subdirectory(test)
endif()

add_subdirectory(cmake/helper_subdir)
else()
obs_generate_multiarch_installer()
endif()

include(CopyMSVCBins)
61 changes: 61 additions & 0 deletions CONTRIBUTING
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Contributing Information:

- Our bug tracker is located at (currently linked to forum accounts):
https://obsproject.com/mantis/

- Development forums are currently located at:
https://obsproject.com/forum/list/general-development.21/

- Development IRC channel is primarily #obs-dev on QuakeNet


Contributing Guidelines:

- Code and commits will be reviewed. Reviews will be blunt and honest, and
your change probably won't go through the first time, or may be outright
rejected. It may require many revisions before changes are finally
accepted.

- If you want to avoid doing a lot of work only to have it rejected, discuss
what you want to change it in the main channels/forums/mailing lists before
actually working on it. Open source requires thick skin. Please don't be
discouraged if your changes don't go through, learn from it and get better.

- Coding style is Linux-style KNF (kernel normal form). This means K&R, 80
columns max, preferable maximum function length of approximately 42 lines, 8
character width tabs, lower_case_names, etc. I chose this for the sake of
the project. Don't argue about it, just do it. It takes no time to do.

See https://www.kernel.org/doc/Documentation/CodingStyle for a general
guideline (though not necessarily a rulebook, for example we allow the use
of boolean return values instead of ints for failure).

NOTE: C++ is an exception to the lower_case_only rule, CamelCase is
encouraged (though not required) to distinguish it from C code. Just a
personal and subjective stylistic thing on my part.

- Commits are not just changes to code; they should also be treated as
annotation to code. For that reason, do not put unrelated changes in a
single commit. Separate out different changes in to different commits, and
make separate pull requests for unrelated changes. Commits should be
formatted with the 50/72 standard, and should be descriptive and concise.
See http://chris.beams.io/posts/git-commit/ for a summary of how to make
good commit messages.

- Core code is C only (unless there's an operating system specific thing that
absolutely requires another language).

- Modules and UI may use C, C++, or Objective-C (for apple), though please try
to use C unless an API you're using requires C++ or Objective-C (such as
windows COM classes, or apple Objective-C APIs).

- If you don't quite know what to work on and just want to help, the bug
tracker has a list of things that need to be worked on.

- Try to respect the wishes of the author(s)/maintainer(s). A good maintainer
will always listen, and will often ask others on the project for their
opinions, but don't expect things to be completely democratic.

- Do not use dependencies for the sake of convenience. There's enough
dependencies as it is. Use them only if you absolutely have to depend on
them.
Loading

0 comments on commit 4fc2dc2

Please sign in to comment.