Skip to content

Commit

Permalink
Add AV1 support (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
murillo128 authored Jul 22, 2024
1 parent decfd16 commit 682d294
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ jobs:
- name: Initialize submodules
run: git submodule update --init --recursive
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install --fix-missing -y libavcodec-dev libavfilter-dev libavformat-dev libavutil-dev libswscale-dev libvpx-dev libx264-dev
run: |
sudo apt-get update
sudo apt-get install --fix-missing -y libavcodec-dev libavfilter-dev libavformat-dev libavutil-dev libswscale-dev libvpx-dev libx264-dev
sudo wget https://ftp.debian.org/debian/pool/main/a/aom/libaom3_3.9.1-1_amd64.deb
sudo wget https://ftp.debian.org/debian/pool/main/a/aom/libaom-dev_3.9.1-1_amd64.deb
sudo dpkg -i libaom3_3.9.1-1_amd64.deb libaom-dev_3.9.1-1_amd64.deb
- name: Install and build
run: npm i
- name: Run Test
Expand Down
32 changes: 17 additions & 15 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
'external_libmediaserver%' : '<!(echo $LIBMEDIASERVER)',
'external_libmediaserver_include_dirs%' : '<!(echo $LIBMEDIASERVER_INCLUDE)',
'medooze_media_server_src' : "<!(node -e \"require('medooze-media-server-src')\")",

},
"targets":
"targets":
[
{
"target_name": "medooze-video-codecs",
"cflags":
"cflags":
[
"-march=native",
"-fexceptions",
Expand All @@ -20,7 +19,7 @@
#"-O0",
#"-fsanitize=address"
],
"cflags_cc":
"cflags_cc":
[
"-fexceptions",
"-std=c++17",
Expand All @@ -31,24 +30,24 @@
#"-O0",
#"-fsanitize=address,leak"
],
"include_dirs" :
"include_dirs" :
[
'/usr/include/nodejs/',
"<!(node -e \"require('nan')\")"
],
"ldflags" : [" -lpthread -lresolv"],
"link_settings":
"link_settings":
{
'libraries': ["-lpthread -lpthread -lresolv -lavcodec -lswscale -lavformat -lavutil -lvpx -lx264 -lavfilter"]
'libraries': ["-lpthread -lpthread -lresolv -lavcodec -lswscale -lavformat -lavutil -lvpx -lx264 -lavfilter -laom"]
},
"sources":
[
"sources":
[
"src/video-codecs_wrap.cxx",
],
"conditions":
[
[
"external_libmediaserver == ''",
"external_libmediaserver == ''",
{
"include_dirs" :
[
Expand All @@ -63,8 +62,9 @@
"<(medooze_media_server_src)/src/vp9",
"<(medooze_media_server_src)/src/h264",
"<(medooze_media_server_src)/src/h265",
"/usr/local/src/aurora/include"
],
"sources":
"sources":
[
"<(medooze_media_server_src)/src/VideoBufferScaler.cpp",
"<(medooze_media_server_src)/src/VideoCodecFactory.cpp",
Expand Down Expand Up @@ -104,8 +104,11 @@
"<(medooze_media_server_src)/src/vp8/VP8LayerSelector.cpp",
"<(medooze_media_server_src)/src/vp9/VP9LayerSelector.cpp",
"<(medooze_media_server_src)/src/jpeg/JPEGEncoder.cpp",
"<(medooze_media_server_src)/src/webp/WEBPEncoder.cpp"

"<(medooze_media_server_src)/src/av1/AV1Decoder.cpp",
"<(medooze_media_server_src)/src/av1/AV1Encoder.cpp",
"<(medooze_media_server_src)/src/av1/AV1CodecConfigurationRecord.cpp",
"<(medooze_media_server_src)/src/av1/AV1LayerSelector.cpp",
"<(medooze_media_server_src)/src/av1/Obu.cpp",
],
"conditions" : [
['OS=="mac"', {
Expand Down Expand Up @@ -138,5 +141,4 @@
]
}
]
}

}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"uuid": "^3.3.2"
},
"peerDependencies": {
"medooze-media-server-src": "^1.2.0"
"medooze-media-server-src": "^1.3.0"
},
"files": [
"lib/*",
Expand Down

0 comments on commit 682d294

Please sign in to comment.