Hey its me again!
While i am still failing in writing a encoded x264 video to file (as you can read here > http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=15&t=534
) i get another problem on another task. My goal is to stream (luckily dont need to write a frame) the encoded videoframes via RTSP (live555) to a android phone. For VLC this is working so far without the header-information (sps / pps) but on android the media player dont accept my videostream.
Since i didnt know how to set up a working x264 configuration (in c-code on up-to-date build) without deprecated header files which i cant translate into newer ones i m using a default codec-configuration via avcodec_get_context_defaults3.
This is where it becomes complicated: i need the sps and pps from the default codec configurations in a byte array (so something like uint8_t* spsData, int spsSize, uint8_t* ppsData, int ppsSize).
One way i figured out is to parse the AVCodecContext.extradata into that informations using weired and ugly functions like that (http://cgit.lscube.org/cgit.cgi/feng/tr ... 264.c#n218
). I guess i will never get into that.
So my question: is there a easy - or better 'easier' way to get those informations?