Mercurial > pt1.oyama
diff src/recpt1.c @ 127:5a380559a61e
modify calclate bitrate mechanism.
author | Naoya OYAMA <naoya.oyama@gmail.com> |
---|---|
date | Tue, 05 Oct 2010 01:42:59 +0900 |
parents | 5dcaf3785ebe |
children | 0db6ccf0fe31 |
line wrap: on
line diff
--- a/src/recpt1.c Sun Oct 03 21:55:37 2010 +0900 +++ b/src/recpt1.c Tue Oct 05 01:42:59 2010 +0900 @@ -671,6 +671,8 @@ ARIB_STD_B25_BUFFER *qbuf = NULL; ARIB_STD_B25_BUFFER *buf; int i; + clock_gettime(CLOCK_REALTIME, &data->streamer->start); + data->streamer->total_byte = 0; //fprintf (stderr, "stream_func(): start.\n"); while(1) { @@ -684,6 +686,7 @@ //fprintf (stderr, "stream_func(): dequeue() return NULL pointer. streaming abort.\n"); continue; } + data->streamer->total_byte += qbuf->size; // クリティカルセクション長いのなんとかしたいなぁ… // ToDo: memcpy とかクリティカルセクションの外に出す // 3.2 tdata->streamer->mutex を lock