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 | struct clipboard_vo_priv { | 23 | struct clipboard_vo_priv { |
| 24 | struct MPContext *mpctx; | 24 | struct MPContext *mpctx; |
| 25 | struct mp_log *log; | ||
| 25 | }; | 26 | }; |
| 26 | 27 | ||
| 27 | static int init(struct clipboard_ctx *cl, struct clipboard_init_params *params) | 28 | static int init(struct clipboard_ctx *cl, struct clipboard_init_params *params) |
| 28 | { | 29 | { |
| 29 | struct clipboard_vo_priv *priv = talloc_ptrtype(cl, priv); | 30 | struct clipboard_vo_priv *priv = talloc_ptrtype(cl, priv); |
| 30 | priv->mpctx = params->mpctx; | 31 | priv->mpctx = params->mpctx; |
| 32 | priv->log = mp_log_new(priv, cl->log, "vo"), | ||
| 31 | cl->priv = priv; | 33 | cl->priv = priv; |
| 32 | return CLIPBOARD_SUCCESS; | 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 | return CLIPBOARD_SUCCESS; | 54 | return CLIPBOARD_SUCCESS; |
| 53 | case VO_NOTAVAIL: | 55 | case VO_NOTAVAIL: |
| 54 | case VO_NOTIMPL: | 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 | return CLIPBOARD_UNAVAILABLE; | 58 | return CLIPBOARD_UNAVAILABLE; |
| 57 | default: | 59 | default: |
| 58 | MP_WARN(cl, "Failed getting VO clipboard.\n"); | 60 | MP_WARN(priv, "Failed getting VO clipboard.\n"); |
| 59 | return CLIPBOARD_FAILED; | 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 | return CLIPBOARD_SUCCESS; | 80 | return CLIPBOARD_SUCCESS; |
| 79 | case VO_NOTAVAIL: | 81 | case VO_NOTAVAIL: |
| 80 | case VO_NOTIMPL: | 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 | return CLIPBOARD_UNAVAILABLE; | 84 | return CLIPBOARD_UNAVAILABLE; |
| 83 | default: | 85 | default: |
| 84 | MP_WARN(cl, "Failed setting VO clipboard.\n"); | 86 | MP_WARN(priv, "Failed setting VO clipboard.\n"); |
| 85 | return CLIPBOARD_FAILED; | 87 | return CLIPBOARD_FAILED; |
| 86 | } | 88 | } |
| 87 | } | 89 | } |