static void get_format(bgav_stream_t * s)
  {
  SchroVideoFormat * format;
  schroedinger_priv_t* priv;
  priv = s->decoder_priv;
  
  format = schro_decoder_get_video_format(priv->dec);

  /* Get colormodel */
  s->data.video.format.pixelformat = get_pixelformat(format);

  /* Get size */
  s->data.video.format.image_width = format->width;
  s->data.video.format.image_height = format->height;

  s->data.video.format.frame_width = format->width;
  s->data.video.format.frame_height = format->height;
  
#if 0
  if((vtrack->stream_cmodel == BC_YUV422P16) ||
     (vtrack->stream_cmodel == BC_YUV444P16))
    {
    
    }
  else
    codec->dec_copy_frame = copy_frame_8;
#endif
  
  priv->frame_format = get_frame_format(format);
  
  /* Get interlace mode */
  if(format->interlaced)
    {
    if(format->top_field_first)
      s->data.video.format.interlace_mode = GAVL_INTERLACE_TOP_FIRST;
    else
      s->data.video.format.interlace_mode = GAVL_INTERLACE_BOTTOM_FIRST;
    }
  else
    s->data.video.format.interlace_mode = GAVL_INTERLACE_NONE;
  
  /* Get pixel aspect */
  s->data.video.format.pixel_width = 
    format->aspect_ratio_numerator;
  s->data.video.format.pixel_height = 
    format->aspect_ratio_denominator;

  /* Get frame rate */
  if(!s->data.video.format.timescale)
    {
    s->data.video.format.timescale = format->frame_rate_numerator;
    s->data.video.format.frame_duration = format->frame_rate_denominator;;
    }
  
  free(format);
  
  }
Exemple #2
0
rs_format rs_get_detached_frame_format(const rs_frame_ref * frame_ref, rs_error ** error) try
{
    VALIDATE_NOT_NULL(frame_ref);
    return frame_ref->get_frame_format();
}