Re: [discuss-webrtc] OpenH264 wrapper update

370 views
Skip to first unread message

Alex Gouaillard

unread,
Jan 19, 2015, 7:53:40 AM1/19/15
to discuss...@googlegroups.com
The patches for libwebrtc are in need of love.

You might want to look at the version of libwebrtc used by FF. They maintain a local fork in their code base which has some modifications not ported back upstream. 

Sent from my iPhone

On 19 Jan 2015, at 6:15 pm, Tadas Straševičius <tadas.str...@gmail.com> wrote:

Hello,

anyone have updated OpenH264 wrapper for WebRTC?

Currently I stuck on H264 fragmentation, in current wrapper there is a line:

encoded_complete_callback_->Encoded(encoded_image_, NULL, NULL);

Because arguments are NULL and rtp_sender_video.cc requires fragmentation regarding these lines:

const RTPFragmentationHeader* frag = (videoType == kRtpVideoVp8) ? NULL : fragmentation;
packetizer->SetPayloadData(data, payload_bytes_to_send, frag);

And because of that RTPPacketizerH264 do not generate packets:

void RtpPacketizerH264::GeneratePackets() {

  for (size_t i = 0; i < fragmentation_.fragmentationVectorSize;) {   

size_t fragment_offset = fragmentation_.fragmentationOffset[i];

    size_t fragment_length = fragmentation_.fragmentationLength[i];

    if (fragment_length > max_payload_len_) {

      PacketizeFuA(fragment_offset, fragment_length);

      ++i;

    } else {

      i = PacketizeStapA(i, fragment_offset, fragment_length);

    }

  }

}


I know that other have this issue too, so maybe someone already solved it?

Thanks!

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

周波

unread,
Mar 9, 2015, 5:51:15 AM3/9/15
to discuss...@googlegroups.com
I have encountered this problem, does anyone solved?

在 2015年1月19日星期一 UTC+8下午8:53:40,Alexandre GOUAILLARD写道:

周波

unread,
Mar 9, 2015, 5:51:15 AM3/9/15
to discuss...@googlegroups.com

Re: [discuss-webrtc] OpenH264 wrapper update
I have encountered this problem, wait solve? 

gla...@webrtc.org

unread,
Mar 9, 2015, 1:53:02 PM3/9/15
to discuss...@googlegroups.com
You may need to create valid entries for RTPFragmentationHeader and CodecSpecificInfo which you pass to Encoded callback.
Something similar to

周波

unread,
Mar 9, 2015, 10:09:55 PM3/9/15
to discuss...@googlegroups.com
Yesterday I changed it, the image is out, but a card, do not know why

在 2015年3月10日星期二 UTC+8上午1:53:02,gla...@webrtc.org写道:
h264_impl.cc

周波

unread,
Mar 10, 2015, 8:20:55 AM3/10/15
to discuss...@googlegroups.com
Whether implemented by the new H264?


在 2015年1月19日星期一 UTC+8下午8:53:40,Alexandre GOUAILLARD写道:
The patches for libwebrtc are in need of love.

Randell Jesup

unread,
Mar 10, 2015, 2:09:47 PM3/10/15
to discuss...@googlegroups.com
On 3/10/2015 8:20 AM, 周波 wrote:
Whether implemented by the new H264?

在 2015年1月19日星期一 UTC+8下午8:53:40,Alexandre GOUAILLARD写道:
The patches for libwebrtc are in need of love.

You might want to look at the version of libwebrtc used by FF. They maintain a local fork in their code base which has some modifications not ported back upstream.

There are some fixes for H264 packetization in Mozilla's tree, and code to deal with the fragmentation headers.

With a mercurial checkout of mozilla-central (Nightly) ("hg clone https://hg.mozilla.org/mozilla-central"):

You can see our current diffs against the webrtc.org branch 40 with: "hg diff -r f5a4769477bf media/webrtc/trunk/webrtc/modules/video_coding/main"
and media/webrtc/trunk/webrtc/modules/rtp_rtcp/source

In particular, packet.cc, session_info.cc, jitter_buffer.cc, rtp_format_h264.cc (this may be the most important).


anyone have updated OpenH264 wrapper for WebRTC?

Currently I stuck on H264 fragmentation, in current wrapper there is a line:

encoded_complete_callback_->Encoded(encoded_image_, NULL, NULL);

Because arguments are NULL and rtp_sender_video.cc requires fragmentation regarding these lines:

const RTPFragmentationHeader* frag = (videoType == kRtpVideoVp8) ? NULL : fragmentation;
packetizer->SetPayloadData(data, payload_bytes_to_send, frag);

Also see the code in media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp, which deals with the fragmentation stuff.



And because of that RTPPacketizerH264 do not generate packets:

void RtpPacketizerH264::GeneratePackets() {

  for (size_t i = 0; i < fragmentation_.fragmentationVectorSize;) {   

size_t fragment_offset = fragmentation_.fragmentationOffset[i];

    size_t fragment_length = fragmentation_.fragmentationLength[i];

    if (fragment_length > max_payload_len_) {

      PacketizeFuA(fragment_offset, fragment_length);

      ++i;

    } else {

      i = PacketizeStapA(i, fragment_offset, fragment_length);

    }

  }

}




-- 
Randell Jesup
randel...@jesup.org

周波

unread,
Mar 11, 2015, 10:06:18 AM3/11/15
to discuss...@googlegroups.com
Can you give a detailed description and modify your files.

在 2015年3月11日星期三 UTC+8上午2:09:47,Randell Jesup写道:

周波

unread,
Mar 12, 2015, 4:40:34 AM3/12/15
to discuss...@googlegroups.com
New webrtc program, integrated H264 procedural errors, does anyone integration, and sharing what


在 2015年1月19日星期一 UTC+8下午8:53:40,Alexandre GOUAILLARD写道:
The patches for libwebrtc are in need of love.
Reply all
Reply to author
Forward
0 new messages