mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 17:16:50 +08:00
[mpp_frame]: add interface to get next frame for multiple output case
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@154 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
@@ -138,6 +138,7 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
MPP_RET mpp_frame_init(MppFrame *frame);
|
MPP_RET mpp_frame_init(MppFrame *frame);
|
||||||
MPP_RET mpp_frame_deinit(MppFrame frame);
|
MPP_RET mpp_frame_deinit(MppFrame frame);
|
||||||
|
MppFrame mpp_frame_get_next(MppFrame frame);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* normal parameter
|
* normal parameter
|
||||||
|
@@ -64,3 +64,14 @@ MPP_RET mpp_frame_deinit(MppFrame frame)
|
|||||||
return MPP_OK;
|
return MPP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MppFrame mpp_frame_get_next(MppFrame frame)
|
||||||
|
{
|
||||||
|
if (NULL == frame) {
|
||||||
|
mpp_err("mpp_frame_get_next invalid NULL pointer input\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
MppFrameImpl *p = (MppFrameImpl *)frame;
|
||||||
|
return (MppFrame)p->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -19,7 +19,9 @@
|
|||||||
|
|
||||||
#include "mpp_frame.h"
|
#include "mpp_frame.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct MppFrameImpl_t MppFrameImpl;
|
||||||
|
|
||||||
|
struct MppFrameImpl_t {
|
||||||
/*
|
/*
|
||||||
* dimension parameter for display
|
* dimension parameter for display
|
||||||
*/
|
*/
|
||||||
@@ -65,7 +67,12 @@ typedef struct {
|
|||||||
* buffer information
|
* buffer information
|
||||||
*/
|
*/
|
||||||
MppBuffer buffer;
|
MppBuffer buffer;
|
||||||
} MppFrameImpl;
|
|
||||||
|
/*
|
||||||
|
* pointer for multiple frame output at one time
|
||||||
|
*/
|
||||||
|
MppFrameImpl *next;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -93,10 +93,15 @@ int main()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dec_out) {
|
if (dec_out) {
|
||||||
// TODO: diaplay function called here
|
// interface may output multiple frame at one time
|
||||||
|
do {
|
||||||
|
MppFrame next = mpp_frame_get_next(dec_out);
|
||||||
|
|
||||||
mpp_frame_deinit(dec_out);
|
// TODO: diaplay function called here
|
||||||
dec_out = NULL;
|
|
||||||
|
mpp_frame_deinit(dec_out);
|
||||||
|
dec_out = next;
|
||||||
|
} while (dec_out);
|
||||||
}
|
}
|
||||||
|
|
||||||
mpp_packet_deinit(dec_in);
|
mpp_packet_deinit(dec_in);
|
||||||
@@ -125,8 +130,15 @@ int main()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dec_out) {
|
if (dec_out) {
|
||||||
mpp_frame_deinit(dec_out);
|
// interface may output multiple frame at one time
|
||||||
dec_out = NULL;
|
do {
|
||||||
|
MppFrame next = mpp_frame_get_next(dec_out);
|
||||||
|
|
||||||
|
// TODO: diaplay function called here
|
||||||
|
|
||||||
|
mpp_frame_deinit(dec_out);
|
||||||
|
dec_out = next;
|
||||||
|
} while (dec_out);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user