Commit Graph

103 Commits

Author SHA1 Message Date
693c872518 media: split demuxer and decoder
Change-Id: I237a3c4110d3b553d2b9cee99abbede4b10a80d2
2019-08-07 14:30:31 -04:00
1eeff3c5a1 Revert "media: split demuxer and decoder"
This reverts commit 880c285a03.

Reason for revert: still needs work

Change-Id: I5851724e6b04ee185ef9a2b41d90caeb1b158461
2019-08-02 21:02:28 -04:00
880c285a03 media: split demuxer and decoder
Change-Id: Id8d3bc885798850e00ef21d11e7f8276b54cc9be
2019-08-02 12:44:23 -04:00
9da5343f93 test: write little endian wav file for decoder
RIFF identifier supposes little endian data.

Change-Id: I56aa829c49388daf04f0249151ca7ef3e35416f4
2019-07-30 17:15:38 -04:00
18bddb39a0 string utils: bring back high precision to_string
Change-Id: I2829c6b42fbebec200b3935aadc62b60498effd0
2019-07-04 10:58:47 -04:00
5c60caa66d encoder: fix logic error in unit test
Change-Id: I055cc4bd496966b1f1306fc7c7dfd23f9ef6fe25
2019-06-03 10:20:14 -04:00
2ee17c3562 unitTest: fix string_utils
Change-Id: I57d3efa477490196e6e935d00a6e98f15d970714
2019-05-31 14:53:39 -04:00
6b0d81f4b0 encoder: fix unit test compilation
Change-Id: Iaac2793ce2a6e0d32027afe168b1511ef0575016
Reviewed-by: Philippe Gorley <philippe.gorley@savoirfairelinux.com>
2019-05-27 10:32:54 -04:00
2130f067b6 sources: rename to jami
* rename namespace from ring to jami
* rename logs methods from RING_* to JAMI_*
* rename RING_VIDEO to ENABLE_VIDEO

Change-Id: Ic98498652d7059fafe58a96220d565bcdfa53658
2019-04-02 17:11:40 -04:00
dda1f61d22 video: add rotation
Change-Id: I0b760e4ae32ab372cef49ef9c2120e722e041ef1
2019-03-07 16:27:29 -05:00
e059062a01 encoder: cleanup and simplify
Cleans up the encoder a bit and removes methods that weren't used or did
nothing. In any case, it should not be the encoder's responsibility to
mute audio/video.

Removes direct accesses to private data. All these options are accessible
through the av_opt_* API with the AV_OPT_SEARCH_CHILDREN flag.

Adding streams to the encoder is now done separately than opening an RTP
output in an effort to streamline the encoder setup (file vs RTP).

Change-Id: I7a868d098fa942697cfbe3246f368fb9fc7bfb0f
2019-02-12 11:03:10 -05:00
c30db636f8 account_factory: fixed unitTest
Change-Id: Ib9cf84c2dfbf8491248ca219bb85eaf8b3523702
2019-02-04 11:35:37 -05:00
8d0d80b3f7 resampler: set matrix on uninitialized context
A comment in swr_set_matrix says "[SwrContext] needs to be allocated
but not initialized" before returning an error code.

Adds a unit test for reinitializing a matrix.

Change-Id: If8f38a5dd15393f8ae9578b4f272c2554a663c11
2019-01-15 16:30:03 -05:00
e2ac73b3a1 sip test: fixed configuration file not being found
Fixed unused parameter warning for main function

Fixed test_sipp.cpp not finding dring-sample.yml in test cases

Change-Id: Ie88ce5853bf18aa6f9c5c07bc0ec888aa268682f
Reviewed-by: Philippe Gorley <philippe.gorley@savoirfairelinux.com>
2019-01-11 11:39:48 -05:00
91a7780591 audio_frame_resizer: fixed unitTest
fixed getFormat

fixed testCase evaluating the sample of the queue

Change-Id: Id6ddb3ee90e674776bec53cfa81e984d47db3ef9
2019-01-11 11:39:10 -05:00
fe226c7a41 Revert "Revert "media_encoder: fixed unitTest""
This reverts commit 0bba87efce.

Reason for revert: merged by mistake

Change-Id: I884227ca3152fa068028a8d4fb839603eb98e1d5
2019-01-10 11:44:28 -05:00
0bba87efce Revert "media_encoder: fixed unitTest"
This reverts commit 5d8d6252d1.

Reason for revert: <INSERT REASONING HERE>

Change-Id: I6bf7ed70695901cc9e115ea93155be720c71ee29
2019-01-10 11:10:54 -05:00
5d8d6252d1 media_encoder: fixed unitTest
Change-Id: Ic5c7b37ee534b4e379c7b7ec363d459e85c024d8
Reviewed-by: Philippe Gorley <philippe.gorley@savoirfairelinux.com>
2019-01-07 17:38:58 -05:00
6f42739902 audio_frame_resizer: fixed setFormat
fixed unitTest

