* hb_batch_title_scan **********************************************************************/
| 158 | * hb_batch_title_scan |
| 159 | **********************************************************************/ |
| 160 | hb_title_t * hb_batch_title_scan( hb_batch_t * d, int t ) |
| 161 | { |
| 162 | |
| 163 | hb_title_t * title; |
| 164 | char * filename; |
| 165 | hb_stream_t * stream; |
| 166 | |
| 167 | if ( t < 0 ) |
| 168 | return NULL; |
| 169 | |
| 170 | filename = hb_list_item( d->list_file, t - 1 ); |
| 171 | if ( filename == NULL ) |
| 172 | return NULL; |
| 173 | |
| 174 | hb_log( "batch: scanning %s", filename ); |
| 175 | title = hb_title_init( filename, t ); |
| 176 | stream = hb_stream_open(d->h, filename, title, 1); |
| 177 | if ( stream == NULL ) |
| 178 | { |
| 179 | hb_title_close( &title ); |
| 180 | return NULL; |
| 181 | } |
| 182 | |
| 183 | title = hb_stream_title_scan( stream, title ); |
| 184 | hb_stream_close( &stream ); |
| 185 | |
| 186 | return title; |
| 187 | } |
| 188 | |
| 189 | hb_title_t * hb_batch_title_scan_single(hb_handle_t *h, char *filename, int title_index) |
| 190 | { |
no test coverage detected