46 *filename = tempnam(
".", prefix);
48 size_t len = strlen(prefix) + 12;
52 if (*filename ==
NULL) {
57 fd = open(*filename, O_RDWR | O_BINARY | O_CREAT, 0444);
59 snprintf(*filename, len,
"/tmp/%sXXXXXX", prefix);
60 fd = mkstemp(*filename);
62 snprintf(*filename, len,
"./%sXXXXXX", prefix);
63 fd = mkstemp(*filename);
77 xvid_plg_create_t xvid_plg_create = { 0 };
78 xvid_plugin_2pass2_t xvid_2pass2 = { 0 };
87 static const char frame_types[] =
" ipbs";
93 snprintf(tmp,
sizeof(tmp),
"%c %d %d %d %d %d %d\n",
97 write(fd, tmp, strlen(tmp));
102 xvid_2pass2.version= XVID_MAKE_VERSION(1,1,0);
103 xvid_2pass2.filename= tmp_name;
109 xvid_plg_create.version= XVID_MAKE_VERSION(1,1,0);
112 xvid_plg_create.param= &xvid_2pass2;
122 xvid_plg_data_t xvid_plg_data = { 0 };
124 xvid_plg_data.version= XVID_MAKE_VERSION(1,1,0);
125 xvid_plg_data.width = s->
width;
126 xvid_plg_data.height= s->
height;
127 xvid_plg_data.mb_width = s->
mb_width;
131 xvid_plg_data.min_quant[0]= s->
avctx->
qmin;
132 xvid_plg_data.min_quant[1]= s->
avctx->
qmin;
133 xvid_plg_data.min_quant[2]= s->
avctx->
qmin;
134 xvid_plg_data.max_quant[0]= s->
avctx->
qmax;
135 xvid_plg_data.max_quant[1]= s->
avctx->
qmax;
136 xvid_plg_data.max_quant[2]= s->
avctx->
qmax;
137 xvid_plg_data.bquant_offset = 0;
138 xvid_plg_data.bquant_ratio = 100;
142 xvid_plg_data.length=
143 xvid_plg_data.stats.length= (s->
frame_bits + 7)/8;
145 xvid_plg_data.quant= s->
qscale;
155 xvid_plg_data.quant= 0;
173 xvid_plg_destroy_t xvid_plg_destroy;