Lukas Herman
f396092609
Default high profile for x264 when possible
2020-11-01 01:08:03 -07: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
4f9822349a
Add mmal hardware video encoder support
...
Using mmal significantly boosts video fps by offloading the encoding
work from CPU to GPU. On a Raspberry Pi 3, libx264 only gives 480p18,
whereas mmal can give 720p30.
2020-10-27 21:08:12 -07:00
Lukas Herman
9dcfaf1c1e
Switch from type alias to embedded struct
...
Embedded struct provides more future compatibility
2020-10-11 23:32:58 -04:00
Lukas Herman
abdd96e6b2
Replace Name with RTPCodec in codec builder
...
Allowing users to implement RTPCodec will give users freedom to have
a custom encoder with custom RTP payload.
2020-10-08 11:33:38 -04:00
Lukas Herman
5703fd7e4b
Remove webrtc dependency in codec and its sub packages
2020-10-05 22:23:52 -04:00
Atsushi Watanabe
0d1e856f7d
codec/opus: support int16 interleaved format
...
Implement audio.Buffer and audio.ChannelMixer.
2020-06-08 20:43:12 -04:00
Atsushi Watanabe
fee9ffa32c
codec/vaapi: fix reference frame update
...
Previous reference frame update sequence was borrowed from
an example in libva-utils, however the quality of the output
was not good (block noised).
This commit disables alternate frame and updates golden frame only
on keyframe. It doesn't enable full referencing feature of VP8, but
ffmpeg vaapi encoder looks also not fully using golden frame and
alternate frame.
2020-04-29 07:14:53 -07:00
Atsushi Watanabe
8f9a29351f
codec/vpx: add error resilient mode config
2020-04-27 20:44:33 -07:00
Atsushi Watanabe
62e3527a25
Use wave.Audio in codec/opus
2020-04-26 10:10:15 -07:00
Atsushi Watanabe
38deddc4f0
codec/vpx: add deadline parameter
2020-04-15 20:47:05 -04:00
Lukas Herman
d58fe5c497
Fix wrong unit bitrate
2020-03-31 21:18:18 -04:00
Atsushi Watanabe
6f66c2866b
codec/vaapi: fix VP8 reference surface usage
...
Fix not to use input surface as reference surface.
Fix flags of key-frame.
2020-03-31 09:59:42 -04:00
Atsushi Watanabe
fa1fd13422
codec/vaapi: return error on unsupported environment
...
Make it buildable on unsupported environment.
Return error on runtime.
2020-03-28 22:12:07 -04:00
Lukas Herman
354f2710b5
Update from io.ReadCloser to codec.ReadCloser
2020-03-25 23:21:25 -04:00
Atsushi Watanabe
73cee07d71
Unify codec params type/func naming
2020-03-24 07:02:32 +09:00
Atsushi Watanabe
7bb7c9e927
codec/vaapi: calculate max bit-rate from BaseParam
2020-03-23 12:25:23 -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
Lukas Herman
9404b56cd6
Avoid double free
2020-03-17 21:05:38 -04:00
Lukas Herman
747105aed2
Add comment
2020-03-12 08:49:10 -04:00
Lukas Herman
b025b7ed11
Add preset
2020-03-12 08:49:10 -04:00
Lukas Herman
55a9763b88
Move from CRF to ABR+VBV
2020-03-12 08:49:10 -04:00
Lukas Herman
8b01597120
Enable quality param
2020-03-12 08:49:10 -04:00
Lukas Herman
9c427e44dc
Remove errno in favor of int pointer
2020-03-12 08:49:10 -04:00
Lukas Herman
50c2345b93
Fix memory leak
2020-03-12 08:49:10 -04:00
Lukas Herman
68ba96dffb
Remove fail2 label for more readibility
2020-03-12 08:49:10 -04:00
Lukas Herman
735d6547c9
Add more granular error message
2020-03-12 08:49:10 -04:00
Lukas Herman
672486b902
Use errno instead of implying from len
2020-03-12 08:49:10 -04:00
Lukas Herman
465852d1ba
Add close synchronization
2020-03-12 08:49:10 -04:00
Lukas Herman
9963c147a7
Favor KeyFrameInterval over Periodic Intra Refresh
2020-03-12 08:49:10 -04:00
Lukas Herman
84cc3765bf
Remove fail definition for readability
2020-03-12 08:49:10 -04:00
Lukas Herman
ee73705329
Add x264 codec
2020-03-12 08:49:10 -04:00
Atsushi Watanabe
31227a18b2
Add libva specific CodecParam
2020-03-11 22:50:37 -04:00
Atsushi Watanabe
1190a695a8
Add hardware accelerated VP9 encoder
2020-03-11 22:50:37 -04:00
Atsushi Watanabe
5cebb7d942
Add hardware accelerated VP8 encoder
...
Using libva.
2020-03-11 22:50:37 -04:00
Atsushi Watanabe
15951b02b6
Support codec specific parameters
2020-03-07 16:51:17 -05:00
Lukas Herman
8340b5310e
Remove opusfile dependency
2020-02-23 20:50:50 -08: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
Lukas Herman
09dcae0840
Fix struct initialization for clang
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
64fe0e1759
Fix non-standard C types
...
ulong and u_char are old name and are not available on musl libc.
2020-02-17 17:37:15 -08:00
Atsushi Watanabe
29d5a80f4f
Reduce realloc in vpx codec
2020-02-17 14:55:49 +09:00
Atsushi Watanabe
ad686605e1
Support size variable encoding of vpx
2020-02-17 14:51:24 +09:00
Atsushi Watanabe
030acd8262
Fix cgo pointer usage
...
Store Go pointers in C memory by C code and unref before return.
2020-02-15 19:06:25 -08:00
Lukas Herman
f79aac8aca
Fix openh264 incorrect chroma stride
2020-02-15 17:34:55 -08:00
Atsushi Watanabe
ad62a6a461
Fix vpx frame timestamp
...
Set frame timestamp by the system time to make encoder's bitrate
calcuation correct for variable framerate.
2020-02-13 21:40:45 -08:00
Atsushi Watanabe
ad9279e961
Go 1.12 compatibility
2020-02-11 20:07:38 -08:00
Lukas Herman
ec310e566b
Move Codec from MediaTrackConstraints to prop.Codec
2020-02-10 20:07:41 -08:00