Image caption Gilmour has been bailed so he can finish his university exams

Charlie Gilmour, son of Pink Floyd guitarist David Gilmour, has pleaded guilty to a charge of violent disorder at a student fees protest in London.

Gilmour, 21, was charged with throwing a bin at a convoy of cars containing Prince Charles, sitting on a protection officer's car and smashing a window.

The Cambridge University student, of Billinghurst, West Sussex, has not specified which charges he admits.

He was told he could face jail but was bailed so he could finish his exams.

The prince and Duchess of Cornwall were travelling to the Royal Variety show at the London Palladium on 9 December when their three-car convoy was attacked.

Gilmour entered a non-specific guilty plea during a hearing at Kingston Crown Court.

'Moment of idiocy'

The bin thrown at the royal convoy missed the royal couple's vehicle but hit another car, the court heard.

Gilmour was also accused of smashing a window at a high street store.

Judge Nicholas Price QC told him: "The fact that I am granting you bail is of no indication whatsoever that you will be dealt with in a non-custodial way.

Image caption The royal couple's car was not hit by the bin

"You must understand that your plea of guilty to violent disorder is a serious matter and it may be that the proper course would be one of immediate custody."

Gilmour, who is banned from the City of Westminster as part of his bail conditions, is due to sit his final exams for a history degree at Girton College in June.

He was among thousands of people who protested in Trafalgar Square and Parliament Square and was photographed hanging from a union flag on the Cenotaph during the march.

Gilmour issued an apology the day after the demonstrations, describing it as a "moment of idiocy", and adding that he did not realise the Whitehall monument commemorated Britain's war dead.

Commander Bob Broadhurst, of the Metropolitan Police, said: "We will not tolerate this kind of behaviour and anyone who thinks they can get away with causing disorder and damage on the streets of our capital should think again."

Gilmour's biological father is poet and playwright Heathcote Williams but he was adopted by the rock star when his mother, writer and journalist Polly Samson, remarried.

Gilmour was bailed until 8 July when he is due to be sentenced.