Lines 276-282
Standard_Boolean Image_VideoRecorder::addVideoStream (
Link Here
|
276 |
// some formats want stream headers to be separate |
276 |
// some formats want stream headers to be separate |
277 |
if (myAVContext->oformat->flags & AVFMT_GLOBALHEADER) |
277 |
if (myAVContext->oformat->flags & AVFMT_GLOBALHEADER) |
278 |
{ |
278 |
{ |
279 |
aCodecCtx->flags |= CODEC_FLAG_GLOBAL_HEADER; |
279 |
aCodecCtx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; |
280 |
} |
280 |
} |
281 |
return Standard_True; |
281 |
return Standard_True; |
282 |
#else |
282 |
#else |
Lines 449-454
Standard_Boolean Image_VideoRecorder::writeVideoFrame
Link Here
|
449 |
AVPacket aPacket; |
449 |
AVPacket aPacket; |
450 |
memset (&aPacket, 0, sizeof(aPacket)); |
450 |
memset (&aPacket, 0, sizeof(aPacket)); |
451 |
av_init_packet (&aPacket); |
451 |
av_init_packet (&aPacket); |
|
|
452 |
#ifdef AVFMT_RAWPICTURE |
452 |
if ((myAVContext->oformat->flags & AVFMT_RAWPICTURE) != 0 |
453 |
if ((myAVContext->oformat->flags & AVFMT_RAWPICTURE) != 0 |
453 |
&& !theToFlush) |
454 |
&& !theToFlush) |
454 |
{ |
455 |
{ |
Lines 461-466
Standard_Boolean Image_VideoRecorder::writeVideoFrame
Link Here
|
461 |
aResAv = av_interleaved_write_frame (myAVContext, &aPacket); |
462 |
aResAv = av_interleaved_write_frame (myAVContext, &aPacket); |
462 |
} |
463 |
} |
463 |
else |
464 |
else |
|
|
465 |
#endif |
464 |
{ |
466 |
{ |
465 |
// encode the image |
467 |
// encode the image |
466 |
myFrame->pts = myFrameCount; |
468 |
myFrame->pts = myFrameCount; |