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

framecpp_channeldemux: add place-holder library name code

parent 13f24550
No related branches found
No related tags found
No related merge requests found
/* /*
* framecpp channel demultiplexor * framecpp channel demultiplexor
* *
* Copyright (C) 2011 Kipp Cannon, Ed Maros * Copyright (C) 2011--2012 Kipp Cannon, Ed Maros
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -98,18 +98,28 @@ GST_DEBUG_CATEGORY(framecpp_channeldemux_debug); ...@@ -98,18 +98,28 @@ GST_DEBUG_CATEGORY(framecpp_channeldemux_debug);
*/ */
/* FIXME: is there a function like this in framecpp? */ /* FIXME: switch to proper #ifndef when problem with framecpp is sorted out */
static const char *get_frame_library_name(FrameCPP::Common::FrHeader::frame_library_type frame_library_type) /* FIXME: remove when we can rely on new-enough framecpp */
/*#ifndef HAVE_FRAMECPP_FrameLibraryName*/
#if 1
static const char *get_frame_library_name(FrameCPP::IFrameStream *ifs)
{ {
static const char *frame_library_names[] = { static const char *frame_library_names[] = {
"unknown", "unknown",
"FrameL", "FrameL",
"framecpp", "framecpp",
}; };
FrameCPP::Common::FrHeader::frame_library_type frame_library_type = ifs->FrameLibrary();
g_assert_cmpint(frame_library_type, >=, 0); g_assert_cmpint(frame_library_type, >=, 0);
g_assert_cmpint(frame_library_type, <=, 2); g_assert_cmpint(frame_library_type, <=, 2);
return frame_library_names[frame_library_type]; return frame_library_names[frame_library_type];
} }
#else
static const char *get_frame_library_name(FrameCPP::IFrameStream *ifs)
{
return ifs->FrameLibraryName().c_str();
}
#endif
/* /*
...@@ -587,7 +597,7 @@ static GstFlowReturn chain(GstPad *pad, GstBuffer *inbuf) ...@@ -587,7 +597,7 @@ static GstFlowReturn chain(GstPad *pad, GstBuffer *inbuf)
FrameCPP::IFrameStream ifs(ibuf); FrameCPP::IFrameStream ifs(ibuf);
GST_LOG_OBJECT(element, "found version %u frame file generated by %s library revision %d", ifs.Version(), get_frame_library_name(ifs.FrameLibrary()), ifs.LibraryRevision()); GST_LOG_OBJECT(element, "found version %u frame file generated by %s library revision %d", ifs.Version(), get_frame_library_name(&ifs), ifs.LibraryRevision());
while(1) { while(1) {
try { try {
......
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