This adds clipboard backend names to backend-specific logs, e.g. clipboard/vo.
Unified · Split
| @@ -22,12 +22,14 @@ · 21 unmodified lines | ||
| 22 | 22 | |
| 23 | 23 | struct clipboard_vo_priv { |
| 24 | 24 | struct MPContext *mpctx; |
| 25 | + struct mp_log *log; | |
| 25 | 26 | }; |
| 26 | 27 | |
| 27 | 28 | static int init(struct clipboard_ctx *cl, struct clipboard_init_params *params) |
| 28 | 29 | { |
| 29 | 30 | struct clipboard_vo_priv *priv = talloc_ptrtype(cl, priv); |
| 30 | 31 | priv->mpctx = params->mpctx; |
| 32 | + priv->log = mp_log_new(priv, cl->log, "vo"), | |
| 31 | 33 | cl->priv = priv; |
| 32 | 34 | return CLIPBOARD_SUCCESS; |
| 33 | 35 | } |
| @@ -52,10 +54,10 @@ static int get_data(struct clipboard_ctx *cl, struct clipboard_access_params *pa · 18 unmodified lines | ||
| 52 | 54 | return CLIPBOARD_SUCCESS; |
| 53 | 55 | case VO_NOTAVAIL: |
| 54 | 56 | 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"); | |
| 56 | 58 | return CLIPBOARD_UNAVAILABLE; |
| 57 | 59 | default: |
| 58 | − MP_WARN(cl, "Failed getting VO clipboard.\n"); | |
| 60 | + MP_WARN(priv, "Failed getting VO clipboard.\n"); | |
| 59 | 61 | return CLIPBOARD_FAILED; |
| 60 | 62 | } |
| 61 | 63 | } |
| @@ -78,10 +80,10 @@ static int set_data(struct clipboard_ctx *cl, struct clipboard_access_params *pa · 16 unmodified lines | ||
| 78 | 80 | return CLIPBOARD_SUCCESS; |
| 79 | 81 | case VO_NOTAVAIL: |
| 80 | 82 | 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"); | |
| 82 | 84 | return CLIPBOARD_UNAVAILABLE; |
| 83 | 85 | default: |
| 84 | − MP_WARN(cl, "Failed setting VO clipboard.\n"); | |
| 86 | + MP_WARN(priv, "Failed setting VO clipboard.\n"); | |
| 85 | 87 | return CLIPBOARD_FAILED; |
| 86 | 88 | } |
| 87 | 89 | } |