Skip to content

Commit

Permalink
Merge pull request #84 from alfredh/v4l2_codec
Browse files Browse the repository at this point in the history
V4l2 codec
this fixes Issue #64
  • Loading branch information
alfredh committed Oct 25, 2015
2 parents 31cacbd + ce5673b commit 0f25118
Show file tree
Hide file tree
Showing 4 changed files with 590 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/baresip.h
Original file line number Diff line number Diff line change
Expand Up @@ -992,6 +992,11 @@ int h264_nal_send(bool first, bool last,
bool marker, uint32_t ihdr, const uint8_t *buf,
size_t size, size_t maxsz,
videnc_packet_h *pkth, void *arg);
static inline bool h264_is_keyframe(int type)
{
return type == H264_NAL_SPS;
}


/*
* Modules
Expand Down
37 changes: 37 additions & 0 deletions modules/v4l2_codec/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
README
------

This module is using V4L2 (Video for Linux 2) as a codec module
for devices that supports compressed formats such as H.264
The module implements both the vidsrc API and the vidcodec API.


- encoder/decoder: Encoder only
- codec formats: H.264
- keyframe refresh: Not supported




EXAMPLE CONFIG
--------------

# Video
video_source v4l2_codec,/dev/video0
video_size 640x480


# Video codec Modules (in order)
module v4l2_codec.so




SUPPORTED DEVICES
-----------------

This webcam supports H.264 hardware acceleration:

HD Pro Webcam C920 (usb-0000:00:1a.0-1.5):
/dev/video0

11 changes: 11 additions & 0 deletions modules/v4l2_codec/module.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#
# module.mk
#
# Copyright (C) 2010 - 2015 Creytiv.com
#

MOD := v4l2_codec
$(MOD)_SRCS += v4l2_codec.c
$(MOD)_LFLAGS +=

include mk/mod.mk

0 comments on commit 0f25118

Please sign in to comment.