Skip to content

Commit e98d6d3

Browse files
Rui Wangkongsuozt
authored andcommitted
video: enable pts calculation when hold video state changes [1/1]
PD#TV-3999 Problem: dtmb individual channel switching speed is slow, it takes about 16s Solution: enable pts calculation when hold video state changes. Verify: X301 Change-Id: I4c8eda3af3df894d8116461abf63c3dda45c8ce3 Signed-off-by: Rui Wang <[email protected]>
1 parent 768c100 commit e98d6d3

File tree

1 file changed

+13
-2
lines changed
  • drivers/amlogic/media/video_sink

1 file changed

+13
-2
lines changed

drivers/amlogic/media/video_sink/video.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ static bool omx_drop_done;
157157
static bool video_start_post;
158158
static bool videopeek;
159159
static bool nopostvideostart;
160+
static int hold_property_changed;
160161
static struct video_frame_detect_s video_frame_detect;
161162
static struct timeval time_setomxpts = {
162163
.tv_sec = 0,
@@ -5390,11 +5391,14 @@ static inline bool vpts_expire(struct vframe_s *cur_vf,
53905391
systime = timestamp_pcrscr_get();
53915392
pts = next_vf->pts;
53925393

5393-
if (((pts == 0) && (cur_dispbuf != &vf_local))
5394+
if (((pts == 0) && ((cur_dispbuf != &vf_local)
5395+
|| (hold_property_changed == 1)))
53945396
|| (freerun_mode == FREERUN_DUR)) {
53955397
pts =
53965398
timestamp_vpts_get() +
53975399
(cur_vf ? DUR2PTS(cur_vf->duration) : 0);
5400+
if (hold_property_changed == 1)
5401+
hold_property_changed = 0;
53985402
}
53995403
/* check video PTS discontinuity */
54005404
else if ((enable_video_discontinue_report) &&
@@ -8361,6 +8365,7 @@ static void video_vf_unreg_provider(void)
83618365
first_frame_toggled = 0;
83628366
videopeek = 0;
83638367
nopostvideostart = false;
8368+
hold_property_changed = 0;
83648369

83658370
atomic_set(&video_unreg_flag, 1);
83668371
while (atomic_read(&video_inirq_flag) > 0)
@@ -10893,15 +10898,21 @@ static ssize_t video_hold_store(struct class *cla,
1089310898
const char *buf, size_t count)
1089410899
{
1089510900
int r;
10901+
unsigned int value;
10902+
1089610903
cur_width = 0;
1089710904
cur_height = 0;
1089810905
if (debug_flag & DEBUG_FLAG_BLACKOUT)
1089910906
pr_info("%s(%s)\n", __func__, buf);
1090010907

10901-
r = kstrtoint(buf, 0, &hold_video);
10908+
r = kstrtoint(buf, 0, &value);
1090210909
if (r < 0)
1090310910
return -EINVAL;
1090410911

10912+
if (value == 0 && hold_video == 1)
10913+
hold_property_changed = 1;
10914+
10915+
hold_video = value;
1090510916
return count;
1090610917
}
1090710918

0 commit comments

Comments
 (0)