47 *filename = tempnam(
".", prefix);
49 size_t len = strlen(prefix) + 12;
53 if (*filename ==
NULL) {
58 fd =
avpriv_open(*filename, O_RDWR | O_BINARY | O_CREAT, 0444);
60 snprintf(*filename, len,
"/tmp/%sXXXXXX", prefix);
61 fd = mkstemp(*filename);
63 snprintf(*filename, len,
"./%sXXXXXX", prefix);
64 fd = mkstemp(*filename);
79 xvid_plg_create_t xvid_plg_create = { 0 };
80 xvid_plugin_2pass2_t xvid_2pass2 = { 0 };
89 static const char frame_types[] =
" ipbs";
95 snprintf(tmp,
sizeof(tmp),
"%c %d %d %d %d %d %d\n",
99 write(fd, tmp, strlen(tmp));
104 xvid_2pass2.version= XVID_MAKE_VERSION(1,1,0);
105 xvid_2pass2.filename= tmp_name;
111 xvid_plg_create.version= XVID_MAKE_VERSION(1,1,0);
114 xvid_plg_create.param= &xvid_2pass2;
124 xvid_plg_data_t xvid_plg_data = { 0 };
126 xvid_plg_data.version= XVID_MAKE_VERSION(1,1,0);
127 xvid_plg_data.width = s->
width;
128 xvid_plg_data.height= s->
height;
129 xvid_plg_data.mb_width = s->
mb_width;
133 xvid_plg_data.min_quant[0]= s->
avctx->
qmin;
134 xvid_plg_data.min_quant[1]= s->
avctx->
qmin;
135 xvid_plg_data.min_quant[2]= s->
avctx->
qmin;
136 xvid_plg_data.max_quant[0]= s->
avctx->
qmax;
137 xvid_plg_data.max_quant[1]= s->
avctx->
qmax;
138 xvid_plg_data.max_quant[2]= s->
avctx->
qmax;
139 xvid_plg_data.bquant_offset = 0;
140 xvid_plg_data.bquant_ratio = 100;
144 xvid_plg_data.length=
145 xvid_plg_data.stats.length= (s->
frame_bits + 7)/8;
147 xvid_plg_data.quant= s->
qscale;
157 xvid_plg_data.quant= 0;
176 xvid_plg_destroy_t xvid_plg_destroy;