}
}
-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;
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() &&
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);