
Recherche avancée
Médias (2)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (35)
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;
Sur d’autres sites (4681)
-
Dreamcast Development Desktop
28 mars 2011, par Multimedia Mike — Sega DreamcastSome people are curious about what kind of equipment is required to program a Sega Dreamcast. This is my setup :
It’s a bit overcomplicated. The only piece in that picture which doesn’t play a role in the Dreamcast development process is the scanner. The Eee PC does the heavy lifting of development (i.e., text editing and cross compilation) and uploads to the Dreamcast via a special serial cable. Those are the most essential parts and are really the only pieces necessary for a lot of algorithmic stuff (things that can be validated via a serial console). But then I have to go up a level where I output video. That’s where things get messy.
The Mac Mini and giant monitor really just act as a glorified TV in this case. Ideally, it will be more than that. The DC outputs audio and video via composite cables to a Canopus DV capture bridge. That’s connected via FireWire to the external hard drive underneath the Mac Mini, which is connected to the Mac. Adobe Premiere Pro handles the DV capture / display.
One day I hope to have something worthwhile to capture.
-
Go / Cgo - How to access a field of a Cstruct ?
17 août 2021, par ChrisGI develope an application in Go for transcode an audio file from one format to another one :


I use the goav library that use Cgo to bind the FFmpeg C-libs :
https://github.com/giorgisio/goav/



The goav library ;
package avformat
has a typedef that cast the original FFmpeg lib C-Struct AVOutputFormat :

type ( 
 OutputFormat C.struct_AVOutputFormat
)



In my code i have a variable called
outputF
of the typeOutputFormat
that is aC.struct_AVOutputFormat
.

The
C
realAVOutputFormat
struct has fields :

name, long_name, mime_type, extensions, audio_codec, video_codec, subtitle_codec,..



and many fields more.


See : https://ffmpeg.org/doxygen/2.6/structAVOutputFormat.html



I verified the situation by
fmt.Println(outputF)
and reached :

{0x7ffff7f23383 0x7ffff7f23907 0x7ffff7f13c33 0x7ffff7f23383 86017 61 0 128 <nil> 0x7ffff7f8cfa0 <nil> 3344 0x7ffff7e3ec10 0x7ffff7e3f410 0x7ffff7e3ecc0 <nil> 0x7ffff7e3dfc0 <nil> <nil> <nil> <nil> <nil> <nil> 0 0x7ffff7e3e070 0x7ffff7e3e020 <nil>}
</nil></nil></nil></nil></nil></nil></nil></nil></nil></nil>


The audio codec field is on position
5
and contains86017


I verified the field name by using the package
reflect
:

val := reflect.Indirect(reflect.ValueOf(outputF))
fmt.Println(val)
fmt.Println("Fieldname: ", val.Type().Field(4).Name)

Output:
Fieldname: audio_codec




I try to access the field
audio_codec
of the originalAVOutputFormat
using :

fmt.Println(outputF.audio_codec)
ERROR: outputF.audio_codec undefined (cannot refer to unexported field or method audio_codec)


fmt.Println(outputF._audio_codec)
ERROR: outputF._audio_codec undefined (type *avformat.OutputFormat has no field or method _audio_codec)





As i read in the Cgo documentation :
Within the Go file, C's struct field names that are keywords in Go can be accessed by prefixing them with an underscore : if x points at a C struct with a field named "type", x._type accesses the field. C struct fields that cannot be expressed in Go, such as bit fields or misaligned data, are omitted in the Go struct, replaced by appropriate padding to reach the next field or the end of the struct.




But I have no idea what im doing wrong.


Edit :
Okay for sure no underscore is required as audio_codec is not a keyword in Go. This i understood for now. But still there is the question why im not able to access the CStruct field "audio_codec".


-
Go / Cgo - How to access a field of a Cstruct - could not make it
15 août 2021, par ChrisGI develope an application in Go for transcode an audio file from one format to another one :


I use the goav library that use Cgo to bind the FFmpeg C-libs :
https://github.com/giorgisio/goav/



The goav library ;
package avformat
has a typedef that cast the original FFmpeg lib C-Struct AVOutputFormat :

type ( 
 OutputFormat C.struct_AVOutputFormat
)



In my code i have a variable called
outputF
of the typeOutputFormat
that is aC.struct_AVOutputFormat
.

The
C
realAVOutputFormat
struct has fields :

name, long_name, mime_type, extensions, audio_codec, video_codec, subtitle_codec,..



and many fields more.


See : https://ffmpeg.org/doxygen/2.6/structAVOutputFormat.html



I verified the situation by
fmt.Println(outputF)
and reached :

{0x7ffff7f23383 0x7ffff7f23907 0x7ffff7f13c33 0x7ffff7f23383 86017 61 0 128 <nil> 0x7ffff7f8cfa0 <nil> 3344 0x7ffff7e3ec10 0x7ffff7e3f410 0x7ffff7e3ecc0 <nil> 0x7ffff7e3dfc0 <nil> <nil> <nil> <nil> <nil> <nil> 0 0x7ffff7e3e070 0x7ffff7e3e020 <nil>}
</nil></nil></nil></nil></nil></nil></nil></nil></nil></nil>


The audio codec field is on position
5
and contains86017


I verified the field name by using the package
reflect
:

val := reflect.Indirect(reflect.ValueOf(outputF))
fmt.Println(val)
fmt.Println("Fieldname: ", val.Type().Field(4).Name)

Output:
Fieldname: audio_codec




I try to access the field
audio_codec
of the originalAVOutputFormat
using :

fmt.Println(outputF.audio_codec)
ERROR: outputF.audio_codec undefined (cannot refer to unexported field or method audio_codec)


fmt.Println(outputF._audio_codec)
ERROR: outputF._audio_codec undefined (type *avformat.OutputFormat has no field or method _audio_codec)





As i read in the Cgo documentation :
Within the Go file, C's struct field names that are keywords in Go can be accessed by prefixing them with an underscore : if x points at a C struct with a field named "type", x._type accesses the field. C struct fields that cannot be expressed in Go, such as bit fields or misaligned data, are omitted in the Go struct, replaced by appropriate padding to reach the next field or the end of the struct.




But I have no idea what im doing wrong.


Edit :
Okay for sure no underscore is required as audio_codec is not a keyword in Go. This i understood for now. But still there is the question why im not able to access the CStruct field "audio_codec".