Lines Matching full:codec

5  * Interface for MJPEG (and maybe later MPEG/WAVELETS) codec's
20 struct videocodec *codec; member
25 const struct videocodec *codec; member
42 struct videocodec *codec; in videocodec_attach() local
63 if ((master->flags & h->codec->flags) == master->flags) { in videocodec_attach()
64 zrdev_dbg(zr, "%s: try '%s'\n", __func__, h->codec->name); in videocodec_attach()
66 codec = kmemdup(h->codec, sizeof(struct videocodec), GFP_KERNEL); in videocodec_attach()
67 if (!codec) in videocodec_attach()
70 res = strlen(codec->name); in videocodec_attach()
71 snprintf(codec->name + res, sizeof(codec->name) - res, "[%d]", h->attached); in videocodec_attach()
72 codec->master_data = master; in videocodec_attach()
73 res = codec->setup(codec); in videocodec_attach()
75 zrdev_dbg(zr, "%s: '%s'\n", __func__, codec->name); in videocodec_attach()
79 ptr->codec = codec; in videocodec_attach()
90 h->codec->name); in videocodec_attach()
94 return codec; in videocodec_attach()
96 kfree(codec); in videocodec_attach()
101 zrdev_err(zr, "%s: no codec found!\n", __func__); in videocodec_attach()
105 kfree(codec); in videocodec_attach()
109 int videocodec_detach(struct videocodec *codec) in videocodec_detach() argument
116 if (!codec) { in videocodec_detach()
121 zr = videocodec_to_zoran(codec); in videocodec_detach()
124 codec->name, codec->type, codec->flags, codec->magic); in videocodec_detach()
135 if (codec == a->codec) { in videocodec_detach()
136 res = a->codec->unset(a->codec); in videocodec_detach()
139 a->codec->name); in videocodec_detach()
140 a->codec->master_data = NULL; in videocodec_detach()
142 zrdev_err(zr, "%s: '%s'\n", __func__, a->codec->name); in videocodec_detach()
143 a->codec->master_data = NULL; in videocodec_detach()
152 kfree(a->codec); in videocodec_detach()
163 zrdev_err(zr, "%s: given codec not found!\n", __func__); in videocodec_detach()
167 int videocodec_register(const struct videocodec *codec) in videocodec_register() argument
172 if (!codec) { in videocodec_register()
177 zr = videocodec_to_zoran((struct videocodec *)codec); in videocodec_register()
181 codec->name, codec->type, codec->flags, codec->magic); in videocodec_register()
186 ptr->codec = codec; in videocodec_register()
196 h->codec->name); in videocodec_register()
202 int videocodec_unregister(const struct videocodec *codec) in videocodec_unregister() argument
207 if (!codec) { in videocodec_unregister()
212 zr = videocodec_to_zoran((struct videocodec *)codec); in videocodec_unregister()
216 codec->name, codec->type, codec->flags, codec->magic); in videocodec_unregister()
224 if (codec == h->codec) { in videocodec_unregister()
227 h->codec->name); in videocodec_unregister()
231 h->codec->name); in videocodec_unregister()
248 zrdev_err(zr, "%s: given codec not found!\n", __func__); in videocodec_unregister()
262 h->codec->name, h->codec->type, in videocodec_debugfs_show()
263 h->codec->flags, h->codec->magic); in videocodec_debugfs_show()
267 a->codec->master_data->name, in videocodec_debugfs_show()
268 a->codec->master_data->type, in videocodec_debugfs_show()
269 a->codec->master_data->flags, in videocodec_debugfs_show()
270 a->codec->master_data->magic, in videocodec_debugfs_show()
271 a->codec->name); in videocodec_debugfs_show()