mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	fix formats
This commit is contained in:
		
							parent
							
								
									7ef4fea2f2
								
							
						
					
					
						commit
						e864836300
					
				
					 2 changed files with 6 additions and 5 deletions
				
			
		| 
						 | 
					@ -615,7 +615,7 @@ handle_id_prop (SpaPODProp *prop, const char *key, GstCaps *res)
 | 
				
			||||||
  if (!(flags & SPA_POD_PROP_FLAG_UNSET))
 | 
					  if (!(flags & SPA_POD_PROP_FLAG_UNSET))
 | 
				
			||||||
    flags &= ~SPA_POD_PROP_RANGE_MASK;
 | 
					    flags &= ~SPA_POD_PROP_RANGE_MASK;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  switch (flags) {
 | 
					  switch (flags & SPA_POD_PROP_RANGE_MASK) {
 | 
				
			||||||
    case SPA_POD_PROP_RANGE_NONE:
 | 
					    case SPA_POD_PROP_RANGE_NONE:
 | 
				
			||||||
      if (!(str = spa_type_map_get_type (type.map, id[0])))
 | 
					      if (!(str = spa_type_map_get_type (type.map, id[0])))
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
| 
						 | 
					@ -654,7 +654,7 @@ handle_int_prop (SpaPODProp *prop, const char *key, GstCaps *res)
 | 
				
			||||||
  if (!(flags & SPA_POD_PROP_FLAG_UNSET))
 | 
					  if (!(flags & SPA_POD_PROP_FLAG_UNSET))
 | 
				
			||||||
    flags &= ~SPA_POD_PROP_RANGE_MASK;
 | 
					    flags &= ~SPA_POD_PROP_RANGE_MASK;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  switch (flags) {
 | 
					  switch (flags & SPA_POD_PROP_RANGE_MASK) {
 | 
				
			||||||
    case SPA_POD_PROP_RANGE_NONE:
 | 
					    case SPA_POD_PROP_RANGE_NONE:
 | 
				
			||||||
      gst_caps_set_simple (res, key, G_TYPE_INT, val[0], NULL);
 | 
					      gst_caps_set_simple (res, key, G_TYPE_INT, val[0], NULL);
 | 
				
			||||||
      break;
 | 
					      break;
 | 
				
			||||||
| 
						 | 
					@ -696,7 +696,7 @@ handle_rect_prop (SpaPODProp *prop, const char *width, const char *height, GstCa
 | 
				
			||||||
  if (!(flags & SPA_POD_PROP_FLAG_UNSET))
 | 
					  if (!(flags & SPA_POD_PROP_FLAG_UNSET))
 | 
				
			||||||
    flags &= ~SPA_POD_PROP_RANGE_MASK;
 | 
					    flags &= ~SPA_POD_PROP_RANGE_MASK;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  switch (flags) {
 | 
					  switch (flags & SPA_POD_PROP_RANGE_MASK) {
 | 
				
			||||||
    case SPA_POD_PROP_RANGE_NONE:
 | 
					    case SPA_POD_PROP_RANGE_NONE:
 | 
				
			||||||
      gst_caps_set_simple (res, width, G_TYPE_INT, rect[0].width,
 | 
					      gst_caps_set_simple (res, width, G_TYPE_INT, rect[0].width,
 | 
				
			||||||
                                height, G_TYPE_INT, rect[0].height, NULL);
 | 
					                                height, G_TYPE_INT, rect[0].height, NULL);
 | 
				
			||||||
| 
						 | 
					@ -747,7 +747,7 @@ handle_fraction_prop (SpaPODProp *prop, const char *key, GstCaps *res)
 | 
				
			||||||
  if (!(flags & SPA_POD_PROP_FLAG_UNSET))
 | 
					  if (!(flags & SPA_POD_PROP_FLAG_UNSET))
 | 
				
			||||||
    flags &= ~SPA_POD_PROP_RANGE_MASK;
 | 
					    flags &= ~SPA_POD_PROP_RANGE_MASK;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  switch (flags) {
 | 
					  switch (flags & SPA_POD_PROP_RANGE_MASK) {
 | 
				
			||||||
    case SPA_POD_PROP_RANGE_NONE:
 | 
					    case SPA_POD_PROP_RANGE_NONE:
 | 
				
			||||||
      gst_caps_set_simple (res, key, GST_TYPE_FRACTION, fract[0].num, fract[0].denom, NULL);
 | 
					      gst_caps_set_simple (res, key, GST_TYPE_FRACTION, fract[0].num, fract[0].denom, NULL);
 | 
				
			||||||
      break;
 | 
					      break;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -513,7 +513,7 @@ spa_v4l2_enum_format (SpaV4l2Source   *this,
 | 
				
			||||||
  const FormatInfo *info;
 | 
					  const FormatInfo *info;
 | 
				
			||||||
  SpaPODFrame f[2];
 | 
					  SpaPODFrame f[2];
 | 
				
			||||||
  SpaPODProp *prop;
 | 
					  SpaPODProp *prop;
 | 
				
			||||||
  SpaPODBuilder b = { state->format_buffer, sizeof (state->format_buffer), };
 | 
					  SpaPODBuilder b = { NULL, };
 | 
				
			||||||
  uint32_t media_type, media_subtype, video_format;
 | 
					  uint32_t media_type, media_subtype, video_format;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (spa_v4l2_open (this) < 0)
 | 
					  if (spa_v4l2_open (this) < 0)
 | 
				
			||||||
| 
						 | 
					@ -663,6 +663,7 @@ have_size:
 | 
				
			||||||
  media_subtype = *SPA_MEMBER (&this->type, info->media_subtype_offset, uint32_t);
 | 
					  media_subtype = *SPA_MEMBER (&this->type, info->media_subtype_offset, uint32_t);
 | 
				
			||||||
  video_format = *SPA_MEMBER (&this->type, info->format_offset, uint32_t);
 | 
					  video_format = *SPA_MEMBER (&this->type, info->format_offset, uint32_t);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  spa_pod_builder_init (&b, state->format_buffer, sizeof (state->format_buffer));
 | 
				
			||||||
  spa_pod_builder_push_format (&b, &f[0], this->type.format,
 | 
					  spa_pod_builder_push_format (&b, &f[0], this->type.format,
 | 
				
			||||||
                               media_type,
 | 
					                               media_type,
 | 
				
			||||||
                               media_subtype);
 | 
					                               media_subtype);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue