History

clipboard-vo: use clipboard parent log context

This adds clipboard backend names to backend-specific logs, e.g. clipboard/vo.

nanahi committed 1 year ago

Commit 589e34c1 parent dc5c8571 file · +6 −4Browse files

Unified · Split

player/clipboard/clipboard-vo.c+6−4
@@ -22,12 +22,14 @@ · 21 unmodified lines
2222
2323 struct clipboard_vo_priv {
2424 struct MPContext *mpctx;
25+ struct mp_log *log;
2526 };
2627
2728 static int init(struct clipboard_ctx *cl, struct clipboard_init_params *params)
2829 {
2930 struct clipboard_vo_priv *priv = talloc_ptrtype(cl, priv);
3031 priv->mpctx = params->mpctx;
32+ priv->log = mp_log_new(priv, cl->log, "vo"),
3133 cl->priv = priv;
3234 return CLIPBOARD_SUCCESS;
3335 }
@@ -52,10 +54,10 @@ static int get_data(struct clipboard_ctx *cl, struct clipboard_access_params *pa · 18 unmodified lines
5254 return CLIPBOARD_SUCCESS;
5355 case VO_NOTAVAIL:
5456 case VO_NOTIMPL:
55− MP_VERBOSE(cl, "VO does not support getting clipboard in the requested format.\n");
57+ MP_VERBOSE(priv, "VO does not support getting clipboard in the requested format.\n");
5658 return CLIPBOARD_UNAVAILABLE;
5759 default:
58− MP_WARN(cl, "Failed getting VO clipboard.\n");
60+ MP_WARN(priv, "Failed getting VO clipboard.\n");
5961 return CLIPBOARD_FAILED;
6062 }
6163 }
@@ -78,10 +80,10 @@ static int set_data(struct clipboard_ctx *cl, struct clipboard_access_params *pa · 16 unmodified lines
7880 return CLIPBOARD_SUCCESS;
7981 case VO_NOTAVAIL:
8082 case VO_NOTIMPL:
81− MP_VERBOSE(cl, "VO does not support setting clipboard in the requested format.\n");
83+ MP_VERBOSE(priv, "VO does not support setting clipboard in the requested format.\n");
8284 return CLIPBOARD_UNAVAILABLE;
8385 default:
84− MP_WARN(cl, "Failed setting VO clipboard.\n");
86+ MP_WARN(priv, "Failed setting VO clipboard.\n");
8587 return CLIPBOARD_FAILED;
8688 }
8789 }

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