Lines Matching refs:ctx
78 #define check_mpp_ctx(ctx) _check_mpp_ctx(ctx, __FUNCTION__) argument
82 if (NULL == p || p->check != p || NULL == p->ctx) { in _check_mpp_ctx()
89 static MPP_RET mpi_decode(MppCtx ctx, MppPacket packet, MppFrame *frame) in mpi_decode() argument
92 MpiImpl *p = (MpiImpl *)ctx; in mpi_decode()
94 mpi_dbg_func("enter ctx %p packet %p frame %p\n", ctx, packet, frame); in mpi_decode()
109 ret = mpp_decode(p->ctx, packet, frame); in mpi_decode()
112 mpi_dbg_func("leave ctx %p ret %d\n", ctx, ret); in mpi_decode()
116 static MPP_RET mpi_decode_put_packet(MppCtx ctx, MppPacket packet) in mpi_decode_put_packet() argument
119 MpiImpl *p = (MpiImpl *)ctx; in mpi_decode_put_packet()
121 mpi_dbg_func("enter ctx %p packet %p\n", ctx, packet); in mpi_decode_put_packet()
133 ret = mpp_put_packet(p->ctx, packet); in mpi_decode_put_packet()
136 mpi_dbg_func("leave ctx %p ret %d\n", ctx, ret); in mpi_decode_put_packet()
140 static MPP_RET mpi_decode_get_frame(MppCtx ctx, MppFrame *frame) in mpi_decode_get_frame() argument
143 MpiImpl *p = (MpiImpl *)ctx; in mpi_decode_get_frame()
145 mpi_dbg_func("enter ctx %p frame %p\n", ctx, frame); in mpi_decode_get_frame()
157 ret = mpp_get_frame(p->ctx, frame); in mpi_decode_get_frame()
160 mpi_dbg_func("leave ctx %p ret %d\n", ctx, ret); in mpi_decode_get_frame()
164 static MPP_RET mpi_encode(MppCtx ctx, MppFrame frame, MppPacket *packet) in mpi_encode() argument
167 MpiImpl *p = (MpiImpl *)ctx; in mpi_encode()
169 mpi_dbg_func("enter ctx %p frame %p packet %p\n", ctx, frame, packet); in mpi_encode()
184 mpi_dbg_func("leave ctx %p ret %d\n", ctx, ret); in mpi_encode()
188 static MPP_RET mpi_encode_put_frame(MppCtx ctx, MppFrame frame) in mpi_encode_put_frame() argument
191 MpiImpl *p = (MpiImpl *)ctx; in mpi_encode_put_frame()
193 mpi_dbg_func("enter ctx %p frame %p\n", ctx, frame); in mpi_encode_put_frame()
205 ret = mpp_put_frame(p->ctx, frame); in mpi_encode_put_frame()
208 mpi_dbg_func("leave ctx %p ret %d\n", ctx, ret); in mpi_encode_put_frame()
212 static MPP_RET mpi_encode_get_packet(MppCtx ctx, MppPacket *packet) in mpi_encode_get_packet() argument
215 MpiImpl *p = (MpiImpl *)ctx; in mpi_encode_get_packet()
217 mpi_dbg_func("enter ctx %p packet %p\n", ctx, packet); in mpi_encode_get_packet()
229 ret = mpp_get_packet(p->ctx, packet); in mpi_encode_get_packet()
232 mpi_dbg_func("leave ctx %p ret %d\n", ctx, ret); in mpi_encode_get_packet()
236 static MPP_RET mpi_isp(MppCtx ctx, MppFrame dst, MppFrame src) in mpi_isp() argument
239 mpi_dbg_func("enter ctx %p dst %p src %p\n", ctx, dst, src); in mpi_isp()
243 mpi_dbg_func("leave ctx %p ret %d\n", ctx, ret); in mpi_isp()
247 static MPP_RET mpi_isp_put_frame(MppCtx ctx, MppFrame frame) in mpi_isp_put_frame() argument
250 mpi_dbg_func("enter ctx %p frame %p\n", ctx, frame); in mpi_isp_put_frame()
254 mpi_dbg_func("leave ctx %p ret %d\n", ctx, ret); in mpi_isp_put_frame()
258 static MPP_RET mpi_isp_get_frame(MppCtx ctx, MppFrame *frame) in mpi_isp_get_frame() argument
261 mpi_dbg_func("enter ctx %p frame %p\n", ctx, frame); in mpi_isp_get_frame()
269 static MPP_RET mpi_poll(MppCtx ctx, MppPortType type, MppPollType timeout) in mpi_poll() argument
272 MpiImpl *p = (MpiImpl *)ctx; in mpi_poll()
274 mpi_dbg_func("enter ctx %p type %d timeout %d\n", ctx, type, timeout); in mpi_poll()
288 ret = mpp_poll(p->ctx, type, timeout); in mpi_poll()
293 mpi_dbg_func("leave ctx %p ret %d\n", ctx, ret); in mpi_poll()
297 static MPP_RET mpi_dequeue(MppCtx ctx, MppPortType type, MppTask *task) in mpi_dequeue() argument
300 MpiImpl *p = (MpiImpl *)ctx; in mpi_dequeue()
302 mpi_dbg_func("enter ctx %p type %d task %p\n", ctx, type, task); in mpi_dequeue()
314 ret = mpp_dequeue(p->ctx, type, task); in mpi_dequeue()
317 mpi_dbg_func("leave ctx %p ret %d\n", ctx, ret); in mpi_dequeue()
321 static MPP_RET mpi_enqueue(MppCtx ctx, MppPortType type, MppTask task) in mpi_enqueue() argument
324 MpiImpl *p = (MpiImpl *)ctx; in mpi_enqueue()
326 mpi_dbg_func("enter ctx %p type %d task %p\n", ctx, type, task); in mpi_enqueue()
338 ret = mpp_enqueue(p->ctx, type, task); in mpi_enqueue()
341 mpi_dbg_func("leave ctx %p ret %d\n", ctx, ret); in mpi_enqueue()
345 static MPP_RET mpi_reset(MppCtx ctx) in mpi_reset() argument
348 MpiImpl *p = (MpiImpl *)ctx; in mpi_reset()
350 mpi_dbg_func("enter ctx %p\n", ctx); in mpi_reset()
356 ret = mpp_reset(p->ctx); in mpi_reset()
359 mpi_dbg_func("leave ctx %p ret %d\n", ctx, ret); in mpi_reset()
363 static MPP_RET mpi_control(MppCtx ctx, MpiCmd cmd, MppParam param) in mpi_control() argument
366 MpiImpl *p = (MpiImpl *)ctx; in mpi_control()
368 mpi_dbg_func("enter ctx %p cmd %x parm %p\n", ctx, cmd, param); in mpi_control()
374 ret = mpp_control(p->ctx, cmd, param); in mpi_control()
377 mpi_dbg_func("leave ctx %p ret %d\n", ctx, ret); in mpi_control()
401 MPP_RET mpp_create(MppCtx *ctx, MppApi **mpi) in mpp_create() argument
406 if (NULL == ctx || NULL == mpi) { in mpp_create()
407 mpp_err_f("invalid input ctx %p mpi %p\n", ctx, mpi); in mpp_create()
411 *ctx = NULL; in mpp_create()
415 mpi_dbg_func("enter ctx %p mpi %p\n", ctx, mpi); in mpp_create()
425 ret = mpp_ctx_create(&p->ctx, p); in mpp_create()
426 if (ret || NULL == p->ctx) { in mpp_create()
436 *ctx = p; in mpp_create()
442 mpi_dbg_func("leave ret %d ctx %p mpi %p\n", ret, *ctx, *mpi); in mpp_create()
446 MPP_RET mpp_init(MppCtx ctx, MppCtxType type, MppCodingType coding) in mpp_init() argument
449 MpiImpl *p = (MpiImpl*)ctx; in mpp_init()
451 mpi_dbg_func("enter ctx %p type %d coding %d\n", ctx, type, coding); in mpp_init()
464 ret = mpp_ctx_init(p->ctx, type, coding); in mpp_init()
469 mpi_dbg_func("leave ctx %p ret %d\n", ctx, ret); in mpp_init()
473 MPP_RET mpp_destroy(MppCtx ctx) in mpp_destroy() argument
475 mpi_dbg_func("enter ctx %p\n", ctx); in mpp_destroy()
478 MpiImpl *p = (MpiImpl*)ctx; in mpp_destroy()
485 if (p->ctx) in mpp_destroy()
486 mpp_ctx_destroy(p->ctx); in mpp_destroy()
491 mpi_dbg_func("leave ctx %p ret %d\n", ctx, ret); in mpp_destroy()