sipsorcery-org / SIPSorceryMedia.FFmpeg

GNU Lesser General Public License v2.1
33 stars 24 forks source link

Replace FileSourceDecoder by FFmpegVideoDecoder and FFmpegAudioDecoder. #10

Closed ChristopheI closed 2 years ago

ChristopheI commented 2 years ago

In this PR:

Enhancement: both FFmpegCameraSource and FFmpegFileSource check PixelFormat to ensure to encode correctly the sample (certainly could be enhanced)

Scenario tested:

Note: On Windows, to test camera, the name on the device must be set like this: "video=[DEVICE_NAME]"; Where DEVICE_NAME is a name listed by this command: ffmpeg -f dshow -list_devices true -i dummy

Example of output of this command:

DirectShow video devices (some may be both video and audio devices)
 "Integrated Camera"
    Alternative name "@device_pnp_\\?\usb#vid_30c9&pid_0014&mi_00#7&10a84933&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global"
 "HD Pro Webcam C920"
    Alternative name "@device_pnp_\\?\usb#vid_046d&pid_082d&mi_00#7&2f7f15f6&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global"
DirectShow audio devices
 "Microphone (HD Pro Webcam C920)"
    Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{A34B481B-520D-482D-B48C-3117D3659FD5}"
 "Microphone Array (Realtek(R) Audio)"
    Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{3B632CDA-D23D-4B1B-A8BE-1DDBBF5486D1}"
 "Microphone (Plantronics .Audio 478 USB)"
    Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{AE04B684-777A-45E2-A452-5E4234C766FF}"