]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
timeshift: cosmetic trace log updates
authorJaroslav Kysela <perex@perex.cz>
Sat, 12 Dec 2015 20:16:50 +0000 (21:16 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sat, 12 Dec 2015 20:16:50 +0000 (21:16 +0100)
src/timeshift.c
src/timeshift/timeshift_reader.c

index 9e4fde81aa8639333b52b3eb8f17bc69e5ee89c0..6b0c6d4bf756c645b1d436c04e39b9fe70750e73 100644 (file)
@@ -268,7 +268,7 @@ static void timeshift_input
     if (sm->sm_type == SMT_PACKET) {
       tvhtrace("timeshift",
                "ts %d pkt in  - stream %d type %c pts %10"PRId64
-               " dts %10"PRId64" dur %10d len %zu",
+               " dts %10"PRId64" dur %10d len %6zu",
                ts->id,
                pkt->pkt_componentindex,
                pkt_frametype_to_char(pkt->pkt_frametype),
@@ -304,14 +304,15 @@ static void timeshift_input
       if (sm->sm_type == SMT_PACKET) {
         tvhtrace("timeshift",
                  "ts %d pkt buf - stream %d type %c pts %10"PRId64
-                 " dts %10"PRId64" dur %10d len %zu",
+                 " dts %10"PRId64" dur %10d len %6zu time %14"PRId64,
                  ts->id,
                  pkt->pkt_componentindex,
                  pkt_frametype_to_char(pkt->pkt_frametype),
                  ts_rescale(pkt->pkt_pts, 1000000),
                  ts_rescale(pkt->pkt_dts, 1000000),
                  pkt->pkt_duration,
-                 pktbuf_len(pkt->pkt_payload));
+                 pktbuf_len(pkt->pkt_payload),
+                 sm->sm_time);
       }
       streaming_target_deliver2(&ts->wr_queue.sq_st, sm);
     } else
index 1e47dfe54f4b16b582776e75257644588bb8d3dc..084e5a6127e480972387ae83e585dd79c3d67635 100644 (file)
@@ -352,11 +352,10 @@ static int _timeshift_read
       if (tsf->rfd < 0)
         return -1;
     }
-    tvhtrace("timeshift", "ts %d seek to %jd (fd %i)", ts->id, (intmax_t)tsf->roff, tsf->rfd);
     if (tsf->rfd >= 0)
       if ((off = lseek(tsf->rfd, tsf->roff, SEEK_SET)) != tsf->roff)
-        tvherror("timeshift", "seek to %s failed (off %"PRId64" != %"PRId64"): %s",
-                 tsf->path, (int64_t)tsf->roff, (int64_t)off, strerror(errno));
+        tvherror("timeshift", "ts %d seek to %s failed (off %"PRId64" != %"PRId64"): %s",
+                 ts->id, tsf->path, (int64_t)tsf->roff, (int64_t)off, strerror(errno));
 
     /* Read msg */
     ooff = tsf->roff;
@@ -364,14 +363,11 @@ static int _timeshift_read
     if (r < 0) {
       streaming_message_t *e = streaming_msg_create_code(SMT_STOP, SM_CODE_UNDEFINED_ERROR);
       streaming_target_deliver2(ts->output, e);
+      tvhtrace("timeshift", "ts %d seek to %jd (fd %i)", ts->id, (intmax_t)tsf->roff, tsf->rfd);
       tvhlog(LOG_ERR, "timeshift", "ts %d could not read buffer", ts->id);
       return -1;
     }
-#if ENABLE_ANDROID
-    tvhtrace("timeshift", "ts %d read msg %p (%ld)", ts->id, *sm, (long int)r);  // Android bug, ssize_t is long int
-#else
-    tvhtrace("timeshift", "ts %d read msg %p (%zd)", ts->id, *sm, r);
-#endif
+    tvhtrace("timeshift", "ts %d seek to %jd (fd %i) read msg %p (%"PRId64")", ts->id, (intmax_t)tsf->roff, tsf->rfd, *sm, (int64_t)r);
 
     /* Incomplete */
     if (r == 0) {
@@ -774,7 +770,7 @@ void *timeshift_reader ( void *p )
         th_pkt_t *pkt = sm->sm_data;
         tvhtrace("timeshift",
                  "ts %d pkt out - stream %d type %c pts %10"PRId64
-                 " dts %10"PRId64 " dur %10d len %zu time %"PRId64,
+                 " dts %10"PRId64 " dur %10d len %6zu time %"PRId64,
                  ts->id,
                  pkt->pkt_componentindex,
                  pkt_frametype_to_char(pkt->pkt_frametype),