frameSize should be set before reallocating the queue

Change-Id: Ie9cefb5419b34d487d67fcd6bd44f66aa192dc57
Reviewed-by: Philippe Gorley <philippe.gorley@savoirfairelinux.com>
2019-01-07 17:38:30 -05:00
2a806fa26d misc: update copyright date
Change-Id: Ia4ed75d04a284efa0763c917aeaa2f08863a87cb
2019-01-02 17:49:21 -05:00
812b7b0725 misc: move *.ring.cx to *.jami.net
Change-Id: I1ab42b470f75aa1291aaebd625bfa11984258080
2018-12-05 12:00:27 -05:00
c16beb439a audioframe: implement mix
Change-Id: I8d8d6bd852d76040eb967dda76dcd8c85118e235
Reviewed-by: Philippe Gorley <philippe.gorley@savoirfairelinux.com>
2018-11-28 16:54:24 -04:00
97786ec047 test: fix audio frame resizer test cases
Change-Id: Ifd62420e19831bb2736248a8ada706429ab5fabc
2018-11-27 16:14:38 -05:00
04e814339c audio: add frame resizer
Allows buffering of samples when the frame sizes at the input and the
output don't match.

Will mostly be used for file streaming, where the file's frame size may
not match the standard 20 ms packet size used in the project.

Adds unit tests.

Change-Id: I568b31ba97d33bc0c1c89495e918bd10a9bf8aeb
2018-11-23 15:07:57 -05:00
66a0af9053 resampler: improve reliability
Improves reliability of resampler by setting the input and output
channel counts and by forcing initialization on the first resampling.

Removes redundancy by using the sample format in AudioFormat.

Change-Id: Ie0154d5b46db6735dbc8da81fdb0e6be795a3efa
2018-11-19 11:41:18 -05:00
46fdc9d992 media_stream: add frame size
This will help once audio streaming is implemented, as the encoder will
need to know the number of samples per frame in the decoded file.

Change-Id: I6d6375b46d74eec6618c0f1e7ee1f07fd86b6e45
2018-11-19 10:12:21 -05:00
623bfc3d3b test: fix resampler test case
Change-Id: I86f08805d93c85eafa88c2a4fc61bcd092e1ea57
2018-10-24 11:25:39 -04:00
19e3ee5cb9 video_scaler: add pixel format conversion shortcut
Adds unit tests for VideoScaler.

Change-Id: I38fc5edbd37ca11196c72db8aed7927d6371b678
2018-10-23 09:40:42 -04:00
87259d0b0e test: add audio mixing test case
Change-Id: I6d01dc501cad775d7561eaf1857393c79dfa2365
2018-10-19 11:03:28 -04:00
acf42c05da test: add resampler test case
Change-Id: I0f8f9571a715fe26a7db61a43675efc50ce71564
2018-10-19 11:03:25 -04:00
f68226c5ec test: execute unit tests first
SIP and TURN tests fail sporadically, and all recent additions to the
test folder have been under the unitTest folder.

Change-Id: Icac4827f53da3fbd72492cdfb024a003decbbbec
2018-10-19 11:03:09 -04:00
b64c2570d7 dring: expose frame wrappers in abi
Makes use of AVFrame's reference counting if possible instead of copying
the data.

Only bumps minor version because MediaFrame et al weren't in the ABI
until now.

Change-Id: I692e76230ed057c1ad4e46ab59ea5cfd163fb98d
2018-10-13 16:44:49 -04:00
0a667fb9da bin: remove any remaining pollEvents call
Change-Id: I848f8c7e5af8bd224c49de8a829475a99993abdc
Reviewed-by: Philippe Gorley <philippe.gorley@savoirfairelinux.com>
Gitlab: #52
2018-09-24 13:50:58 -04:00
98518e998f filter: add automatic reinitialization
If one of the inputs has changed, the filter will reinitialize itself.

Change-Id: I884195b6fdf19ad72329364eeeefd33e3b3bbfff
2018-09-19 12:08:01 -04:00
9d36c29eef media_filter: remove simple filters
Change-Id: Ie45773677290111f92b81230071835ac42e7197e
Reviewed-by: Philippe Gorley <philippe.gorley@savoirfairelinux.com>
2018-08-23 10:47:30 -04:00
589688c2d9 trust store: add unit test
Change-Id: I6cd45067abc547be732e498d984ce1f1f5c76655
Reviewed-by: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
2018-08-22 13:26:55 -04:00
20b631fb78 audio: refactor resampler class
Using MediaFilter would make the resampling time longer and more
unpredictable than directly using libswresample.

Adds libswresample as a dependency.
Simplifies Resampler class.
Resampler detects changes in input and output formats automatically.
Changes Audiofile to use Resampler instead of MediaFilter.

Change-Id: I24919e8fa514dbb4a38408e338016976e7424136
2018-08-08 13:36:45 -04:00
e3022741bd audio: remove libsamplerate dependency
Rewrites the Resampler class to use MediaFilter.
Adds a unit test for the new Resampler.

Change-Id: I8ed78d2e1d82df81bbaf46a9719c682c825ee245
2018-08-03 14:13:41 -04:00
60305d9224 filter: simplify usage and get input params
Adds a way to get input parameters.
Simplifies usage of simple filters.
Adds const where useful.

Change-Id: I768d2f3e4e46e791e10530a1c3010607fecc42da
2018-08-02 12:19:51 -04:00
04556ae8ee test: add decoder unit test
If the PCM signed 16 decoders cannot be found, skip the test

Change-Id: If7ddf9778465415232e59f43b88ba17bf3bf7dbd
Reviewed-by: Sebastien Blin <sebastien.blin@savoirfairelinux.com>
2018-07-30 13:41:53 -04:00
55f48f133c fix spelling errors
Change-Id: Ifbc5f3792a7019dcfa8249eb30afe2a64cbeb57c
Reviewed-by: Sebastien Blin <sebastien.blin@savoirfairelinux.com>
2018-07-26 14:05:58 -04:00
b4c6a2199c encoder: add file metadata
Allows title and description to be specified when muxing to a file.

Change-Id: Ie48c185a0177e09872867520ab1aabfddeacbb8a
Reviewed-by: Sebastien Blin <sebastien.blin@savoirfairelinux.com>
2018-06-05 19:41:17 -04:00
454cb1717f filter: get output stream properties
Change-Id: I6f1ebfc9d967452fe7d7c7e72e32cf795ae2d85a
Reviewed-by: Sebastien Blin <sebastien.blin@savoirfairelinux.com>
2018-05-29 13:43:03 -04:00
d22bed2591 Revert "Revert "media: add filters""
Filters were reverted for the release so the binaries wouldn't include
libavfilter (which wasn't yet used).

This reverts commit 1e6a471687.

Change-Id: Ib9790a544b442066265b3fe1ea96313be35eff62
Reviewed-by: Sebastien Blin <sebastien.blin@savoirfairelinux.com>
2018-05-28 13:07:57 -04:00
afd1934d37 encoder: refactor for reusability
Refactors the MediaEncoder class so it can be reused elsewhere in the
codebase.

Concretely, MediaEncoder now supports multiple streams and file formats.

Adds a unit test for MediaEncoder.

Change-Id: I27d6f2e8538809e01fef5c35978a0c35dcf8cae4
Reviewed-by: Sebastien Blin <sebastien.blin@savoirfairelinux.com>
2018-05-15 12:09:42 -05:00
70429e95c0 test: better gitignore rules
Changes sip and turn test executable names to match gitignore rules.

Removes dring-sample.yml that is created and modified each time the sip
test runs.

Ignore generated configuration files.

Change-Id: I5e6cc760183763a3448f2d35bd0bf55ba765f746
Reviewed-by: Sebastien Blin <sebastien.blin@savoirfairelinux.com>
2018-05-11 12:54:28 -05:00
1e6a471687 Revert "media: add filters"
This reverts commit ea2933d4ac.

Change-Id: I624c07255f60186a0d1e6610a58956775f91b342
2018-05-09 14:38:14 -04:00
e34f3ca7bc tests: fix test_TURN
permitPeer was failing because of a bad parsing.
Here we should use the ipv4 mapped address.

Change-Id: If286afc54efc99f8828c6379a6264c9da4285d75
Reviewed-by: Philippe Gorley <philippe.gorley@savoirfairelinux.com>
2018-05-09 10:51:39 -05:00
ea2933d4ac media: add filters
Adds dependency to libavfilter, which provides many useful utilities
such as hardware encoding, mixing audio or rotating video.

Access to libavfilter is done through the MediaFilter class, which takes
a filter graph string and AVFrames as input and outputs filtered
AVFrames.

Adds unit tests for MediaFilter.

Change-Id: I0bf3869a9f19ad9cbbe1fc5e2d37eb83ece66ccc
Reviewed-by: Sebastien Blin <sebastien.blin@savoirfairelinux.com>
2018-05-08 14:55:03 -05:00
5b60066f4e test: ignore generated config file
Some unit tests generate a dring configuration file. Have git ignore it
so it is not accidentally added to the repo.

Change-Id: I6f491d1c4f49606e9fa4d0dc42324919cd88c7ce
2018-05-07 16:02:46 -05:00