From patchwork Sat Jan 19 23:54:11 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Per Mellander X-Patchwork-Id: 12582 Received: from mail.mmtab.se ([84.243.56.194]) by www.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1JGNW0-0006S2-59 for vdr@linuxtv.org; Sun, 20 Jan 2008 00:54:20 +0100 Received: from [10.0.1.198] (c-74b9e455.39-0129-74657210.cust.bredbandsbolaget.se [85.228.185.116]) (authenticated bits=0) by mail.mmtab.se (8.13.8/8.13.8) with ESMTP id m0JNsHt7022919 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 20 Jan 2008 00:54:18 +0100 Message-ID: <47928DA3.1080501@mellander.org> Date: Sun, 20 Jan 2008 00:54:11 +0100 From: Per Mellander User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: VDR Mailing List References: <47922784.70001@mellander.org> In-Reply-To: Subject: Re: [vdr] CoreAVC + xineliboutput X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jan 2008 23:54:20 -0000 Status: O X-Status: X-Keywords: X-UID: 15175 Morfsta skrev: > I'm having the same problem. I've put the .ax file in /usr/lib/win32, > registed the key in ~/.mplayer/registry32 and then done: - You don't have to register. I patched xine-lib with coreavc for Linux xine.patch @ http://coreavc-for-linux.googlecode.com/svn/trunk/xine/xine.patch Then you have to add additional code to demux_mpeg_pes.c ( see attached patch ) You have to delete xineplug_decode_ff.so and xineplug_decode_qt.so in /usr/local/lib/xine/plugins/1.1.9/ I tried xineliboutput first but that give me black screen with epg + sound. With vdr-xine-0.8.1.tgz it all seems to work :) root@mm plugins]# lsof | grep Core xine 4548 root mem REG 8,2 1031168 1999941 /usr/lib/win32/CoreAVCDecoder.ax Many thanks to Igor who has been a great help! --- demux_mpeg_pes.c.org 2008-01-19 22:09:58.000000000 +0100 +++ demux_mpeg_pes.c 2008-01-19 22:10:02.000000000 +0100 @@ -1092,6 +1092,7 @@ static int32_t parse_private_stream_1(de return this->packet_len + result; } +int sent_header = 0; /* Added by Mel */ static int32_t parse_video_stream(demux_mpeg_pes_t *this, uint8_t *p, buf_element_t *buf) { int32_t result; uint32_t todo_length=0; @@ -1136,6 +1137,7 @@ static int32_t parse_video_stream(demux_ an AUD has been found at the beginning of the payload. */ if (this->mpeg12_h264_detected < 2) { + sent_header = 0; /* Added by Mel */ uint8_t *pp = p + 2, *pp_limit = p + payload_size - 1; while (0 < pp && pp < pp_limit) { if (pp[0] == 0x01 && pp[-1] == 0x00 && pp[-2] == 0x00) { @@ -1156,9 +1158,44 @@ static int32_t parse_video_stream(demux_ pp++; pp = memchr(pp, 0x01, pp_limit - pp); } + usleep(100); /* Added by Mel */ lprintf("%s%c\n", (this->mpeg12_h264_detected & 1) ? "H.264" : "MPEG1/2", (this->mpeg12_h264_detected & 2) ? '!' : '?'); + +// Mel START + + if (this->mpeg12_h264_detected == 3){ + if (sent_header == 0) { + printf("INIT H264\n"); + xine_bmiheader bih; + buf_element_t *buf = this->video_fifo->buffer_pool_alloc (this->video_fifo); + buf->decoder_flags = BUF_FLAG_STDHEADER; + + memset(&bih, 0x00, sizeof(bih)); + bih.biWidth = 1920; + bih.biHeight = 1080; + bih.biPlanes = 1; + bih.biBitCount = 24; + bih.biCompression = 0x34363248; //31435641; //AVC1 + bih.biSizeImage = 0; + bih.biXPelsPerMeter=10000; + bih.biYPelsPerMeter=10000; + bih.biClrUsed=0; + bih.biClrImportant=0; + bih.biSize = sizeof(bih); + buf->content = malloc(sizeof(bih)); + memcpy(buf->content, &bih, sizeof(bih)); + //memcpy(buf->content, &bih, sizeof(bih)); + buf->size = sizeof(bih); + buf->type = BUF_VIDEO_H264; + buf->decoder_flags |= BUF_FLAG_FRAME_END; + this->video_fifo->put (this->video_fifo, buf); + sent_header = 1; + buf = NULL; + } } +} +// Mel END /* when an H.264 AUD is seen, we first need to tell the decoder that the previous frame was complete. */