gstdspvdec.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * Copyright (C) 2009-2010 Felipe Contreras
  3. *
  4. * Author: Felipe Contreras <felipe.contreras@gmail.com>
  5. *
  6. * This file may be used under the terms of the GNU Lesser General Public
  7. * License version 2.1, a copy of which is found in LICENSE included in the
  8. * packaging of this file.
  9. */
  10. #ifndef GST_DSP_VDEC_H
  11. #define GST_DSP_VDEC_H
  12. #include <gst/gst.h>
  13. G_BEGIN_DECLS
  14. #define GST_DSP_VDEC(obj) (GstDspVDec *)(obj)
  15. #define GST_DSP_VDEC_TYPE (gst_dsp_vdec_get_type())
  16. #define GST_DSP_VDEC_CLASS(obj) (GstDspVDecClass *)(obj)
  17. #define GST_IS_DSP_VDEC(obj) \
  18. (G_TYPE_CHECK_INSTANCE_TYPE((obj), gst_dsp_vdec_get_type()))
  19. typedef struct _GstDspVDec GstDspVDec;
  20. typedef struct _GstDspVDecClass GstDspVDecClass;
  21. #include "gstdspbase.h"
  22. enum {
  23. GSTDSP_MPEG4VDEC,
  24. GSTDSP_H264DEC,
  25. GSTDSP_H263DEC,
  26. GSTDSP_WMVDEC,
  27. GSTDSP_JPEGDEC,
  28. GSTDSP_HDMPEG4VDEC,
  29. GSTDSP_HDH264VDEC,
  30. };
  31. union vdec_priv_data {
  32. struct {
  33. gint lol;
  34. gboolean is_avc;
  35. gint hd_h264_streamtype;
  36. guint32 ref_frames;
  37. guint32 initial_height;
  38. unsigned poc_type;
  39. } h264;
  40. struct {
  41. gboolean is_divx;
  42. } mpeg4;
  43. };
  44. struct _GstDspVDec {
  45. GstDspBase element;
  46. gint width, height;
  47. gint crop_width, crop_height;
  48. gint frame_index;
  49. gboolean wmv_is_vc1;
  50. gboolean jpeg_is_interlaced;
  51. gboolean codec_data_sent;
  52. guint32 color_format;
  53. gint mode;
  54. int profile;
  55. union vdec_priv_data priv;
  56. };
  57. struct _GstDspVDecClass {
  58. GstDspBaseClass parent_class;
  59. };
  60. void gstdsp_vdec_len_fixup(GstDspVDec *self, dmm_buffer_t *b);
  61. GType gst_dsp_vdec_get_type(void);
  62. G_END_DECLS
  63. #endif /* GST_DSP_VDEC_H */