Last week I promised that GMyth would handle all that stuff from MythTV’s remote transcoding and here it is.
The last version from svn is already able to request (start/stop) the transcode of videos that were recorded through MythTV. It’s also possible to create/delete and list myth’s transcoding profiles. I also modified some structure’s members from GString* type to gchar* type following Gustavo Barbieri’s suggestion.
In order to be able to use this profiles features you need to apply another patch that I’ve submitted for MythTV’s developers. Using this last patch with the one that I mentioned on a post below, you can use all this GMyth’s transcoding features. Here I show the basic steps for setting up and using a transcode object and listing/creating a profile:
- GSList* profiles = gmyth_http_retrieve_rec_profiles(backend_info, “Transcoders”);
- GMythRecProfile* prof = profiles->data;
- int test = gmyth_http_del_rec_profile(backend_info, prof->id);
- GMythRecProfile* profile = gmyth_recprofile_new();
- gmyth_recprofile_set_name(profile,”Teste”);
- gmyth_recprofile_set_group(profile,”Transcoders”);
- gmyth_recprofile_set_vcodec(profile,”MPEG-4″);
- gmyth_recprofile_set_acodec(profile,”MP3″);
- test = gmyth_http_create_rec_profile(backend_info, profile);
- GMythTranscode* transcode = gmyth_transcode_new();
- transcode->backend_info = backend_info;
- transcode->cutlist = TRUE;
- gmyth_transcode_set_profile (transcode, “N800”);
- gmyth_transcode_set_filename (transcode, “1000_20061207123000.nuv”);
- int test = gmyth_jobqueue_add_job(transcode, “JOB_TRANSCODE”);
- test = gmyth_jobqueue_change_cmd(transcode, “STOP”, “JOB_TRANSCODE”);
We are also changing a lot of SQL queries inside GMyth for HTTP+XML requests. I think we are almost there 😉