rmagroup.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:11k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /****************************************************************************
  2.  * 
  3.  *  $Id: rmagroup.h,v 1.1 2003/05/30 02:17:36 gabest Exp $
  4.  * 
  5.  *  Copyright (C) 1995-1999 RealNetworks, Inc. All rights reserved.
  6.  *  
  7.  *  http://www.real.com/devzone
  8.  *
  9.  *  This program contains proprietary 
  10.  *  information of Progressive Networks, Inc, and is licensed
  11.  *  subject to restrictions on use and distribution.
  12.  *
  13.  *
  14.  *  Group Interface.
  15.  *
  16.  */
  17. #ifndef _IRMAGROUP_H_
  18. #define _IRMAGROUP_H_
  19. /****************************************************************************
  20.  *
  21.  * Forward declarations of some interfaces defined/used here-in.
  22.  */
  23. typedef _INTERFACE   IRMAGroup     IRMAGroup;
  24. typedef _INTERFACE   IRMAGroupManager     IRMAGroupManager;
  25. typedef _INTERFACE   IRMAGroupSink     IRMAGroupSink;
  26. typedef _INTERFACE   IRMAValues     IRMAValues;
  27. /****************************************************************************
  28.  * 
  29.  *  Interface:
  30.  * 
  31.  *  IRMAGroup
  32.  * 
  33.  *  Purpose:
  34.  * 
  35.  * 
  36.  *  IID_IRMAGroup:
  37.  * 
  38.  *  {0x00002400-0901-11d1-8B06-00A024406D59}
  39.  * 
  40.  */
  41. DEFINE_GUID(IID_IRMAGroup, 0x00002400, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  42.             0xa0, 0x24, 0x40, 0x6d, 0x59);
  43. #undef  INTERFACE
  44. #define INTERFACE   IRMAGroup
  45. DECLARE_INTERFACE_(IRMAGroup, IUnknown)
  46. {
  47.     /*
  48.      *  IUnknown methods
  49.      */
  50.     STDMETHOD(QueryInterface)       (THIS_
  51.                     REFIID riid,
  52.                     void** ppvObj) PURE;
  53.     STDMETHOD_(ULONG,AddRef)      (THIS) PURE;
  54.     STDMETHOD_(ULONG,Release)     (THIS) PURE;
  55.     /*
  56.      *  IRMAGroup methods
  57.      */
  58.     /************************************************************************
  59.     *  Method:
  60.     *      IRMAGroup::SetGroupProperties
  61.     *  Purpose:
  62.     * Set any group specific information like Title Author 
  63.     * Copyright etc. 
  64.     */
  65.     STDMETHOD(SetGroupProperties)   (THIS_
  66.      IRMAValues*  /*IN*/ pProperties) PURE;
  67.     /************************************************************************
  68.     *  Method:
  69.     *      IRMAGroup::GetGroupProperties
  70.     *  Purpose:
  71.     * Get any group specific information. May return NULL.
  72.     */
  73.     STDMETHOD_(IRMAValues*, GetGroupProperties)   (THIS) PURE;
  74.     /************************************************************************
  75.     *  Method:
  76.     *      IRMAGroup::GetTrackCount
  77.     *  Purpose:
  78.     * Get the number of tracks within this group.
  79.     */
  80.     STDMETHOD_(UINT16,GetTrackCount)    (THIS) PURE;
  81.     /************************************************************************
  82.     *  Method:
  83.     *      IRMAGroup::GetTrack
  84.     *  Purpose:
  85.     * Get ith track in this group
  86.     */
  87.     STDMETHOD(GetTrack) (THIS_
  88. UINT16      /*IN*/ uTrackIndex,
  89. REF(IRMAValues*)  /*OUT*/ pTrack) PURE;
  90.     /************************************************************************
  91.     *  Method:
  92.     *      IRMAGroup::AddTrack
  93.     *  Purpose:
  94.     * Add Tracks to the group.
  95.     */
  96.     STDMETHOD(AddTrack) (THIS_
  97. IRMAValues* /*IN*/ pTrack) PURE;
  98.     /************************************************************************
  99.     *  Method:
  100.     *      IRMAGroup::RemoveTrack
  101.     *  Purpose:
  102.     * Remove an already added track
  103.     */
  104.     STDMETHOD(RemoveTrack)  (THIS_
  105.     UINT16 /*IN*/ uTrackIndex) PURE;
  106. };
  107. /****************************************************************************
  108.  * 
  109.  *  Interface:
  110.  * 
  111.  *  IRMAGroupManager
  112.  * 
  113.  *  Purpose:
  114.  * 
  115.  * 
  116.  *  IID_IRMAGroupManager:
  117.  * 
  118.  *  {0x00002401-0901-11d1-8B06-00A024406D59}
  119.  * 
  120.  */
  121. DEFINE_GUID(IID_IRMAGroupManager, 0x00002401, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  122.             0xa0, 0x24, 0x40, 0x6d, 0x59);
  123. #undef  INTERFACE
  124. #define INTERFACE   IRMAGroupManager
  125. DECLARE_INTERFACE_(IRMAGroupManager, IUnknown)
  126. {
  127.     /*
  128.      *  IUnknown methods
  129.      */
  130.     STDMETHOD(QueryInterface)       (THIS_
  131.                     REFIID riid,
  132.                     void** ppvObj) PURE;
  133.     STDMETHOD_(ULONG,AddRef)      (THIS) PURE;
  134.     STDMETHOD_(ULONG,Release)     (THIS) PURE;
  135.     /*
  136.      *  IRMAGroupManager methods
  137.      */
  138.     /************************************************************************
  139.     *  Method:
  140.     *      IRMAGroupManager::CreateGroup
  141.     *  Purpose:
  142.     * Create a group
  143.     */
  144.     STDMETHOD(CreateGroup)    (REF(IRMAGroup*) pGroup) PURE;
  145.     /************************************************************************
  146.     *  Method:
  147.     *      IRMAGroupManager::GetGroupCount
  148.     *  Purpose:
  149.     * Get the number of groups within the presentation.
  150.     */
  151.     STDMETHOD_(UINT16,GetGroupCount)    (THIS) PURE;
  152.     /************************************************************************
  153.     *  Method:
  154.     *      IRMAGroupManager::GetGroup
  155.     *  Purpose:
  156.     * Get ith group in the presentation
  157.     */
  158.     STDMETHOD(GetGroup) (THIS_
  159. UINT16    /*IN*/  uGroupIndex,
  160. REF(IRMAGroup*)  /*OUT*/ pGroup) PURE;
  161.     /************************************************************************
  162.     *  Method:
  163.     *      IRMAGroupManager::SetCurrentGroup
  164.     *  Purpose:
  165.     * Play this group in the presentation.
  166.     */
  167.     STDMETHOD(SetCurrentGroup) (THIS_
  168. UINT16      /*IN*/ uGroupIndex) PURE;
  169.     /************************************************************************
  170.     *  Method:
  171.     *      IRMAGroupMgr::GetCurrentGroup
  172.     *  Purpose:
  173.     * Get the current group index
  174.     */
  175.     STDMETHOD(GetCurrentGroup) (THIS_
  176. REF(UINT16) /*OUT*/ uGroupIndex) PURE;
  177.     /************************************************************************
  178.     *  Method:
  179.     *      IRMAGroupManager::AddGroup
  180.     *  Purpose:
  181.     * Add a group to the presentation.
  182.     */
  183.     STDMETHOD(AddGroup) (THIS_
  184. IRMAGroup*     /*IN*/ pGroup) PURE;
  185.     /************************************************************************
  186.     *  Method:
  187.     *      IRMAGroupManager::RemoveGroup
  188.     *  Purpose:
  189.     * Remove an already added group
  190.     */
  191.     STDMETHOD(RemoveGroup)  (THIS_
  192.     UINT16  /*IN*/ uGroupIndex) PURE;
  193.     /************************************************************************
  194.     *  Method:
  195.     *      IRMAGroupManager::AddSink
  196.     *  Purpose:
  197.     * Add a sink to get notifications about any tracks or groups
  198.     * being added to the presentation.
  199.     */
  200.     STDMETHOD(AddSink) (THIS_
  201. IRMAGroupSink* /*IN*/ pGroupSink) PURE;
  202.     /************************************************************************
  203.     *  Method:
  204.     *      IRMAGroupManager::RemoveSink
  205.     *  Purpose:
  206.     * Remove Sink
  207.     */
  208.     STDMETHOD(RemoveSink)   (THIS_
  209.     IRMAGroupSink* /*IN*/ pGroupSink) PURE;
  210.     /************************************************************************
  211.     *  Method:
  212.     *      IRMAGroup::GetPresentationProperties
  213.     *  Purpose:
  214.     * Get any presentation information. May return NULL.
  215.     */
  216.     STDMETHOD_(IRMAValues*, GetPresentationProperties)   (THIS) PURE;
  217.     /************************************************************************
  218.     *  Method:
  219.     *      IRMAGroup::SetPresentationProperties
  220.     *  Purpose:
  221.     * Set any presentation information like Title Author 
  222.     * Copyright etc. 
  223.     */
  224.     STDMETHOD(SetPresentationProperties)   (THIS_
  225.     IRMAValues*  /*IN*/ pProperties) PURE;
  226.    
  227. };
  228. /****************************************************************************
  229.  * 
  230.  *  Interface:
  231.  * 
  232.  *  IRMAGroupSink
  233.  * 
  234.  *  Purpose:
  235.  * 
  236.  * 
  237.  *  IID_IRMAGroupSink:
  238.  * 
  239.  *  {0x00002402-0901-11d1-8B06-00A024406D59}
  240.  * 
  241.  */
  242. DEFINE_GUID(IID_IRMAGroupSink, 0x00002402, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 
  243.             0xa0, 0x24, 0x40, 0x6d, 0x59);
  244. #undef  INTERFACE
  245. #define INTERFACE   IRMAGroupSink
  246. DECLARE_INTERFACE_(IRMAGroupSink, IUnknown)
  247. {
  248.     /*
  249.      *  IUnknown methods
  250.      */
  251.     STDMETHOD(QueryInterface)       (THIS_
  252.                     REFIID riid,
  253.                     void** ppvObj) PURE;
  254.     STDMETHOD_(ULONG,AddRef)      (THIS) PURE;
  255.     STDMETHOD_(ULONG,Release)     (THIS) PURE;
  256.     /*
  257.      *  IRMAGroupSink methods
  258.      */
  259.     /************************************************************************
  260.     *  Method:
  261.     *      IRMAGroupSink::GroupAdded
  262.     *  Purpose:
  263.     * Notification of a new group being added to the presentation.
  264.     */
  265.     STDMETHOD(GroupAdded)    (THIS_
  266.     UINT16      /*IN*/ uGroupIndex,
  267.     IRMAGroup*     /*IN*/ pGroup) PURE;
  268.     /************************************************************************
  269.     *  Method:
  270.     *      IRMAGroupSink::GroupRemoved
  271.     *  Purpose:
  272.     * Notification of a group being removed from the presentation.
  273.     */
  274.     STDMETHOD(GroupRemoved)    (THIS_
  275. UINT16      /*IN*/ uGroupIndex,
  276. IRMAGroup*  /*IN*/ pGroup) PURE;
  277.     /************************************************************************
  278.     *  Method:
  279.     *      IRMAGroupSink::AllGroupsRemoved
  280.     *  Purpose:
  281.     * Notification that all groups have been removed from the 
  282.     * current presentation.
  283.     */
  284.     STDMETHOD(AllGroupsRemoved)  (THIS) PURE;
  285.     /************************************************************************
  286.     *  Method:
  287.     *      IRMAGroupSink::TrackAdded
  288.     *  Purpose:
  289.     * Notification of a new track being added to a group.
  290.     */
  291.     STDMETHOD(TrackAdded)  (THIS_
  292.     UINT16      /*IN*/ uGroupIndex,
  293.     UINT16      /*IN*/ uTrackIndex,
  294.     IRMAValues*     /*IN*/ pTrack) PURE;
  295.     /************************************************************************
  296.     *  Method:
  297.     *      IRMAGroupSink::TrackRemoved
  298.     *  Purpose:
  299.     * Notification of a track being removed from a group.
  300.     */
  301.     STDMETHOD(TrackRemoved)    (THIS_
  302. UINT16  /*IN*/ uGroupIndex,
  303. UINT16  /*IN*/ uTrackIndex,
  304. IRMAValues* /*IN*/ pTrack) PURE;
  305.     /************************************************************************
  306.     *  Method:
  307.     *      IRMAGroupSink::TrackStarted
  308.     *  Purpose:
  309.     * Notification of a track being started (to get duration, for
  310.     * instance...)
  311.     */
  312.     STDMETHOD(TrackStarted) (THIS_
  313. UINT16     /*IN*/ uGroupIndex,
  314. UINT16     /*IN*/ uTrackIndex,
  315. IRMAValues* /*IN*/ pTrack) PURE;
  316.     /************************************************************************
  317.     *  Method:
  318.     *      IRMAGroupSink::TrackStopped
  319.     *  Purpose:
  320.     * Notification of a track being stopped
  321.     *
  322.     */
  323.     STDMETHOD(TrackStopped) (THIS_
  324. UINT16     /*IN*/ uGroupIndex,
  325. UINT16     /*IN*/ uTrackIndex,
  326. IRMAValues* /*IN*/ pTrack) PURE;
  327.     /************************************************************************
  328.     *  Method:
  329.     *      IRMAGroupSink::CurrentGroupSet
  330.     *  Purpose:
  331.     * This group is being currently played in the presentation.
  332.     */
  333.     STDMETHOD(CurrentGroupSet) (THIS_
  334. UINT16      /*IN*/ uGroupIndex,
  335. IRMAGroup*  /*IN*/ pGroup) PURE;
  336. };
  337. #endif /*_IRMAGROUP_H_*/