some question about snapshot

This forum is about all development around libVLC.
robertzh
New Cone
New Cone
Posts: 2
Joined: 18 Mar 2015 00:39

some question about snapshot

Postby robertzh » 19 Mar 2015 08:38

1.hi, guys,i use parameter as following:
vlc_argv[vlc_argc++] = "--snapshot-format=jpg";

but i get the file is also png format, the first 4 bytes is 89,50,4e 47, it means 'PNG'
2.another question is can vlc snapshot to memory buffer, not to file?
because i want to process it latter, if save to file, i need read from file;

xuanvuongspkt
New Cone
New Cone
Posts: 5
Joined: 05 Jul 2015 10:52

Re: some question about snapshot

Postby xuanvuongspkt » 01 Aug 2015 09:43

Hi, are you have a answer for your problem ? Can you share it to me
Thanks !!!

jocomau
New Cone
New Cone
Posts: 6
Joined: 31 Jul 2015 11:28

Re: some question about snapshot

Postby jocomau » 03 Aug 2015 12:51

The code for libvlc_video_take_snapshot on 2.0.7 was:
int
libvlc_video_take_snapshot( libvlc_media_player_t *p_mi, unsigned num,
const char *psz_filepath,
unsigned int i_width, unsigned int i_height )
{
assert( psz_filepath );

vout_thread_t *p_vout = GetVout (p_mi, num);
if (p_vout == NULL)
return -1;

/* FIXME: This is not atomic. Someone else could change the values,
* at least in theory. */
var_SetInteger( p_vout, "snapshot-width", i_width);
var_SetInteger( p_vout, "snapshot-height", i_height );
var_SetString( p_vout, "snapshot-path", psz_filepath );
var_SetString( p_vout, "snapshot-format", "png" );
var_TriggerCallback( p_vout, "video-snapshot" );
vlc_object_release( p_vout );
return 0;
}
So it was forced every time png format, I don't know on more recent versions


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 30 guests