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
215 if (mp_sws_reinit(p->sws) < 0)215 if (mp_sws_reinit(p->sws) < 0)
216 return -1;216 return -1;
217 217
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);
218 vo->want_redraw = true;221 vo->want_redraw = true;
219 return 0;222 return 0;
220}223}
video/out/vo_wlshm.c+5−0
@@ -195,6 +195,7 @@ static int resize(struct vo *vo) · 194 unmodified lines
195 vo->dwidth = width;195 vo->dwidth = width;
196 vo->dheight = height;196 vo->dheight = height;
197 vo_get_src_dst_rects(vo, &p->src, &p->dst, &p->osd);197 vo_get_src_dst_rects(vo, &p->src, &p->dst, &p->osd);
198
198 p->sws->dst = (struct mp_image_params) {199 p->sws->dst = (struct mp_image_params) {
199 .imgfmt = MP_SELECT_LE_BE(IMGFMT_BGR0, IMGFMT_0RGB),200 .imgfmt = MP_SELECT_LE_BE(IMGFMT_BGR0, IMGFMT_0RGB),
200 .w = width,201 .w = width,
@@ -203,6 +204,10 @@ static int resize(struct vo *vo) · 2 unmodified lines
203 .p_h = 1,204 .p_h = 1,
204 };205 };
205 mp_image_params_guess_csp(&p->sws->dst);206 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
206 while (p->free_buffers) {211 while (p->free_buffers) {
207 buf = p->free_buffers;212 buf = p->free_buffers;
208 p->free_buffers = buf->next;213 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
266 266
267 if (mp_sws_reinit(p->sws) < 0)267 if (mp_sws_reinit(p->sws) < 0)
268 return false;268 return false;
269
270 mp_mutex_lock(&vo->params_mutex);
271 vo->target_params = &p->sws->dst;
272 mp_mutex_unlock(&vo->params_mutex);
269 }273 }
270 274
271 vo->want_redraw = true;275 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