5 #include "BasicUsageEnvironment.hh" 7 #include <GroupsockHelper.hh> 37 nextTask() = envir().taskScheduler().scheduleDelayedTask(0, (TaskFunc*)
waitForFrame,
this);
45 catch(
const std::exception&
e)
47 envir() <<
"RsDeviceSource: " << e.what() <<
'\n';
67 catch(
const std::exception&
e)
69 envir() <<
"RsDeviceSource: " << e.what() <<
'\n';
81 if(!isCurrentlyAwaitingData())
83 envir() <<
"isCurrentlyAwaitingData returned false\n";
89 gettimeofday(&fPresentationTime,
NULL);
94 fFrameSize = ((
int*)t_frame->
get_data())[0];
95 data = (
unsigned char*)t_frame->
get_data() +
sizeof(int);
100 data = (
unsigned char*)t_frame->
get_data();
131 memmove(fTo, &header,
sizeof(header));
134 FramedSource::afterGetting(
this);
void deliverRSFrame(rs2::frame *t_frame)
RsDeviceSource(UsageEnvironment &t_env, rs2::video_stream_profile &t_videoStreamProfile, rs2::frame_queue &t_queue)
virtual ~RsDeviceSource()
rs2::frame_queue * m_framesQueue
rs2_metadata_type get_frame_metadata(rs2_frame_metadata_value frame_metadata) const
std::enable_if< std::is_base_of< rs2::frame, T >::value, bool >::type poll_for_frame(T *output) const
stream_profile get_profile() const
rs2::frame_queue * getFramesQueue()
const void * get_data() const
bool supports_frame_metadata(rs2_frame_metadata_value frame_metadata) const
std_msgs::Header * header(M &m)
returns Header<M>::pointer(m);
static void waitForFrame(RsDeviceSource *t_deviceSource)
double get_timestamp() const
Exposes RealSense sensor functionality for C compilers.
static bool isCompressionSupported(rs2_format t_format, rs2_stream t_streamType)
virtual void doGetNextFrame()
rs2::video_stream_profile * m_streamProfile
rs2_format format() const
void handleWaitForFrame()
rs2_timestamp_domain get_frame_timestamp_domain() const
const int get_data_size() const
static RsDeviceSource * createNew(UsageEnvironment &t_env, rs2::video_stream_profile &t_videoStreamProfile, rs2::frame_queue &t_queue)
unsigned long long get_frame_number() const
rs2_stream stream_type() const