MediaAnalyzer.idl 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /******************************************************************************
  2. |* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  3. |* ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  4. |* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  5. |* PARTICULAR PURPOSE.
  6. |*
  7. |* Copyright 1995-2005 Nero AG and its licensors. All Rights Reserved.
  8. |*-----------------------------------------------------------------------------
  9. |* NeroSDK / NeroVisionAPI
  10. |*
  11. |* PROGRAM: MediaAnalyzer.idl
  12. |*
  13. |* PURPOSE: Interface definition of the NeroVision API
  14. ******************************************************************************/
  15. [
  16. local, uuid(B8A9267B-F8EB-4aef-ACFA-BF18F43A32FD),
  17. helpstring("Attributes and methods for audio & video of a single media")
  18. ]
  19. interface IMediaInfo : IUnknown
  20. {
  21. typedef [helpstring("MediaInfo file type")]
  22. enum
  23. {
  24. Invalid = 0,
  25. Other,
  26. MPEG1,
  27. MPEG2,
  28. DV_DV,
  29. DV_AVI1,
  30. DV_AVI2
  31. } FileType;
  32. [propget, helpstring("Media file type")]
  33. HRESULT FileType([out, retval] FileType* ft);
  34. [propget, helpstring("Duration in seconds")]
  35. HRESULT Duration([out, retval] double* sec);
  36. [propget, helpstring("Whether the media has at least one audio stream")]
  37. HRESULT HasAudio([out, retval] boolean* has);
  38. [propget, helpstring("Whether the media has a video stream")]
  39. HRESULT HasVideo([out, retval] boolean* has);
  40. [propget, helpstring("Media width")]
  41. HRESULT Width([out, retval] int* w);
  42. [propget, helpstring("Media height")]
  43. HRESULT Height([out, retval] int* h);
  44. [propget, helpstring("Media aspect (x/y)")]
  45. HRESULT AspectXByY([out, retval] double* aspect);
  46. [propget, helpstring("Frame time in seconds")]
  47. HRESULT FrameRate([out, retval] double* rate);
  48. [helpstring("Retrieves the first (non-empty) thumbnail of the media. The returned DIB handle must be freed by the caller.")]
  49. HRESULT GetThumbnail([in] boolean ensureNotEmpty, [out, retval] HANDLE_PTR* hDib);
  50. [helpstring("Retrieves a frame of the media at a given position. The returned DIB handle must be freed by the caller.")]
  51. HRESULT GetImage([in] double posSec, [out, retval] HANDLE_PTR* hDib);
  52. };
  53. [
  54. local, uuid(7B64280B-4277-43dd-B753-92A1315046B0),
  55. helpstring("Attributes and methods for a physical file, which may contain several segments.")
  56. ]
  57. interface IFileInfo : IUnknown
  58. {
  59. [propget, helpstring("The associated file's path and name")]
  60. HRESULT FilePath([out, retval] BSTR* filepath);
  61. [propget, helpstring("Gets the number of segments in the file")]
  62. HRESULT NumSegments([out, retval] int* numSeg);
  63. [helpstring("Gets the MediaInfo for one segment of the file")]
  64. HRESULT GetSegmentMediaInfo([in] int segIndex, [out, retval] IMediaInfo** pMediaInfo);
  65. };
  66. [
  67. local, uuid(9CC2383F-485F-4593-983D-4686DA5CA265),
  68. helpstring("Interface for analyzing one or more media files")
  69. ]
  70. interface IMediaAnalyzer : IUnknown
  71. {
  72. [helpstring("Add a file to be analyzed. The resulting IFileInfo is filled after calling AnalyzeFiles().")]
  73. HRESULT AddFile([in] BSTR filepath, [out, retval] IFileInfo** fileInfo);
  74. [helpstring("Analyzes all files previously added by AddFile().")]
  75. HRESULT AnalyzeFiles([in] IProgressCallback* pCallback, [out, retval] boolean* pbSuccess);
  76. [propget, helpstring("Gets the error object of the last called function")]
  77. HRESULT LastError([out, retval] IError** pError);
  78. };
  79. [
  80. uuid(AEF4E74F-7767-4fed-B4A8-2F9A0A713D26),
  81. helpstring("Media analyzer object"),
  82. ]
  83. coclass MediaAnalyzer
  84. {
  85. [default] interface IMediaAnalyzer;
  86. };