Commit Graph

22 Commits

Author SHA1 Message Date
代码人生 cd5f8eb43a set bitrate for openh264 (#566)
* Added the set bitrate function for openh264

* add examples

* Format

---------

Co-authored-by: Jingyang Kang <3drxkjy@gmail.com>
2025-04-06 20:47:23 +08:00
Abdarrakhman Akhmetgali dbd37689e4 Optimize ToI420 conversion by using sync.Pool (#473)
Added sync.Pool to the i420 conversion to minimize overhead of creating new byte slices
2023-03-06 15:53:44 -05:00
Valentin Cocaud cd6aaa1393 Force key frame on PLI
Also make the ReadCloser an Controllable allows to uncouple
the controller implementation from the encoder.
This is not needed for the 2 codec controller already implemented (openh264 and vpx)
but is more future proof in case it required for other codecs.
2022-07-25 10:51:35 -04:00
adamroach 82cc32308b Enable configuration of OpenH264 Encoder (#409)
There's been a long-standing TODO comment in the bridge for OpenH264 to
remove hardcoding for the set of configurable parameters exposed by that
library. That patch does exactly that.
2022-07-06 23:58:56 -05:00
adamroach 9bb5755cd2 Fixing Stride Handling for OpenH264 (#381)
The golang image.YCbCr struct can contain fields of arbitrary stride
lengths, which don't necessarily match the field widths. This
patch passes the stride values from the image.YCbCr struct into
the OpenH264 encode calls.
2022-03-08 03:09:01 -06:00
Atsushi Watanabe a88c2daf89 Allow double close of codecs (#364)
Video/AudioTrack.NewRTPReader() internally closes encoder on error.
It caused double free if user closes reader after error.
2021-11-21 22:57:50 +09:00
Patryk Rogalski b863c105c8 Implemented ForceKeyFrame for openh264 encoder (#319) 2021-03-12 15:26:30 -08:00
Lukas Herman 1b5203d3a0 Enhance cross-platform build system (#266)
With this new build system, it'll make it easier to compile third-party
libraries statically to multiple platforms.
2020-12-15 14:13:12 -05:00
Lukas Herman 559c6a13a1 Update readers to be memory pool friendly 2020-10-29 00:04:12 -07:00
Lukas Herman f4a4edcabd Update codec.Reader interface to return byte slice 2020-10-29 04:48:47 +00:00
Lukas Herman 354f2710b5 Update from io.ReadCloser to codec.ReadCloser 2020-03-25 23:21:25 -04:00
Lukas Herman c9b90fb233 Redesign codec
Resolves https://github.com/pion/mediadevices/issues/114

* Remove codec registrar
* Completely redesign how codec is being discovered, tuned, and built
* Update examples
* Update unit tests
2020-03-21 07:45:10 -04:00
Atsushi Watanabe 15951b02b6 Support codec specific parameters 2020-03-07 16:51:17 -05:00
Atsushi Watanabe 3f27079072 Fix CGO error handling of openh264 codec
Errno based error handling is not goroutine safe on Darwin.
Receive error number as int pointer and wrap by error interface.
2020-02-24 01:56:11 +09:00
Atsushi Watanabe 3fbecd2095 Add openh264 library for darwin and windows
Use dockercore/golang-cross to cross compile openh264.
Set `-tags dynamic` to use system installed library.
2020-02-24 01:56:11 +09:00
Atsushi Watanabe cd1be2ca80 Fix race condition in codecs
CGO based codecs caused segmentation fault due to the race condition
of Close() and Read().
2020-02-19 19:55:21 -08:00
Atsushi Watanabe 00bcadc238 Add codec property
Add codec property, which stores general encoding parameters,
to MediaTrackConstraints.
2020-02-10 18:45:34 -08:00
Lukas Herman 152f15526b Add ToI420 converter
Moved I420 converter from vpx.go, converted video.Reader in openh264.go
and created ToI420 to convert a video.Reader to a new video.Reader that
will emit images in I420 format.
2020-02-09 08:02:15 -08:00
Lukas Herman aece2b94c6 Refractor, unify some APIs to be more DRY 2020-02-06 22:44:29 -08:00
Lukas Herman 2640f6c1f4 Move all settings to video/audio under io 2020-02-06 22:44:29 -08:00
Lukas Herman e1365d8811 Convert video APIs to use video.Reader 2020-02-06 22:44:29 -08:00
Lukas Herman 107b8c0a34 Rename h264 to openh264 2020-01-05 22:12:44 -08:00