M
M
mrxakerrus2018-01-27 00:45:29
C++ / C#
mrxakerrus, 2018-01-27 00:45:29

How to output data to stdout in c++?

int  realData(long lRealHandle, const PACKET_INFO_EX *pFrame, long dwUser)
{
  printf("time:%04d-%02d-%02d %02d:%02d:%02d\n",pFrame->nYear,pFrame->nMonth,pFrame->nDay,pFrame->nHour,pFrame->nMinute,pFrame->nSecond);
  BOOL bResult = TRUE;
    fwrite(pFrame->pPacketBuffer,1,pFrame->dwPacketSize,g_pFile);
  return bResult;
}

instead of writing a file, you need to output data to stdout in order to pass ffmpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mercury13, 2018-01-27
@Mercury13

As I understand it, you need standard I / O redirection  - so that what we write somewhere serves as an input for the FFMPEG process that was launched in advance. On Windows, this is done through pipes and CreateProcess.
https://msdn.microsoft.com/en-us/library/windows/d...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question