关于利用direct show做VCD播放软件中,声道控制问题!(100分)

  • 主题发起人 主题发起人 lxmzm
  • 开始时间 开始时间
http://www.138soft.com/htm/netplay.zip
http://www.138soft.com/htm/voddemo.zip

DLLDEMO_API VOID __stdcall STREAM_PopupAudioPropDlg(HWND hwnd)
{
if(pigb)
{

IBaseFilter *pBaseFilter = NULL;
ISpecifyPropertyPages *pispp = NULL;

if (SUCCEEDED(pigb->FindFilterByName(L"MPEG Audio Decoder", &pBaseFilter)))
{ // Found MPEG video decoder.

//GetFilterInfo(pBaseFilter);
pBaseFilter->QueryInterface(IID_ISpecifyPropertyPages, (void **)&pispp);

// Declare the counted array of GUIDs for the property page
CAUUID caGUID;

pispp->GetPages(&caGUID);
pispp->Release();

// Display the default MPEG Video Decoder filter's property page
OleCreatePropertyFrame(hwnd,
0,
0,
L"Filter",
1,
(IUnknown **)&pBaseFilter,
0,
NULL,
0,
0,
NULL);

pBaseFilter->Release();


} // Found MPEG video decoder.

} // pigb instance
}
 
只要有类似问题,jiangtao老大都不忘推销138soft.
在下佩服.

另外:并不是每一个MPEG Decoder都有SpecifyPropertyPages吧.
还有:就是有SpecifyPropertyPages也不一定能设置左右声道对换吧.
再说:就是有这个功能,人家要的也是编程实现,不是用对话框来选.
 
偶是学生嘛,穷嘛,没办法啊.
 
呵呵。学生里面的地主!
 
为什么我按上面的代码写
按F9时
MpegFilter: IBaseFilter;提示[Error] Unit1.pas(181): Undeclared identifier: 'IBaseFilter'
要怎么办呢
我是用DSPACK2。3
 
有人能回答一下吗

谢谢

为什么我按上面的代码写
按F9时
MpegFilter: IBaseFilter;提示[Error] Unit1.pas(181): Undeclared identifier: 'IBaseFilter'
要怎么办呢
我是用DSPACK2。3
 
终于实现了对DSPack的左右声道切换的问题,小弟不深感激各位,太谢谢了
 
我今天把改了一下代码,想用来切换MPEG4或者MP3的声道,怎么不行呢?代码如下:
var
MpegFilter: IBaseFilter;
MpegAudioDecoder: IMpegAudioDecoder;
begin

MainForm.FilterGraph.FindFilterByName(StringToOleStr('MPEG Layer-3 Decoder'),MpegFilter);
MpegFilter.QueryInterface(IID_IMpegAudioDecoder,MpegAudioDecoder);
MpegAudioDecoder.put_DualMode(0);
//只要播放中一设定,就提示这句有问题,如果没有这句播放就正常,但是这句是用来设置左右声道的嘛
//MpegAudioDecoder.put_DualMode(1);
//MpegAudioDecoder.put_DualMode(2);
{MpegFilter := nil;
MpegAudioDecoder :=nil;}
end;


请高手帮我看看问题所在,我猜测可能是对于'MPEG Layer-3 Decoder',MpegAudioDecoder不支持put_DualMode()函数,但是怎么设置MPEG4的左右声道呢?郁闷中~~~~~~~~~
 
>lovinger
按你的代码,以下行不通过:
MainForm.FilterGraph.FindFilterByName(StringToOleStr('MPEG Layer-3 Decoder'),MpegFilter);
“MainForm.FilterGraph.FindFilterByName”是什么东东?
可否提供相关的原码文件? gucong@126.com qq:1430249
 
试试
procedure TForm1.RadioButton1Click(Sender: TObject);
begin

g_pAudioControl.put_Balance(-9999);
end;


procedure TForm1.RadioButton2Click(Sender: TObject);
begin

g_pAudioControl.put_Balance(9999);
end;


procedure TForm1.RadioButton3Click(Sender: TObject);
begin

g_pAudioControl.put_Balance(0);
end;
 
后退
顶部