annotate libmpcodecs/vd_mpegpes.c @ 8200:3ae71e4f2858

disable dr1 for huffyuv (422P & stride hack & dr1 -> bad )
author michael
date Fri, 15 Nov 2002 00:12:38 +0000
parents baac3cd44794
children 9dbe188e65ad
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5476
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
1 #include <stdio.h>
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
2 #include <stdlib.h>
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
3
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
4 #include "config.h"
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
5 #include "mp_msg.h"
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
6
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
7 #include "vd_internal.h"
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
8
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
9 static vd_info_t info =
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
10 {
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
11 "MPEG 1/2 Video passthrough",
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
12 "mpegpes",
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
13 "A'rpi",
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
14 "A'rpi",
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
15 "for hw decoders"
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
16 };
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
17
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
18 LIBVD_EXTERN(mpegpes)
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
19
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
20 //#include "libmpdemux/parse_es.h"
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
21
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
22 #include "libvo/video_out.h"
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
23
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
24 // to set/get/query special features/parameters
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
25 static int control(sh_video_t *sh,int cmd,void* arg,...){
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
26 return CONTROL_UNKNOWN;
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
27 }
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
28
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
29 // init driver
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
30 static int init(sh_video_t *sh){
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
31 return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_MPEGPES);
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
32 }
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
33
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
34 // uninit driver
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
35 static void uninit(sh_video_t *sh){
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
36 }
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
37
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
38 // decode a frame
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
39 static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
40 mp_image_t* mpi;
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
41 static vo_mpegpes_t packet;
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
42 mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, 0, sh->disp_w, sh->disp_h);
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
43 packet.data=data;
7464
baac3cd44794 we don't need the 0x1FF hack any more
arpi
parents: 7180
diff changeset
44 packet.size=len;
5476
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
45 packet.timestamp=sh->timer*90000.0;
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
46 packet.id=0x1E0; //+sh_video->ds->id;
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
47 mpi->planes[0]=(uint8_t*)(&packet);
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
48 return mpi;
ac09ea252466 vd_mpegpes added
arpi
parents:
diff changeset
49 }