Q&A

  • DSPack 관련 질문입니다.
IMediaSeeking <- 요넘만 들어가면 ▶(RUN)이 않됩니다.
[Error] player.pas(298): Undeclared identifier: 'IMediaSeeking'
왜 이러는지 많이 난감합니다.
문제점이 예상돼시는 고수님의 조언을 부탁드립니다.

<!--CodeS-->
procedure TForm1.OpenMenuClick(Sender: TObject);
var
  Value, H, M, S : Integer;
  MediaSeeking: IMediaSeeking;
  pStart, pStop : int64;

begin
  if OpenDialog.Execute then
  begin
    if not FilterGraph.Active then FilterGraph.Active := true;
    FilterGraph.ClearGraph;
    FilterGraph.RenderFile(OpenDialog.FileName);
    FilterGraph.QueryInterface(IMediaSeeking, MediaSeeking);

    with MediaSeeking do begin
      MediaSeeking.GetPositions(pStart,pStop);

      Value := Trunc(pStop / 10000000);
      H := value div 3600;
      M := (value mod 3600) div 60;
      S := (value mod 3600) mod 60;
      TotalTime.Caption := Format('%d:%2.2d:%2.2d', [H, M, S]);
    end;
    
    TitleTxt.Caption := ExtractFilename(OpenDialog.FileName);
    FilterGraph.Play;
end;
<!--CodeE-->
2  COMMENTS
  • Profile
    라벤더 2005.10.14 04:06



    안녕하세요?

    uses절에 DirectShow를 빼먹으신것은 아닌지...

    그럼 즐코하세요 ^^
  • Profile
    김도현 2005.10.14 21:08


    라벤더님 감사합니다.
    덕분에 문제 해결했습니다.
    다른 예제 소스들에는 uses절에 DirectShow9, DSUtil 두개가 더 있던데, 저만 없더군요.
    그래서 추가하고 실행했더니 계속 에러나길래 다이렉트9 재설치 부터 컴포넌트 재설치까지 다시 했더니 해결 되었습니다.

    아무래도 DSPack설치때 문제가 있었던가 봅니다.