1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

SRT: Close connection if RTMP failed. (#2917)

* SRT: using global variables  to pass errors (#2897)

* SRT: using global variables  to pass errors (#2897)
This commit is contained in:
loveforever 2022-02-15 18:49:17 +08:00 committed by GitHub
parent 0a848430e9
commit e8fca60ece
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 49 additions and 25 deletions

View file

@ -74,7 +74,7 @@ Value Description
class ts_media_data_callback_I {
public:
virtual void on_data_callback(SRT_DATA_MSG_PTR data_ptr, unsigned int media_type, uint64_t dts, uint64_t pts) = 0;
virtual int on_data_callback(SRT_DATA_MSG_PTR data_ptr, unsigned int media_type, uint64_t dts, uint64_t pts) = 0;
};
typedef std::shared_ptr<ts_media_data_callback_I> TS_DATA_CALLBACK_PTR;
@ -227,7 +227,7 @@ private:
int pes_parse(unsigned char* p, size_t npos, unsigned char** ret_pp, size_t& ret_size,
uint64_t& dts, uint64_t& pts);
void insert_into_databuf(unsigned char* data_p, size_t data_size, std::string key_path, unsigned short pid);
void on_callback(TS_DATA_CALLBACK_PTR callback, unsigned short pid,
int on_callback(TS_DATA_CALLBACK_PTR callback, unsigned short pid,
std::string key_path, uint64_t dts, uint64_t pts);
private: