summaryrefslogtreecommitdiff
path: root/src/video.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/video.c')
-rw-r--r--src/video.c38
1 files changed, 1 insertions, 37 deletions
diff --git a/src/video.c b/src/video.c
index f191215..5c1b8bb 100644
--- a/src/video.c
+++ b/src/video.c
@@ -25,7 +25,6 @@
enum {
- SRATE = 90000,
MAX_MUTED_FRAMES = 3,
};
@@ -980,7 +979,7 @@ int video_start(struct video *v, const char *peer)
return err;
}
- stream_set_srate(v->strm, SRATE, SRATE);
+ stream_set_srate(v->strm, VIDEO_SRATE, VIDEO_SRATE);
if (vidisp_find(baresip_vidispl(), NULL)) {
err = set_vidisp(&v->vrx);
@@ -1384,38 +1383,3 @@ void video_set_devicename(struct video *v, const char *src, const char *disp)
str_ncpy(v->vtx.device, src, sizeof(v->vtx.device));
str_ncpy(v->vrx.device, disp, sizeof(v->vrx.device));
}
-
-
-/**
- * Calculate the RTP timestamp from Presentation Time Stamp (PTS)
- * or Decoding Time Stamp (DTS) and framerate.
- *
- * @note The calculated RTP Timestamp may wrap around.
- *
- * @param pts Presentation Time Stamp (PTS)
- * @param fps Framerate in [frames per second]
- *
- * @return RTP Timestamp
- */
-uint32_t video_calc_rtp_timestamp(int64_t pts, unsigned fps)
-{
- uint64_t rtp_ts;
-
- if (!fps)
- return 0;
-
- rtp_ts = ((uint64_t)SRATE * pts) / fps;
-
- return (uint32_t)rtp_ts;
-}
-
-
-double video_calc_seconds(uint32_t rtp_ts)
-{
- double timestamp;
-
- /* convert from RTP clockrate to seconds */
- timestamp = (double)rtp_ts / (double)SRATE;
-
- return timestamp;
-}