mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 13:06:23 +00:00
Revert "dvdspu: cache overlay composition"
This reverts commit aabb8a1a68
.
This commit is contained in:
parent
259a7bbf6c
commit
de568c4896
2 changed files with 8 additions and 28 deletions
|
@ -179,15 +179,6 @@ gst_dvd_spu_init (GstDVDSpu * dvdspu)
|
|||
gst_dvd_spu_clear (dvdspu);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_dvd_spu_reset_composition (GstDVDSpu * dvdspu)
|
||||
{
|
||||
if (dvdspu->composition) {
|
||||
gst_video_overlay_composition_unref (dvdspu->composition);
|
||||
dvdspu->composition = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gst_dvd_spu_clear (GstDVDSpu * dvdspu)
|
||||
{
|
||||
|
@ -278,8 +269,6 @@ gst_dvd_spu_flush_spu_info (GstDVDSpu * dvdspu, gboolean keep_events)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
gst_dvd_spu_reset_composition (dvdspu);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -810,27 +799,26 @@ gstspu_render (GstDVDSpu * dvdspu, GstBuffer * buf)
|
|||
GstVideoOverlayComposition *composition;
|
||||
GstVideoFrame frame;
|
||||
|
||||
if (!dvdspu->composition) {
|
||||
dvdspu->composition = gstspu_render_composition (dvdspu);
|
||||
if (!dvdspu->composition)
|
||||
return;
|
||||
}
|
||||
|
||||
composition = dvdspu->composition;
|
||||
composition = gstspu_render_composition (dvdspu);
|
||||
if (!composition)
|
||||
return;
|
||||
|
||||
if (dvdspu->attach_compo_to_buffer) {
|
||||
gst_buffer_add_video_overlay_composition_meta (buf, composition);
|
||||
return;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!gst_video_frame_map (&frame, &dvdspu->spu_state.info, buf,
|
||||
GST_MAP_READWRITE)) {
|
||||
GST_WARNING_OBJECT (dvdspu, "failed to map video frame for blending");
|
||||
return;
|
||||
goto done;
|
||||
}
|
||||
|
||||
gst_video_overlay_composition_blend (composition, &frame);
|
||||
gst_video_frame_unmap (&frame);
|
||||
|
||||
done:
|
||||
gst_video_overlay_composition_unref (composition);
|
||||
}
|
||||
|
||||
/* With SPU LOCK */
|
||||
|
@ -899,9 +887,6 @@ gst_dvd_spu_handle_dvd_event (GstDVDSpu * dvdspu, GstEvent * event)
|
|||
break;
|
||||
}
|
||||
|
||||
if (hl_change)
|
||||
gst_dvd_spu_reset_composition (dvdspu);
|
||||
|
||||
if (hl_change && (dvdspu->spu_state.flags & SPU_STATE_STILL_FRAME)) {
|
||||
gst_dvd_spu_redraw_still (dvdspu, FALSE);
|
||||
}
|
||||
|
@ -955,8 +940,6 @@ gst_dvd_spu_advance_spu (GstDVDSpu * dvdspu, GstClockTime new_ts)
|
|||
GST_TIME_ARGS (dvdspu->video_seg.position),
|
||||
packet->buf ? "buffer" : "event");
|
||||
|
||||
gst_dvd_spu_reset_composition (dvdspu);
|
||||
|
||||
if (packet->buf) {
|
||||
switch (dvdspu->spu_input_type) {
|
||||
case SPU_INPUT_TYPE_VOBSUB:
|
||||
|
@ -1068,8 +1051,6 @@ gst_dvd_spu_negotiate (GstDVDSpu * dvdspu)
|
|||
GstCaps *caps;
|
||||
gboolean attach = FALSE;
|
||||
|
||||
gst_dvd_spu_reset_composition (dvdspu);
|
||||
|
||||
GST_DEBUG_OBJECT (dvdspu, "performing negotiation");
|
||||
|
||||
caps = gst_pad_get_current_caps (dvdspu->srcpad);
|
||||
|
|
|
@ -115,7 +115,6 @@ struct _GstDVDSpu {
|
|||
|
||||
/* Overlay composition */
|
||||
gboolean attach_compo_to_buffer;
|
||||
GstVideoOverlayComposition *composition;
|
||||
};
|
||||
|
||||
struct _GstDVDSpuClass {
|
||||
|
|
Loading…
Reference in a new issue