summaryrefslogtreecommitdiff
path: root/src/libw32dll/w32codec.c
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2002-02-09 07:13:22 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2002-02-09 07:13:22 +0000
commit8700c75544d88f1479d5455b5b2788921d4dd5ee (patch)
tree7a80e2b00e4e7294c7d7ca1440c4d136ccf12998 /src/libw32dll/w32codec.c
parent2f8fed75fc94e7afe89f7b60586f7cb55737efe1 (diff)
downloadxine-lib-8700c75544d88f1479d5455b5b2788921d4dd5ee.tar.gz
xine-lib-8700c75544d88f1479d5455b5b2788921d4dd5ee.tar.bz2
the long-awaited video_out changes, not completely debuged (races)
- pts are 64 bit now - scr and video_out-loop run all the time - video_out cleanups - metronom cleanups - buffer type BUF_CONTROL_DISCONTINUITY is used internally now, input plugins should no longer send this one - support for individual frame durations - using nano-/usleep instead of itimer (simpler code, maybe this will help freebsd) CVS patchset: 1487 CVS date: 2002/02/09 07:13:22
Diffstat (limited to 'src/libw32dll/w32codec.c')
-rw-r--r--src/libw32dll/w32codec.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c
index 0d8f123d2..3c9dacd51 100644
--- a/src/libw32dll/w32codec.c
+++ b/src/libw32dll/w32codec.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: w32codec.c,v 1.62 2002/01/22 01:55:12 miguelfreitas Exp $
+ * $Id: w32codec.c,v 1.63 2002/02/09 07:13:24 guenter Exp $
*
* routines for using w32 codecs
* DirectShow support by Miguel Freitas (Nov/2001)
@@ -127,11 +127,11 @@ typedef struct w32a_decoder_s {
unsigned char *buf;
int size;
- uint32_t pts;
- uint32_t scr;
+ int64_t pts;
+ int64_t scr;
/* these are used for pts estimation */
- uint32_t lastpts, sumpts, sumsize;
+ int64_t lastpts, sumpts, sumsize;
unsigned char *outbuf;
int outsize;
@@ -633,9 +633,10 @@ static void w32v_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
this->bih.biHeight,
42,
IMGFMT_YUY2,
- this->video_step,
VO_BOTH_FIELDS);
+ img->duration = this->video_step;
+
if (this->outfmt==IMGFMT_YUY2)
img_buffer = img->base[0];
@@ -717,8 +718,8 @@ static void w32v_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
}
}
- img->PTS = buf->PTS;
- img->SCR = buf->SCR;
+ img->pts = buf->pts;
+ img->scr = buf->scr;
if(ret || this->skipframes) {
if( !this->skipframes )
printf("w32codec: Error decompressing frame, err=%ld\n", (long)ret);
@@ -976,8 +977,8 @@ static void w32a_decode_audio (w32a_decoder_t *this,
unsigned char *data,
uint32_t size,
int frame_end,
- uint32_t pts,
- uint32_t scr) {
+ int64_t pts,
+ int64_t scr) {
static ACMSTREAMHEADER ash;
HRESULT hr;
@@ -1128,7 +1129,7 @@ static void w32a_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
w32a_decode_audio (this, buf->content, buf->size,
buf->decoder_info[0]==2,
- buf->PTS, buf->SCR);
+ buf->pts, buf->scr);
}
}