[Xineliboutput-cvslog] vdr-xineliboutput xine_input_vdr.c, 1.173, 1.174
Brought to you by:
phintuka
From: Petri H. <phi...@us...> - 2008-08-03 20:56:02
|
Update of /cvsroot/xineliboutput/vdr-xineliboutput In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv7072 Modified Files: xine_input_vdr.c Log Message: Improved support for dshowserver/CoreAVC Index: xine_input_vdr.c =================================================================== RCS file: /cvsroot/xineliboutput/vdr-xineliboutput/xine_input_vdr.c,v retrieving revision 1.173 retrieving revision 1.174 diff -u -d -r1.173 -r1.174 --- xine_input_vdr.c 3 Aug 2008 20:52:26 -0000 1.173 +++ xine_input_vdr.c 3 Aug 2008 20:56:11 -0000 1.174 @@ -4906,15 +4906,41 @@ if(!this->bih_posted) { video_size_t size = {0}; if (pes_get_video_size(vid_buf->content, vid_buf->size, &size, this->h264 > 0)) { + + /* reset decoder buffer */ + cbuf->decoder_flags |= BUF_FLAG_FRAME_START; + + /* Fill xine_bmiheader for CoreAVC / H.264 */ + + if (this->h264 > 0 && this->coreavc_h264_decoder) { xine_bmiheader *bmi = (xine_bmiheader*) cbuf->content; memset(bmi, 0, sizeof(xine_bmiheader)); cbuf->decoder_flags |= BUF_FLAG_HEADER; + cbuf->decoder_flags |= BUF_FLAG_STDHEADER; /* CoreAVC: buffer contains bmiheader */ + cbuf->size = sizeof(xine_bmiheader); + bmi->biSize = sizeof(xine_bmiheader); bmi->biWidth = size.width; bmi->biHeight = size.height; - if (!this->h264 && size.pixel_aspect.num) { + bmi->biPlanes = 1; + bmi->biBitCount = 24; + bmi->biCompression = 0x34363248; + bmi->biSizeImage = 0; + bmi->biXPelsPerMeter = size.pixel_aspect.num; + bmi->biYPelsPerMeter = size.pixel_aspect.den; + bmi->biClrUsed = 0; + bmi->biClrImportant = 0; + } + + /* Set aspect ratio for ffmpeg mpeg2 / CoreAVC H.264 decoder + * (not for FFmpeg H.264 or libmpeg2 mpeg2 decoders) + */ + + if (size.pixel_aspect.num && + (!this->h264 || this->coreavc_h264_decoder)) { + cbuf->decoder_flags |= BUF_FLAG_HEADER; cbuf->decoder_flags |= BUF_FLAG_ASPECT; /* pixel ratio -> frame ratio */ if(size.pixel_aspect.num > size.height) { |