Mercurial > mplayer.hg
annotate libmpcodecs/vd_qtrpza.c @ 9291:64b8c5a07c2c
- It adds an option enqueue/noenqueue, so users can choose if they want to
have playlist overwritten by files on commandline or just enqueue them at
the end ...
- Playtree is finally cleared, as such gui has total control!
- Autoplay if files are available on commandline and -enqueue is not set!
- Fallback on Playlists finally does work with Gui and even with streaming
Playlists! [ Before gui was broken as mplayer.c:playtree tried to have
control]
patch by Fabian Franz <FabianFranz@gmx.de>
author | arpi |
---|---|
date | Wed, 05 Feb 2003 23:02:35 +0000 |
parents | 75048549dc44 |
children |
rev | line source |
---|---|
4915
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
1 #include <stdio.h> |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
2 #include <stdlib.h> |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
3 |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
4 #include "config.h" |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
5 #include "mp_msg.h" |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
6 |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
7 #include "vd_internal.h" |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
8 |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
9 static vd_info_t info = { |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
10 "Quicktime Apple Video", |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
11 "qtrpza", |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
12 "Roberto Togni", |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
13 "Roberto Togni", |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
14 "native codec" |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
15 }; |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
16 |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
17 LIBVD_EXTERN(qtrpza) |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
18 |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
19 // to set/get/query special features/parameters |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
20 static int control(sh_video_t *sh,int cmd,void* arg,...){ |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
21 return CONTROL_UNKNOWN; |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
22 } |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
23 |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
24 // init driver |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
25 static int init(sh_video_t *sh){ |
8954 | 26 return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_BGR15); |
4915
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
27 } |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
28 |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
29 // uninit driver |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
30 static void uninit(sh_video_t *sh){ |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
31 } |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
32 |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
33 //mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h); |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
34 |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
35 void qt_decode_rpza(char *encoded, int encodec_size, char *decodec, int width, int height, int bytes_per_pixel); |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
36 |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
37 // decode a frame |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
38 static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){ |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
39 mp_image_t* mpi; |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
40 if(len<=0) return NULL; // skipped frame |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
41 |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
42 mpi=mpcodecs_get_image(sh, MP_IMGTYPE_STATIC, MP_IMGFLAG_PRESERVE, sh->disp_w, sh->disp_h); |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
43 |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
44 if(!mpi){ // temporary! |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
45 printf("couldn't allocate image for qtrpza codec\n"); |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
46 return NULL; |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
47 } |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
48 |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
49 qt_decode_rpza(data, len, mpi->planes[0], sh->disp_w, sh->disp_h, |
4948 | 50 mpi->bpp/8); |
4915
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
51 |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
52 return mpi; |
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
diff
changeset
|
53 } |