}
out->s = in->s;
- hb_buffer_move_subs( out, in );
return out;
}
0 );
out->s = in->s;
- hb_buffer_move_subs( out, in );
*buf_out = out;
}
}
}
}
- // Copy subs only to first output buffer
- hb_buffer_move_subs( out, pv->ref[1] );
-
hb_buffer_close(&o_buf[0]);
hb_buffer_close(&o_buf[1]);
last = dst;
dst->s = src->s;
- hb_buffer_move_subs(dst, src);
hb_buffer_close(&src);
}
if (in == NULL)
idx ^= 1;
}
}
-
- // Copy subs only to first output buffer
- hb_buffer_move_subs( out, pv->yadif_ref[1] );
-
hb_buffer_close(&o_buf[0]);
hb_buffer_close(&o_buf[1]);
}
out->s = in->s;
- hb_buffer_move_subs( out, in );
-
*buf_out = out;
return HB_FILTER_OK;
pullup_release_frame( frame );
out->s = in->s;
- hb_buffer_move_subs( out, in );
-
*buf_out = out;
output_frame:
hb_list_rem(buffers.alloc_list, b);
hb_unlock(buffers.lock);
#endif
- // Close any attached subtitle buffers
- hb_buffer_close( &b->sub );
-
if( buffer_pool && b->data && !hb_fifo_is_full( buffer_pool ) )
{
hb_fifo_push_head( buffer_pool, b );
*_b = NULL;
}
-void hb_buffer_move_subs( hb_buffer_t * dst, hb_buffer_t * src )
-{
- // Note that dst takes ownership of the subtitles
- dst->sub = src->sub;
- src->sub = NULL;
-
-#ifdef USE_QSV
- memcpy(&dst->qsv_details, &src->qsv_details, sizeof(src->qsv_details));
-#endif
-
-}
-
hb_image_t * hb_image_init(int pix_fmt, int width, int height)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
hb_unlock( f->lock );
}
-// Pushes a list of packets onto the specified FIFO as a single element.
-void hb_fifo_push_list_element( hb_fifo_t *fifo, hb_buffer_t *buffer_list )
-{
- hb_buffer_t *container = hb_buffer_init( 0 );
- // XXX: Using an arbitrary hb_buffer_t pointer (other than 'next')
- // to carry the list inside a single "container" buffer
- container->sub = buffer_list;
-
- hb_fifo_push( fifo, container );
-}
-
-// Removes a list of packets from the specified FIFO that were stored as a single element.
-hb_buffer_t *hb_fifo_get_list_element( hb_fifo_t *fifo )
-{
- hb_buffer_t *container = hb_fifo_get( fifo );
- // XXX: Using an arbitrary hb_buffer_t pointer (other than 'next')
- // to carry the list inside a single "container" buffer
- hb_buffer_t *buffer_list = container->sub;
- hb_buffer_close( &container );
-
- return buffer_list;
-}
-
void hb_fifo_close( hb_fifo_t ** _f )
{
hb_fifo_t * f = *_f;
// Store this data here when read and pass to decoder.
hb_buffer_t * palette;
- // PICTURESUB subtitle packets:
-
- // Video packets (after processing by the hb_sync_video work-object):
- // A (copy of a) PICTURESUB subtitle packet that needs to be burned into
- // this video packet by the vobsub renderer filter
- //
- // Subtitles that are simply passed thru are NOT attached to the
- // associated video packets.
- hb_buffer_t * sub;
-
// Packets in a list:
// the next packet in the list
hb_buffer_t * next;
hb_buffer_t * hb_buffer_dup( const hb_buffer_t * src );
int hb_buffer_copy( hb_buffer_t * dst, const hb_buffer_t * src );
void hb_buffer_swap_copy( hb_buffer_t *src, hb_buffer_t *dst );
-void hb_buffer_move_subs( hb_buffer_t * dst, hb_buffer_t * src );
hb_image_t * hb_image_init(int pix_fmt, int width, int height);
hb_image_t * hb_buffer_to_image(hb_buffer_t *buf);
void hb_fifo_push_wait( hb_fifo_t *, hb_buffer_t * );
int hb_fifo_full_wait( hb_fifo_t * f );
void hb_fifo_push_head( hb_fifo_t *, hb_buffer_t * );
-void hb_fifo_push_list_element( hb_fifo_t *fifo, hb_buffer_t *buffer_list );
-hb_buffer_t * hb_fifo_get_list_element( hb_fifo_t *fifo );
void hb_fifo_close( hb_fifo_t ** );
void hb_fifo_flush( hb_fifo_t * f );
sub = hb_list_item( pv->sub_list, 0 );
if ( sub->s.start <= buf->s.start )
{
- while ( sub )
- {
- ApplySub( pv, buf, sub );
- sub = sub->sub;
- }
+ ApplySub( pv, buf, sub );
}
}
}
// Rotate!
rotate_filter( pv, out, in );
+
out->s = in->s;
- hb_buffer_move_subs( out, in );
-
*buf_out = out;
return HB_FILTER_OK;
*buf_out = cur;
int64_t duration = next_start - cur->s.start;
sync->cur = cur = next;
- cur->sub = NULL;
cur->s.start -= pv->common->video_pts_slip;
if (cur->s.renderOffset != AV_NOPTS_VALUE)
cur->s.renderOffset -= pv->common->video_pts_slip;