You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
2.0KB

  1. /*
  2. * "Real" compatible muxer and demuxer.
  3. * Copyright (c) 2000, 2001 Fabrice Bellard.
  4. *
  5. * This file is part of FFmpeg.
  6. *
  7. * FFmpeg is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * FFmpeg is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with FFmpeg; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. #ifndef RM_H
  22. #define RM_H
  23. #include "avformat.h"
  24. typedef struct {
  25. int nb_packets;
  26. int packet_total_size;
  27. int packet_max_size;
  28. /* codec related output */
  29. int bit_rate;
  30. float frame_rate;
  31. int nb_frames; /* current frame number */
  32. int total_frames; /* total number of frames */
  33. int num;
  34. AVCodecContext *enc;
  35. } StreamInfo;
  36. typedef struct {
  37. StreamInfo streams[2];
  38. StreamInfo *audio_stream, *video_stream;
  39. int data_pos; /* position of the data after the header */
  40. int nb_packets;
  41. int old_format;
  42. int current_stream;
  43. int remaining_len;
  44. /// Audio descrambling matrix parameters
  45. uint8_t *audiobuf; ///< place to store reordered audio data
  46. int64_t audiotimestamp; ///< Audio packet timestamp
  47. int sub_packet_cnt; // Subpacket counter, used while reading
  48. int sub_packet_size, sub_packet_h, coded_framesize; ///< Descrambling parameters from container
  49. int audio_stream_num; ///< Stream number for audio packets
  50. int audio_pkt_cnt; ///< Output packet counter
  51. int audio_framesize; /// Audio frame size from container
  52. int sub_packet_lengths[16]; /// Length of each aac subpacket
  53. } RMContext;
  54. #endif /* RM_H */