From searching through the code for the H264 splitter, I see a protected function called: GetNALUData(MediaData & p_data);
Has anyone used this function before? If it were a public function could I simply use the splitter on an encoded frame, cycle through the encoded frame and get outputted the NAL units without any undesired side-effects??
If this is possible, then how can I create an H.264 splitter that constructs using a MediaData object as opposed to a file on disk??
Thanks for the reply. I looked at the code that you suggested. I think the following summarises what the H264Splitter does in the decoder:
1) Gets initialised with the filename of the H.264 file 2) In a loop, calls GetNextVideoData on the media data object. This (as far as I can tell) just takes as much data as it can get.
Unfortunately this does not give any indication as to what I want to do as it (1) gets initialised with a file as opposed to a stream, and (2) you cannot specifically ask it to only get a NAL unit, it just takes whatever is in the input MediaData object.
Basically, I need to be able to generate H.264 NAL units from raw video input. I firstly thought that the encoder would be able to output NAL units, but this does not seem to be the case. So I thought that perhaps a splitter could take an encoded stream and extract one NAL unit at a time (which would be less efficient, but would at least work).