summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-07-22 12:57:20 +0200
committerAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-07-22 12:57:20 +0200
commit834f7b72305fab45776c9df081a691e2b541805f (patch)
treefbdacced55bac22b0af31b8fab3f3dd9cd229982 /src
parent53cf99cd0fde4eca4fcb8400809b0346a4cb8d32 (diff)
video: show resolution of incoming video
Diffstat (limited to 'src')
-rw-r--r--src/video.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/video.c b/src/video.c
index f442d4c..ad70f56 100644
--- a/src/video.c
+++ b/src/video.c
@@ -132,6 +132,7 @@ struct vrx {
struct lock *lock; /**< Lock for decoder */
struct list filtl; /**< Filters in decoding order */
struct tmr tmr_picup; /**< Picture update timer */
+ struct vidsz size; /**< Incoming video resolution */
enum vidorient orient; /**< Display orientation */
char device[64]; /**< Display device name */
int pt_rx; /**< Incoming RTP payload type */
@@ -588,6 +589,8 @@ static int video_stream_decode(struct vrx *vrx, const struct rtp_header *hdr,
if (!vidframe_isvalid(frame))
goto out;
+ vrx->size = frame->size;
+
if (!list_isempty(&vrx->filtl)) {
err = vidframe_alloc(&frame_filt, frame->fmt, &frame->size);
@@ -1287,11 +1290,14 @@ int video_debug(struct re_printf *pf, const struct video *v)
err = re_hprintf(pf, "\n--- Video stream ---\n");
err |= re_hprintf(pf, " started: %s\n", v->started ? "yes" : "no");
+
err |= re_hprintf(pf, " tx: %u x %u, fps=%d\n",
vtx->vsrc_size.w,
vtx->vsrc_size.h, vtx->vsrc_prm.fps);
err |= re_hprintf(pf, " skipc=%u\n", vtx->skipc);
- err |= re_hprintf(pf, " rx: pt=%d\n", vrx->pt_rx);
+
+ err |= re_hprintf(pf, " rx: %u x %u\n", vrx->size.w, vrx->size.h);
+ err |= re_hprintf(pf, " pt=%d\n", vrx->pt_rx);
err |= re_hprintf(pf, " n_intra=%u, n_picup=%u\n",
vrx->n_intra, vrx->n_picup);