Rv = encoder_->EncodeFrame (&pic, &info) // encodes the Frame Pic.pData = pic.pData + (width * height > 2) Pic.iStride = pic.iStride = pic.iPicWidth > 1 Memset (&pic, 0, sizeof (SSourcePicture)) Memset (&info, 0, sizeof (SFrameBSInfo)) Step 4: encocode and store output bitstream Std::basic_ifstream file("/home/megamol/Git/h264_sample/build/test.bmp", std::ios::binary) //opens bitstream to sourceīuf = std::vector((std::istreambuf_iterator(file)), std::istreambuf_iterator()) // reads in data to the vectorĮncoder_->SetOption (ENCODER_OPTION_DATAFORMAT, &videoFormat) Std::vector buf //to store the image information ![]() ![]() ![]() Int total_num = 500 //what does this value do? additional libaries used by sample code So far this is the code I derived from their wiki: #include I have an image and want to encode it with OpenH264.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |