2012-06-24 110 views
1

我有一個帶揚聲器輸出的軸凸輪。我在筆記本上安裝了Vapix Library,現在我可以接收MEPEG-4格式的視頻。VAPIX發送音頻到軸攝像頭

現在我想將從筆記本捕獲的音頻發送到具有相同庫的相機。

最後我搜索了這個文檔,但我不知道如何在C#中使用它。

Vapix Audio SDK

+0

嗨男孩..我已經解決了......如果你有興趣WIRTE我一個下午。 – Antonio

+0

你可以隨時用解決方案回答你自己的問題。 – zambono

+0

無法在StackOverflow上發送私人消息。請將您在這裏找到的解決方案寫下來作爲答案,我會加倍努力。 – agazso

回答

2

問題的解決:

using System; 
using System.Collections.Generic; 
using System.ComponentModel; 
using System.Data; 
using System.Drawing; 
using System.Linq; 
using System.Text; 
using System.Windows.Forms; 

namespace VapixForToroRosso 
{ 
public partial class Form1 : Form 
{ 
    private string USER = "root"; 
    private string PASS = "Blescia"; 
    private string IP = "192.168.1.2"; 
    public Form1() 
    { 
     InitializeComponent(); 
    } 

    private void Form1_Load(object sender, EventArgs e) 
    { 
     axAxisMediaControl1.Volume = 100; //Set the volume of speaker 
     /* 
     *Use this if the camera required the login 
     */ 
     axAxisMediaControl1.MediaUsername = USER; //Set the username 
     axAxisMediaControl1.MediaPassword = PASS; //Set the password 
     axAxisMediaControl1.Mute = false; //Disable Mute  
     axAxisMediaControl1.EnableReconnect = true; //Reconnect to the camera automatically 

     axAxisMediaControl1.MediaURL = "rtsp://192.168.1.2/mpeg4/media.amp"; //For Retrieve the video streaming 
     axAxisMediaControl1.AudioConfigURL = "http://" + IP + "/axis-cgi/view/param.cgi?camera=1&action=list&group=Audio,AudioSource.A0"; //Pre-Configuration of Camera 
     axAxisMediaControl1.AudioTransmitURL = "http://" + IP + "/axis-cgi/audio/transmit.cgi"; //Url to send the streaming AUDIO   

     axAxisMediaControl1.Play(); 
    } 

    private void btnStartStreaming_Click(object sender, EventArgs e) 
    { 
     axAxisMediaControl1.AudioTransmitStart(); //Start the streaming to camera 
    } 

    private void btnStopStreaming_Click(object sender, EventArgs e) 
    { 
     axAxisMediaControl1.AudioTransmitStop(); //Stop the streaming the camera 
    } 
    } 
} 
相關問題