winlin

add pid to srs rtmp dump

@@ -28,6 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -28,6 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 // for srs-librtmp, @see https://github.com/simple-rtmp-server/srs/issues/213 28 // for srs-librtmp, @see https://github.com/simple-rtmp-server/srs/issues/213
29 #ifndef _WIN32 29 #ifndef _WIN32
30 #include <sys/time.h> 30 #include <sys/time.h>
  31 +#include <unistd.h>
31 #endif 32 #endif
32 33
33 #include <string> 34 #include <string>
@@ -927,8 +927,8 @@ extern const char* srs_human_format_time(); @@ -927,8 +927,8 @@ extern const char* srs_human_format_time();
927 #define srs_human_verbose(msg, ...) (void)0 927 #define srs_human_verbose(msg, ...) (void)0
928 #define srs_human_raw(msg, ...) (void)0 928 #define srs_human_raw(msg, ...) (void)0
929 #else 929 #else
930 - #define srs_human_trace(msg, ...) printf("[%s] ", srs_human_format_time());printf(msg, ##__VA_ARGS__);printf("\n")  
931 - #define srs_human_verbose(msg, ...) printf("[%s] ", srs_human_format_time());printf(msg, ##__VA_ARGS__);printf("\n") 930 + #define srs_human_trace(msg, ...) printf("[%s][%d] ", srs_human_format_time(), getpid());printf(msg, ##__VA_ARGS__);printf("\n")
  931 + #define srs_human_verbose(msg, ...) printf("[%s][%d] ", srs_human_format_time(), getpid());printf(msg, ##__VA_ARGS__);printf("\n")
932 #define srs_human_raw(msg, ...) printf(msg, ##__VA_ARGS__) 932 #define srs_human_raw(msg, ...) printf(msg, ##__VA_ARGS__)
933 #endif 933 #endif
934 934
@@ -943,6 +943,8 @@ typedef void* srs_hijack_io_t; @@ -943,6 +943,8 @@ typedef void* srs_hijack_io_t;
943 #ifndef _WIN32 943 #ifndef _WIN32
944 // for iovec. 944 // for iovec.
945 #include <sys/uio.h> 945 #include <sys/uio.h>
  946 + // for getpid.
  947 + #include <unistd.h>
946 #endif 948 #endif
947 /** 949 /**
948 * get the hijack io object in rtmp protocol sdk. 950 * get the hijack io object in rtmp protocol sdk.