From f0acf98c3bc0b4217f5100927bb459a523217842 Mon Sep 17 00:00:00 2001
From: Ed Maros <ed.maros@ligo.org>
Date: Thu, 26 Jul 2018 13:20:17 -0700
Subject: [PATCH] Conversion for version 2.6.x versions of FrameCPP while
 maintaiing backwards compatability

---
 gstlal-ugly/gst/framecpp/framecpp_channeldemux.cc | 13 ++++++++++---
 gstlal-ugly/gst/framecpp/framecpp_channelmux.cc   |  4 +++-
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/gstlal-ugly/gst/framecpp/framecpp_channeldemux.cc b/gstlal-ugly/gst/framecpp/framecpp_channeldemux.cc
index 80c6d86038..8536d9afc5 100644
--- a/gstlal-ugly/gst/framecpp/framecpp_channeldemux.cc
+++ b/gstlal-ugly/gst/framecpp/framecpp_channeldemux.cc
@@ -66,6 +66,13 @@
 #include <framecpp/IFrameStream.hh>
 
 
+/*
+ * Allows for version agnostic programming by ensuring correct smart pointer usage
+ * as defined by FrameCPP
+ */
+typedef FrameCPP::Common::Container< FrameCPP::FrVect >::value_type gst_framecpp_frvect;
+
+
 /*
  * our own stuff
  */
@@ -172,7 +179,7 @@ static gboolean is_requested_channel(GstFrameCPPChannelDemux *element, const cha
  */
 
 
-static GstCaps *FrVect_get_caps(LDASTools::AL::SharedPtr<FrameCPP::FrVect> vect, gint *rate, guint *unit_size)
+static GstCaps *FrVect_get_caps( gst_framecpp_frvect vect, gint *rate, guint *unit_size)
 {
 	GstCaps *caps;
 
@@ -248,7 +255,7 @@ static void vectdata_free(FrameCPP::FrVect::data_type *ptr)
 }
 
 
-static GstBuffer *FrVect_to_GstBuffer(LDASTools::AL::SharedPtr<FrameCPP::FrVect> vect, GstClockTime timestamp, guint64 offset, gint rate)
+static GstBuffer *FrVect_to_GstBuffer( gst_framecpp_frvect vect, GstClockTime timestamp, guint64 offset, gint rate)
 {
 	GstBuffer *buffer;
 	FrameCPP::FrVect::data_type *data = new FrameCPP::FrVect::data_type;
@@ -557,7 +564,7 @@ static gboolean src_pad_do_pending_events(GstFrameCPPChannelDemux *element, GstP
  */
 
 
-static GstFlowReturn frvect_to_buffer_and_push(GstFrameCPPChannelDemux *element, GstPad *pad, LDASTools::AL::SharedPtr<FrameCPP::FrVect> vect, GstClockTime timestamp)
+static GstFlowReturn frvect_to_buffer_and_push(GstFrameCPPChannelDemux *element, GstPad *pad, gst_framecpp_frvect vect, GstClockTime timestamp)
 {
 	struct pad_state *pad_state = (struct pad_state *) gst_pad_get_element_private(pad);
 	GstCaps *caps, *current_caps;
diff --git a/gstlal-ugly/gst/framecpp/framecpp_channelmux.cc b/gstlal-ugly/gst/framecpp/framecpp_channelmux.cc
index 571a18e0f8..dd09dbf964 100644
--- a/gstlal-ugly/gst/framecpp/framecpp_channelmux.cc
+++ b/gstlal-ugly/gst/framecpp/framecpp_channelmux.cc
@@ -69,6 +69,8 @@
 #include <framecpp/OFrameStream.hh>
 
 
+typedef FrameCPP::OFrameFStream::frameh_type gst_framecpp_frameh;
+
 /*
  * our own stuff
  */
@@ -278,7 +280,7 @@ static GstFlowReturn build_and_push_frame_file(GstFrameCPPChannelMux *mux, GstCl
 			guint i;
 			GSList *collectdatalist;
 			FrameCPP::GPSTime gpstime(frame_t_start / GST_SECOND, frame_t_start % GST_SECOND);
-			LDASTools::AL::SharedPtr<FrameCPP::FrameH> frame(new FrameCPP::FrameH(mux->frame_name, mux->frame_run, mux->frame_number, gpstime, gpstime.GetLeapSeconds(), (double) (frame_t_end - frame_t_start) / GST_SECOND));
+			gst_framecpp_frameh frame(new FrameCPP::FrameH(mux->frame_name, mux->frame_run, mux->frame_number, gpstime, gpstime.GetLeapSeconds(), (double) (frame_t_end - frame_t_start) / GST_SECOND));
 
 			GST_LOG_OBJECT(mux, "building frame %d [%" GST_TIME_SECONDS_FORMAT ", %" GST_TIME_SECONDS_FORMAT ")", mux->frame_number, GST_TIME_SECONDS_ARGS(frame_t_start), GST_TIME_SECONDS_ARGS(frame_t_end));
 
-- 
GitLab