Commit 640f2d31 authored by jehan's avatar jehan
Browse files

rework a bit srtp

parent 221583f6
......@@ -69,26 +69,6 @@ MS2_PUBLIC void ring_stop (RingStream * stream);
/**
* @}
**/
/*
* Crypto suite used configure encrypted stream*/
typedef enum _MSCryptoSuite{
MS_CRYPTO_SUITE_INVALID=0,
MS_AES_128_SHA1_80,
MS_AES_128_SHA1_32,
MS_AES_128_NO_AUTH,
MS_NO_CIPHER_SHA1_80,
MS_AES_256_SHA1_80,
MS_AES_256_SHA1_32
} MSCryptoSuite;
typedef struct _MSCryptoSuiteNameParams{
const char *name;
const char *params;
}MSCryptoSuiteNameParams;
MS2_PUBLIC MSCryptoSuite ms_crypto_suite_build_from_name_params(const MSCryptoSuiteNameParams *nameparams);
MS2_PUBLIC int ms_crypto_suite_to_name_params(MSCryptoSuite cs, MSCryptoSuiteNameParams *nameparams);
/**
* The MediaStream is an object describing a stream (one of AudioStream or VideoStream).
**/
......
......@@ -21,7 +21,16 @@
#define ms_srtp_h
#include <ortp/rtpsession.h>
#include "mediastreamer2/mscommon.h"
#if defined(HAVE_SRTP)
/*srtp defines all this stuff*/
#undef PACKAGE_BUGREPORT
#undef PACKAGE_NAME
#undef PACKAGE_STRING
#undef PACKAGE_TARNAME
#undef PACKAGE_VERSION
#if defined(ANDROID) || !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
// Android and Windows phone don't use make install
# include <srtp.h>
......@@ -36,25 +45,34 @@ typedef struct srtp_policy srtp_policy_t;
#endif /* HAVE_SRTP */
/*srtp defines all this stuff*/
#undef PACKAGE_BUGREPORT
#undef PACKAGE_NAME
#undef PACKAGE_STRING
#undef PACKAGE_TARNAME
#undef PACKAGE_VERSION
#include <ortp/rtpsession.h>
#include "mediastreamer2/mscommon.h"
#ifdef __cplusplus
extern "C"{
#endif
/* defined in mediastream.h */
struct _MediaStream;
enum _MSCryptoSuite;
/*
* Crypto suite used configure encrypted stream*/
typedef enum _MSCryptoSuite{
MS_CRYPTO_SUITE_INVALID=0,
MS_AES_128_SHA1_80,
MS_AES_128_SHA1_32,
MS_AES_128_NO_AUTH,
MS_NO_CIPHER_SHA1_80,
MS_AES_256_SHA1_80,
MS_AES_256_SHA1_32
} MSCryptoSuite;
typedef struct _MSCryptoSuiteNameParams{
const char *name;
const char *params;
}MSCryptoSuiteNameParams;
MS2_PUBLIC MSCryptoSuite ms_crypto_suite_build_from_name_params(const MSCryptoSuiteNameParams *nameparams);
MS2_PUBLIC int ms_crypto_suite_to_name_params(MSCryptoSuite cs, MSCryptoSuiteNameParams *nameparams);
/**
* Check if SRTP is supported
......
......@@ -22,11 +22,6 @@
#endif
#include "ortp/ortp.h"
#undef PACKAGE_NAME
#undef PACKAGE_STRING
#undef PACKAGE_TARNAME
#undef PACKAGE_VERSION
#include "mediastreamer2/ms_srtp.h"
#include "mediastreamer2/mediastream.h"
......
......@@ -18,8 +18,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "mediastreamer2/mediastream.h"
#ifdef HAVE_CONFIG_H
#include "mediastreamer-config.h"
#endif
#include "mediastreamer2/mediastream.h"
#include "mediastreamer2/dtmfgen.h"
#include "mediastreamer2/mssndcard.h"
#include "mediastreamer2/msrtp.h"
......@@ -33,9 +36,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "mediastreamer2/msitc.h"
#include "private.h"
#ifdef HAVE_CONFIG_H
#include "mediastreamer-config.h"
#endif
#include <sys/types.h>
......
......@@ -18,17 +18,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "ortp/port.h"
#ifdef HAVE_CONFIG_H
#include "mediastreamer-config.h"
#endif
#include "ortp/port.h"
#include "mediastreamer2/mediastream.h"
#include "private.h"
#include <ctype.h>
#ifdef HAVE_CONFIG_H
#include "mediastreamer-config.h"
#endif
#ifndef MS_MINIMAL_MTU
/*this is used for determining the minimum size of recv buffers for RTP packets
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment