mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-06 01:26:49 +08:00
feat[kmpp_buffer]: Add ioctl to inc ref and flush
Change-Id: Ia0c12d6bae71246c17e0a065761439702c529af9 Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
This commit is contained in:
@@ -128,6 +128,30 @@ rk_s32 kmpp_buffer_setup(KmppBuffer buffer)
|
||||
return kmpp_obj_ioctl_f(buffer, 0, buffer, NULL);
|
||||
}
|
||||
|
||||
rk_s32 kmpp_buffer_inc_ref(KmppBuffer buffer)
|
||||
{
|
||||
KmppBufferImpl *impl = (KmppBufferImpl *)kmpp_obj_to_entry(buffer);
|
||||
|
||||
if (!impl) {
|
||||
mpp_loge_f("invalid NULL buffer\n");
|
||||
return rk_nok;
|
||||
}
|
||||
|
||||
return kmpp_obj_ioctl_f(buffer, 1, buffer, NULL);
|
||||
}
|
||||
|
||||
rk_s32 kmpp_buffer_flush(KmppBuffer buffer)
|
||||
{
|
||||
KmppBufferImpl *impl = (KmppBufferImpl *)kmpp_obj_to_entry(buffer);
|
||||
|
||||
if (!impl) {
|
||||
mpp_loge_f("invalid NULL buffer\n");
|
||||
return rk_nok;
|
||||
}
|
||||
|
||||
return kmpp_obj_ioctl_f(buffer, 2, buffer, NULL);
|
||||
}
|
||||
|
||||
rk_s32 kmpp_buffer_impl_init(void *entry, KmppObj obj, const char *caller)
|
||||
{
|
||||
KmppBufPriv *priv = (KmppBufPriv *)kmpp_obj_to_priv(obj);
|
||||
|
Reference in New Issue
Block a user