winlin

refine ingester pithy print

@@ -345,12 +345,11 @@ void SrsIngester::ingester() @@ -345,12 +345,11 @@ void SrsIngester::ingester()
345 } 345 }
346 346
347 // reportable 347 // reportable
348 - if (!pithy_print->can_print()) {  
349 - return;  
350 - }  
351 - 348 + if (pithy_print->can_print()) {
352 // TODO: FIXME: show more info. 349 // TODO: FIXME: show more info.
353 - srs_trace("-> time=%"PRId64", ingesters=%d", pithy_print->age(), (int)ingesters.size()); 350 + srs_trace("-> "SRS_LOG_ID_INGESTER
  351 + " time=%"PRId64", ingesters=%d", pithy_print->age(), (int)ingesters.size());
  352 + }
354 } 353 }
355 354
356 int SrsIngester::on_reload_vhost_added(string vhost) 355 int SrsIngester::on_reload_vhost_added(string vhost)
@@ -156,5 +156,7 @@ extern ISrsThreadContext* _srs_context; @@ -156,5 +156,7 @@ extern ISrsThreadContext* _srs_context;
156 #define SRS_LOG_ID_CLIENT_PUBLISH "CPB" 156 #define SRS_LOG_ID_CLIENT_PUBLISH "CPB"
157 // web/flash publish to edge/origin 157 // web/flash publish to edge/origin
158 #define SRS_LOG_ID_WEB_PUBLISH "WPB" 158 #define SRS_LOG_ID_WEB_PUBLISH "WPB"
  159 +// ingester for edge(play)/origin
  160 +#define SRS_LOG_ID_INGESTER "IGS"
159 161
160 #endif 162 #endif
@@ -47,6 +47,7 @@ public: @@ -47,6 +47,7 @@ public:
47 virtual void set_recv_timeout(int64_t timeout_us) = 0; 47 virtual void set_recv_timeout(int64_t timeout_us) = 0;
48 virtual int64_t get_recv_timeout() = 0; 48 virtual int64_t get_recv_timeout() = 0;
49 virtual int64_t get_recv_bytes() = 0; 49 virtual int64_t get_recv_bytes() = 0;
  50 + // TODO: FIXME: remove this interface.
50 virtual int get_recv_kbps() = 0; 51 virtual int get_recv_kbps() = 0;
51 }; 52 };
52 53
@@ -63,6 +64,7 @@ public: @@ -63,6 +64,7 @@ public:
63 virtual void set_send_timeout(int64_t timeout_us) = 0; 64 virtual void set_send_timeout(int64_t timeout_us) = 0;
64 virtual int64_t get_send_timeout() = 0; 65 virtual int64_t get_send_timeout() = 0;
65 virtual int64_t get_send_bytes() = 0; 66 virtual int64_t get_send_bytes() = 0;
  67 + // TODO: FIXME: remove this interface.
66 virtual int get_send_kbps() = 0; 68 virtual int get_send_kbps() = 0;
67 virtual int writev(const iovec *iov, int iov_size, ssize_t* nwrite) = 0; 69 virtual int writev(const iovec *iov, int iov_size, ssize_t* nwrite) = 0;
68 }; 70 };