- 
                Notifications
    
You must be signed in to change notification settings  - Fork 176
 
Feature/fake audio and video capture #382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            voluntas
  wants to merge
  48
  commits into
  develop
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
feature/fake-audio-and-video-capture
  
      
      
   
  
    
  
  
  
 
  
      
    base: develop
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
                
     Open
            
            
          
      
        
          +0
        
        
          −0
        
        
          
        
      
    
  
Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    - コマンドラインオプション --fake-capture-device を追加 - USE_FAKE_CAPTURE_DEVICE マクロでガード - Blend2D ライブラリの依存関係を追加(バージョン 0.12.0) - Safari モードのフェイク映像キャプチャを実装 - タイマー、フレーム番号、アニメーション表示(フォント埋め込みは未実装) - 移動するカラーボックスのアニメーション - 円グラフのアニメーション - run.py に --disable-fake-capture-device オプションを追加 - CMake で USE_FAKE_CAPTURE_DEVICE フラグを追加 - FindBlend2D.cmake を追加 - install_blend2d_official と _build_blend2d に分離(Zakuro と同じ構造) Zakuro の実装を参考にして、テスト用のフェイク映像デバイスを 実装しました。実際のカメラデバイスなしで動作確認が可能になります。 --disable-fake-capture-device でビルドした場合は完全に無効化されます。
フォントがない前提で動作するようにフォント関連のコードを削除: - DrawTexts メソッドと関連する BLFont メンバー変数を削除 - has_font_ フラグと条件分岐を削除 - デジタル時計のみを表示するシンプルな実装に変更
USE_FAKE_CAPTURE_DEVICE が定義されていない場合のダミー実装を削除して、常に Blend2D がある前提でのシンプルな実装に変更
- FakeAudioCapturer を新規作成(AudioDeviceModule を実装) - FakeVideoCapturer に FakeAudioCapturer への参照を追加 - 円(パイチャート)が一周完了時に 1000Hz のビープ音(100ms)を生成 - RTCManager で fake_capture_device 時に FakeAudioCapturer を使用 - main.cpp で FakeVideoCapturer と FakeAudioCapturer を連携 ビープ音は WebRTC のオーディオストリームとして送信される
ビルドエラーを修正するため、USE_FAKE_CAPTURE_DEVICE が有効な場合に fake_audio_capturer.cpp をソースファイルに追加
api/make_ref_counted.h をインクルードして webrtc::make_ref_counted を利用可能にした
音声のずれを修正するため以下の改善を実施: - sleep_until を使用した正確な 10ms 間隔のオーディオ生成 - sin 波の位相を連続させて音の途切れを防止 - 円が 0 度を通過した瞬間を正確に検出してビープ音をトリガー - 不要な last_beep_frame_ メンバー変数を削除
Platform クラスには name 属性が存在しないため、 適切な target.package_name を使用するように修正
Platform クラスには name 属性が存在しないため、 適切な target.package_name を使用するように修正 - run.py の 353 行目付近: disable_blend2d の判定部分 - run.py の 564 行目付近: disable_fake_capture の判定部分
…mo into feature/fake-capture-device
eeff865    to
    d84bd9e      
    Compare
  
    - VS Code の C++ 設定に USE_FAKE_CAPTURE_DEVICE マクロを追加 - Blend2D の画像データ取得失敗時にエラーログを出力するように修正
- stop_audio_thread_ へのアクセスに適切なメモリオーダーを指定する - frame_counter_ を atomic 型に変更してメモリオーダーを指定する - ビデオキャプチャーで連続エラー時に自動停止する機能を追加する
DrawAnimations メソッド内で current_frame 変数が二重に宣言されていた問題を修正。 159行目の重複宣言を削除し、152行目で宣言された変数を使用するように変更。
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
No description provided.