Click here to Skip to main content
15,891,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: multi language Pin
toxcct31-Oct-06 5:28
toxcct31-Oct-06 5:28 
QuestionCalling a Web service in VC++ Pin
Programm3r31-Oct-06 2:21
Programm3r31-Oct-06 2:21 
AnswerRe: Calling a Web service in VC++ Pin
Chris Losinger31-Oct-06 3:29
professionalChris Losinger31-Oct-06 3:29 
GeneralRe: Calling a Web service in VC++ Pin
Programm3r31-Oct-06 18:21
Programm3r31-Oct-06 18:21 
QuestionHow to add wave file to wmv file Pin
Hemant kulkarni31-Oct-06 1:36
Hemant kulkarni31-Oct-06 1:36 
AnswerRe: How to add wave file to wmv file Pin
Mark Salsbery31-Oct-06 4:10
Mark Salsbery31-Oct-06 4:10 
AnswerRe: How to add wave file to wmv file Pin
Mark Salsbery31-Oct-06 6:15
Mark Salsbery31-Oct-06 6:15 
GeneralRe: How to add wave file to wmv file Pin
Hemant kulkarni1-Nov-06 2:44
Hemant kulkarni1-Nov-06 2:44 
Hi,
Thanks for your comments!.

Now I am using the Windows Media Format SDK for adding the wave file to wmv file. I have written the following code, but it is not allowing to add audio to me. It adds either audio or video and not the both. WHat may be the reason

public static void AddAudioVideo()
{
try
{
// Create a WMEncoder object.
WMEncoder Encoder = new WMEncoder();

// Retrieve the source group collection.
IWMEncSourceGroupCollection SrcGrpColl = Encoder.SourceGroupCollection;

// Add a source group to the collection.
IWMEncSourceGroup SrcGrp = SrcGrpColl.Add("SG_1");

// Add a video and audio source to the source group.
IWMEncSource SrcAud = SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_AUDIO);
SrcAud.SetInput("D:\\wmv\\input\\2006_10_16_13_9_49_759.wav", "", "");

IWMEncVideoSource2 SrcVid = (IWMEncVideoSource2)SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_VIDEO);
SrcVid.SetInput("D:\\wmv\\output\\TestOutPut.wmv", "", "");

// Specify a file object in which to save encoded content.
IWMEncFile File = Encoder.File;
File.LocalFileName = "D:\\wmv\\output\\OutputFile.wmv";

// Choose a profile from the collection.
IWMEncProfileCollection ProColl = Encoder.ProfileCollection;
IWMEncProfile Pro;
for (int i = 0; i < ProColl.Count; i++)
{
Pro = ProColl.Item(i);
if (Pro.Name == "Windows Media Video 8 for Local Area Network (384 Kbps)")
{
SrcGrp.set_Profile(Pro);
break;
}
}


// Start the encoding process.
// Wait until the encoding process stops before exiting the application.
Encoder.PrepareToEncode(true);
Encoder.Start();
Console.WriteLine("Press Enter when the file has been encoded.");
Console.ReadLine(); // Press Enter after the file has been encoded.
}
catch (Exception e)
{
// TODO: Handle exceptions.
}
}

///////
}

Regards,
Hemant.
GeneralRe: How to add wave file to wmv file Pin
Mark Salsbery1-Nov-06 5:29
Mark Salsbery1-Nov-06 5:29 
GeneralRe: How to add wave file to wmv file Pin
Hemant kulkarni1-Nov-06 19:54
Hemant kulkarni1-Nov-06 19:54 
QuestionWMI and BSTR Data conversion Pin
YusufK31-Oct-06 1:12
YusufK31-Oct-06 1:12 
AnswerRe: WMI and BSTR Data conversion Pin
Jonathan [Darka]31-Oct-06 2:17
professionalJonathan [Darka]31-Oct-06 2:17 
AnswerRe: WMI and BSTR Data conversion Pin
ThatsAlok31-Oct-06 4:58
ThatsAlok31-Oct-06 4:58 
QuestionChange Content of a File? Pin
bosfan31-Oct-06 0:54
bosfan31-Oct-06 0:54 
AnswerRe: Change Content of a File? Pin
toxcct31-Oct-06 0:59
toxcct31-Oct-06 0:59 
GeneralRe: Change Content of a File? Pin
bosfan31-Oct-06 1:18
bosfan31-Oct-06 1:18 
AnswerRe: Change Content of a File? Pin
Hamid_RT31-Oct-06 1:04
Hamid_RT31-Oct-06 1:04 
GeneralRe: Change Content of a File? [modified] Pin
bosfan31-Oct-06 1:28
bosfan31-Oct-06 1:28 
GeneralRe: Change Content of a File? Pin
Hamid_RT31-Oct-06 8:01
Hamid_RT31-Oct-06 8:01 
GeneralRe: Change Content of a File? Pin
bosfan31-Oct-06 8:49
bosfan31-Oct-06 8:49 
GeneralRe: Change Content of a File? Pin
Hamid_RT31-Oct-06 19:09
Hamid_RT31-Oct-06 19:09 
AnswerRe: Change Content of a File? Pin
Niklas L31-Oct-06 2:07
Niklas L31-Oct-06 2:07 
GeneralRe: Change Content of a File? [modified] Pin
bosfan31-Oct-06 2:43
bosfan31-Oct-06 2:43 
QuestionQuestion about Service Utility Functions. Pin
softgrid31-Oct-06 0:45
softgrid31-Oct-06 0:45 
AnswerRe: Question about Service Utility Functions. Pin
softgrid31-Oct-06 2:06
softgrid31-Oct-06 2:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.