matroska_ebml.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*****************************************************************************
  2. * matroska_ebml.h: matroska muxer utilities
  3. *****************************************************************************
  4. * Copyright (C) 2005-2018 x264 project
  5. *
  6. * Authors: Mike Matsnev <mike@haali.su>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.
  21. *
  22. * This program is also available under a commercial proprietary license.
  23. * For more information, contact us at licensing@x264.com.
  24. *****************************************************************************/
  25. #ifndef X264_MATROSKA_EBML_H
  26. #define X264_MATROSKA_EBML_H
  27. /* Matroska display size units from the spec */
  28. #define DS_PIXELS 0
  29. #define DS_CM 1
  30. #define DS_INCHES 2
  31. #define DS_ASPECT_RATIO 3
  32. typedef struct mk_writer mk_writer;
  33. mk_writer *mk_create_writer( const char *filename );
  34. int mk_write_header( mk_writer *w, const char *writing_app,
  35. const char *codec_id,
  36. const void *codec_private, unsigned codec_private_size,
  37. int64_t default_frame_duration,
  38. int64_t timescale,
  39. unsigned width, unsigned height,
  40. unsigned d_width, unsigned d_height, int display_size_units, int stereo_mode );
  41. int mk_start_frame( mk_writer *w );
  42. int mk_add_frame_data( mk_writer *w, const void *data, unsigned size );
  43. int mk_set_frame_flags( mk_writer *w, int64_t timestamp, int keyframe, int skippable );
  44. int mk_close( mk_writer *w, int64_t last_delta );
  45. #endif