nlemozz
17th September 2010, 22:41
I have a question about copying/saving frames between calls.
I want to do the following in my GetFrame function:
PVideoFrame src = child->GetFrame(n, env);
PVideoFrame dst = env->NewVideoFrame(vi);
const unsigned int * srcp = (const unsigned int*) src->GetReadPtr();
unsigned int* dstp = (unsigned int*) dst->GetWritePtr();
**** Do some operations on dst through dstp here *****
*** Save dst to a member of my class which is a PVideoFrame here eg PVideoFrame savedFrame****
**** Do more operations on dst through dstp here without affecting the saved version *****
return dst
My question is, can I just use:
savedFrame = dst;
or do I have to do some sort of new/copy/delete?
Thanks in advance.
I want to do the following in my GetFrame function:
PVideoFrame src = child->GetFrame(n, env);
PVideoFrame dst = env->NewVideoFrame(vi);
const unsigned int * srcp = (const unsigned int*) src->GetReadPtr();
unsigned int* dstp = (unsigned int*) dst->GetWritePtr();
**** Do some operations on dst through dstp here *****
*** Save dst to a member of my class which is a PVideoFrame here eg PVideoFrame savedFrame****
**** Do more operations on dst through dstp here without affecting the saved version *****
return dst
My question is, can I just use:
savedFrame = dst;
or do I have to do some sort of new/copy/delete?
Thanks in advance.