Skip to content
Snippets Groups Projects
Commit 2932e82b authored by Kipp Cannon's avatar Kipp Cannon
Browse files

framecpp: update for 2.x

parent 588d986f
No related branches found
No related tags found
No related merge requests found
......@@ -309,10 +309,8 @@ AS_IF([test "x${HAVE_FRAMECPP}" == "xyes"], [
AC_DEFINE([HAVE_FRAMECPP], [1], [Defined if you have framecpp])
framecpp_VERSION=`$PKG_CONFIG --modversion framecpp`
AC_MSG_NOTICE([framecpp version: $framecpp_VERSION])
# we now require this version so this isn't needed, it's left as an
# example
AX_COMPARE_VERSION([$framecpp_VERSION], [ge], [1.19.25], [
AC_DEFINE([HAVE_FRAMECPP_FrameLibraryName], [1], [Defined if framecpp supplies FrameLibraryName() function])
AX_COMPARE_VERSION([$framecpp_VERSION], [ge], [2.0.0], [
AC_DEFINE([HAVE_FRAMECPP_2x], [1], [Defined if framecpp >= 2.x])
])
# FIXME: the "-std=c++0x" option is here as a temporary hack until
# we can find a way to get the autoconf macros to configure the
......
......@@ -171,7 +171,11 @@ static gboolean is_requested_channel(GstFrameCPPChannelDemux *element, const cha
*/
#ifdef HAVE_FRAMECPP_2x
static GstCaps *FrVect_get_caps(LDASTools::AL::SharedPtr<FrameCPP::FrVect> vect, gint *rate, guint *unit_size)
#else
static GstCaps *FrVect_get_caps(General::SharedPtr < FrameCPP::FrVect > vect, gint *rate, guint *unit_size)
#endif
{
GstCaps *caps;
gint width = vect->GetTypeSize() * 8;
......@@ -244,7 +248,11 @@ static GstCaps *FrVect_get_caps(General::SharedPtr < FrameCPP::FrVect > vect, gi
*/
#ifdef HAVE_FRAMECPP_2x
static GstBuffer *FrVect_to_GstBuffer(LDASTools::AL::SharedPtr<FrameCPP::FrVect> vect, GstClockTime timestamp, guint64 offset, gint *rate, guint *unit_size)
#else
static GstBuffer *FrVect_to_GstBuffer(General::SharedPtr < FrameCPP::FrVect > vect, GstClockTime timestamp, guint64 offset, gint *rate, guint *unit_size)
#endif
{
GstBuffer *buffer;
......@@ -567,7 +575,11 @@ static gboolean src_pad_do_pending_events(GstFrameCPPChannelDemux *element, GstP
*/
#ifdef HAVE_FRAMECPP_2x
static GstFlowReturn frvect_to_buffer_and_push(GstFrameCPPChannelDemux *element, GstPad *pad, LDASTools::AL::SharedPtr<FrameCPP::FrVect> vect, GstClockTime timestamp)
#else
static GstFlowReturn frvect_to_buffer_and_push(GstFrameCPPChannelDemux *element, GstPad *pad, General::SharedPtr < FrameCPP::FrVect > vect, GstClockTime timestamp)
#endif
{
struct pad_state *pad_state = (struct pad_state *) gst_pad_get_element_private(pad);
GstBuffer *buffer;
......
......@@ -62,6 +62,7 @@
#include <framecpp/FrRawData.hh>
#include <framecpp/FrSimData.hh>
#include <framecpp/FrVect.hh>
#include <framecpp/GPSTime.hh>
#include <framecpp/OFrameStream.hh>
......@@ -273,8 +274,13 @@ static GstFlowReturn build_and_push_frame_file(GstFrameCPPChannelMux *mux, GstCl
for(frame_t_start = gwf_t_start, frame_t_end = MIN(gwf_t_start - gwf_t_start % mux->frame_duration + mux->frame_duration, gwf_t_end); frame_t_start < gwf_t_end; frame_t_start = frame_t_end, frame_t_end = MIN(frame_t_end + mux->frame_duration, gwf_t_end)) {
GSList *collectdatalist;
#ifdef HAVE_FRAMECPP_2x
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));
#else
General::GPSTime gpstime(frame_t_start / GST_SECOND, frame_t_start % GST_SECOND);
General::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));
#endif
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));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment