| 1 | /*************************************************************************** |
|---|
| 2 | * Copyright (c) 2003-2009, Broadcom Corporation |
|---|
| 3 | * All Rights Reserved |
|---|
| 4 | * Confidential Property of Broadcom Corporation |
|---|
| 5 | * |
|---|
| 6 | * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE |
|---|
| 7 | * AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR |
|---|
| 8 | * EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. |
|---|
| 9 | * |
|---|
| 10 | * $brcm_Workfile: $ |
|---|
| 11 | * $brcm_Revision: $ |
|---|
| 12 | * $brcm_Date: $ |
|---|
| 13 | * |
|---|
| 14 | * Module Description: Video primer module for fast channel change support. |
|---|
| 15 | * |
|---|
| 16 | * Revision History: |
|---|
| 17 | * |
|---|
| 18 | * $brcm_Log: $ |
|---|
| 19 | * |
|---|
| 20 | * |
|---|
| 21 | ***************************************************************************/ |
|---|
| 22 | |
|---|
| 23 | #if !defined(__VPRIMER_H__) |
|---|
| 24 | #define __VPRIMER_H__ 1 |
|---|
| 25 | |
|---|
| 26 | #include "bxpt_rave.h" |
|---|
| 27 | /*************************************************************************** |
|---|
| 28 | Summary: VPrimer_Handle is a video primer handle |
|---|
| 29 | Description: Video primer handle is returned by open and used for all |
|---|
| 30 | subsequent operations on the primer. |
|---|
| 31 | SeeAlso: |
|---|
| 32 | None |
|---|
| 33 | ***************************************************************************/ |
|---|
| 34 | typedef struct VPrimer_t * VPrimer_Handle; |
|---|
| 35 | |
|---|
| 36 | /*************************************************************************** |
|---|
| 37 | Summary: Initialize internal primer data structures. |
|---|
| 38 | Description: Initialize internal primer data structures and allocate |
|---|
| 39 | all needed memory |
|---|
| 40 | Input: None |
|---|
| 41 | Output: None |
|---|
| 42 | Returns: BERR_SUCCESS if successful, error code otherwise |
|---|
| 43 | SeeAlso: |
|---|
| 44 | None |
|---|
| 45 | ***************************************************************************/ |
|---|
| 46 | BERR_Code vprimer_init(void); |
|---|
| 47 | |
|---|
| 48 | /*************************************************************************** |
|---|
| 49 | Summary: Open primer |
|---|
| 50 | Description: Open primer and prepare to spool video from rave context. |
|---|
| 51 | Input: None |
|---|
| 52 | Output: |
|---|
| 53 | primer - Primer handle to use in future operations |
|---|
| 54 | Returns: BERR_SUCCESS if successful, error code otherwise |
|---|
| 55 | SeeAlso: |
|---|
| 56 | None |
|---|
| 57 | ***************************************************************************/ |
|---|
| 58 | BERR_Code vprimer_open(VPrimer_Handle * primer); |
|---|
| 59 | |
|---|
| 60 | /*************************************************************************** |
|---|
| 61 | Summary: Close primer. |
|---|
| 62 | Description: Close primer, stop spooling and discard any video data. |
|---|
| 63 | Input: |
|---|
| 64 | primer - Primer handle |
|---|
| 65 | Output: |
|---|
| 66 | None |
|---|
| 67 | Returns: BERR_SUCCESS if successful, error code otherwise |
|---|
| 68 | SeeAlso: |
|---|
| 69 | None |
|---|
| 70 | ***************************************************************************/ |
|---|
| 71 | BERR_Code vprimer_close(VPrimer_Handle primer); |
|---|
| 72 | |
|---|
| 73 | /*************************************************************************** |
|---|
| 74 | Summary: Attach primer to rave context |
|---|
| 75 | Description: Attach primer to rave context and start spooling data from |
|---|
| 76 | this context. No explicit start is required to start spooling data. |
|---|
| 77 | Input: |
|---|
| 78 | primer - primer handle to attach to rave context. |
|---|
| 79 | cx - rave context to attach to primer. |
|---|
| 80 | Output: |
|---|
| 81 | None |
|---|
| 82 | Returns: BERR_SUCCESS if successful, error code otherwise |
|---|
| 83 | SeeAlso: |
|---|
| 84 | None |
|---|
| 85 | ***************************************************************************/ |
|---|
| 86 | BERR_Code vprimer_attach(VPrimer_Handle primer, BXPT_RaveCx_Handle cx, uint8_t format); |
|---|
| 87 | |
|---|
| 88 | /*************************************************************************** |
|---|
| 89 | Summary: Detach primer from rave context |
|---|
| 90 | Description: Detach primer from rave context and stop spooling data. When |
|---|
| 91 | primer is detached context pointers left in consistent state. Rave |
|---|
| 92 | context can be given to the decoder which should be able to start decoding |
|---|
| 93 | using rave context pointers. |
|---|
| 94 | Input: |
|---|
| 95 | primer - primer to detach from. |
|---|
| 96 | cx - rave context to detach from primer. |
|---|
| 97 | Output: |
|---|
| 98 | None |
|---|
| 99 | Returns: BERR_SUCCESS if successful, error code otherwise. |
|---|
| 100 | SeeAlso: |
|---|
| 101 | None |
|---|
| 102 | ***************************************************************************/ |
|---|
| 103 | BERR_Code vprimer_detach(VPrimer_Handle primer, BXPT_RaveCx_Handle cx); |
|---|
| 104 | |
|---|
| 105 | /*************************************************************************** |
|---|
| 106 | Summary: Flush primer |
|---|
| 107 | Description: Flush primer and discard all data from rave context |
|---|
| 108 | Input: |
|---|
| 109 | primer - primer to flush. |
|---|
| 110 | cx - rave context to flush. |
|---|
| 111 | Output: |
|---|
| 112 | None |
|---|
| 113 | Returns: BERR_SUCCESS if successful, error code otherwise. |
|---|
| 114 | SeeAlso: |
|---|
| 115 | None |
|---|
| 116 | ***************************************************************************/ |
|---|
| 117 | BERR_Code vprimer_flush(VPrimer_Handle primer, BXPT_RaveCx_Handle cx); |
|---|
| 118 | |
|---|
| 119 | #endif /*__VPRIMER_H__*/ |
|---|