New upstream version 0.15.4+dfsg1
This commit is contained in:
parent
55d5047af0
commit
67704ac59c
359 changed files with 8423 additions and 1050 deletions
|
|
@ -10,6 +10,7 @@ if(WIN32)
|
|||
add_subdirectory(decklink/win)
|
||||
add_subdirectory(win-mf)
|
||||
add_subdirectory(obs-qsv11)
|
||||
add_subdirectory(vlc-video)
|
||||
elseif(APPLE)
|
||||
add_subdirectory(coreaudio-encoder)
|
||||
add_subdirectory(mac-avcapture)
|
||||
|
|
@ -17,6 +18,7 @@ elseif(APPLE)
|
|||
add_subdirectory(mac-vth264)
|
||||
add_subdirectory(mac-syphon)
|
||||
add_subdirectory(decklink/mac)
|
||||
add_subdirectory(vlc-video)
|
||||
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
|
||||
add_subdirectory(linux-capture)
|
||||
add_subdirectory(linux-pulseaudio)
|
||||
|
|
@ -24,6 +26,7 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
|
|||
add_subdirectory(linux-jack)
|
||||
add_subdirectory(linux-alsa)
|
||||
add_subdirectory(decklink/linux)
|
||||
add_subdirectory(vlc-video)
|
||||
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD")
|
||||
add_subdirectory(linux-capture)
|
||||
add_subdirectory(linux-pulseaudio)
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ CoreAudioAAC="CoreAudio AAC -enkooderi"
|
|||
Bitrate="Bitrate"
|
||||
AllowHEAAC="Salli HE-AAC"
|
||||
OutputSamplerate="Ulostulon näytetaajuus"
|
||||
UseInputSampleRate="Käytä sisääntulon näytetaajuutta (saattaa sisältää myös epäsopivia arvoja)"
|
||||
UseInputSampleRate="Käytä sisääntulon näytetaajuutta (saattaa sisältää myös ei tuettuja arvoja)"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
CoreAudioAAC="Encoder CoreAudio AAC"
|
||||
Bitrate="Bitrate"
|
||||
AllowHEAAC="Consenti l'HE-AAC"
|
||||
OutputSamplerate="Output Sample Rate"
|
||||
UseInputSampleRate="Usa frequenza di campionamento input (OBS) (potrebbe elencare bitrate non supportati)"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
CoreAudioAAC="CoreAudio AAC-koder"
|
||||
Bitrate="Bitrate"
|
||||
AllowHEAAC="Tillat HE-AAC-koding"
|
||||
OutputSamplerate="Prøvefrekvens for utgang"
|
||||
UseInputSampleRate="Bruk prøvefrekvens for inngang (OBS). Kan vise bitrater som ikke er støttet."
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
CoreAudioAAC="Codificador CoreAudio AAC"
|
||||
Bitrate="Bitrate"
|
||||
AllowHEAAC="Permitir HE-AAC"
|
||||
OutputSamplerate="Taxa de amostragem de saída"
|
||||
UseInputSampleRate="Taxa de amostragem de entrada (OBS) Taxa Amostra (pode listar taxas de bit sem suporte)"
|
||||
|
||||
|
|
|
|||
|
|
@ -1346,7 +1346,8 @@ bool obs_module_load(void)
|
|||
{
|
||||
#ifdef _WIN32
|
||||
if (!load_core_audio()) {
|
||||
CA_LOG(LOG_WARNING, "Couldn't load CoreAudio AAC encoder");
|
||||
CA_LOG(LOG_WARNING, "CoreAudio AAC encoder not installed on "
|
||||
"the system or couldn't be loaded");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@ static bool load_lib(void)
|
|||
|
||||
#define LOAD_LIB(x, n) x = LoadLibrary(TEXT(n)); \
|
||||
if (!x) \
|
||||
CA_LOG(LOG_WARNING, "Failed loading library '" n "'");
|
||||
CA_LOG(LOG_DEBUG, "Failed loading library '" n "'");
|
||||
|
||||
LOAD_LIB(audio_toolbox, "CoreAudioToolbox.dll");
|
||||
#undef LOAD_LIB
|
||||
|
|
|
|||
|
|
@ -2,4 +2,5 @@ BlackmagicDevice="Dispositivo Blackmagic"
|
|||
Device="Dispositivo"
|
||||
Mode="Modo"
|
||||
Buffering="Utilizar Buffering"
|
||||
PixelFormat="Formato de pixel"
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ bool DeckLinkDeviceDiscovery::Init(void)
|
|||
|
||||
initialized = result == S_OK;
|
||||
if (!initialized)
|
||||
blog(LOG_INFO, "Failed to start search for DeckLink devices");
|
||||
blog(LOG_DEBUG, "Failed to start search for DeckLink devices");
|
||||
|
||||
return initialized;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,18 @@
|
|||
project(image-source)
|
||||
|
||||
if(MSVC)
|
||||
set(image-source_PLATFORM_DEPS
|
||||
w32-pthreads)
|
||||
endif()
|
||||
|
||||
set(image-source_SOURCES
|
||||
image-source.c)
|
||||
image-source.c
|
||||
obs-slideshow.c)
|
||||
|
||||
add_library(image-source MODULE
|
||||
${image-source_SOURCES})
|
||||
target_link_libraries(image-source
|
||||
libobs)
|
||||
libobs
|
||||
${image-source_PLATFORM_DEPS})
|
||||
|
||||
install_obs_plugin_with_data(image-source data)
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@ ImageInput="الصورة"
|
|||
File="ملف الصورة"
|
||||
UnloadWhenNotShowing="إلغاء تحميل الصورة إذا لم تظهر"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
ImageInput="Изображение"
|
||||
File="Файл с изображение"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="Imatge"
|
|||
File="Fitxer de la imatge"
|
||||
UnloadWhenNotShowing="Descarrega la imatge de la memòria quan no es mostri"
|
||||
|
||||
SlideShow="Presentació de diapositives"
|
||||
SlideShow.TransitionSpeed="Velocitat de la transició (mil·lisegons)"
|
||||
SlideShow.SlideTime="Temps entre diapositives (mil·lisegons)"
|
||||
SlideShow.Files="Fitxers d'imatge"
|
||||
SlideShow.Randomize="Reproducció aleatòria"
|
||||
SlideShow.Transition="Transició"
|
||||
SlideShow.Transition.Cut="Tall"
|
||||
SlideShow.Transition.Fade="Desaparèixer"
|
||||
SlideShow.Transition.Swipe="De cop"
|
||||
SlideShow.Transition.Slide="Diapositiva"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="Obrázek"
|
|||
File="Soubor obrázku"
|
||||
UnloadWhenNotShowing="Nenačítat při skrytém"
|
||||
|
||||
SlideShow="Obrázková prezentace"
|
||||
SlideShow.TransitionSpeed="Rychlost přechodu (milisekundy)"
|
||||
SlideShow.SlideTime="Čas mezi snímky (milisekundy)"
|
||||
SlideShow.Files="Soubory obrázků"
|
||||
SlideShow.Randomize="Náhodné přehrávání"
|
||||
SlideShow.Transition="Přechod"
|
||||
SlideShow.Transition.Cut="Střih"
|
||||
SlideShow.Transition.Fade="Slábnutí"
|
||||
SlideShow.Transition.Swipe="Tažení"
|
||||
SlideShow.Transition.Slide="Sklouznutí"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@ ImageInput="Billede"
|
|||
File="Billedfil"
|
||||
UnloadWhenNotShowing="Fjern billede fra hukommelsen når det ikke vises"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="Bild"
|
|||
File="Bilddatei"
|
||||
UnloadWhenNotShowing="Entlade Bild, wenn es nicht angezeigt wird"
|
||||
|
||||
SlideShow="Diashow"
|
||||
SlideShow.TransitionSpeed="Geschwindigkeit des Übergangs (Millisekunden)"
|
||||
SlideShow.SlideTime="Zeit zwischen Bildern (Millisekunden)"
|
||||
SlideShow.Files="Bilddateien"
|
||||
SlideShow.Randomize="Zufällige Wiedergabe"
|
||||
SlideShow.Transition="Übergang"
|
||||
SlideShow.Transition.Cut="Schnitt"
|
||||
SlideShow.Transition.Fade="Überblenden"
|
||||
SlideShow.Transition.Swipe="Swipe"
|
||||
SlideShow.Transition.Slide="Slide"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@ ImageInput="Εικόνα"
|
|||
File="Αρχείο εικόνας"
|
||||
UnloadWhenNotShowing="Ξεφόρτωση εικόνας όταν δεν εμφανίζεται"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,14 @@
|
|||
ImageInput="Image"
|
||||
File="Image File"
|
||||
UnloadWhenNotShowing="Unload image when not showing"
|
||||
|
||||
SlideShow="Image Slide Show"
|
||||
SlideShow.TransitionSpeed="Transition Speed (milliseconds)"
|
||||
SlideShow.SlideTime="Time Between Slides (milliseconds)"
|
||||
SlideShow.Files="Image Files"
|
||||
SlideShow.Randomize="Randomize Playback"
|
||||
SlideShow.Transition="Transition"
|
||||
SlideShow.Transition.Cut="Cut"
|
||||
SlideShow.Transition.Fade="Fade"
|
||||
SlideShow.Transition.Swipe="Swipe"
|
||||
SlideShow.Transition.Slide="Slide"
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="Imagen"
|
|||
File="Archivo de imagen"
|
||||
UnloadWhenNotShowing="Descargar la imagen mientras no se muestre"
|
||||
|
||||
SlideShow="Galería de imágenes"
|
||||
SlideShow.TransitionSpeed="Velocidad de la transición (milisegundos)"
|
||||
SlideShow.SlideTime="Tiempo entre diapositivas (milisegundos)"
|
||||
SlideShow.Files="Archivo de imagen"
|
||||
SlideShow.Randomize="Reproducción aleatoria"
|
||||
SlideShow.Transition="Transición"
|
||||
SlideShow.Transition.Cut="Corte"
|
||||
SlideShow.Transition.Fade="Desvanecimiento"
|
||||
SlideShow.Transition.Swipe="Deslizar Rapido"
|
||||
SlideShow.Transition.Slide="Deslizar"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="Irudia"
|
|||
File="Irudi-fitxategia"
|
||||
UnloadWhenNotShowing="Ez kargatu irudia erakusten ez denean"
|
||||
|
||||
SlideShow="Irudien diaporama"
|
||||
SlideShow.TransitionSpeed="Trantsizioaren abiadura (milisegundotan)"
|
||||
SlideShow.SlideTime="Diapositiben arteko denbora (milisegundotan)"
|
||||
SlideShow.Files="Irudi fitxategiak"
|
||||
SlideShow.Randomize="Ausazko erreprodukzioa"
|
||||
SlideShow.Transition="Trantsizioa"
|
||||
SlideShow.Transition.Cut="Ebaki"
|
||||
SlideShow.Transition.Fade="Iraungi"
|
||||
SlideShow.Transition.Swipe="Korritu"
|
||||
SlideShow.Transition.Slide="Irristatu"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="Kuva"
|
|||
File="Kuvatiedosto"
|
||||
UnloadWhenNotShowing="Vapauta kuva muistista, kun se ei ole näkyvissä"
|
||||
|
||||
SlideShow="Diaesitys"
|
||||
SlideShow.TransitionSpeed="Siirtymän nopeus (millisekuntia)"
|
||||
SlideShow.SlideTime="Kesto kuvien välissä (millisekunteina)"
|
||||
SlideShow.Files="Kuvatiedostot"
|
||||
SlideShow.Randomize="Toista satunnaisesti"
|
||||
SlideShow.Transition="Siirtymä"
|
||||
SlideShow.Transition.Cut="Leikkaa"
|
||||
SlideShow.Transition.Fade="Häivytä"
|
||||
SlideShow.Transition.Swipe="Pyyhkäise"
|
||||
SlideShow.Transition.Slide="Liu'uta"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="Image"
|
|||
File="Fichier image"
|
||||
UnloadWhenNotShowing="Décharger l'image quand elle n'est pas affichée"
|
||||
|
||||
SlideShow="Diaporama"
|
||||
SlideShow.TransitionSpeed="Vitesse de transition (millisecondes)"
|
||||
SlideShow.SlideTime="Temps entre chaque diapositive (millisecondes)"
|
||||
SlideShow.Files="Fichiers image"
|
||||
SlideShow.Randomize="Lecture aléatoire"
|
||||
SlideShow.Transition="Transition"
|
||||
SlideShow.Transition.Cut="Coupure"
|
||||
SlideShow.Transition.Fade="Fondu"
|
||||
SlideShow.Transition.Swipe="Balayage"
|
||||
SlideShow.Transition.Slide="Glissement"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@ ImageInput="Imaxe"
|
|||
File="Ficheiro de imaxe"
|
||||
UnloadWhenNotShowing="Non descargar a imaxe cando non se mostre"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="תמונה"
|
|||
File="קובץ תמונה"
|
||||
UnloadWhenNotShowing="הסר טעינת תמונה כאשר לא נראה"
|
||||
|
||||
SlideShow="מצגת תמונות"
|
||||
SlideShow.TransitionSpeed="מהירות מעבר (אלפיות שניה)"
|
||||
SlideShow.SlideTime="זמן בין שקופיות (אלפיות שניה)"
|
||||
SlideShow.Files="קבצי תמונה"
|
||||
SlideShow.Randomize="סדר נגינה אקראי"
|
||||
SlideShow.Transition="מעבר"
|
||||
SlideShow.Transition.Cut="חתוך"
|
||||
SlideShow.Transition.Fade="עמעום"
|
||||
SlideShow.Transition.Swipe="החלקה"
|
||||
SlideShow.Transition.Slide="הסט"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="Slika"
|
|||
File="Datoteka slike"
|
||||
UnloadWhenNotShowing="Ukloni sliku iz memorije kada se ne prikazuje"
|
||||
|
||||
SlideShow="Prikazivanje slajdova"
|
||||
SlideShow.TransitionSpeed="Brzina prelaza (milisekunde)"
|
||||
SlideShow.SlideTime="Vreme između slajdova (milisekunde)"
|
||||
SlideShow.Files="Datoteke slika"
|
||||
SlideShow.Randomize="Nasumična reprodukcija"
|
||||
SlideShow.Transition="Prelaz"
|
||||
SlideShow.Transition.Cut="Isecanje"
|
||||
SlideShow.Transition.Fade="Zatamnjenje"
|
||||
SlideShow.Transition.Swipe="Prevlačenje"
|
||||
SlideShow.Transition.Slide="Klizanje"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="Kép"
|
|||
File="Képfájl"
|
||||
UnloadWhenNotShowing="Kép kitöltése mikor nem jelenik meg"
|
||||
|
||||
SlideShow="Képvetítő"
|
||||
SlideShow.TransitionSpeed="Áttűnési sebesség (ezredmásodperc)"
|
||||
SlideShow.SlideTime="Diák közti idő (ezredmásodperc)"
|
||||
SlideShow.Files="Képfájlok"
|
||||
SlideShow.Randomize="Véletlenszerű lejátszás"
|
||||
SlideShow.Transition="Átmenet"
|
||||
SlideShow.Transition.Cut="Kivágás"
|
||||
SlideShow.Transition.Fade="Áttűnés"
|
||||
SlideShow.Transition.Swipe="Lapozás"
|
||||
SlideShow.Transition.Slide="Csúsztatás"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="Immagine"
|
|||
File="File Immagine"
|
||||
UnloadWhenNotShowing="Non caricare immagine se non si vede"
|
||||
|
||||
SlideShow="Presentazione immagini"
|
||||
SlideShow.TransitionSpeed="Velocità di transizione (millisecondi)"
|
||||
SlideShow.SlideTime="Tempo tra le diapositive (millisecondi)"
|
||||
SlideShow.Files="Files Immagini"
|
||||
SlideShow.Randomize="Randomizzare la riproduzione"
|
||||
SlideShow.Transition="Transizione"
|
||||
SlideShow.Transition.Cut="Taglio"
|
||||
SlideShow.Transition.Fade="Dissolvenza"
|
||||
SlideShow.Transition.Swipe="Scorri"
|
||||
SlideShow.Transition.Slide="Scivola"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="画像"
|
|||
File="画像ファイル"
|
||||
UnloadWhenNotShowing="表示中でない画像は読み込まない"
|
||||
|
||||
SlideShow="画像スライドショー"
|
||||
SlideShow.TransitionSpeed="画面切替速度 (ミリ秒)"
|
||||
SlideShow.SlideTime="スライド時間間隔 (ミリ秒)"
|
||||
SlideShow.Files="画像ファイル"
|
||||
SlideShow.Randomize="ランダム再生"
|
||||
SlideShow.Transition="トランジション"
|
||||
SlideShow.Transition.Cut="カット"
|
||||
SlideShow.Transition.Fade="フェード"
|
||||
SlideShow.Transition.Swipe="スワイプ"
|
||||
SlideShow.Transition.Slide="スライド"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="이미지"
|
|||
File="이미지 파일"
|
||||
UnloadWhenNotShowing="이미지가 표시되지 않을 경우 비디오 메모리에서 읽지 않기"
|
||||
|
||||
SlideShow="이미지 슬라이드 쇼"
|
||||
SlideShow.TransitionSpeed="전환 속도 (밀리초)"
|
||||
SlideShow.SlideTime="슬라이드 간격 (밀리초)"
|
||||
SlideShow.Files="이미지 파일 형식"
|
||||
SlideShow.Randomize="무작위 재생"
|
||||
SlideShow.Transition="전환 방식"
|
||||
SlideShow.Transition.Cut="자르기"
|
||||
SlideShow.Transition.Fade="서서히 사라지기"
|
||||
SlideShow.Transition.Swipe="밀어내기"
|
||||
SlideShow.Transition.Slide="슬라이드"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="Bilde"
|
|||
File="Bildefil"
|
||||
UnloadWhenNotShowing="Avlast bilde når det ikke vises"
|
||||
|
||||
SlideShow="Lysbildefremvisning"
|
||||
SlideShow.TransitionSpeed="Overgangshastighet (millisekunder)"
|
||||
SlideShow.SlideTime="Tid mellom lysbilder (millisekunder)"
|
||||
SlideShow.Files="Bildefiler"
|
||||
SlideShow.Randomize="Tilfeldig avspilling"
|
||||
SlideShow.Transition="Overgang"
|
||||
SlideShow.Transition.Cut="Kutt"
|
||||
SlideShow.Transition.Fade="Forløpning"
|
||||
SlideShow.Transition.Swipe="Sveip"
|
||||
SlideShow.Transition.Slide="Skyv"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="Afbeelding"
|
|||
File="Afbeeldingsbestand"
|
||||
UnloadWhenNotShowing="Niet getoonde afbeeldingen uit het geheugen verwijderen"
|
||||
|
||||
SlideShow="Diashow"
|
||||
SlideShow.TransitionSpeed="Overgangssnelheid (milliseconden)"
|
||||
SlideShow.SlideTime="Tijd Tussen Dia's (milliseconden)"
|
||||
SlideShow.Files="Afbeeldingsbestanden"
|
||||
SlideShow.Randomize="Willekeurige Volgorde"
|
||||
SlideShow.Transition="Overgang"
|
||||
SlideShow.Transition.Cut="Knippen"
|
||||
SlideShow.Transition.Fade="Vervagen"
|
||||
SlideShow.Transition.Swipe="Vegen"
|
||||
SlideShow.Transition.Slide="Slide"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="Obraz"
|
|||
File="Plik obrazu"
|
||||
UnloadWhenNotShowing="Usuń obraz z pamięci, gdy nie jest pokazywany"
|
||||
|
||||
SlideShow="Pokaz slajdów"
|
||||
SlideShow.TransitionSpeed="Prędkość efektu przejścia (ms)"
|
||||
SlideShow.SlideTime="Czas wyświetlania slajdu (ms)"
|
||||
SlideShow.Files="Pliki graficzne"
|
||||
SlideShow.Randomize="Odtwarzanie losowe"
|
||||
SlideShow.Transition="Efekt przejścia"
|
||||
SlideShow.Transition.Cut="Cięcie"
|
||||
SlideShow.Transition.Fade="Zanikanie"
|
||||
SlideShow.Transition.Swipe="Przeciągnięcie"
|
||||
SlideShow.Transition.Slide="Przesunięcie"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="Imagem"
|
|||
File="Arquivo de Imagem"
|
||||
UnloadWhenNotShowing="Descarregar imagem quando não estiver em exibição"
|
||||
|
||||
SlideShow="Imagens em Deslize"
|
||||
SlideShow.TransitionSpeed="Velocidade de transição (milissegundos)"
|
||||
SlideShow.SlideTime="Tempo entre Deslizes (milissegundos)"
|
||||
SlideShow.Files="Arquivos de Imagem"
|
||||
SlideShow.Randomize="Reprodução aleatória"
|
||||
SlideShow.Transition="Transição"
|
||||
SlideShow.Transition.Cut="Cortar"
|
||||
SlideShow.Transition.Fade="Desvanecer"
|
||||
SlideShow.Transition.Swipe="Deslizar"
|
||||
SlideShow.Transition.Slide="Deslize"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="Imagem"
|
|||
File="Ficheiro de imagem"
|
||||
UnloadWhenNotShowing="Descarregar imagem quando não estiver em visualização"
|
||||
|
||||
SlideShow="Imagens em Deslize"
|
||||
SlideShow.TransitionSpeed="Velocidade de transição (milissegundos)"
|
||||
SlideShow.SlideTime="Tempo entre Deslizes (milissegundos)"
|
||||
SlideShow.Files="Arquivos de Imagem"
|
||||
SlideShow.Randomize="Reprodução aleatória"
|
||||
SlideShow.Transition="Transição"
|
||||
SlideShow.Transition.Cut="Cortar"
|
||||
SlideShow.Transition.Fade="Desvanecer"
|
||||
SlideShow.Transition.Swipe="Deslizar"
|
||||
SlideShow.Transition.Slide="Deslize"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@ ImageInput="Imagine"
|
|||
File="Fișier imagine"
|
||||
UnloadWhenNotShowing="Eliberează din memorie imaginea când nu este afișată"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="Изображение"
|
|||
File="Файл изображения"
|
||||
UnloadWhenNotShowing="Выгружать изображения, которые не показываются"
|
||||
|
||||
SlideShow="Слайдшоу"
|
||||
SlideShow.TransitionSpeed="Скорость перехода (миллисекунды)"
|
||||
SlideShow.SlideTime="Время между слайдами (миллисекунды)"
|
||||
SlideShow.Files="Файлы изображений"
|
||||
SlideShow.Randomize="Случайное воспроизведение"
|
||||
SlideShow.Transition="Переход"
|
||||
SlideShow.Transition.Cut="Обрезать"
|
||||
SlideShow.Transition.Fade="Затухание"
|
||||
SlideShow.Transition.Swipe="Перемещение"
|
||||
SlideShow.Transition.Slide="Сдвиг"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@ ImageInput="Obrázok"
|
|||
File="Súbor s obrázkom"
|
||||
UnloadWhenNotShowing="Uvoľniť obrázok, ak nie je zobrazený"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@ ImageInput="Slika"
|
|||
File="Slikovna datoteka"
|
||||
UnloadWhenNotShowing="Ne naloži slike, ko ni prikazana"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="Slika"
|
|||
File="Datoteka slike"
|
||||
UnloadWhenNotShowing="Ukloni sliku iz memorije kada se ne prikazuje"
|
||||
|
||||
SlideShow="Prikazivanje slajdova"
|
||||
SlideShow.TransitionSpeed="Brzina prelaza (milisekunde)"
|
||||
SlideShow.SlideTime="Vreme između slajdova (milisekunde)"
|
||||
SlideShow.Files="Datoteke slika"
|
||||
SlideShow.Randomize="Nasumična reprodukcija"
|
||||
SlideShow.Transition="Prelaz"
|
||||
SlideShow.Transition.Cut="Isecanje"
|
||||
SlideShow.Transition.Fade="Zatamnjenje"
|
||||
SlideShow.Transition.Swipe="Prevlačenje"
|
||||
SlideShow.Transition.Slide="Klizanje"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="Слика"
|
|||
File="Датотека слике"
|
||||
UnloadWhenNotShowing="Уклони слику из меморије када се не приказује"
|
||||
|
||||
SlideShow="Приказивање слајдова"
|
||||
SlideShow.TransitionSpeed="Брзина прелаза (милисекунде)"
|
||||
SlideShow.SlideTime="Време између слајдова (милисекунде)"
|
||||
SlideShow.Files="Датотеке слика"
|
||||
SlideShow.Randomize="Насумична репродукција"
|
||||
SlideShow.Transition="Прелаз"
|
||||
SlideShow.Transition.Cut="Исецање"
|
||||
SlideShow.Transition.Fade="Затамњење"
|
||||
SlideShow.Transition.Swipe="Превлачење"
|
||||
SlideShow.Transition.Slide="Клизање"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="Bild"
|
|||
File="Bildfil"
|
||||
UnloadWhenNotShowing="Ta bort bild när den inte visas"
|
||||
|
||||
SlideShow="Bildspel"
|
||||
SlideShow.TransitionSpeed="Övergångshastighet (millisekunder)"
|
||||
SlideShow.SlideTime="Tid mellan bilder (millisekunder)"
|
||||
SlideShow.Files="Bildfiler"
|
||||
SlideShow.Randomize="Slumpa uppspelning"
|
||||
SlideShow.Transition="Övergång"
|
||||
SlideShow.Transition.Cut="Klipp"
|
||||
SlideShow.Transition.Fade="Tona"
|
||||
SlideShow.Transition.Swipe="Svep"
|
||||
SlideShow.Transition.Slide="Glid"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
ImageInput="รูปภาพ"
|
||||
File="ไฟล์รูปภาพ"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@ ImageInput="Görüntü"
|
|||
File="Görüntü Dosyası"
|
||||
UnloadWhenNotShowing="Resim gösterilmediğinde bellekten kaldır"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="图像"
|
|||
File="图像文件"
|
||||
UnloadWhenNotShowing="当不显示时卸载图像"
|
||||
|
||||
SlideShow="图像幻灯片放映"
|
||||
SlideShow.TransitionSpeed="过渡速度(毫秒)"
|
||||
SlideShow.SlideTime="幻灯片之间时间(毫秒)"
|
||||
SlideShow.Files="图像文件"
|
||||
SlideShow.Randomize="随机播放"
|
||||
SlideShow.Transition="转换"
|
||||
SlideShow.Transition.Cut="剪切"
|
||||
SlideShow.Transition.Fade="淡出"
|
||||
SlideShow.Transition.Swipe="滑动"
|
||||
SlideShow.Transition.Slide="幻灯片"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,3 +2,14 @@ ImageInput="圖片"
|
|||
File="圖片檔案"
|
||||
UnloadWhenNotShowing="當不顯示圖片時卸載"
|
||||
|
||||
SlideShow="投影片放映"
|
||||
SlideShow.TransitionSpeed="變更速度 (毫秒)"
|
||||
SlideShow.SlideTime="圖片間隔 (毫秒)"
|
||||
SlideShow.Files="圖片檔案"
|
||||
SlideShow.Randomize="隨機播放"
|
||||
SlideShow.Transition="變更特效"
|
||||
SlideShow.Transition.Cut="直接變更"
|
||||
SlideShow.Transition.Fade="淡入淡出"
|
||||
SlideShow.Transition.Swipe="滑出"
|
||||
SlideShow.Transition.Slide="推出"
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ struct image_source {
|
|||
time_t file_timestamp;
|
||||
float update_time_elapsed;
|
||||
uint64_t last_time;
|
||||
bool active;
|
||||
|
||||
gs_image_file_t image;
|
||||
};
|
||||
|
|
@ -162,6 +163,31 @@ static void image_source_tick(void *data, float seconds)
|
|||
struct image_source *context = data;
|
||||
uint64_t frame_time = obs_get_video_frame_time();
|
||||
|
||||
if (obs_source_active(context->source)) {
|
||||
if (!context->active) {
|
||||
if (context->image.is_animated_gif)
|
||||
context->last_time = frame_time;
|
||||
context->active = true;
|
||||
}
|
||||
|
||||
} else {
|
||||
if (context->active) {
|
||||
if (context->image.is_animated_gif) {
|
||||
context->image.cur_frame = 0;
|
||||
context->image.cur_loop = 0;
|
||||
context->image.cur_time = 0;
|
||||
|
||||
obs_enter_graphics();
|
||||
gs_image_file_update_texture(&context->image);
|
||||
obs_leave_graphics();
|
||||
}
|
||||
|
||||
context->active = false;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (context->last_time && context->image.is_animated_gif) {
|
||||
uint64_t elapsed = frame_time - context->last_time;
|
||||
bool updated = gs_image_file_tick(&context->image, elapsed);
|
||||
|
|
@ -175,8 +201,6 @@ static void image_source_tick(void *data, float seconds)
|
|||
|
||||
context->last_time = frame_time;
|
||||
|
||||
if (!obs_source_showing(context->source)) return;
|
||||
|
||||
context->update_time_elapsed += seconds;
|
||||
|
||||
if (context->update_time_elapsed >= 1.0f) {
|
||||
|
|
@ -246,8 +270,11 @@ static struct obs_source_info image_source_info = {
|
|||
OBS_DECLARE_MODULE()
|
||||
OBS_MODULE_USE_DEFAULT_LOCALE("image-source", "en-US")
|
||||
|
||||
extern struct obs_source_info slideshow_info;
|
||||
|
||||
bool obs_module_load(void)
|
||||
{
|
||||
obs_register_source(&image_source_info);
|
||||
obs_register_source(&slideshow_info);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
528
plugins/image-source/obs-slideshow.c
Normal file
528
plugins/image-source/obs-slideshow.c
Normal file
|
|
@ -0,0 +1,528 @@
|
|||
#include <obs-module.h>
|
||||
#include <util/threading.h>
|
||||
#include <util/platform.h>
|
||||
#include <util/darray.h>
|
||||
#include <util/dstr.h>
|
||||
|
||||
#define do_log(level, format, ...) \
|
||||
blog(level, "[slideshow: '%s'] " format, \
|
||||
obs_source_get_name(ss->source), ##__VA_ARGS__)
|
||||
|
||||
#define warn(format, ...) do_log(LOG_WARNING, format, ##__VA_ARGS__)
|
||||
|
||||
#define S_TR_SPEED "transition_speed"
|
||||
#define S_SLIDE_TIME "slide_time"
|
||||
#define S_TRANSITION "transition"
|
||||
#define S_RANDOMIZE "randomize"
|
||||
#define S_FILES "files"
|
||||
|
||||
#define TR_CUT "cut"
|
||||
#define TR_FADE "fade"
|
||||
#define TR_SWIPE "swipe"
|
||||
#define TR_SLIDE "slide"
|
||||
|
||||
#define T_(text) obs_module_text("SlideShow." text)
|
||||
#define T_TR_SPEED T_("TransitionSpeed")
|
||||
#define T_SLIDE_TIME T_("SlideTime")
|
||||
#define T_TRANSITION T_("Transition")
|
||||
#define T_RANDOMIZE T_("Randomize")
|
||||
#define T_FILES T_("Files")
|
||||
|
||||
#define T_TR_(text) obs_module_text("SlideShow.Transition." text)
|
||||
#define T_TR_CUT T_TR_("Cut")
|
||||
#define T_TR_FADE T_TR_("Fade")
|
||||
#define T_TR_SWIPE T_TR_("Swipe")
|
||||
#define T_TR_SLIDE T_TR_("Slide")
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
struct image_file_data {
|
||||
char *path;
|
||||
obs_source_t *source;
|
||||
};
|
||||
|
||||
struct slideshow {
|
||||
obs_source_t *source;
|
||||
|
||||
bool randomize;
|
||||
float slide_time;
|
||||
uint32_t tr_speed;
|
||||
const char *tr_name;
|
||||
obs_source_t *transition;
|
||||
|
||||
float elapsed;
|
||||
size_t cur_item;
|
||||
|
||||
uint32_t cx;
|
||||
uint32_t cy;
|
||||
|
||||
pthread_mutex_t mutex;
|
||||
DARRAY(struct image_file_data) files;
|
||||
};
|
||||
|
||||
static obs_source_t *get_transition(struct slideshow *ss)
|
||||
{
|
||||
obs_source_t *tr;
|
||||
|
||||
pthread_mutex_lock(&ss->mutex);
|
||||
tr = ss->transition;
|
||||
obs_source_addref(tr);
|
||||
pthread_mutex_unlock(&ss->mutex);
|
||||
|
||||
return tr;
|
||||
}
|
||||
|
||||
static obs_source_t *get_source(struct darray *array, const char *path)
|
||||
{
|
||||
DARRAY(struct image_file_data) files;
|
||||
obs_source_t *source = NULL;
|
||||
|
||||
files.da = *array;
|
||||
|
||||
for (size_t i = 0; i < files.num; i++) {
|
||||
const char *cur_path = files.array[i].path;
|
||||
|
||||
if (strcmp(path, cur_path) == 0) {
|
||||
source = files.array[i].source;
|
||||
obs_source_addref(source);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return source;
|
||||
}
|
||||
|
||||
static obs_source_t *create_source_from_file(const char *file)
|
||||
{
|
||||
obs_data_t *settings = obs_data_create();
|
||||
obs_source_t *source;
|
||||
|
||||
obs_data_set_string(settings, "file", file);
|
||||
obs_data_set_bool(settings, "unload", false);
|
||||
source = obs_source_create_private("image_source", NULL, settings);
|
||||
|
||||
obs_data_release(settings);
|
||||
return source;
|
||||
}
|
||||
|
||||
static void free_files(struct darray *array)
|
||||
{
|
||||
DARRAY(struct image_file_data) files;
|
||||
files.da = *array;
|
||||
|
||||
for (size_t i = 0; i < files.num; i++) {
|
||||
bfree(files.array[i].path);
|
||||
obs_source_release(files.array[i].source);
|
||||
}
|
||||
|
||||
da_free(files);
|
||||
}
|
||||
|
||||
static inline size_t random_file(struct slideshow *ss)
|
||||
{
|
||||
return (size_t)rand() % ss->files.num;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
static const char *ss_getname(void *unused)
|
||||
{
|
||||
UNUSED_PARAMETER(unused);
|
||||
return obs_module_text("SlideShow");
|
||||
}
|
||||
|
||||
static void add_file(struct slideshow *ss, struct darray *array,
|
||||
const char *path, uint32_t *cx, uint32_t *cy)
|
||||
{
|
||||
DARRAY(struct image_file_data) new_files;
|
||||
struct image_file_data data;
|
||||
obs_source_t *new_source;
|
||||
|
||||
new_files.da = *array;
|
||||
|
||||
pthread_mutex_lock(&ss->mutex);
|
||||
new_source = get_source(&ss->files.da, path);
|
||||
pthread_mutex_unlock(&ss->mutex);
|
||||
|
||||
if (!new_source)
|
||||
new_source = get_source(&new_files.da, path);
|
||||
if (!new_source)
|
||||
new_source = create_source_from_file(path);
|
||||
|
||||
if (new_source) {
|
||||
uint32_t new_cx = obs_source_get_width(new_source);
|
||||
uint32_t new_cy = obs_source_get_height(new_source);
|
||||
|
||||
data.path = bstrdup(path);
|
||||
data.source = new_source;
|
||||
da_push_back(new_files, &data);
|
||||
|
||||
if (new_cx > *cx) *cx = new_cx;
|
||||
if (new_cy > *cy) *cy = new_cy;
|
||||
}
|
||||
|
||||
*array = new_files.da;
|
||||
}
|
||||
|
||||
static bool valid_extension(const char *ext)
|
||||
{
|
||||
if (!ext)
|
||||
return false;
|
||||
return astrcmpi(ext, ".bmp") == 0 ||
|
||||
astrcmpi(ext, ".tga") == 0 ||
|
||||
astrcmpi(ext, ".png") == 0 ||
|
||||
astrcmpi(ext, ".jpeg") == 0 ||
|
||||
astrcmpi(ext, ".jpg") == 0 ||
|
||||
astrcmpi(ext, ".gif") == 0;
|
||||
}
|
||||
|
||||
static void ss_update(void *data, obs_data_t *settings)
|
||||
{
|
||||
DARRAY(struct image_file_data) new_files;
|
||||
DARRAY(struct image_file_data) old_files;
|
||||
obs_source_t *new_tr = NULL;
|
||||
obs_source_t *old_tr = NULL;
|
||||
struct slideshow *ss = data;
|
||||
obs_data_array_t *array;
|
||||
const char *tr_name;
|
||||
uint32_t new_duration;
|
||||
uint32_t new_speed;
|
||||
uint32_t cx = 0;
|
||||
uint32_t cy = 0;
|
||||
size_t count;
|
||||
|
||||
/* ------------------------------------- */
|
||||
/* get settings data */
|
||||
|
||||
da_init(new_files);
|
||||
|
||||
tr_name = obs_data_get_string(settings, S_TRANSITION);
|
||||
if (astrcmpi(tr_name, TR_CUT) == 0)
|
||||
tr_name = "cut_transition";
|
||||
else if (astrcmpi(tr_name, TR_SWIPE) == 0)
|
||||
tr_name = "swipe_transition";
|
||||
else if (astrcmpi(tr_name, TR_SLIDE) == 0)
|
||||
tr_name = "slide_transition";
|
||||
else
|
||||
tr_name = "fade_transition";
|
||||
|
||||
ss->randomize = obs_data_get_bool(settings, S_RANDOMIZE);
|
||||
|
||||
if (!ss->tr_name || strcmp(tr_name, ss->tr_name) != 0)
|
||||
new_tr = obs_source_create_private(tr_name, NULL, NULL);
|
||||
|
||||
new_duration = (uint32_t)obs_data_get_int(settings, S_SLIDE_TIME);
|
||||
new_speed = (uint32_t)obs_data_get_int(settings, S_TR_SPEED);
|
||||
|
||||
array = obs_data_get_array(settings, S_FILES);
|
||||
count = obs_data_array_count(array);
|
||||
|
||||
/* ------------------------------------- */
|
||||
/* create new list of sources */
|
||||
|
||||
for (size_t i = 0; i < count; i++) {
|
||||
obs_data_t *item = obs_data_array_item(array, i);
|
||||
const char *path = obs_data_get_string(item, "value");
|
||||
os_dir_t *dir = os_opendir(path);
|
||||
|
||||
if (dir) {
|
||||
struct dstr dir_path = {0};
|
||||
struct os_dirent *ent;
|
||||
|
||||
for (;;) {
|
||||
const char *ext;
|
||||
|
||||
ent = os_readdir(dir);
|
||||
if (!ent)
|
||||
break;
|
||||
if (ent->directory)
|
||||
continue;
|
||||
|
||||
ext = os_get_path_extension(ent->d_name);
|
||||
if (!valid_extension(ext))
|
||||
continue;
|
||||
|
||||
dstr_copy(&dir_path, path);
|
||||
dstr_cat_ch(&dir_path, '/');
|
||||
dstr_cat(&dir_path, ent->d_name);
|
||||
add_file(ss, &new_files.da, dir_path.array,
|
||||
&cx, &cy);
|
||||
}
|
||||
|
||||
dstr_free(&dir_path);
|
||||
os_closedir(dir);
|
||||
} else {
|
||||
add_file(ss, &new_files.da, path, &cx, &cy);
|
||||
}
|
||||
|
||||
obs_data_release(item);
|
||||
}
|
||||
|
||||
/* ------------------------------------- */
|
||||
/* update settings data */
|
||||
|
||||
pthread_mutex_lock(&ss->mutex);
|
||||
|
||||
old_files.da = ss->files.da;
|
||||
ss->files.da = new_files.da;
|
||||
if (new_tr) {
|
||||
old_tr = ss->transition;
|
||||
ss->transition = new_tr;
|
||||
}
|
||||
|
||||
if (new_duration < 50)
|
||||
new_duration = 50;
|
||||
if (new_speed > (new_duration - 50))
|
||||
new_speed = new_duration - 50;
|
||||
|
||||
ss->tr_speed = new_speed;
|
||||
ss->tr_name = tr_name;
|
||||
ss->slide_time = (float)new_duration / 1000.0f;
|
||||
|
||||
pthread_mutex_unlock(&ss->mutex);
|
||||
|
||||
/* ------------------------------------- */
|
||||
/* clean up and restart transition */
|
||||
|
||||
if (old_tr)
|
||||
obs_source_release(old_tr);
|
||||
free_files(&old_files.da);
|
||||
|
||||
ss->cx = cx;
|
||||
ss->cy = cy;
|
||||
ss->cur_item = 0;
|
||||
ss->elapsed = 0.0f;
|
||||
obs_transition_set_size(ss->transition, cx, cy);
|
||||
obs_transition_set_alignment(ss->transition, OBS_ALIGN_CENTER);
|
||||
obs_transition_set_scale_type(ss->transition,
|
||||
OBS_TRANSITION_SCALE_ASPECT);
|
||||
|
||||
if (ss->randomize && ss->files.num)
|
||||
ss->cur_item = random_file(ss);
|
||||
if (new_tr)
|
||||
obs_source_add_active_child(ss->source, new_tr);
|
||||
if (ss->files.num)
|
||||
obs_transition_start(ss->transition, OBS_TRANSITION_MODE_AUTO,
|
||||
ss->tr_speed,
|
||||
ss->files.array[ss->cur_item].source);
|
||||
|
||||
obs_data_array_release(array);
|
||||
}
|
||||
|
||||
static void ss_destroy(void *data)
|
||||
{
|
||||
struct slideshow *ss = data;
|
||||
|
||||
obs_source_release(ss->transition);
|
||||
free_files(&ss->files.da);
|
||||
pthread_mutex_destroy(&ss->mutex);
|
||||
bfree(ss);
|
||||
}
|
||||
|
||||
static void *ss_create(obs_data_t *settings, obs_source_t *source)
|
||||
{
|
||||
struct slideshow *ss = bzalloc(sizeof(*ss));
|
||||
ss->source = source;
|
||||
|
||||
pthread_mutex_init_value(&ss->mutex);
|
||||
if (pthread_mutex_init(&ss->mutex, NULL) != 0)
|
||||
goto error;
|
||||
|
||||
obs_source_update(source, NULL);
|
||||
|
||||
UNUSED_PARAMETER(settings);
|
||||
return ss;
|
||||
|
||||
error:
|
||||
ss_destroy(ss);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void ss_video_render(void *data, gs_effect_t *effect)
|
||||
{
|
||||
struct slideshow *ss = data;
|
||||
obs_source_t *transition = get_transition(ss);
|
||||
|
||||
if (transition) {
|
||||
obs_source_video_render(transition);
|
||||
obs_source_release(transition);
|
||||
}
|
||||
|
||||
UNUSED_PARAMETER(effect);
|
||||
}
|
||||
|
||||
static void ss_video_tick(void *data, float seconds)
|
||||
{
|
||||
struct slideshow *ss = data;
|
||||
|
||||
if (!ss->transition || !ss->slide_time)
|
||||
return;
|
||||
|
||||
ss->elapsed += seconds;
|
||||
if (ss->elapsed > ss->slide_time) {
|
||||
ss->elapsed -= ss->slide_time;
|
||||
|
||||
if (ss->randomize) {
|
||||
size_t next = ss->cur_item;
|
||||
if (ss->files.num > 1) {
|
||||
while (next == ss->cur_item)
|
||||
next = random_file(ss);
|
||||
}
|
||||
ss->cur_item = next;
|
||||
|
||||
} else if (++ss->cur_item >= ss->files.num) {
|
||||
ss->cur_item = 0;
|
||||
}
|
||||
|
||||
if (ss->files.num)
|
||||
obs_transition_start(ss->transition,
|
||||
OBS_TRANSITION_MODE_AUTO, ss->tr_speed,
|
||||
ss->files.array[ss->cur_item].source);
|
||||
}
|
||||
}
|
||||
|
||||
static inline bool ss_audio_render_(obs_source_t *transition, uint64_t *ts_out,
|
||||
struct obs_source_audio_mix *audio_output,
|
||||
uint32_t mixers, size_t channels, size_t sample_rate)
|
||||
{
|
||||
struct obs_source_audio_mix child_audio;
|
||||
uint64_t source_ts;
|
||||
|
||||
if (obs_source_audio_pending(transition))
|
||||
return false;
|
||||
|
||||
source_ts = obs_source_get_audio_timestamp(transition);
|
||||
if (!source_ts)
|
||||
return false;
|
||||
|
||||
obs_source_get_audio_mix(transition, &child_audio);
|
||||
for (size_t mix = 0; mix < MAX_AUDIO_MIXES; mix++) {
|
||||
if ((mixers & (1 << mix)) == 0)
|
||||
continue;
|
||||
|
||||
for (size_t ch = 0; ch < channels; ch++) {
|
||||
float *out = audio_output->output[mix].data[ch];
|
||||
float *in = child_audio.output[mix].data[ch];
|
||||
|
||||
memcpy(out, in, AUDIO_OUTPUT_FRAMES *
|
||||
MAX_AUDIO_CHANNELS * sizeof(float));
|
||||
}
|
||||
}
|
||||
|
||||
*ts_out = source_ts;
|
||||
|
||||
UNUSED_PARAMETER(sample_rate);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool ss_audio_render(void *data, uint64_t *ts_out,
|
||||
struct obs_source_audio_mix *audio_output,
|
||||
uint32_t mixers, size_t channels, size_t sample_rate)
|
||||
{
|
||||
struct slideshow *ss = data;
|
||||
obs_source_t *transition = get_transition(ss);
|
||||
bool success;
|
||||
|
||||
if (!transition)
|
||||
return false;
|
||||
|
||||
success = ss_audio_render_(transition, ts_out, audio_output, mixers,
|
||||
channels, sample_rate);
|
||||
|
||||
obs_source_release(transition);
|
||||
return success;
|
||||
}
|
||||
|
||||
static void ss_enum_sources(void *data, obs_source_enum_proc_t cb, void *param)
|
||||
{
|
||||
struct slideshow *ss = data;
|
||||
|
||||
pthread_mutex_lock(&ss->mutex);
|
||||
if (ss->transition)
|
||||
cb(ss->source, ss->transition, param);
|
||||
pthread_mutex_unlock(&ss->mutex);
|
||||
}
|
||||
|
||||
static uint32_t ss_width(void *data)
|
||||
{
|
||||
struct slideshow *ss = data;
|
||||
return ss->transition ? ss->cx : 0;
|
||||
}
|
||||
|
||||
static uint32_t ss_height(void *data)
|
||||
{
|
||||
struct slideshow *ss = data;
|
||||
return ss->transition ? ss->cy : 0;
|
||||
}
|
||||
|
||||
static void ss_defaults(obs_data_t *settings)
|
||||
{
|
||||
obs_data_set_default_string(settings, S_TRANSITION, "fade");
|
||||
obs_data_set_default_int(settings, S_SLIDE_TIME, 8000);
|
||||
obs_data_set_default_int(settings, S_TR_SPEED, 700);
|
||||
}
|
||||
|
||||
static const char *file_filter =
|
||||
"Image files (*.bmp *.tga *.png *.jpeg *.jpg *.gif)";
|
||||
|
||||
static obs_properties_t *ss_properties(void *data)
|
||||
{
|
||||
obs_properties_t *ppts = obs_properties_create();
|
||||
struct slideshow *ss = data;
|
||||
struct dstr path = {0};
|
||||
obs_property_t *p;
|
||||
|
||||
p = obs_properties_add_list(ppts, S_TRANSITION, T_TRANSITION,
|
||||
OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);
|
||||
obs_property_list_add_string(p, T_TR_CUT, TR_CUT);
|
||||
obs_property_list_add_string(p, T_TR_FADE, TR_FADE);
|
||||
obs_property_list_add_string(p, T_TR_SWIPE, TR_SWIPE);
|
||||
obs_property_list_add_string(p, T_TR_SLIDE, TR_SLIDE);
|
||||
|
||||
obs_properties_add_int(ppts, S_SLIDE_TIME, T_SLIDE_TIME,
|
||||
50, 3600000, 50);
|
||||
obs_properties_add_int(ppts, S_TR_SPEED, T_TR_SPEED,
|
||||
0, 3600000, 50);
|
||||
obs_properties_add_bool(ppts, S_RANDOMIZE, T_RANDOMIZE);
|
||||
|
||||
if (ss) {
|
||||
pthread_mutex_lock(&ss->mutex);
|
||||
if (ss->files.num) {
|
||||
struct image_file_data *last = da_end(ss->files);
|
||||
const char *slash;
|
||||
|
||||
dstr_copy(&path, last->path);
|
||||
dstr_replace(&path, "\\", "/");
|
||||
slash = strrchr(path.array, '/');
|
||||
if (slash)
|
||||
dstr_resize(&path, slash - path.array + 1);
|
||||
}
|
||||
pthread_mutex_unlock(&ss->mutex);
|
||||
}
|
||||
|
||||
obs_properties_add_editable_list(ppts, S_FILES, T_FILES,
|
||||
OBS_EDITABLE_LIST_TYPE_FILES, file_filter, path.array);
|
||||
dstr_free(&path);
|
||||
|
||||
return ppts;
|
||||
}
|
||||
|
||||
struct obs_source_info slideshow_info = {
|
||||
.id = "slideshow",
|
||||
.type = OBS_SOURCE_TYPE_INPUT,
|
||||
.output_flags = OBS_SOURCE_VIDEO |
|
||||
OBS_SOURCE_CUSTOM_DRAW |
|
||||
OBS_SOURCE_COMPOSITE,
|
||||
.get_name = ss_getname,
|
||||
.create = ss_create,
|
||||
.destroy = ss_destroy,
|
||||
.update = ss_update,
|
||||
.video_render = ss_video_render,
|
||||
.video_tick = ss_video_tick,
|
||||
.audio_render = ss_audio_render,
|
||||
.enum_active_sources = ss_enum_sources,
|
||||
.get_width = ss_width,
|
||||
.get_height = ss_height,
|
||||
.get_defaults = ss_defaults,
|
||||
.get_properties = ss_properties
|
||||
};
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
AlsaInput="Zaznamenávací zařízení zvuku (ALSA)"
|
||||
AlsaInput="Zařízení pro záznam zvuku (ALSA)"
|
||||
Device="Zařízení"
|
||||
|
||||
|
|
|
|||
3
plugins/linux-alsa/data/locale/he-IL.ini
Normal file
3
plugins/linux-alsa/data/locale/he-IL.ini
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
AlsaInput="התקן לכידת שמע (ALSA)"
|
||||
Device="התקן"
|
||||
|
||||
3
plugins/linux-alsa/data/locale/it-IT.ini
Normal file
3
plugins/linux-alsa/data/locale/it-IT.ini
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
AlsaInput="Dispositivo di acquisizione audio (ALSA)"
|
||||
Device="Dispositivo"
|
||||
|
||||
3
plugins/linux-alsa/data/locale/nb-NO.ini
Normal file
3
plugins/linux-alsa/data/locale/nb-NO.ini
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
AlsaInput="Lydopptaksenhet (ALSA)"
|
||||
Device="Enhet"
|
||||
|
||||
3
plugins/linux-alsa/data/locale/pt-PT.ini
Normal file
3
plugins/linux-alsa/data/locale/pt-PT.ini
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
AlsaInput="Dispositivo de captura de áudio (ALSA)"
|
||||
Device="Dispositivo"
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
X11SharedMemoryScreenInput="التقاط الشاشة (XSHM)"
|
||||
Screen="الشاشة"
|
||||
CaptureCursor="مؤشر الالتقاط"
|
||||
CaptureCursor="التقاط المؤشر"
|
||||
AdvancedSettings="إعدادات متقدمة"
|
||||
XServer="X Server"
|
||||
XCCapture="التقاط النافذة (Xcomposite)"
|
||||
|
|
@ -11,4 +11,5 @@ CropRight="الاقتطاع من اليمين (بكسل)"
|
|||
CropBottom="الاقتطاع من الأسفل (بكسل)"
|
||||
SwapRedBlue="مبادلة بين الأحمر و الأزرق"
|
||||
LockX="قفل السيرفر X عند الالتقاط"
|
||||
IncludeXBorder="تضمين حواف X"
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ Screen="Kuvaruutu"
|
|||
CaptureCursor="Kaappaa kursori"
|
||||
AdvancedSettings="Lisäasetukset"
|
||||
XServer="X Server"
|
||||
XCCapture="Ikkunakaappaus (Xcomposite)"
|
||||
XCCapture="Ikkuna (Xcomposite)"
|
||||
Window="Ikkuna"
|
||||
CropTop="Rajaa ylhäältä (pikselit)"
|
||||
CropLeft="Rajaa vasemmalta (pikselit)"
|
||||
|
|
|
|||
|
|
@ -12,4 +12,5 @@ CropBottom="חיתוך תחתון (פיקסלים)"
|
|||
SwapRedBlue="החלף אדום וכחול"
|
||||
LockX="נעל שרת X בעת לכידה"
|
||||
IncludeXBorder="כלול קצה שרת X"
|
||||
ExcludeAlpha="השתמש בתבנית מרקם ללא אלפא (עקיפת בעיית Mesa)"
|
||||
|
||||
|
|
|
|||
|
|
@ -12,4 +12,5 @@ CropBottom="Crop Inferiore (pixels)"
|
|||
SwapRedBlue="Inverti rosso e blu"
|
||||
LockX="Blocca l' X Server durante l'acquisizione"
|
||||
IncludeXBorder="Includi X bordi"
|
||||
ExcludeAlpha="Usa formato texture alfa-less (soluzione di Mesa)"
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ CropLeft="Beskjær venstre (piksler)"
|
|||
CropRight="Beskjær høyre (piksler)"
|
||||
CropBottom="Beskjær bunnen (piksler)"
|
||||
SwapRedBlue="Bytt rød og blå"
|
||||
LockX="Lås X-server under opptak"
|
||||
LockX="Lås X-tjener under opptak"
|
||||
IncludeXBorder="Inkludér X11-rammen"
|
||||
ExcludeAlpha="Bruk teksturformat uten alfakanal (Mesa løsning)"
|
||||
|
||||
|
|
|
|||
|
|
@ -12,4 +12,5 @@ CropBottom="Cortar em baixo (píxeis)"
|
|||
SwapRedBlue="Trocar vermelho e azul"
|
||||
LockX="Bloquear X Server durante a captura"
|
||||
IncludeXBorder="Incluir X Border"
|
||||
ExcludeAlpha="Uso da textura Formato de alfa-menos (solução de Mesa)"
|
||||
|
||||
|
|
|
|||
|
|
@ -12,4 +12,5 @@ CropBottom="剪裁底部(px)"
|
|||
SwapRedBlue="交換紅藍顏色"
|
||||
LockX="截取時鎖定 X server"
|
||||
IncludeXBorder="包含X邊框"
|
||||
ExcludeAlpha="使用不帶有alpha值的材質格式 (Mesa暫時解決方案)"
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#include <pthread.h>
|
||||
|
||||
#include <obs-module.h>
|
||||
#include <util/platform.h>
|
||||
|
||||
#include "xcompcap-helper.hpp"
|
||||
|
||||
|
|
@ -171,9 +172,9 @@ namespace XCompcap
|
|||
return XScreenNumberOfScreen(attr.screen);
|
||||
}
|
||||
|
||||
std::string getWindowName(Window win)
|
||||
std::string getWindowAtom(Window win, const char *atom)
|
||||
{
|
||||
Atom netWmName = XInternAtom(disp(), "_NET_WM_NAME", false);
|
||||
Atom netWmName = XInternAtom(disp(), atom, false);
|
||||
int n;
|
||||
char **list = 0;
|
||||
XTextProperty tp;
|
||||
|
|
@ -199,6 +200,11 @@ namespace XCompcap
|
|||
}
|
||||
}
|
||||
|
||||
char *conv = nullptr;
|
||||
if (os_mbs_to_utf8_ptr(res.c_str(), 0, &conv))
|
||||
res = conv;
|
||||
bfree(conv);
|
||||
|
||||
XFree(tp.value);
|
||||
|
||||
return res;
|
||||
|
|
@ -409,6 +415,39 @@ void XErrorLock::resetError()
|
|||
curErrorText[0] = 0;
|
||||
}
|
||||
|
||||
XDisplayLock::XDisplayLock()
|
||||
{
|
||||
islock = false;
|
||||
lock();
|
||||
}
|
||||
|
||||
XDisplayLock::~XDisplayLock()
|
||||
{
|
||||
unlock();
|
||||
}
|
||||
|
||||
bool XDisplayLock::isLocked()
|
||||
{
|
||||
return islock;
|
||||
}
|
||||
|
||||
void XDisplayLock::lock()
|
||||
{
|
||||
if (!islock) {
|
||||
XLockDisplay(XCompcap::disp());
|
||||
islock = true;
|
||||
}
|
||||
}
|
||||
|
||||
void XDisplayLock::unlock()
|
||||
{
|
||||
if (islock) {
|
||||
XSync(XCompcap::disp(), 0);
|
||||
XUnlockDisplay(XCompcap::disp());
|
||||
islock = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ObsGsContextHolder::ObsGsContextHolder()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -48,6 +48,23 @@ class XErrorLock
|
|||
void resetError();
|
||||
};
|
||||
|
||||
class XDisplayLock
|
||||
{
|
||||
bool islock;
|
||||
|
||||
public:
|
||||
XDisplayLock(const XDisplayLock&) = delete;
|
||||
XDisplayLock& operator=(const XDisplayLock&) = delete;
|
||||
|
||||
XDisplayLock();
|
||||
~XDisplayLock();
|
||||
|
||||
bool isLocked();
|
||||
|
||||
void unlock();
|
||||
void lock();
|
||||
};
|
||||
|
||||
class ObsGsContextHolder
|
||||
{
|
||||
public:
|
||||
|
|
@ -65,12 +82,22 @@ namespace XCompcap
|
|||
|
||||
std::string getWindowCommand(Window win);
|
||||
int getRootWindowScreen(Window root);
|
||||
std::string getWindowName(Window win);
|
||||
std::string getWindowAtom(Window win, const char *atom);
|
||||
int getWindowPid(Window win);
|
||||
bool ewmhIsSupported();
|
||||
std::list<Window> getTopLevelWindows();
|
||||
std::list<Window> getAllWindows();
|
||||
|
||||
inline std::string getWindowName(Window win)
|
||||
{
|
||||
return getWindowAtom(win, "_NET_WM_NAME");
|
||||
}
|
||||
|
||||
inline std::string getWindowClass(Window win)
|
||||
{
|
||||
return getWindowAtom(win, "WM_CLASS");
|
||||
}
|
||||
|
||||
void processEvents();
|
||||
bool windowWasReconfigured(Window win);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,11 +57,11 @@ obs_properties_t *XCompcapMain::properties()
|
|||
|
||||
for (Window win: XCompcap::getTopLevelWindows()) {
|
||||
std::string wname = XCompcap::getWindowName(win);
|
||||
std::string progpath = XCompcap::getWindowCommand(win);
|
||||
std::string cls = XCompcap::getWindowClass(win);
|
||||
std::string winid = std::to_string((long long)win);
|
||||
std::string desc =
|
||||
(winid + WIN_STRING_DIV + wname +
|
||||
WIN_STRING_DIV + progpath);
|
||||
WIN_STRING_DIV + cls);
|
||||
|
||||
obs_property_list_add_string(wins, wname.c_str(),
|
||||
desc.c_str());
|
||||
|
|
@ -106,6 +106,7 @@ void XCompcapMain::defaults(obs_data_t *settings)
|
|||
obs_data_set_default_bool(settings, "exclude_alpha", false);
|
||||
}
|
||||
|
||||
#define FIND_WINDOW_INTERVAL 2.0
|
||||
|
||||
struct XCompcapMain_private
|
||||
{
|
||||
|
|
@ -137,7 +138,7 @@ struct XCompcapMain_private
|
|||
obs_source_t *source;
|
||||
|
||||
std::string windowName;
|
||||
Window win;
|
||||
Window win = 0;
|
||||
int cut_top, cur_cut_top;
|
||||
int cut_left, cur_cut_left;
|
||||
int cut_right, cur_cut_right;
|
||||
|
|
@ -148,6 +149,8 @@ struct XCompcapMain_private
|
|||
bool include_border;
|
||||
bool exclude_alpha;
|
||||
|
||||
double window_check_time = 0.0;
|
||||
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
uint32_t border;
|
||||
|
|
@ -201,6 +204,8 @@ XCompcapMain::~XCompcapMain()
|
|||
|
||||
static Window getWindowFromString(std::string wstr)
|
||||
{
|
||||
XErrorLock xlock;
|
||||
|
||||
if (wstr == "") {
|
||||
return XCompcap::getTopLevelWindows().front();
|
||||
}
|
||||
|
|
@ -211,26 +216,29 @@ static Window getWindowFromString(std::string wstr)
|
|||
}
|
||||
|
||||
size_t firstMark = wstr.find(WIN_STRING_DIV);
|
||||
size_t markSize = strlen(WIN_STRING_DIV);
|
||||
|
||||
if (firstMark == std::string::npos)
|
||||
return (Window)std::stol(wstr);
|
||||
|
||||
std::string widstr = wstr.substr(0, firstMark);
|
||||
Window wid = (Window)std::stol(widstr);
|
||||
Window wid = 0;
|
||||
|
||||
wstr = wstr.substr(firstMark + strlen(WIN_STRING_DIV));
|
||||
wstr = wstr.substr(firstMark + markSize);
|
||||
|
||||
size_t lastMark = wstr.rfind(WIN_STRING_DIV);
|
||||
std::string wname = wstr.substr(0, lastMark);
|
||||
std::string wcls = wstr.substr(lastMark + markSize);
|
||||
|
||||
Window matchedNameWin = wid;
|
||||
for (Window cwin: XCompcap::getTopLevelWindows()) {
|
||||
std::string cwinname = XCompcap::getWindowName(cwin);
|
||||
std::string ccls = XCompcap::getWindowClass(cwin);
|
||||
|
||||
if (cwin == wid && wname == cwinname)
|
||||
if (cwin == wid && wname == cwinname && wcls == ccls)
|
||||
return wid;
|
||||
|
||||
if (wname == cwinname)
|
||||
if (wname == cwinname ||
|
||||
(!matchedNameWin && !wcls.empty() && wcls == ccls))
|
||||
matchedNameWin = cwin;
|
||||
}
|
||||
|
||||
|
|
@ -240,7 +248,7 @@ static Window getWindowFromString(std::string wstr)
|
|||
static void xcc_cleanup(XCompcapMain_private *p)
|
||||
{
|
||||
PLock lock(&p->lock);
|
||||
XErrorLock xlock;
|
||||
XDisplayLock xlock;
|
||||
|
||||
if (p->gltex) {
|
||||
gs_texture_destroy(p->gltex);
|
||||
|
|
@ -299,7 +307,9 @@ void XCompcapMain::updateSettings(obs_data_t *settings)
|
|||
|
||||
xlock.resetError();
|
||||
|
||||
XCompositeRedirectWindow(xdisp, p->win, CompositeRedirectAutomatic);
|
||||
if (p->win)
|
||||
XCompositeRedirectWindow(xdisp, p->win,
|
||||
CompositeRedirectAutomatic);
|
||||
|
||||
if (xlock.gotError()) {
|
||||
blog(LOG_ERROR, "XCompositeRedirectWindow failed: %s",
|
||||
|
|
@ -307,18 +317,19 @@ void XCompcapMain::updateSettings(obs_data_t *settings)
|
|||
return;
|
||||
}
|
||||
|
||||
XSelectInput(xdisp, p->win, StructureNotifyMask | ExposureMask);
|
||||
if (p->win)
|
||||
XSelectInput(xdisp, p->win, StructureNotifyMask | ExposureMask);
|
||||
XSync(xdisp, 0);
|
||||
|
||||
XWindowAttributes attr;
|
||||
if (!XGetWindowAttributes(xdisp, p->win, &attr)) {
|
||||
if (!p->win || !XGetWindowAttributes(xdisp, p->win, &attr)) {
|
||||
p->win = 0;
|
||||
p->width = 0;
|
||||
p->height = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (p->cursor && p->show_cursor) {
|
||||
if (p->win && p->cursor && p->show_cursor) {
|
||||
Window child;
|
||||
int x, y;
|
||||
|
||||
|
|
@ -451,8 +462,6 @@ void XCompcapMain::updateSettings(obs_data_t *settings)
|
|||
|
||||
void XCompcapMain::tick(float seconds)
|
||||
{
|
||||
UNUSED_PARAMETER(seconds);
|
||||
|
||||
if (!obs_source_showing(p->source))
|
||||
return;
|
||||
|
||||
|
|
@ -463,21 +472,30 @@ void XCompcapMain::tick(float seconds)
|
|||
|
||||
XCompcap::processEvents();
|
||||
|
||||
if (XCompcap::windowWasReconfigured(p->win))
|
||||
updateSettings(0);
|
||||
if (p->win && XCompcap::windowWasReconfigured(p->win)) {
|
||||
p->window_check_time = FIND_WINDOW_INTERVAL;
|
||||
p->win = 0;
|
||||
}
|
||||
|
||||
XErrorLock xlock;
|
||||
xlock.resetError();
|
||||
XDisplayLock xlock;
|
||||
XWindowAttributes attr;
|
||||
|
||||
if (!XGetWindowAttributes(xdisp, p->win, &attr)) {
|
||||
if (!p->win || !XGetWindowAttributes(xdisp, p->win, &attr)) {
|
||||
p->window_check_time += (double)seconds;
|
||||
|
||||
if (p->window_check_time < FIND_WINDOW_INTERVAL)
|
||||
return;
|
||||
|
||||
Window newWin = getWindowFromString(p->windowName);
|
||||
|
||||
if (XGetWindowAttributes(xdisp, newWin, &attr)) {
|
||||
p->window_check_time = 0.0;
|
||||
|
||||
if (newWin && XGetWindowAttributes(xdisp, newWin, &attr)) {
|
||||
p->win = newWin;
|
||||
updateSettings(0);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (!p->tex || !p->gltex)
|
||||
|
|
@ -524,11 +542,11 @@ void XCompcapMain::tick(float seconds)
|
|||
|
||||
void XCompcapMain::render(gs_effect_t *effect)
|
||||
{
|
||||
PLock lock(&p->lock, true);
|
||||
|
||||
if (!p->win)
|
||||
return;
|
||||
|
||||
PLock lock(&p->lock, true);
|
||||
|
||||
effect = obs_get_base_effect(OBS_EFFECT_OPAQUE);
|
||||
|
||||
if (!lock.isLocked() || !p->tex)
|
||||
|
|
@ -552,10 +570,16 @@ void XCompcapMain::render(gs_effect_t *effect)
|
|||
|
||||
uint32_t XCompcapMain::width()
|
||||
{
|
||||
if (!p->win)
|
||||
return 0;
|
||||
|
||||
return p->width - p->cur_cut_left - p->cur_cut_right;
|
||||
}
|
||||
|
||||
uint32_t XCompcapMain::height()
|
||||
{
|
||||
if (!p->win)
|
||||
return 0;
|
||||
|
||||
return p->height - p->cur_cut_bot - p->cur_cut_top;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,8 @@ extern "C" void xcomposite_load(void)
|
|||
|
||||
sinfo.id = "xcomposite_input";
|
||||
sinfo.output_flags = OBS_SOURCE_VIDEO |
|
||||
OBS_SOURCE_CUSTOM_DRAW;
|
||||
OBS_SOURCE_CUSTOM_DRAW |
|
||||
OBS_SOURCE_DO_NOT_DUPLICATE;
|
||||
|
||||
sinfo.get_name = xcompcap_getname;
|
||||
sinfo.create = xcompcap_create;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
StartJACKServer="Start JACK server"
|
||||
Channels="Antall kanaler"
|
||||
JACKInput="JACK innputtklient"
|
||||
JACKInput="JACK inngangsklient"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
PulseInput="Záznam vstupu zvuku (PulseAudio)"
|
||||
PulseOutput="Záznam výstupu zvuku (PulseAudio)"
|
||||
PulseInput="Záznam zvukového vstupu (PulseAudio)"
|
||||
PulseOutput="Záznam zvukového výstupu (PulseAudio)"
|
||||
Device="Zařízení"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
PulseInput="Äänen sisääntulo (PulseAudio)"
|
||||
PulseOutput="Äänen ulostulo (PulseAudio)"
|
||||
PulseInput="Äänitulo (PulseAudio)"
|
||||
PulseOutput="Äänilähtö (PulseAudio)"
|
||||
Device="Laite"
|
||||
|
||||
|
|
|
|||
|
|
@ -172,6 +172,10 @@ int_fast32_t pulse_get_source_info_list(pa_source_info_cb_t cb, void* userdata)
|
|||
|
||||
pa_operation *op = pa_context_get_source_info_list(
|
||||
pulse_context, cb, userdata);
|
||||
if (!op) {
|
||||
pulse_unlock();
|
||||
return -1;
|
||||
}
|
||||
while (pa_operation_get_state(op) == PA_OPERATION_RUNNING)
|
||||
pulse_wait();
|
||||
pa_operation_unref(op);
|
||||
|
|
@ -191,6 +195,10 @@ int_fast32_t pulse_get_source_info(pa_source_info_cb_t cb, const char *name,
|
|||
|
||||
pa_operation *op = pa_context_get_source_info_by_name(
|
||||
pulse_context, name, cb, userdata);
|
||||
if (!op) {
|
||||
pulse_unlock();
|
||||
return -1;
|
||||
}
|
||||
while (pa_operation_get_state(op) == PA_OPERATION_RUNNING)
|
||||
pulse_wait();
|
||||
pa_operation_unref(op);
|
||||
|
|
@ -209,6 +217,10 @@ int_fast32_t pulse_get_server_info(pa_server_info_cb_t cb, void* userdata)
|
|||
|
||||
pa_operation *op = pa_context_get_server_info(
|
||||
pulse_context, cb, userdata);
|
||||
if (!op) {
|
||||
pulse_unlock();
|
||||
return -1;
|
||||
}
|
||||
while (pa_operation_get_state(op) == PA_OPERATION_RUNNING)
|
||||
pulse_wait();
|
||||
pa_operation_unref(op);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
V4L2Input="جهاز التقاط الفيديو (V4L2)"
|
||||
Device="الجهاز"
|
||||
VideoFormat="تنسيق الفيديو"
|
||||
VideoStandard="معيار الفيديو"
|
||||
DVTiming="توقيت DV"
|
||||
Resolution="الأبعاد"
|
||||
FrameRate="الإطار"
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ Device="裝置"
|
|||
Input="輸入"
|
||||
VideoFormat="影像格式"
|
||||
VideoStandard="影像標準"
|
||||
DVTiming="數位視頻時序值"
|
||||
Resolution="解析度"
|
||||
FrameRate="影格率"
|
||||
LeaveUnchanged="不改變並離開"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
AVCapture="Zaznamenávací zařízení obrazu"
|
||||
AVCapture="Zařízení pro záznam obrazu"
|
||||
Device="Zařízení"
|
||||
UsePreset="Použít předvolbu"
|
||||
Preset="Předvolba"
|
||||
|
|
|
|||
|
|
@ -3,4 +3,12 @@ Device="Dispositivo"
|
|||
UsePreset="Usa il pre impostato"
|
||||
Preset="Preimpostato"
|
||||
Buffering="Usa Buffer"
|
||||
FrameRate="Frame rate"
|
||||
InputFormat="Formato di input"
|
||||
ColorSpace="Spazio colore"
|
||||
VideoRange="Gamma video"
|
||||
VideoRange.Partial="Parziale"
|
||||
VideoRange.Full="Intero"
|
||||
Auto="Autom."
|
||||
Unknown="Sconosciuto ($1)"
|
||||
|
||||
|
|
|
|||
|
|
@ -3,4 +3,12 @@ Device="Enhet"
|
|||
UsePreset="Bruk forhåndsinnstilling"
|
||||
Preset="Forhåndsinnstilling"
|
||||
Buffering="Bruk bufring"
|
||||
FrameRate="Bildefrekvens"
|
||||
InputFormat="Inngangsformat"
|
||||
ColorSpace="Fargeområde"
|
||||
VideoRange="Videoområde"
|
||||
VideoRange.Partial="Delvis"
|
||||
VideoRange.Full="Hel"
|
||||
Auto="Automatisk"
|
||||
Unknown="Ukjent (%1)"
|
||||
|
||||
|
|
|
|||
|
|
@ -3,4 +3,11 @@ Device="Dispositivo"
|
|||
UsePreset="Utilizar predefinição"
|
||||
Preset="Predefinição"
|
||||
Buffering="Utilizar Buffering"
|
||||
FrameRate="Taxa de frames (frame rate)"
|
||||
InputFormat="Formato de entrada"
|
||||
ColorSpace="Espaço de cor"
|
||||
VideoRange.Partial="Parcial"
|
||||
VideoRange.Full="Completo"
|
||||
Auto="Auto"
|
||||
Unknown="Desconhecido (%1)"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,14 @@
|
|||
AVCapture="視訊擷取裝置"
|
||||
Device="裝置"
|
||||
UsePreset="使用預設值"
|
||||
Preset="預設值"
|
||||
Buffering="使用緩衝"
|
||||
FrameRate="畫面播放速率"
|
||||
InputFormat="輸入格式"
|
||||
ColorSpace="色彩空間"
|
||||
VideoRange="色彩範圍"
|
||||
VideoRange.Partial="部分"
|
||||
VideoRange.Full="全部"
|
||||
Auto="自動"
|
||||
Unknown="未知 (%1)"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
CoreAudio.InputCapture="Äänen sisääntulon kaappaus"
|
||||
CoreAudio.OutputCapture="Äänen ulostulon kaappaus"
|
||||
CoreAudio.InputCapture="Äänitulo"
|
||||
CoreAudio.OutputCapture="Äänilähtö"
|
||||
CoreAudio.Device="Laite"
|
||||
CoreAudio.Device.Default="Oletusarvo"
|
||||
DisplayCapture="Ruudunkaappaus"
|
||||
DisplayCapture="Monitori"
|
||||
DisplayCapture.Display="Näyttö"
|
||||
DisplayCapture.ShowCursor="Näytä kursori"
|
||||
WindowCapture="Ikkunakaappaus"
|
||||
WindowCapture="Ikkuna"
|
||||
WindowCapture.ShowShadow="Näytä ikkunan varjo"
|
||||
WindowUtils.Window="Ikkuna"
|
||||
WindowUtils.ShowEmptyNames="Näytä ikkunat joilla on tyhjä nimi"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
CoreAudio.InputCapture="Audioinvoer Opname"
|
||||
CoreAudio.OutputCapture="Audiouitvoer Opname"
|
||||
CoreAudio.InputCapture="Audioinvoer Capture"
|
||||
CoreAudio.OutputCapture="Audiouitvoer Capture"
|
||||
CoreAudio.Device="Apparaat"
|
||||
CoreAudio.Device.Default="Standaardinstellingen"
|
||||
DisplayCapture="Beeldschermopname"
|
||||
DisplayCapture="Beeldschermcapture"
|
||||
DisplayCapture.Display="Beeldscherm"
|
||||
DisplayCapture.ShowCursor="Cursor Weergeven"
|
||||
WindowCapture="Venstercapture"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
CoreAudio.InputCapture="截取音效輸入"
|
||||
CoreAudio.OutputCapture="截取音效輸出"
|
||||
CoreAudio.InputCapture="擷取音效輸入"
|
||||
CoreAudio.OutputCapture="擷取音效輸出"
|
||||
CoreAudio.Device="裝置"
|
||||
CoreAudio.Device.Default="預設"
|
||||
DisplayCapture="截取螢幕輸出"
|
||||
DisplayCapture="擷取螢幕輸出"
|
||||
DisplayCapture.Display="螢幕"
|
||||
DisplayCapture.ShowCursor="顯示游標"
|
||||
WindowCapture="視窗擷取"
|
||||
|
|
@ -12,6 +12,8 @@ WindowUtils.ShowEmptyNames="顯示無標題視窗"
|
|||
CropMode="裁剪"
|
||||
CropMode.None="無"
|
||||
CropMode.Manual="手動"
|
||||
CropMode.ToWindow="到視窗"
|
||||
CropMode.ToWindowAndManual="到視窗並手動"
|
||||
Crop.origin.x="左邊界"
|
||||
Crop.origin.y="上邊界"
|
||||
Crop.size.width="右邊界"
|
||||
|
|
|
|||
13
plugins/mac-syphon/data/locale/zh-TW.ini
Normal file
13
plugins/mac-syphon/data/locale/zh-TW.ini
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
Syphon="遊戲擷取 (Syphon)"
|
||||
Source="來源"
|
||||
LaunchSyphonInject="啟動 SyphonInject"
|
||||
Inject="注入"
|
||||
Application="應用程式"
|
||||
SyphonLicense="Syphon 授權"
|
||||
Crop="剪裁"
|
||||
Crop.origin.x="左邊界"
|
||||
Crop.origin.y="上邊界"
|
||||
Crop.size.width="右邊界"
|
||||
Crop.size.height="下邊界"
|
||||
AllowTransparency="允許透明"
|
||||
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
VTH264EncHW="Apple VT H264 Hardware Encoder"
|
||||
VTH264EncSW="Apple VT H264 Software Encoder"
|
||||
VTEncoder="VideoToolbox Encoder"
|
||||
VTH264EncHW="Apple VT H264 Laitteistopohjainen enkooderi"
|
||||
VTH264EncSW="Apple VT H264 Ohjelmistopohjainen enkooderi"
|
||||
VTEncoder="VideoToolbox Enkooderi"
|
||||
Bitrate="Bitrate"
|
||||
UseMaxBitrate="Rajoita bitratea"
|
||||
MaxBitrate="Bitrate-maksimi"
|
||||
MaxBitrateWindow="Bitrate-maksimin ikkuna (sekuntia)"
|
||||
KeyframeIntervalSec="Keyframe-väli (sec, 0=auto)"
|
||||
MaxBitrate="Maksimi bitrate"
|
||||
MaxBitrateWindow="Maksimi bitraten ikkuna (sekunteina)"
|
||||
KeyframeIntervalSec="Keyframe-väli (sekunteina, 0=automaattinen)"
|
||||
Profile="Profiili"
|
||||
None="(Ei mitään)"
|
||||
DefaultEncoder="(Oletusenkooderi)"
|
||||
|
|
|
|||
14
plugins/mac-vth264/data/locale/pt-PT.ini
Normal file
14
plugins/mac-vth264/data/locale/pt-PT.ini
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
VTH264EncHW="Codificador de Hardware Apple VT H264"
|
||||
VTH264EncSW="Codificador de Apple VT H264 Software"
|
||||
VTEncoder="VideoToolbox Codificador"
|
||||
Bitrate="Taxa de bits"
|
||||
UseMaxBitrate="Limite taxa de bits"
|
||||
MaxBitrate="Taxa de bits máxima"
|
||||
MaxBitrateWindow="Máxima janela taxa de bits (segundos)"
|
||||
KeyframeIntervalSec="Intervalo do keyframe (segundos, 0=automático)"
|
||||
Profile="Perfil"
|
||||
None="(Nenhum)"
|
||||
DefaultEncoder="(Codificador padrão)"
|
||||
UseBFrames="Usar B-Frames"
|
||||
|
||||
|
||||
14
plugins/mac-vth264/data/locale/zh-TW.ini
Normal file
14
plugins/mac-vth264/data/locale/zh-TW.ini
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
VTH264EncHW="蘋果 VT H264 硬體編碼器"
|
||||
VTH264EncSW="蘋果 VT H264 軟體編碼器"
|
||||
VTEncoder="VideoToolbox 編碼器"
|
||||
Bitrate="位元率"
|
||||
UseMaxBitrate="限制位元率"
|
||||
MaxBitrate="最大位元率"
|
||||
MaxBitrateWindow="最大位元率窗 (秒)"
|
||||
KeyframeIntervalSec="關鍵訊框間隔 (秒,0 = 自動)"
|
||||
Profile="設定檔"
|
||||
None="(無)"
|
||||
DefaultEncoder="(預設編碼器)"
|
||||
UseBFrames="使用 B 訊框"
|
||||
|
||||
|
||||
|
|
@ -2,11 +2,11 @@ FFmpegOutput="FFmpeg ulostulo"
|
|||
FFmpegAAC="FFmpeg oletus AAC-enkooderi"
|
||||
Bitrate="Bitrate"
|
||||
Preset="Esiasetus"
|
||||
RateControl="Nopeudensäädin"
|
||||
KeyframeIntervalSec="Keyframe-väli (sec, 0=auto)"
|
||||
RateControl="Rate Control -tila"
|
||||
KeyframeIntervalSec="Keyframe-väli (sekunteina, 0=automaattinen)"
|
||||
Lossless="Häviötön"
|
||||
|
||||
NVENC.Use2Pass="Käytä kaksivaiheista enkoodausta"
|
||||
NVENC.Use2Pass="Käytä Two-Pass enkoodausta"
|
||||
NVENC.Preset.default="Oletusarvo"
|
||||
NVENC.Preset.hq="Korkea laatu"
|
||||
NVENC.Preset.hp="Korkea suorituskyky"
|
||||
|
|
@ -22,7 +22,7 @@ Looping="Toista jatkuvasti"
|
|||
Input="Sisääntulo"
|
||||
InputFormat="Sisääntulon muoto"
|
||||
ForceFormat="Pakota muodon muuntaminen"
|
||||
HardwareDecode="Käytä laitteistoa purkamiseen, kun mahdollista"
|
||||
HardwareDecode="Käytä laitteistotason purkua, kun mahdollista"
|
||||
ClearOnMediaEnd="Piilota lähde kun toisto päättyy"
|
||||
Advanced="Lisäasetukset"
|
||||
AudioBufferSize="Äänipuskurin koko (ruutua)"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,20 @@
|
|||
FFmpegOutput="פלט FFmpeg"
|
||||
FFmpegAAC="FFmpeg מקודד AAC ברירת מחדל"
|
||||
Bitrate="קצב ביטים"
|
||||
Preset="קבוע מראש"
|
||||
RateControl="בקרת קצב"
|
||||
KeyframeIntervalSec="מרווח ערך ה keyframe בשניות (0=אוטומטי)"
|
||||
Lossless="ללא אובדן נתונים"
|
||||
|
||||
NVENC.Use2Pass="השתמש בקידוד שני מעברים"
|
||||
NVENC.Preset.default="ברירת מחדל"
|
||||
NVENC.Preset.hq="איכות גבוהה"
|
||||
NVENC.Preset.hp="ביצועים גבוהים"
|
||||
NVENC.Preset.bd="בלוריי"
|
||||
NVENC.Preset.ll="השהיה נמוכה"
|
||||
NVENC.Preset.llhq="השהיה נמוכה איכות גבוהה"
|
||||
NVENC.Preset.llhp="השהיה נמוכה ביצועים גבוהים"
|
||||
NVENC.Level="רמה"
|
||||
|
||||
FFmpegSource="מקור מדיה"
|
||||
LocalFile="קובץ מקומי"
|
||||
|
|
@ -23,6 +36,10 @@ DiscardNonIntra="פריימים לא ביינים"
|
|||
DiscardNonKey="מסגרות שאינן מפתח"
|
||||
DiscardAll="כל הפריימים (זהירות!)"
|
||||
RestartWhenActivated="הפעל מחדש השמעה כאשר מקור הופך לפעיל"
|
||||
ColorRange="טווח צבעים YUV"
|
||||
ColorRange.Auto="אוטומטי"
|
||||
ColorRange.Partial="חלקי"
|
||||
ColorRange.Full="מלא"
|
||||
|
||||
|
||||
MediaFileFilter.AllMediaFiles="כל קבצי המדיה"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ FFmpegOutput="FFmpeg izlaz"
|
|||
FFmpegAAC="FFmpeg podrazumevani AAC enkoder"
|
||||
Bitrate="Protok"
|
||||
Preset="Šablon"
|
||||
RateControl="Kontrola protoka"
|
||||
KeyframeIntervalSec="Interval ključnih frejmova (sekunde, 0=automatski)"
|
||||
Lossless="Bez gubitka"
|
||||
|
||||
NVENC.Use2Pass="Koristi enkoding duplog prolaza"
|
||||
NVENC.Preset.default="Podrazumevani"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,20 @@
|
|||
FFmpegOutput="Uscita FFmpeg"
|
||||
FFmpegAAC="Codificatore FFmpeg predefinito AAC"
|
||||
Bitrate="Bitrate"
|
||||
Preset="Preset"
|
||||
RateControl="Controllo frequenza"
|
||||
KeyframeIntervalSec="Intervallo Keyframe (secondi, 0=automatico)"
|
||||
Lossless="Lossless"
|
||||
|
||||
NVENC.Use2Pass="Usa codifica in due passaggi"
|
||||
NVENC.Preset.default="Predefinito"
|
||||
NVENC.Preset.hq="Alta Qualità"
|
||||
NVENC.Preset.hp="Alte Prestazioni"
|
||||
NVENC.Preset.bd="Bluray"
|
||||
NVENC.Preset.ll="Bassa latenza"
|
||||
NVENC.Preset.llhq="Bassa latenza Alta Qualità"
|
||||
NVENC.Preset.llhp="Bassa latenza ad Alte Prestazioni"
|
||||
NVENC.Level="Livello"
|
||||
|
||||
FFmpegSource="Origine multimediale"
|
||||
LocalFile="File locale"
|
||||
|
|
@ -23,6 +36,14 @@ DiscardNonIntra="Frame non interposti"
|
|||
DiscardNonKey="Frame non di chiave"
|
||||
DiscardAll="Tutti i Frame (opzione per utenti più esperti)"
|
||||
RestartWhenActivated="Riattiva playback quando la fonte torna attiva"
|
||||
ColorRange="Gamma di colore YUV"
|
||||
ColorRange.Auto="Autom."
|
||||
ColorRange.Partial="Parziale"
|
||||
ColorRange.Full="Intero"
|
||||
|
||||
|
||||
MediaFileFilter.AllMediaFiles="Tutti i file media"
|
||||
MediaFileFilter.VideoFiles="File video"
|
||||
MediaFileFilter.AudioFiles="File audio"
|
||||
MediaFileFilter.AllFiles="Tutti i file"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,26 @@
|
|||
FFmpegOutput="FFmpeg utdata"
|
||||
FFmpegAAC="Standard FFmpeg AAC-koder"
|
||||
Bitrate="Bitrate"
|
||||
Preset="Forhåndsinnstilling"
|
||||
RateControl="Hastighetskontroll"
|
||||
KeyframeIntervalSec="Nøkkelbildeintervall (sekunder, 0 = automatisk)"
|
||||
Lossless="Tapsfri"
|
||||
|
||||
NVENC.Use2Pass="Bruk tostegskoding"
|
||||
NVENC.Preset.default="Standard"
|
||||
NVENC.Preset.hq="Høy kvalitet"
|
||||
NVENC.Preset.hp="Høy ytelse"
|
||||
NVENC.Preset.bd="Bluray"
|
||||
NVENC.Preset.ll="Lav latens"
|
||||
NVENC.Preset.llhq="Lav latens, høy kvalitet"
|
||||
NVENC.Preset.llhp="Lav latens, høy ytelse"
|
||||
NVENC.Level="Nivå"
|
||||
|
||||
FFmpegSource="Mediekilde"
|
||||
LocalFile="Lokal fil"
|
||||
Looping="Repeter"
|
||||
Input="Inndata"
|
||||
InputFormat="Inndataformat"
|
||||
Input="Inngang"
|
||||
InputFormat="Inngangsformat"
|
||||
ForceFormat="Tving formatkonvertering"
|
||||
HardwareDecode="Bruk maskinvaredekoding når tilgjengelig"
|
||||
ClearOnMediaEnd="Skjul kilde når avspilling ender"
|
||||
|
|
@ -22,6 +35,15 @@ DiscardBiDir="Toveisbilder"
|
|||
DiscardNonIntra="Non-intra bilder"
|
||||
DiscardNonKey="Ikkenøkkelbilder"
|
||||
DiscardAll="Alle bilder (forsiktig!)"
|
||||
RestartWhenActivated="Start avspilling omigjen når kilde blir aktiv"
|
||||
ColorRange="YUV fargerom"
|
||||
ColorRange.Auto="Automatisk"
|
||||
ColorRange.Partial="Delvis"
|
||||
ColorRange.Full="Hel"
|
||||
|
||||
|
||||
MediaFileFilter.AllMediaFiles="Alle mediefiler"
|
||||
MediaFileFilter.VideoFiles="Videofiler"
|
||||
MediaFileFilter.AudioFiles="Lydfiler"
|
||||
MediaFileFilter.AllFiles="Alle filer"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ FFmpegOutput="Wyjście FFmpeg"
|
|||
FFmpegAAC="Domyślny enkoder AAC w FFmpeg"
|
||||
Bitrate="Przepływność bitowa"
|
||||
Preset="Profil ustawień"
|
||||
RateControl="Typ przepływności"
|
||||
KeyframeIntervalSec="Odstęp między klatkami kluczowymi (sekundy, 0=automatyczny)"
|
||||
Lossless="Bezstratny"
|
||||
|
||||
NVENC.Use2Pass="Użyj enkodowania dwuprzebiegowego"
|
||||
NVENC.Preset.default="Domyślny"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,19 @@
|
|||
FFmpegOutput="Saída do FFmpeg"
|
||||
FFmpegAAC="Codificador AAC Padrão do FFmpeg"
|
||||
Bitrate="Taxa de Bits"
|
||||
Preset="Predefinição"
|
||||
RateControl="Controle de Taxa"
|
||||
KeyframeIntervalSec="Intervalo do keyframe (segundos, 0=automático)"
|
||||
Lossless="Sem perdas"
|
||||
|
||||
NVENC.Preset.default="Predefinido"
|
||||
NVENC.Preset.hq="Alta Qualidade"
|
||||
NVENC.Preset.hp="Alto Desempenho"
|
||||
NVENC.Preset.bd="Bluray"
|
||||
NVENC.Preset.ll="Baixa latência"
|
||||
NVENC.Preset.llhq="Baixa latência Alta Qualidade"
|
||||
NVENC.Preset.llhp="Baixa latência Alto Desempenho"
|
||||
NVENC.Level="Nível"
|
||||
|
||||
FFmpegSource="Fonte de mídia"
|
||||
LocalFile="Arquivo Local"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,19 @@
|
|||
FFmpegOutput="Saída de FFmpeg"
|
||||
FFmpegAAC="Codificador AAC padrão do FFmpeg"
|
||||
Bitrate="Bitrate"
|
||||
Preset="Predefinição"
|
||||
RateControl="Controle de Taxa"
|
||||
KeyframeIntervalSec="Intervalo do keyframe (segundos, 0=automático)"
|
||||
Lossless="Sem perdas"
|
||||
|
||||
NVENC.Preset.default="Predefinido"
|
||||
NVENC.Preset.hq="Alta Qualidade"
|
||||
NVENC.Preset.hp="Alto Desempenho"
|
||||
NVENC.Preset.bd="Bluray"
|
||||
NVENC.Preset.ll="Baixa latência"
|
||||
NVENC.Preset.llhq="Baixa latência Alta Qualidade"
|
||||
NVENC.Preset.llhp="Baixa latência Alto Desempenho"
|
||||
NVENC.Level="Nível"
|
||||
|
||||
FFmpegSource="Fonte de multimédia"
|
||||
LocalFile="Ficheiro local"
|
||||
|
|
@ -22,6 +34,15 @@ DiscardBiDir="Fotogramas bidirecionais"
|
|||
DiscardNonIntra="Fotogramas não internos"
|
||||
DiscardNonKey="Fotogramas não registados"
|
||||
DiscardAll="Todos os fotogramas (cuidado!)"
|
||||
RestartWhenActivated="Reiniciar reprodução quando a fonte se torna ativo"
|
||||
ColorRange="Gama de cor YUV"
|
||||
ColorRange.Auto="Auto"
|
||||
ColorRange.Partial="Parcial"
|
||||
ColorRange.Full="Completo"
|
||||
|
||||
|
||||
MediaFileFilter.AllMediaFiles="Todos os Arquivos de Media"
|
||||
MediaFileFilter.VideoFiles="Arquivos de Vídeo"
|
||||
MediaFileFilter.AudioFiles="Arquivos de Áudio"
|
||||
MediaFileFilter.AllFiles="Todos os ficheiros"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ FFmpegOutput="Вывод FFmpeg"
|
|||
FFmpegAAC="Стандартный AAC-кодер FFmpeg"
|
||||
Bitrate="Битрейт"
|
||||
Preset="Пресет"
|
||||
RateControl="Управление битрейтом"
|
||||
KeyframeIntervalSec="Интервал ключевых кадров (сек, 0=авто)"
|
||||
Lossless="Без потерь"
|
||||
|
||||
NVENC.Use2Pass="Использовать двухпроходное кодирование"
|
||||
NVENC.Preset.default="По умолчанию"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ FFmpegOutput="FFmpeg izlaz"
|
|||
FFmpegAAC="FFmpeg podrazumevani AAC enkoder"
|
||||
Bitrate="Protok"
|
||||
Preset="Šablon"
|
||||
RateControl="Kontrola protoka"
|
||||
KeyframeIntervalSec="Interval ključnih frejmova (sekunde, 0=automatski)"
|
||||
Lossless="Bez gubitka"
|
||||
|
||||
NVENC.Use2Pass="Koristi enkoding duplog prolaza"
|
||||
NVENC.Preset.default="Podrazumevani"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ FFmpegOutput="FFmpeg излаз"
|
|||
FFmpegAAC="FFmpeg подразумевани AAC енкодер"
|
||||
Bitrate="Проток"
|
||||
Preset="Шаблон"
|
||||
RateControl="Контрола протока"
|
||||
KeyframeIntervalSec="Интервал кључних фрејмова (секунде, 0=аутоматски)"
|
||||
Lossless="Без губитка"
|
||||
|
||||
NVENC.Use2Pass="Користи енкодинг дуплог пролаза"
|
||||
NVENC.Preset.default="Подразумевани"
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ FFmpegOutput="FFmpeg-utmatning"
|
|||
FFmpegAAC="AAC-kodare (FFmpeg standard)"
|
||||
Bitrate="Bithastighet"
|
||||
Preset="Förinställning"
|
||||
RateControl="Hastighetskontroll"
|
||||
Lossless="Förlustfri"
|
||||
|
||||
NVENC.Use2Pass="Använd tvåpassavkodning"
|
||||
NVENC.Preset.default="Standard"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,20 @@
|
|||
FFmpegOutput="FFmpeg 輸出"
|
||||
FFmpegAAC="FFmpeg 預設 AAC 編碼器"
|
||||
Bitrate="流量"
|
||||
Bitrate="位元率"
|
||||
Preset="預置"
|
||||
RateControl="位元率控制"
|
||||
KeyframeIntervalSec="關鍵訊框間隔 (秒,0 = 自動)"
|
||||
Lossless="無損"
|
||||
|
||||
NVENC.Use2Pass="使用 Two-Pass 編碼"
|
||||
NVENC.Preset.default="預設"
|
||||
NVENC.Preset.hq="高品質"
|
||||
NVENC.Preset.hp="高性能"
|
||||
NVENC.Preset.bd="藍光"
|
||||
NVENC.Preset.ll="低延遲"
|
||||
NVENC.Preset.llhq="低延遲高品質"
|
||||
NVENC.Preset.llhp="低延遲高性能"
|
||||
NVENC.Level="级别"
|
||||
|
||||
FFmpegSource="媒體來源"
|
||||
LocalFile="本機檔案"
|
||||
|
|
@ -12,15 +25,21 @@ ForceFormat="強制格式轉換"
|
|||
HardwareDecode="盡可能使用硬體解碼"
|
||||
ClearOnMediaEnd="當播放結束時隱藏來源"
|
||||
Advanced="進階"
|
||||
AudioBufferSize="音訊緩衝區大小 (幀)"
|
||||
VideoBufferSize="影像緩衝區大小 (幀)"
|
||||
FrameDropping="掉幀程度"
|
||||
AudioBufferSize="音訊緩衝區大小 (訊框)"
|
||||
VideoBufferSize="影像緩衝區大小 (訊框)"
|
||||
FrameDropping="丟棄訊框级别"
|
||||
DiscardNone="無"
|
||||
DiscardDefault="預設 (無效封包)"
|
||||
DiscardNonRef="非參考幀"
|
||||
DiscardNonIntra="非內部框架"
|
||||
DiscardNonKey="非關鍵幀"
|
||||
DiscardAll="所有幀(小心!)"
|
||||
DiscardNonRef="非參考訊框"
|
||||
DiscardBiDir="雙向訊框"
|
||||
DiscardNonIntra="非內部訊框"
|
||||
DiscardNonKey="非關鍵訊框"
|
||||
DiscardAll="所有訊框(小心!)"
|
||||
RestartWhenActivated="當來源可使用時重新播放"
|
||||
ColorRange="YUV 色彩空間"
|
||||
ColorRange.Auto="自動"
|
||||
ColorRange.Partial="部分"
|
||||
ColorRange.Full="全部"
|
||||
|
||||
|
||||
MediaFileFilter.AllMediaFiles="所有媒體檔案"
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#include <obs-avc.h>
|
||||
#include <util/dstr.h>
|
||||
#include <util/pipe.h>
|
||||
#include <util/threading.h>
|
||||
#include "ffmpeg-mux/ffmpeg-mux.h"
|
||||
|
||||
#include <libavformat/avformat.h>
|
||||
|
|
@ -33,10 +34,12 @@
|
|||
struct ffmpeg_muxer {
|
||||
obs_output_t *output;
|
||||
os_process_pipe_t *pipe;
|
||||
int64_t stop_ts;
|
||||
struct dstr path;
|
||||
bool sent_headers;
|
||||
bool active;
|
||||
bool capturing;
|
||||
volatile bool active;
|
||||
volatile bool stopping;
|
||||
volatile bool capturing;
|
||||
};
|
||||
|
||||
static const char *ffmpeg_mux_getname(void *unused)
|
||||
|
|
@ -72,6 +75,21 @@ static void *ffmpeg_mux_create(obs_data_t *settings, obs_output_t *output)
|
|||
#define FFMPEG_MUX "ffmpeg-mux"
|
||||
#endif
|
||||
|
||||
static inline bool capturing(struct ffmpeg_muxer *stream)
|
||||
{
|
||||
return os_atomic_load_bool(&stream->capturing);
|
||||
}
|
||||
|
||||
static inline bool stopping(struct ffmpeg_muxer *stream)
|
||||
{
|
||||
return os_atomic_load_bool(&stream->stopping);
|
||||
}
|
||||
|
||||
static inline bool active(struct ffmpeg_muxer *stream)
|
||||
{
|
||||
return os_atomic_load_bool(&stream->active);
|
||||
}
|
||||
|
||||
/* TODO: allow codecs other than h264 whenever we start using them */
|
||||
|
||||
static void add_video_encoder_params(struct ffmpeg_muxer *stream,
|
||||
|
|
@ -223,8 +241,8 @@ static bool ffmpeg_mux_start(void *data)
|
|||
}
|
||||
|
||||
/* write headers and start capture */
|
||||
stream->active = true;
|
||||
stream->capturing = true;
|
||||
os_atomic_set_bool(&stream->active, true);
|
||||
os_atomic_set_bool(&stream->capturing, true);
|
||||
obs_output_begin_data_capture(stream->output, 0);
|
||||
|
||||
info("Writing file '%s'...", stream->path.array);
|
||||
|
|
@ -235,29 +253,32 @@ static int deactivate(struct ffmpeg_muxer *stream)
|
|||
{
|
||||
int ret = -1;
|
||||
|
||||
if (stream->active) {
|
||||
if (active(stream)) {
|
||||
ret = os_process_pipe_destroy(stream->pipe);
|
||||
stream->pipe = NULL;
|
||||
|
||||
stream->active = false;
|
||||
stream->sent_headers = false;
|
||||
os_atomic_set_bool(&stream->active, false);
|
||||
os_atomic_set_bool(&stream->sent_headers, false);
|
||||
|
||||
info("Output of file '%s' stopped", stream->path.array);
|
||||
}
|
||||
|
||||
if (stopping(stream))
|
||||
obs_output_end_data_capture(stream->output);
|
||||
|
||||
os_atomic_set_bool(&stream->stopping, false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void ffmpeg_mux_stop(void *data)
|
||||
static void ffmpeg_mux_stop(void *data, uint64_t ts)
|
||||
{
|
||||
struct ffmpeg_muxer *stream = data;
|
||||
|
||||
if (stream->capturing) {
|
||||
obs_output_end_data_capture(stream->output);
|
||||
stream->capturing = false;
|
||||
if (capturing(stream)) {
|
||||
stream->stop_ts = (int64_t)ts / 1000LL;
|
||||
os_atomic_set_bool(&stream->stopping, true);
|
||||
os_atomic_set_bool(&stream->capturing, false);
|
||||
}
|
||||
|
||||
deactivate(stream);
|
||||
}
|
||||
|
||||
static void signal_failure(struct ffmpeg_muxer *stream)
|
||||
|
|
@ -271,7 +292,7 @@ static void signal_failure(struct ffmpeg_muxer *stream)
|
|||
}
|
||||
|
||||
obs_output_signal_stop(stream->output, code);
|
||||
stream->capturing = false;
|
||||
os_atomic_set_bool(&stream->capturing, false);
|
||||
}
|
||||
|
||||
static bool write_packet(struct ffmpeg_muxer *stream,
|
||||
|
|
@ -358,7 +379,7 @@ static void ffmpeg_mux_data(void *data, struct encoder_packet *packet)
|
|||
{
|
||||
struct ffmpeg_muxer *stream = data;
|
||||
|
||||
if (!stream->active)
|
||||
if (!active(stream))
|
||||
return;
|
||||
|
||||
if (!stream->sent_headers) {
|
||||
|
|
@ -368,6 +389,13 @@ static void ffmpeg_mux_data(void *data, struct encoder_packet *packet)
|
|||
stream->sent_headers = true;
|
||||
}
|
||||
|
||||
if (stopping(stream)) {
|
||||
if (packet->sys_dts_usec >= stream->stop_ts) {
|
||||
deactivate(stream);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
write_packet(stream, packet);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -160,6 +160,8 @@ static bool nvenc_update(void *data, obs_data_t *settings)
|
|||
nvenc_video_info(enc, &info);
|
||||
av_opt_set_int(enc->context->priv_data, "cbr", false, 0);
|
||||
|
||||
av_opt_set(enc->context->priv_data, "preset", preset, 0);
|
||||
|
||||
if (astrcmpi(rc, "cqp") == 0) {
|
||||
bitrate = 0;
|
||||
enc->context->global_quality = cqp;
|
||||
|
|
@ -171,7 +173,7 @@ static bool nvenc_update(void *data, obs_data_t *settings)
|
|||
bool hp = (astrcmpi(preset, "hp") == 0 ||
|
||||
astrcmpi(preset, "llhp") == 0);
|
||||
|
||||
av_opt_set(enc->context->priv_data, "profile",
|
||||
av_opt_set(enc->context->priv_data, "preset",
|
||||
hp ? "losslesshp" : "lossless", 0);
|
||||
|
||||
} else if (astrcmpi(rc, "vbr") != 0) { /* CBR by default */
|
||||
|
|
@ -182,7 +184,6 @@ static bool nvenc_update(void *data, obs_data_t *settings)
|
|||
}
|
||||
|
||||
|
||||
av_opt_set(enc->context->priv_data, "preset", preset, 0);
|
||||
av_opt_set(enc->context->priv_data, "level", level, 0);
|
||||
av_opt_set_int(enc->context->priv_data, "2pass", twopass, 0);
|
||||
av_opt_set_int(enc->context->priv_data, "gpu", gpu, 0);
|
||||
|
|
|
|||
|
|
@ -89,6 +89,11 @@ struct ffmpeg_output {
|
|||
bool connecting;
|
||||
pthread_t start_thread;
|
||||
|
||||
uint64_t audio_start_ts;
|
||||
uint64_t video_start_ts;
|
||||
uint64_t stop_ts;
|
||||
volatile bool stopping;
|
||||
|
||||
bool write_thread_active;
|
||||
pthread_mutex_t write_mutex;
|
||||
pthread_t write_thread;
|
||||
|
|
@ -237,6 +242,7 @@ static bool create_video_stream(struct ffmpeg_data *data)
|
|||
context->pix_fmt = closest_format;
|
||||
context->colorspace = data->config.color_space;
|
||||
context->color_range = data->config.color_range;
|
||||
context->thread_count = 0;
|
||||
|
||||
data->video->time_base = context->time_base;
|
||||
|
||||
|
|
@ -548,6 +554,11 @@ fail:
|
|||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
static inline bool stopping(struct ffmpeg_output *output)
|
||||
{
|
||||
return os_atomic_load_bool(&output->stopping);
|
||||
}
|
||||
|
||||
static const char *ffmpeg_output_getname(void *unused)
|
||||
{
|
||||
UNUSED_PARAMETER(unused);
|
||||
|
|
@ -588,7 +599,7 @@ fail:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static void ffmpeg_output_stop(void *data);
|
||||
static void ffmpeg_output_full_stop(void *data);
|
||||
static void ffmpeg_deactivate(struct ffmpeg_output *output);
|
||||
|
||||
static void ffmpeg_output_destroy(void *data)
|
||||
|
|
@ -599,7 +610,7 @@ static void ffmpeg_output_destroy(void *data)
|
|||
if (output->connecting)
|
||||
pthread_join(output->start_thread, NULL);
|
||||
|
||||
ffmpeg_output_stop(output);
|
||||
ffmpeg_output_full_stop(output);
|
||||
|
||||
pthread_mutex_destroy(&output->write_mutex);
|
||||
os_sem_destroy(output->write_sem);
|
||||
|
|
@ -647,6 +658,8 @@ static void receive_video(void *param, struct video_data *frame)
|
|||
|
||||
av_init_packet(&packet);
|
||||
|
||||
if (!output->video_start_ts)
|
||||
output->video_start_ts = frame->timestamp;
|
||||
if (!data->start_timestamp)
|
||||
data->start_timestamp = frame->timestamp;
|
||||
|
||||
|
|
@ -768,6 +781,8 @@ static bool prepare_audio(struct ffmpeg_data *data,
|
|||
return false;
|
||||
|
||||
cutoff = data->start_timestamp - frame->timestamp;
|
||||
output->timestamp += cutoff;
|
||||
|
||||
cutoff = cutoff * (uint64_t)data->audio_samplerate /
|
||||
1000000000;
|
||||
|
||||
|
|
@ -797,6 +812,9 @@ static void receive_audio(void *param, struct audio_data *frame)
|
|||
if (!prepare_audio(data, frame, &in))
|
||||
return;
|
||||
|
||||
if (!output->audio_start_ts)
|
||||
output->audio_start_ts = in.timestamp;
|
||||
|
||||
frame_size_bytes = (size_t)data->frame_size * data->audio_size;
|
||||
|
||||
for (size_t i = 0; i < data->audio_planes; i++)
|
||||
|
|
@ -812,6 +830,26 @@ static void receive_audio(void *param, struct audio_data *frame)
|
|||
}
|
||||
}
|
||||
|
||||
static uint64_t get_packet_sys_dts(struct ffmpeg_output *output,
|
||||
AVPacket *packet)
|
||||
{
|
||||
struct ffmpeg_data *data = &output->ff_data;
|
||||
uint64_t start_ts;
|
||||
|
||||
AVRational time_base;
|
||||
|
||||
if (data->video && data->video->index == packet->stream_index) {
|
||||
time_base = data->video->time_base;
|
||||
start_ts = output->video_start_ts;
|
||||
} else {
|
||||
time_base = data->audio->time_base;
|
||||
start_ts = output->audio_start_ts;
|
||||
}
|
||||
|
||||
return start_ts + (uint64_t)av_rescale_q(packet->dts,
|
||||
time_base, (AVRational){1, 1000000000});
|
||||
}
|
||||
|
||||
static int process_packet(struct ffmpeg_output *output)
|
||||
{
|
||||
AVPacket packet;
|
||||
|
|
@ -834,6 +872,14 @@ static int process_packet(struct ffmpeg_output *output)
|
|||
packet.size, packet.flags,
|
||||
packet.stream_index, output->packets.num);*/
|
||||
|
||||
if (stopping(output)) {
|
||||
uint64_t sys_ts = get_packet_sys_dts(output, &packet);
|
||||
if (sys_ts >= output->stop_ts) {
|
||||
ffmpeg_output_full_stop(output);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
ret = av_interleaved_write_frame(output->ff_data.output, &packet);
|
||||
if (ret < 0) {
|
||||
av_free_packet(&packet);
|
||||
|
|
@ -954,7 +1000,7 @@ static bool try_connect(struct ffmpeg_output *output)
|
|||
if (ret != 0) {
|
||||
blog(LOG_WARNING, "ffmpeg_output_start: failed to create write "
|
||||
"thread.");
|
||||
ffmpeg_output_stop(output);
|
||||
ffmpeg_output_full_stop(output);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -985,11 +1031,15 @@ static bool ffmpeg_output_start(void *data)
|
|||
if (output->connecting)
|
||||
return false;
|
||||
|
||||
os_atomic_set_bool(&output->stopping, false);
|
||||
output->audio_start_ts = 0;
|
||||
output->video_start_ts = 0;
|
||||
|
||||
ret = pthread_create(&output->start_thread, NULL, start_thread, output);
|
||||
return (output->connecting = (ret == 0));
|
||||
}
|
||||
|
||||
static void ffmpeg_output_stop(void *data)
|
||||
static void ffmpeg_output_full_stop(void *data)
|
||||
{
|
||||
struct ffmpeg_output *output = data;
|
||||
|
||||
|
|
@ -999,6 +1049,20 @@ static void ffmpeg_output_stop(void *data)
|
|||
}
|
||||
}
|
||||
|
||||
static void ffmpeg_output_stop(void *data, uint64_t ts)
|
||||
{
|
||||
struct ffmpeg_output *output = data;
|
||||
|
||||
if (output->active) {
|
||||
if (ts == 0) {
|
||||
ffmpeg_output_full_stop(output);
|
||||
} else {
|
||||
os_atomic_set_bool(&output->stopping, true);
|
||||
output->stop_ts = ts;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void ffmpeg_deactivate(struct ffmpeg_output *output)
|
||||
{
|
||||
if (output->write_thread_active) {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,29 @@
|
|||
project(obs-filters)
|
||||
|
||||
find_package(Libspeexdsp QUIET)
|
||||
if(LIBSPEEXDSP_FOUND)
|
||||
set(obs-filters_LIBSPEEXDSP_SOURCES
|
||||
noise-suppress-filter.c)
|
||||
set(obs-filters_LIBSPEEXDSP_LIBRARIES
|
||||
${LIBSPEEXDSP_LIBRARIES})
|
||||
else()
|
||||
message(STATUS "Speexdsp library not found, speexdsp filters disabled")
|
||||
endif()
|
||||
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/obs-filters-config.h.in"
|
||||
"${CMAKE_BINARY_DIR}/plugins/obs-filters/config/obs-filters-config.h")
|
||||
|
||||
set(obs-filters_config_HEADERS
|
||||
"${CMAKE_BINARY_DIR}/plugins/obs-filters/config/obs-filters-config.h")
|
||||
include_directories(${LIBSPEEXDSP_INCLUDE_DIRS}
|
||||
"${CMAKE_BINARY_DIR}/plugins/obs-filters/config")
|
||||
|
||||
set(obs-filters_SOURCES
|
||||
obs-filters.c
|
||||
color-filter.c
|
||||
async-delay-filter.c
|
||||
crop-filter.c
|
||||
scale-filter.c
|
||||
scroll-filter.c
|
||||
chroma-key-filter.c
|
||||
color-key-filter.c
|
||||
|
|
@ -14,8 +33,11 @@ set(obs-filters_SOURCES
|
|||
mask-filter.c)
|
||||
|
||||
add_library(obs-filters MODULE
|
||||
${obs-filters_SOURCES})
|
||||
${obs-filters_SOURCES}
|
||||
${obs-filters_config_HEADERS}
|
||||
${obs-filters_LIBSPEEXDSP_SOURCES})
|
||||
target_link_libraries(obs-filters
|
||||
libobs)
|
||||
libobs
|
||||
${obs-filters_LIBSPEEXDSP_LIBRARIES})
|
||||
|
||||
install_obs_plugin_with_data(obs-filters data)
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ static obs_properties_t *async_delay_filter_properties(void *data)
|
|||
obs_properties_t *props = obs_properties_create();
|
||||
|
||||
obs_properties_add_int(props, SETTING_DELAY_MS, TEXT_DELAY_MS,
|
||||
0, 6000, 1);
|
||||
0, 20000, 1);
|
||||
|
||||
UNUSED_PARAMETER(data);
|
||||
return props;
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ struct crop_filter_data {
|
|||
int right;
|
||||
int top;
|
||||
int bottom;
|
||||
uint32_t abs_cx;
|
||||
uint32_t abs_cy;
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
int abs_cx;
|
||||
int abs_cy;
|
||||
int width;
|
||||
int height;
|
||||
bool absolute;
|
||||
|
||||
struct vec2 mul_val;
|
||||
|
|
@ -108,13 +108,13 @@ static obs_properties_t *crop_filter_properties(void *data)
|
|||
obs_property_set_modified_callback(p, relative_clicked);
|
||||
|
||||
obs_properties_add_int(props, "left", obs_module_text("Crop.Left"),
|
||||
0, 8192, 1);
|
||||
-8192, 8192, 1);
|
||||
obs_properties_add_int(props, "top", obs_module_text("Crop.Top"),
|
||||
0, 8192, 1);
|
||||
-8192, 8192, 1);
|
||||
obs_properties_add_int(props, "right", obs_module_text("Crop.Right"),
|
||||
0, 8192, 1);
|
||||
-8192, 8192, 1);
|
||||
obs_properties_add_int(props, "bottom", obs_module_text("Crop.Bottom"),
|
||||
0, 8192, 1);
|
||||
-8192, 8192, 1);
|
||||
obs_properties_add_int(props, "cx", obs_module_text("Crop.Width"),
|
||||
0, 8192, 1);
|
||||
obs_properties_add_int(props, "cy", obs_module_text("Crop.Height"),
|
||||
|
|
@ -135,37 +135,26 @@ static void calc_crop_dimensions(struct crop_filter_data *filter,
|
|||
obs_source_t *target = obs_filter_get_target(filter->context);
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
uint32_t total;
|
||||
|
||||
if (!target) {
|
||||
width = 0;
|
||||
height = 0;
|
||||
return;
|
||||
} else {
|
||||
width = obs_source_get_base_width(target);
|
||||
height = obs_source_get_base_height(target);
|
||||
}
|
||||
|
||||
if (filter->absolute) {
|
||||
uint32_t max_abs_cx = (filter->left + filter->abs_cx);
|
||||
if (max_abs_cx > width) max_abs_cx = width;
|
||||
max_abs_cx -= filter->left;
|
||||
|
||||
total = max_abs_cx < width ? (width - max_abs_cx) : 0;
|
||||
filter->width = filter->abs_cx;
|
||||
filter->height = filter->abs_cy;
|
||||
} else {
|
||||
total = filter->left + filter->right;
|
||||
filter->width = (int)width - filter->left - filter->right;
|
||||
filter->height = (int)height - filter->top - filter->bottom;
|
||||
}
|
||||
filter->width = total > width ? 0 : (width - total);
|
||||
|
||||
if (filter->absolute) {
|
||||
uint32_t max_abs_cy = (filter->top + filter->abs_cy);
|
||||
if (max_abs_cy > height) max_abs_cy = height;
|
||||
max_abs_cy -= filter->top;
|
||||
|
||||
total = max_abs_cy < height ? (height - max_abs_cy) : 0;
|
||||
} else {
|
||||
total = filter->top + filter->bottom;
|
||||
}
|
||||
filter->height = total > height ? 0 : (height - total);
|
||||
if (filter->width < 1) filter->width = 1;
|
||||
if (filter->height < 1) filter->height = 1;
|
||||
|
||||
if (width && filter->width) {
|
||||
mul_val->x = (float)filter->width / (float)width;
|
||||
|
|
@ -209,13 +198,13 @@ static void crop_filter_render(void *data, gs_effect_t *effect)
|
|||
static uint32_t crop_filter_width(void *data)
|
||||
{
|
||||
struct crop_filter_data *crop = data;
|
||||
return crop->width;
|
||||
return (uint32_t)crop->width;
|
||||
}
|
||||
|
||||
static uint32_t crop_filter_height(void *data)
|
||||
{
|
||||
struct crop_filter_data *crop = data;
|
||||
return crop->height;
|
||||
return (uint32_t)crop->height;
|
||||
}
|
||||
|
||||
struct obs_source_info crop_filter = {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue