1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0030612: Visualization - provide texture map with video as image source

Introduced package Media wrapping FFmpeg structures.
Media_PlayerContext class manages video decoding into Media_IFrameQueue interface.
Graphic3d_MediaTextureSet implements Media_IFrameQueue interface and can be used as texture source.
AIS_MediaPlayer implements simple AIS object displaying video.
This commit is contained in:
kgv
2019-03-28 00:57:17 +03:00
committed by apn
parent 9491df8c1b
commit 98e6c6d17b
36 changed files with 4012 additions and 77 deletions

View File

@@ -283,7 +283,7 @@ Standard_Boolean Image_VideoRecorder::addVideoStream (const Image_VideoParams& t
// some formats want stream headers to be separate
if (myAVContext->oformat->flags & AVFMT_GLOBALHEADER)
{
aCodecCtx->flags |= CODEC_FLAG_GLOBAL_HEADER;
aCodecCtx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
}
return Standard_True;
#else
@@ -456,18 +456,6 @@ Standard_Boolean Image_VideoRecorder::writeVideoFrame (const Standard_Boolean th
AVPacket aPacket;
memset (&aPacket, 0, sizeof(aPacket));
av_init_packet (&aPacket);
if ((myAVContext->oformat->flags & AVFMT_RAWPICTURE) != 0
&& !theToFlush)
{
// raw video case - directly store the picture in the packet
aPacket.flags |= AV_PKT_FLAG_KEY;
aPacket.stream_index = myVideoStream->index;
aPacket.data = myFrame->data[0];
aPacket.size = sizeof(AVPicture);
aResAv = av_interleaved_write_frame (myAVContext, &aPacket);
}
else
{
// encode the image
myFrame->pts = myFrameCount;