clone_stream.h 769 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (c) 2018 Actions Semiconductor Co., Ltd
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. /**
  7. * @file clone stream interface
  8. */
  9. #ifndef __CLONE_STREAM_H__
  10. #define __CLONE_STREAM_H__
  11. #include <stream.h>
  12. /**
  13. * @defgroup clone_stream_apis Clone Stream APIs
  14. * @ingroup stream_apis
  15. * @{
  16. /** structure of clone stream info,
  17. * used to pass parama to clone stream
  18. */
  19. struct clone_stream_info {
  20. /* stream to be cloned */
  21. io_stream_t origin;
  22. /* clone direction (MODE_IN, MODE_OUT) : origin stream data read or write */
  23. int clone_mode;
  24. /* stream array that will be cloned to */
  25. io_stream_t clones[1];
  26. };
  27. io_stream_t clone_stream_create(struct clone_stream_info *info);
  28. /**
  29. * @} end defgroup clone_stream_apis
  30. */
  31. #endif /* __CLONE_STREAM_H__ */