MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / hb_batch_title_scan_single

Function hb_batch_title_scan_single

libhb/batch.c:189–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189hb_title_t * hb_batch_title_scan_single(hb_handle_t *h, char *filename, int title_index)
190{
191 hb_title_t *title;
192 hb_stream_t *stream;
193
194 if (title_index < 0)
195 {
196 return NULL;
197 }
198
199 if (!hb_is_valid_batch_path(filename))
200 {
201 return NULL;
202 }
203
204 hb_log("batch: scanning %s", filename);
205 title = hb_title_init(filename, title_index);
206
207 if (title == NULL)
208 {
209 return NULL;
210 }
211
212 stream = hb_stream_open(h, filename, title, 1);
213
214 if (stream == NULL)
215 {
216 hb_title_close(&title);
217 return NULL;
218 }
219
220 title = hb_stream_title_scan(stream, title);
221 hb_stream_close(&stream);
222
223 return title;
224}
225
226int hb_is_valid_batch_path(const char *filename)
227{

Callers 1

ScanFuncFunction · 0.85

Calls 7

hb_is_valid_batch_pathFunction · 0.85
hb_logFunction · 0.85
hb_title_initFunction · 0.85
hb_stream_openFunction · 0.85
hb_title_closeFunction · 0.85
hb_stream_title_scanFunction · 0.85
hb_stream_closeFunction · 0.85

Tested by

no test coverage detected