Hi all :) ,
I am working on video plug-in in C++.NET. I have a video file. Its size is not fixed. It can be in MBs or GBs. I have calculated sample size and sample count of video file and now I want to prepend (insert in the beginning of video file) this information in the video file. I tried all modes of file handling in C. I also tried to open the file in append mode but and move the file pointer in start by rewind() and fseek() but all my efforts are wasted. I want to do this without creating another new file (insert the sample information first and then append rest of video file information and then remove the older one.) because file size can be large and it will take too much time complete the process.

Guys I need the best solution in this case as earliest as possible:icon_neutral: ...


Many Thanks

Kind Regards

Asif Javaid Chughtai
Software Engineer
IT Marvel Lahore
Pakistan

Sorry to tell you that the only way to add something to the beginning of a file is to completly rewrite it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.