annotate libmpcodecs/ve_raw.c @ 36288:63e8bfb208c6

Remove property wsWaitMap and function wsWindowMapWait(). There was a false check of the property (wsShowWindow instead of wsWaitMap) in wsWindowCreate(), so wsWindowMapWait() was actually never used on window creation. The function seems pointless.
author ib
date Thu, 01 Aug 2013 17:20:16 +0000
parents a6eb88882b9f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
30421
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
1 /*
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
2 * This file is part of MPlayer.
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
3 *
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
4 * MPlayer is free software; you can redistribute it and/or modify
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
5 * it under the terms of the GNU General Public License as published by
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
7 * (at your option) any later version.
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
8 *
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
9 * MPlayer is distributed in the hope that it will be useful,
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
12 * GNU General Public License for more details.
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
13 *
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
14 * You should have received a copy of the GNU General Public License along
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
17 */
bbb6ebec87a0 Add missing license headers to all files in the libmpcodecs directory.
diego
parents: 29263
diff changeset
18
11966
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
19 #include <stdio.h>
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
20 #include <stdlib.h>
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
21 #include <string.h>
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
22
17012
6ff3379a0862 Unify include path handling, -I.. is in CFLAGS.
diego
parents: 14878
diff changeset
23 #include "config.h"
6ff3379a0862 Unify include path handling, -I.. is in CFLAGS.
diego
parents: 14878
diff changeset
24 #include "mp_msg.h"
18004
bcd805923554 Part2 of several printf2mp_msg changes in patch from Otvos Attila oattila AT chello DOT hu with LOTS of modifications by me
reynaldo
parents: 17906
diff changeset
25 #include "help_mp.h"
11966
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
26
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
27 #include "codec-cfg.h"
22600
3c2b4a866c6a Add explicit location for headers from the stream/ directory.
diego
parents: 21660
diff changeset
28 #include "stream/stream.h"
22601
ed8f90096c65 Add explicit location for headers from the libmpdemux/ directory.
diego
parents: 22600
diff changeset
29 #include "libmpdemux/demuxer.h"
ed8f90096c65 Add explicit location for headers from the libmpdemux/ directory.
diego
parents: 22600
diff changeset
30 #include "libmpdemux/stheader.h"
11966
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
31
22600
3c2b4a866c6a Add explicit location for headers from the stream/ directory.
diego
parents: 21660
diff changeset
32 #include "stream/stream.h"
22601
ed8f90096c65 Add explicit location for headers from the libmpdemux/ directory.
diego
parents: 22600
diff changeset
33 #include "libmpdemux/muxer.h"
11966
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
34
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
35 #include "img_format.h"
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
36 #include "mp_image.h"
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
37 #include "vf.h"
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
38
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
39
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
40 //===========================================================================//
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
41
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
42 struct vf_priv_s {
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
43 muxer_stream_t* mux;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
44 };
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
45 #define mux_v (vf->priv->mux)
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
46
30642
a972c1a4a012 cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents: 30421
diff changeset
47 static int set_format(struct vf_instance *vf, unsigned int fmt) {
27366
067da68b5b16 change ve_raw.c:set_format to not overwrite biCompression if force_fourcc is set.
compn
parents: 22958
diff changeset
48 if (!force_fourcc)
27367
c4667b965561 cosmetics: reindent after last commit
compn
parents: 27366
diff changeset
49 mux_v->bih->biCompression = fmt;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 27367
diff changeset
50
11966
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
51 mux_v->bih->biPlanes = 1;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
52 if (IMGFMT_IS_RGB(fmt)) {
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
53 if (IMGFMT_RGB_DEPTH(fmt) < 8 && !(fmt&128))
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
54 mux_v->bih->biBitCount = IMGFMT_RGB_DEPTH(fmt);
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
55 else
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
56 mux_v->bih->biBitCount = (IMGFMT_RGB_DEPTH(fmt)+7)&(~7);
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
57 return 1;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
58 }
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
59 if (IMGFMT_IS_BGR(fmt)) {
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
60 if (IMGFMT_BGR_DEPTH(fmt) < 8 && !(fmt&128))
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
61 mux_v->bih->biBitCount = IMGFMT_BGR_DEPTH(fmt);
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
62 else
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
63 mux_v->bih->biBitCount = (IMGFMT_BGR_DEPTH(fmt)+7)&(~7);
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
64 return 1;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
65 }
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
66 switch (fmt) {
32490
059cc86b02dc Support NV12/NV21/HM12 in ve_raw.
reimar
parents: 32105
diff changeset
67 case IMGFMT_NV12:
059cc86b02dc Support NV12/NV21/HM12 in ve_raw.
reimar
parents: 32105
diff changeset
68 case IMGFMT_NV21:
059cc86b02dc Support NV12/NV21/HM12 in ve_raw.
reimar
parents: 32105
diff changeset
69 case IMGFMT_HM12:
059cc86b02dc Support NV12/NV21/HM12 in ve_raw.
reimar
parents: 32105
diff changeset
70 mux_v->bih->biPlanes = 2;
059cc86b02dc Support NV12/NV21/HM12 in ve_raw.
reimar
parents: 32105
diff changeset
71 mux_v->bih->biBitCount = 12;
059cc86b02dc Support NV12/NV21/HM12 in ve_raw.
reimar
parents: 32105
diff changeset
72 break;
11966
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
73 case IMGFMT_I420:
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
74 case IMGFMT_IYUV:
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
75 case IMGFMT_YV12:
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
76 case IMGFMT_411P:
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
77 mux_v->bih->biPlanes = 3;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
78 mux_v->bih->biBitCount = 12;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
79 break;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
80 case IMGFMT_444P:
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
81 mux_v->bih->biPlanes = 3;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
82 mux_v->bih->biBitCount = 24;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
83 break;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
84 case IMGFMT_422P:
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
85 mux_v->bih->biPlanes = 3;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
86 mux_v->bih->biBitCount = 16;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
87 break;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
88 case IMGFMT_IF09:
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
89 mux_v->bih->biPlanes = 4;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
90 case IMGFMT_YVU9:
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
91 mux_v->bih->biBitCount = 9;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
92 break;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
93 case IMGFMT_UYVY:
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
94 case IMGFMT_YUY2:
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
95 mux_v->bih->biBitCount = 16;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
96 break;
22958
1ea1e076cd4c support format=y8 with -ovc raw
lorenm
parents: 22601
diff changeset
97 case IMGFMT_Y8:
1ea1e076cd4c support format=y8 with -ovc raw
lorenm
parents: 22601
diff changeset
98 mux_v->bih->biBitCount = 8;
1ea1e076cd4c support format=y8 with -ovc raw
lorenm
parents: 22601
diff changeset
99 break;
11966
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
100 default:
18004
bcd805923554 Part2 of several printf2mp_msg changes in patch from Otvos Attila oattila AT chello DOT hu with LOTS of modifications by me
reynaldo
parents: 17906
diff changeset
101 mp_msg(MSGT_MENCODER, MSGL_INFO, MSGTR_MPCODECS_OutputWithFourccNotSupported, fmt);
11966
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
102 mux_v->bih->biCompression = 0;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
103 return 0;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
104 }
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
105 return 1;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
106 }
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
107
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
108
30642
a972c1a4a012 cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents: 30421
diff changeset
109 static int config(struct vf_instance *vf,
11966
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
110 int width, int height, int d_width, int d_height,
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
111 unsigned int flags, unsigned int outfmt)
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
112 {
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
113 int ret;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
114 mux_v->bih->biWidth = width;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
115 mux_v->bih->biHeight = height;
12061
656a1b45b309 Use aspect from encoder for AVI vprp header
ranma
parents: 11966
diff changeset
116 mux_v->aspect = (float)d_width/d_height;
11966
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
117 ret = set_format(vf, outfmt);
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
118 if (!ret) return 0;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
119
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
120 mux_v->bih->biSizeImage = mux_v->bih->biWidth*mux_v->bih->biHeight*mux_v->bih->biBitCount/8;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
121 return 1;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
122 }
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
123
30642
a972c1a4a012 cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents: 30421
diff changeset
124 static int control(struct vf_instance *vf, int request, void *data) {
11966
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
125 return CONTROL_UNKNOWN;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
126 }
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
127
30642
a972c1a4a012 cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents: 30421
diff changeset
128 static int query_format(struct vf_instance *vf, unsigned int fmt) {
11966
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
129 if (IMGFMT_IS_RGB(fmt) || IMGFMT_IS_BGR(fmt))
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
130 return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
131 switch (fmt) {
32902
a6eb88882b9f Missing part of r32577: Add NV12/NV21/HM12 to query_format so they really
reimar
parents: 32490
diff changeset
132 case IMGFMT_NV12:
a6eb88882b9f Missing part of r32577: Add NV12/NV21/HM12 to query_format so they really
reimar
parents: 32490
diff changeset
133 case IMGFMT_NV21:
a6eb88882b9f Missing part of r32577: Add NV12/NV21/HM12 to query_format so they really
reimar
parents: 32490
diff changeset
134 case IMGFMT_HM12:
11966
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
135 case IMGFMT_I420:
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
136 case IMGFMT_IYUV:
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
137 case IMGFMT_YV12:
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
138 case IMGFMT_411P:
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
139 case IMGFMT_444P:
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
140 case IMGFMT_422P:
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
141 case IMGFMT_UYVY:
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
142 case IMGFMT_YUY2:
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
143 case IMGFMT_YVU9:
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
144 case IMGFMT_IF09:
22958
1ea1e076cd4c support format=y8 with -ovc raw
lorenm
parents: 22601
diff changeset
145 case IMGFMT_Y8:
11966
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
146 return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
147 }
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
148
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
149 return 0;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
150 }
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
151
30642
a972c1a4a012 cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents: 30421
diff changeset
152 static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts) {
11966
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
153 mux_v->buffer = mpi->planes[0];
17906
20aca9baf5d8 passing pts through the filter layer (lets see if pts or cola comes out at the end)
michael
parents: 17487
diff changeset
154 muxer_write_chunk(mux_v, mpi->width*mpi->height*mux_v->bih->biBitCount/8, 0x10, pts, pts);
11966
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
155 return 1;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
156 }
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
157
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
158 //===========================================================================//
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
159
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
160 static int vf_open(vf_instance_t *vf, char* args){
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
161 vf->config = config;
14878
5723c4b2a2ea fixes for encoding of multiple files
henry
parents: 14549
diff changeset
162 vf->default_caps = VFCAP_CONSTANT;
11966
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
163 vf->control = control;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
164 vf->query_format = query_format;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
165 vf->put_image = put_image;
14303
ef29ceb5add1 Raw encoder does not support stride.
reimar
parents: 12061
diff changeset
166 vf->default_caps = 0;
11966
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
167 vf->priv = malloc(sizeof(struct vf_priv_s));
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
168 memset(vf->priv, 0, sizeof(struct vf_priv_s));
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
169 vf->priv->mux = (muxer_stream_t*)args;
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 27367
diff changeset
170
32105
c08363dc5320 Replace sizoef(type) by sizeof(*ptrvar).
reimar
parents: 32033
diff changeset
171 mux_v->bih = calloc(1, sizeof(*mux_v->bih));
c08363dc5320 Replace sizoef(type) by sizeof(*ptrvar).
reimar
parents: 32033
diff changeset
172 mux_v->bih->biSize = sizeof(*mux_v->bih);
11966
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
173 mux_v->bih->biWidth = 0;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
174 mux_v->bih->biHeight = 0;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
175
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
176 return 1;
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
177 }
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
178
32033
c42345605c7a Mark video encoder vf_info_t structs as const.
diego
parents: 30642
diff changeset
179 const vf_info_t ve_info_raw = {
11966
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
180 "raw encoder",
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
181 "raw",
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
182 "jwe21@cam.ac.uk",
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
183 "Based on rawrgb",
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
184 vf_open
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
185 };
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
186
b58fdd5d8e8d remove raw nonsense and replace it by one ovc
attila
parents:
diff changeset
187 //===========================================================================//