History

vo_{drm,wlshm,x11}: add support for video-target-params

sfan5 committed 2 years ago

Commit bc8038c1 parent 2893b7d3 files · +12 −0Browse files

Unified · Split

3 files
  1. video/out/vo_drm.c +3 −0
  2. video/out/vo_wlshm.c +5 −0
  3. video/out/vo_x11.c +4 −0
video/out/vo_drm.c+3−0
@@ -215,6 +215,9 @@ static int reconfig(struct vo *vo, struct mp_image_params *params) · 214 unmodified lines
215215 if (mp_sws_reinit(p->sws) < 0)
216216 return -1;
217217
218+ mp_mutex_lock(&vo->params_mutex);
219+ vo->target_params = &p->sws->dst; // essentially constant, so this is okay
220+ mp_mutex_unlock(&vo->params_mutex);
218221 vo->want_redraw = true;
219222 return 0;
220223 }
video/out/vo_wlshm.c+5−0
@@ -195,6 +195,7 @@ static int resize(struct vo *vo) · 194 unmodified lines
195195 vo->dwidth = width;
196196 vo->dheight = height;
197197 vo_get_src_dst_rects(vo, &p->src, &p->dst, &p->osd);
198+
198199 p->sws->dst = (struct mp_image_params) {
199200 .imgfmt = MP_SELECT_LE_BE(IMGFMT_BGR0, IMGFMT_0RGB),
200201 .w = width,
@@ -203,6 +204,10 @@ static int resize(struct vo *vo) · 2 unmodified lines
203204 .p_h = 1,
204205 };
205206 mp_image_params_guess_csp(&p->sws->dst);
207+ mp_mutex_lock(&vo->params_mutex);
208+ vo->target_params = &p->sws->dst;
209+ mp_mutex_unlock(&vo->params_mutex);
210+
206211 while (p->free_buffers) {
207212 buf = p->free_buffers;
208213 p->free_buffers = buf->next;
video/out/vo_x11.c+4−0
@@ -266,6 +266,10 @@ static bool resize(struct vo *vo) · 265 unmodified lines
266266
267267 if (mp_sws_reinit(p->sws) < 0)
268268 return false;
269+
270+ mp_mutex_lock(&vo->params_mutex);
271+ vo->target_params = &p->sws->dst;
272+ mp_mutex_unlock(&vo->params_mutex);
269273 }
270274
271275 vo->want_redraw = true;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t