[MPlayer-dev-eng] XviD support is done

Vladimir Kushnir vkushnir at alfacom.net
Mon Jan 28 01:27:26 CET 2002


On Mon, 28 Jan 2002, Arpi wrote:

> Hi,
>
> > I was a bit wrong (see below) - a problem with mplayer+XviD under FreeBSD
> > isn't XviD's. I tested it with xine and aviplay - both play back with XviD
> > perfectly all right, and only MPlayer doesn't :-( I can't for the life of
> > me understand what's causing this.
>
> which xvid version? new core from cvs ?
>

Yes, CVS version of core

> and why don't you use ffodivx from libavcodec for xvid playback?
> it's MUCH faster.

Except for a simple curiousity, you mean? :-)
Well, there are several reasons. Sometimes ffodivx gives wrong image when
playing DivX movies (sorry, can't provide a sample). Besides, it looks
like it will be faster when fully optimized (well, this is merely ptivate
feeling, I'm not going to start argument).

>
> > P.S. Oh, BTW, one more question (totally unrelated). Wouldn't it make some
> > sence to enable input STREAMTYPE_STREAM not only from stdin but from pipe
> > as well? It's very simple to implement (just stat() on file) an could be
> > useful for mencoder.
> send patch
>

Ok, at the end is what seems to be the simplest. I only wish there was a
way to input video and audio streams from different sources (files. pipes
and so on)

Regards,
Vladimir

-- 
Vladimir Kushnir - vkushnir at Alfacom.net

/*-----------cut here------------*/
*** ../../ncvs/MM/mplayer/main/libmpdemux/open.c	Mon Jan 28 01:50:34 2002
--- libmpdemux/open.c	Mon Jan 28 01:52:54 2002
***************
*** 1,10 ****
!
  #include <ctype.h>
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
  #include <unistd.h>
  #include <fcntl.h>

  #include "config.h"
  #include "mp_msg.h"
--- 1,11 ----
! #include <sys/types.h>
  #include <ctype.h>
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
  #include <unistd.h>
  #include <fcntl.h>
+ #include <sys/stat.h>

  #include "config.h"
  #include "mp_msg.h"
***************
*** 72,77 ****
--- 73,79 ----
  stream_t* stream=NULL;
  int f=-1;
  off_t len;
+ struct stat sb;
  #ifdef VCD_CACHE
  int vcd_cache_size=128;
  #endif
***************
*** 390,396 ****
        stream=new_stream(f,STREAMTYPE_STREAM);
        return stream;
    }
!
  #ifdef STREAMING
    url = url_new(filename);
    if(url) {
--- 392,406 ----
        stream=new_stream(f,STREAMTYPE_STREAM);
        return stream;
    }
!
! //============ Open PIPE ============
!   f=open(filename,O_RDONLY);
!       if(!stat(filename, &sb) || (sb.st_mode = S_IFIFO)){
!       // read from pipe
!       stream=new_stream(f,STREAMTYPE_STREAM);
!       return stream;
!   }
!
  #ifdef STREAMING
    url = url_new(filename);
    if(url) {




More information about the MPlayer-dev-eng mailing list