mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
rename struct to class. 0.9.100
This commit is contained in:
parent
2f89c8b2e8
commit
c59576146b
7 changed files with 33 additions and 17 deletions
|
@ -179,8 +179,9 @@ enum SrsCodecAudioSoundType
|
||||||
/**
|
/**
|
||||||
* buffer indicates the position and size.
|
* buffer indicates the position and size.
|
||||||
*/
|
*/
|
||||||
struct SrsCodecBuffer
|
class SrsCodecBuffer
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
/**
|
/**
|
||||||
* @remark user must manage the bytes.
|
* @remark user must manage the bytes.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -43,8 +43,9 @@ class SrsPithyPrint;
|
||||||
/**
|
/**
|
||||||
* ingester ffmpeg object.
|
* ingester ffmpeg object.
|
||||||
*/
|
*/
|
||||||
struct SrsIngesterFFMPEG
|
class SrsIngesterFFMPEG
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
std::string vhost;
|
std::string vhost;
|
||||||
std::string id;
|
std::string id;
|
||||||
SrsFFMPEG* ffmpeg;
|
SrsFFMPEG* ffmpeg;
|
||||||
|
|
|
@ -39,8 +39,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
extern int srs_get_log_level(std::string level);
|
extern int srs_get_log_level(std::string level);
|
||||||
|
|
||||||
// @see: man getrusage
|
// @see: man getrusage
|
||||||
struct SrsRusage
|
class SrsRusage
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
// whether the data is ok.
|
// whether the data is ok.
|
||||||
bool ok;
|
bool ok;
|
||||||
// the time in ms when sample.
|
// the time in ms when sample.
|
||||||
|
@ -57,8 +58,9 @@ extern SrsRusage* srs_get_system_rusage();
|
||||||
extern void srs_update_system_rusage();
|
extern void srs_update_system_rusage();
|
||||||
|
|
||||||
// @see: man 5 proc, /proc/[pid]/stat
|
// @see: man 5 proc, /proc/[pid]/stat
|
||||||
struct SrsProcSelfStat
|
class SrsProcSelfStat
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
// whether the data is ok.
|
// whether the data is ok.
|
||||||
bool ok;
|
bool ok;
|
||||||
// the time in ms when sample.
|
// the time in ms when sample.
|
||||||
|
@ -208,8 +210,9 @@ struct SrsProcSelfStat
|
||||||
};
|
};
|
||||||
|
|
||||||
// @see: man 5 proc, /proc/stat
|
// @see: man 5 proc, /proc/stat
|
||||||
struct SrsProcSystemStat
|
class SrsProcSystemStat
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
// whether the data is ok.
|
// whether the data is ok.
|
||||||
bool ok;
|
bool ok;
|
||||||
// the time in ms when sample.
|
// the time in ms when sample.
|
||||||
|
@ -262,8 +265,9 @@ extern SrsProcSystemStat* srs_get_system_proc_stat();
|
||||||
extern void srs_update_proc_stat();
|
extern void srs_update_proc_stat();
|
||||||
|
|
||||||
// @see: cat /proc/meminfo
|
// @see: cat /proc/meminfo
|
||||||
struct SrsMemInfo
|
class SrsMemInfo
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
// whether the data is ok.
|
// whether the data is ok.
|
||||||
bool ok;
|
bool ok;
|
||||||
// the time in ms when sample.
|
// the time in ms when sample.
|
||||||
|
@ -298,8 +302,9 @@ extern SrsMemInfo* srs_get_meminfo();
|
||||||
extern void srs_update_meminfo();
|
extern void srs_update_meminfo();
|
||||||
|
|
||||||
// @see: cat /proc/cpuinfo
|
// @see: cat /proc/cpuinfo
|
||||||
struct SrsCpuInfo
|
class SrsCpuInfo
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
// whether the data is ok.
|
// whether the data is ok.
|
||||||
bool ok;
|
bool ok;
|
||||||
|
|
||||||
|
@ -315,8 +320,9 @@ struct SrsCpuInfo
|
||||||
extern SrsCpuInfo* srs_get_cpuinfo();
|
extern SrsCpuInfo* srs_get_cpuinfo();
|
||||||
|
|
||||||
// platform(os, srs) summary
|
// platform(os, srs) summary
|
||||||
struct SrsPlatformInfo
|
class SrsPlatformInfo
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
// whether the data is ok.
|
// whether the data is ok.
|
||||||
bool ok;
|
bool ok;
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
// current release version
|
// current release version
|
||||||
#define VERSION_MAJOR "0"
|
#define VERSION_MAJOR "0"
|
||||||
#define VERSION_MINOR "9"
|
#define VERSION_MINOR "9"
|
||||||
#define VERSION_REVISION "99"
|
#define VERSION_REVISION "100"
|
||||||
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
|
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
|
||||||
// server info.
|
// server info.
|
||||||
#define RTMP_SIG_SRS_KEY "srs"
|
#define RTMP_SIG_SRS_KEY "srs"
|
||||||
|
|
|
@ -56,8 +56,9 @@ namespace srs
|
||||||
* offset: 4bytes
|
* offset: 4bytes
|
||||||
* @see also: http://blog.csdn.net/win_lin/article/details/13006803
|
* @see also: http://blog.csdn.net/win_lin/article/details/13006803
|
||||||
*/
|
*/
|
||||||
struct key_block
|
class key_block
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
// (offset)bytes
|
// (offset)bytes
|
||||||
char* random0;
|
char* random0;
|
||||||
int random0_size;
|
int random0_size;
|
||||||
|
@ -81,8 +82,9 @@ namespace srs
|
||||||
* random-data: (764-4-offset-32)bytes
|
* random-data: (764-4-offset-32)bytes
|
||||||
* @see also: http://blog.csdn.net/win_lin/article/details/13006803
|
* @see also: http://blog.csdn.net/win_lin/article/details/13006803
|
||||||
*/
|
*/
|
||||||
struct digest_block
|
class digest_block
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
// 4bytes
|
// 4bytes
|
||||||
int32_t offset;
|
int32_t offset;
|
||||||
|
|
||||||
|
@ -183,8 +185,9 @@ namespace srs
|
||||||
* key: 764bytes
|
* key: 764bytes
|
||||||
* @see also: http://blog.csdn.net/win_lin/article/details/13006803
|
* @see also: http://blog.csdn.net/win_lin/article/details/13006803
|
||||||
*/
|
*/
|
||||||
struct c1s1
|
class c1s1
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
union block {
|
union block {
|
||||||
key_block key;
|
key_block key;
|
||||||
digest_block digest;
|
digest_block digest;
|
||||||
|
@ -262,8 +265,9 @@ namespace srs
|
||||||
* digest-data: 32bytes
|
* digest-data: 32bytes
|
||||||
* @see also: http://blog.csdn.net/win_lin/article/details/13006803
|
* @see also: http://blog.csdn.net/win_lin/article/details/13006803
|
||||||
*/
|
*/
|
||||||
struct c2s2
|
class c2s2
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
char random[1504];
|
char random[1504];
|
||||||
char digest[32];
|
char digest[32];
|
||||||
|
|
||||||
|
|
|
@ -97,8 +97,9 @@ public:
|
||||||
/**
|
/**
|
||||||
* the response to client.
|
* the response to client.
|
||||||
*/
|
*/
|
||||||
struct SrsResponse
|
class SrsResponse
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
int stream_id;
|
int stream_id;
|
||||||
|
|
||||||
SrsResponse();
|
SrsResponse();
|
||||||
|
|
|
@ -90,8 +90,9 @@ class SrsChunkStream;
|
||||||
class SrsProtocol
|
class SrsProtocol
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
struct AckWindowSize
|
class AckWindowSize
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
int ack_window_size;
|
int ack_window_size;
|
||||||
int64_t acked_size;
|
int64_t acked_size;
|
||||||
|
|
||||||
|
@ -221,8 +222,9 @@ private:
|
||||||
/**
|
/**
|
||||||
* 4.1. Message Header
|
* 4.1. Message Header
|
||||||
*/
|
*/
|
||||||
struct SrsMessageHeader
|
class SrsMessageHeader
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
/**
|
/**
|
||||||
* One byte field to represent the message type. A range of type IDs
|
* One byte field to represent the message type. A range of type IDs
|
||||||
* (1-7) are reserved for protocol control messages.
|
* (1-7) are reserved for protocol control messages.
|
||||||
|
@ -370,8 +372,9 @@ public:
|
||||||
class SrsSharedPtrMessage : public SrsMessage
|
class SrsSharedPtrMessage : public SrsMessage
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
struct __SrsSharedPtr
|
class __SrsSharedPtr
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
char* payload;
|
char* payload;
|
||||||
int size;
|
int size;
|
||||||
int shared_count;
|
int shared_count;
|
||||||
|
|
Loading…
Reference in a new issue