Revision eb9e75ef src/gst/rtpReceiver.cpp
| b/src/gst/rtpReceiver.cpp | ||
|---|---|---|
| 99 | 99 |
{
|
| 100 | 100 |
/// we can't just use context->depayloader because this signal may have been called for the rtp pad |
| 101 | 101 |
/// of another rtpreceiver than context |
| 102 |
GstPad *sinkPad = getMatchingDepayloaderSinkPad(srcPad); |
|
| 102 |
std::string srcMediaType(getMediaType(srcPad)); |
|
| 103 |
GstPad *sinkPad = getMatchingDepayloaderSinkPad(srcMediaType); |
|
| 103 | 104 |
|
| 104 | 105 |
if (gst_pad_is_linked(sinkPad)) // only link once |
| 105 | 106 |
{
|
| ... | ... | |
| 109 | 110 |
gst_object_unref(oldSrcPad); |
| 110 | 111 |
} |
| 111 | 112 |
gstlinkable::link_pads(srcPad, sinkPad); // link our udpsrc to the corresponding depayloader |
| 112 |
gchar *srcPadName; |
|
| 113 |
srcPadName = gst_pad_get_name(srcPad); |
|
| 114 |
/// FIXME: name by itself isn't so helpful, also sinkPad name is just sink so we ignore it |
|
| 115 |
LOG_INFO("Made new RTP connection with source pad " << srcPadName);
|
|
| 116 |
g_free(srcPadName); |
|
| 117 |
|
|
| 118 | 113 |
gst_object_unref(sinkPad); |
| 114 |
|
|
| 115 |
LOG_INFO("New " << srcMediaType << " stream connected");
|
|
| 119 | 116 |
} |
| 120 | 117 |
} |
| 121 | 118 |
|
| ... | ... | |
| 141 | 138 |
} |
| 142 | 139 |
|
| 143 | 140 |
|
| 144 |
GstPad *RtpReceiver::getMatchingDepayloaderSinkPad(GstPad *srcPad)
|
|
| 141 |
GstPad *RtpReceiver::getMatchingDepayloaderSinkPad(const std::string &srcMediaType)
|
|
| 145 | 142 |
{
|
| 146 | 143 |
GstPad *sinkPad; |
| 147 | 144 |
|
| ... | ... | |
| 151 | 148 |
// FIXME: what if we have two video depayloaders? two audio depayloaders? |
| 152 | 149 |
|
| 153 | 150 |
std::list<GstElement *>::iterator iter = depayloaders_.begin(); |
| 154 |
std::string srcMediaType(getMediaType(srcPad)); |
|
| 155 | 151 |
|
| 156 | 152 |
while (getMediaType(sinkPad) != srcMediaType |
| 157 | 153 |
and iter != depayloaders_.end()) |
Also available in: Unified diff