~ubuntu-branches/debian/sid/mplayer/sid

« back to all changes in this revision

Viewing changes to libmpdemux/demux_rawvideo.c

  • Committer: Bazaar Package Importer
  • Author(s): A Mennucc1
  • Date: 2009-03-23 10:05:45 UTC
  • mfrom: (4.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090323100545-x8h79obawnnte7kk
Tags: 1.0~rc2+svn20090303-5
debian/control : move docbook-xml,docbook-xsl,xsltproc from 
Build-Depends-Indep to Build-Depends, since they are needed to run
configure

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 
15
15
#include "libmpcodecs/img_format.h"
16
16
 
17
 
extern int demuxer_type;
18
17
static int format = IMGFMT_I420;
19
18
static int size_id = 0;
20
19
static int width = 0;
22
21
static float fps = 25;
23
22
static int imgsize=0;
24
23
 
25
 
m_option_t demux_rawvideo_opts[] = {
 
24
const m_option_t demux_rawvideo_opts[] = {
26
25
  // size:
27
26
  { "w", &width, CONF_TYPE_INT,CONF_RANGE,1,8192, NULL },
28
27
  { "h", &height, CONF_TYPE_INT,CONF_RANGE,1,8192, NULL },
77
76
  case IMGFMT_NV12:
78
77
  case IMGFMT_HM12:
79
78
  case IMGFMT_YV12: imgsize=width*height+2*(width>>1)*(height>>1);break;
80
 
  case IMGFMT_YUY2: imgsize=width*height*2;break;
 
79
  case IMGFMT_YUY2:
81
80
  case IMGFMT_UYVY: imgsize=width*height*2;break;
 
81
  case IMGFMT_Y800:
82
82
  case IMGFMT_Y8: imgsize=width*height;break;
83
83
  default:
84
84
      if (IMGFMT_IS_RGB(format))
123
123
  sh_video_t* sh_video = demuxer->video->sh;
124
124
  off_t pos;
125
125
 
126
 
  pos = (flags & 1) ? demuxer->movi_start : stream_tell(s);
127
 
  if(flags & 2)
 
126
  pos = (flags & SEEK_ABSOLUTE) ? demuxer->movi_start : stream_tell(s);
 
127
  if(flags & SEEK_FACTOR)
128
128
    pos += ((demuxer->movi_end - demuxer->movi_start)*rel_seek_secs);
129
129
  else
130
130
    pos += (rel_seek_secs*sh_video->i_bps);
138
138
}
139
139
 
140
140
 
141
 
demuxer_desc_t demuxer_desc_rawvideo = {
 
141
const demuxer_desc_t demuxer_desc_rawvideo = {
142
142
  "Raw video demuxer",
143
143
  "rawvideo",
144
144
  "rawvideo",