From 95975eccc1c53715adaaa5ede654a7228725e6be Mon Sep 17 00:00:00 2001 From: Zhizhong Zhang Date: Wed, 16 Sep 2020 19:19:31 +0800 Subject: [PATCH] tsync: move tsync related start/stop from v-stream to tsync [2/3] PD#SWPL-32957 Problem: zap to audio only channel,no audio output Solution: move tsync related start/stop from v-stream to tsync Verify: AH212 patch-build Change-Id: Ia2f741aac7ea91319fd0592da8d9485eb14423df Signed-off-by: Zhizhong Zhang --- .../amports/stream_buffer_interface.c | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/drivers/stream_input/amports/stream_buffer_interface.c b/drivers/stream_input/amports/stream_buffer_interface.c index 98cb1bf..6e0988d 100644 --- a/drivers/stream_input/amports/stream_buffer_interface.c +++ b/drivers/stream_input/amports/stream_buffer_interface.c @@ -60,18 +60,6 @@ static const char *type_to_str(int t) } } -static int type_to_pts(int t) -{ - switch (t) { - case BUF_TYPE_VIDEO: - return PTS_TYPE_VIDEO; - case BUF_TYPE_HEVC: - return PTS_TYPE_HEVC; - default: - return PTS_TYPE_MAX; - } -} - static int stream_buffer_init(struct stream_buf_s *stbuf, struct vdec_s *vdec) { int ret = 0; @@ -128,16 +116,6 @@ static int stream_buffer_init(struct stream_buf_s *stbuf, struct vdec_s *vdec) stbuf->canusebuf_size = size; stbuf->stream_offset = 0; - if (stbuf->use_ptsserv) { - /* init pts server. */ - ret = pts_start(type_to_pts(stbuf->type)); - if (ret < 0) { - pr_err("[%d]: pts server failed\n", stbuf->id); - stbuf->use_ptsserv = false; - //goto err;//fixme - } - tsync_pcr_start(); - } /* init thread write. */ if (!(vdec_get_debug_flags() & 1) && !codec_mm_video_tvp_enabled() && @@ -172,11 +150,6 @@ static void stream_buffer_release(struct stream_buf_s *stbuf) if (stbuf->write_thread) threadrw_release(stbuf); - if (stbuf->use_ptsserv) { - pts_stop(type_to_pts(stbuf->type)); - tsync_pcr_stop(); - } - if (stbuf->flag & BUF_FLAG_ALLOC && stbuf->buf_start) { if (!stbuf->ext_buf_addr) codec_mm_free_for_dma(MEM_NAME, stbuf->buf_start); -- 2.20.1