diff options
Diffstat (limited to 'lib/avtp_pipeline/platform/Linux/intf_h264_gst')
3 files changed, 44 insertions, 0 deletions
diff --git a/lib/avtp_pipeline/platform/Linux/intf_h264_gst/h264_gst_listener.ini b/lib/avtp_pipeline/platform/Linux/intf_h264_gst/h264_gst_listener.ini index 9817900c..6de30dc5 100644 --- a/lib/avtp_pipeline/platform/Linux/intf_h264_gst/h264_gst_listener.ini +++ b/lib/avtp_pipeline/platform/Linux/intf_h264_gst/h264_gst_listener.ini @@ -5,6 +5,12 @@ # talker or listener role = listener +# initial_state: Specify whether the talker or listener should be +# running or stopped on startup. Valid values are running or stopped. +# If not specified, the default will depend on how the talker or +# listener is launched. +#initial_state = stopped + # stream_addr: Used on the listener and should be set to the # mac address of the talker. stream_addr = ba:bc:1a:ba:bc:1a diff --git a/lib/avtp_pipeline/platform/Linux/intf_h264_gst/h264_gst_talker.ini b/lib/avtp_pipeline/platform/Linux/intf_h264_gst/h264_gst_talker.ini index 87569675..e69bf5bf 100644 --- a/lib/avtp_pipeline/platform/Linux/intf_h264_gst/h264_gst_talker.ini +++ b/lib/avtp_pipeline/platform/Linux/intf_h264_gst/h264_gst_talker.ini @@ -5,6 +5,12 @@ # talker or listener role = talker +# initial_state: Specify whether the talker or listener should be +# running or stopped on startup. Valid values are running or stopped. +# If not specified, the default will depend on how the talker or +# listener is launched. +#initial_state = stopped + # stream_addr: Used on the listener and should be set to the # mac address of the talker. stream_addr = ba:bc:1a:ba:bc:1a diff --git a/lib/avtp_pipeline/platform/Linux/intf_h264_gst/openavb_intf_h264_gst.c b/lib/avtp_pipeline/platform/Linux/intf_h264_gst/openavb_intf_h264_gst.c index 35af240f..1be182d1 100644 --- a/lib/avtp_pipeline/platform/Linux/intf_h264_gst/openavb_intf_h264_gst.c +++ b/lib/avtp_pipeline/platform/Linux/intf_h264_gst/openavb_intf_h264_gst.c @@ -1,5 +1,6 @@ /************************************************************************************************************* Copyright (c) 2012-2015, Symphony Teleca Corporation, a Harman International Industries, Incorporated company +Copyright (c) 2016-2017, Harman International Industries, Incorporated All rights reserved. Redistribution and use in source and binary forms, with or without @@ -70,6 +71,8 @@ typedef struct pvt_data_t bool blockingRx; gint nWaiting; + bool firstSample; + U16 stream_uid; } pvt_data_t; // Each configuration name value pair for this mapping will result in this callback being called. @@ -144,6 +147,11 @@ static GstFlowReturn sinkNewBufferSample(GstAppSink *sink, gpointer pv) media_q_t *pMediaQ = (media_q_t *)pv; pvt_data_t *pPvtData = pMediaQ->pPvtIntfInfo; + if (pPvtData->firstSample) { + AVB_LOGF_WARNING("UID: %d: First sample to send", pPvtData->stream_uid); + pPvtData->firstSample = false; + } + g_atomic_int_add(&pPvtData->nWaiting, 1); return GST_FLOW_OK; @@ -252,6 +260,8 @@ void openavbIntfH264RtpGstTxInitCB(media_q_t *pMediaQ) return; } + pPvtData->firstSample = true; + createTxPipeline(pMediaQ); AVB_TRACE_EXIT(AVB_TRACE_INTF); @@ -430,6 +440,8 @@ void openavbIntfH264RtpGstRxInitCB(media_q_t *pMediaQ) return; } + pPvtData->firstSample = true; + GError *error = NULL; pPvtData->pipe = gst_parse_launch(pPvtData->pPipelineStr, &error); if (error) @@ -504,6 +516,12 @@ bool openavbIntfH264RtpGstRxCB(media_q_t *pMediaQ) openavbMediaQTailPull(pMediaQ); continue; } + + if (pPvtData->firstSample) { + AVB_LOGF_WARNING("UID: %d: First packet RX", pPvtData->stream_uid); + pPvtData->firstSample = false; + } + if (pPvtData->asyncRx) { U32 bufwr = pPvtData->bufwr; @@ -587,6 +605,19 @@ void openavbIntfH264RtpGstGenEndCB(media_q_t *pMediaQ) AVB_TRACE_EXIT(AVB_TRACE_INTF); } +void openavbIntfH264RtpGstSetStreamUidCB(media_q_t *pMediaQ, U16 stream_uid) +{ + AVB_TRACE_ENTRY(AVB_TRACE_INTF); + pvt_data_t *pPvtData = pMediaQ->pPvtIntfInfo; + if (!pPvtData) + { + AVB_LOG_ERROR("Private interface module data not allocated."); + return; + } + pPvtData->stream_uid = stream_uid; + AVB_TRACE_EXIT(AVB_TRACE_INTF); +} + // Main initialization entry point into the interface module extern DLL_EXPORT bool openavbIntfH264RtpGstInitialize(media_q_t *pMediaQ, openavb_intf_cb_t *pIntfCB) { @@ -611,6 +642,7 @@ extern DLL_EXPORT bool openavbIntfH264RtpGstInitialize(media_q_t *pMediaQ, opena pIntfCB->intf_rx_cb = openavbIntfH264RtpGstRxCB; pIntfCB->intf_end_cb = openavbIntfH264RtpGstEndCB; pIntfCB->intf_gen_end_cb = openavbIntfH264RtpGstGenEndCB; + pIntfCB->intf_set_stream_uid_cb = openavbIntfH264RtpGstSetStreamUidCB; pPvtData->ignoreTimestamp = FALSE; |