* @brief Called when the input buffer(packet) used up.
* @details It will be invoked when mediacodec has used input buffer.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @remarks The @a packet should be released using media_packet_destroy().
+ * @remarks The @a packet should be released using media_packet_unref().
* @param[in] packet The media packet handle
* @param[in] user_data The user data passed from the callback registration function
* @pre It will be invoked when input buffer process completed if you register this callback using mediacodec_set_input_buffer_used_cb().
* @brief Called when the output buffer is available.
* @details It will be invoked when mediacodec has output buffer.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @remarks The @a packet should be released using media_packet_destroy().
+ * @remarks The @a packet should be released using media_packet_unref().
* @param[in] packet The media packet handle
* @param[in] user_data The user data passed from the callback registration function
* @pre It will be invoked when mediacodec process completed(had output buffer) if you register this callback using mediacodec_set_fill_buffer_cb().
/**
* @brief Gets the decoded or encoded packet from the output queue.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @remarks The @a packet should be released using media_packet_destroy().
+ * @remarks The @a packet should be released using media_packet_unref().
* @param[in] mediacodec The handle to mediacodec
* @param[out] packet The current output of the decoder/encoder.
* this function passed decoded/encoded frame to output queue.
Name: capi-media-codec
Summary: A Media Codec library in Tizen Native API
-Version: 0.6.29
+Version: 0.6.30
Release: 0
Group: Multimedia/API
License: Apache-2.0
return ret;
ERROR:
if (packet)
- media_packet_destroy(packet);
+ media_packet_unref(packet);
MEDIACODEC_FLEAVE();
return ret;
}
g_mutex_lock(&core->ports[1]->mutex);
while ((packet = g_queue_pop_head(core->ports[1]->queue))) {
- LOGD("destroy packet[%p]", packet);
- media_packet_destroy(packet);
+ LOGD("release packet[%p]", packet);
+ media_packet_unref(packet);
}
g_mutex_unlock(&core->ports[1]->mutex);
#ifdef USE_POOL
media_packet_pool_release_packet(pkt_pool, pkt);
#else
- media_packet_destroy(pkt);
+ media_packet_unref(pkt);
#endif
app->ebd++;
g_mutex_unlock(&app->lock);
- media_packet_destroy(out_pkt);
+ media_packet_unref(out_pkt);
out_pkt = NULL;
g_print("done\n");
g_mutex_unlock(&app->lock);
- media_packet_destroy(out_pkt);
+ media_packet_unref(out_pkt);
out_pkt = NULL;
g_print("done\n");
g_mutex_unlock(&app->lock);
- media_packet_destroy(out_pkt);
+ media_packet_unref(out_pkt);
out_pkt = NULL;
g_print("done\n");
void _mediacodec_enc_input_buffer_used_cb(media_packet_h pkt, void *user_data)
{
/* release input raw packet */
- media_packet_destroy(pkt);
+ media_packet_unref(pkt);
}
/* this callback is called when the input buffer for codec has done to use */
void _mediacodec_dec_input_buffer_used_cb(media_packet_h pkt, void *user_data)
{
/* release input encoded packet */
- media_packet_destroy(pkt);
+ media_packet_unref(pkt);
}
void _mediacodec_enc_output_buffer_available_cb(media_packet_h pkt, void *user_data)
if (app->enable_dump)
decoder_output_dump(app, output_buf);
- media_packet_destroy(output_buf);
+ media_packet_unref(output_buf);
}
void _media_packet_preview_cb(media_packet_h packet, void *user_data)