Hi, All
I am Big bignner in CUDA API.
Recently I have been compiled and executed the CUDA SDK 4.0 and CUDA API 2.0 sample(http://rationalqm.us/dgdecnv/cuda/cuda.html)
That is executed perfectly in the case of using H.264 bitstream file.
But I want to execute not H.264 file format but H.264 bitstream coming from IP camera.
In my using IP camera, I call the H.264 bitstream which is encoded per frame.
The next paragraph is sample source code, which reads the H.264 bitstream and
pkt.flages is CUVID_PKT_ENDOFSTREAM or 0 according to len.
lastly cuvidParseVideoData() is called and then callback function(HandleVideoSequence(),HandlePictureDecode() and HandlePictureDisplay()) is executed.
for (;;)
{
CUVIDSOURCEDATAPACKET pkt;
int len = fread(io_buffer, 1, sizeof(io_buffer), fInput);
packet_cnt++;
if (len <= 0)
{
// Flush the decoder
pkt.flags = CUVID_PKT_ENDOFSTREAM;
pkt.payload_size = 0;
pkt.payload = NULL;
pkt.timestamp = 0;
cuvidParseVideoData(state.cuParser, &pkt);
break;
}
pkt.flags = 0;
pkt.payload_size = len;
pkt.payload = io_buffer;
pkt.timestamp = 0; // not using timestamps
cuvidParseVideoData(state.cuParser, &pkt);
}
But My source is not recall callback function after calling frome cuvidParseVideoData().
Next paragraph is that I rewrite the sample source as following:
pkt.flags = CUVID_PKT_ENDOFSTREAM;
pkt.payload_size = nEncSize;
pkt.payload = inbuf_ptr;
pkt.timestamp = 0; // not using timestamps
cuvidParseVideoData(state.cuParser, &pkt); // callback ...
My source calls the callback function(HandleVideoSequence(),HandlePictureDecode(),HandlePictureDisplay()).
But, as you see there is a problem because of using the CUVID_PKT_ENDOFSTREAM.
Whenever my source calls next packet, there is not recalled callback function.
How do I solve the problem?
Best regards,
nrson
[RESOLVED] cuvidParseVideoData() doesn't callback
Re: cuvidParseVideoData() don't call callback function!!
I can't see your setup for CUVID, etc. You'll have to post the entire source code.
Re: cuvidParseVideoData() don't call callback function!!
OP is not responding, so I close this as resolved.
Re: [RESOLVED] cuvidParseVideoData() doesn't callback
Hi, admin
I am sorry your reply, but I resolved my problem.
Thank you for your concern..
Best regards
nrson
I am sorry your reply, but I resolved my problem.
Thank you for your concern..
Best regards
nrson